Skip to content

Commit

Permalink
change blockProg + txt
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCruciani committed Jun 1, 2021
1 parent 0e8ed6f commit a511bb3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
12 changes: 6 additions & 6 deletions bin/Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import subprocess
import pathlib
pathProg = pathlib.Path(__file__).parent.absolute()
s = ""
pathWork = ""
for i in re.split(r"/|\\", str(pathProg))[:-1]:
s += i + "/"
sys.path.append(s + "etc")
pathWork += i + "/"
sys.path.append(pathWork + "etc")
import allVariables
import OnLinux.get_Fls_Strings
import automatisation_yara
Expand All @@ -22,19 +22,19 @@ def runningVms():

def readFile():
f = open(str(pathProg) + "/tmp","r")
f1 = open(allVariables.blockProg, "r")
f1 = open(pathWork + "etc/blockProg.txt", "r")

l = f.readline().rstrip()
l1 = f1.readlines()

f.close()
f1.close()

listTmp = [l.split(":")[0],l.split(":")[1]]
listTmp = [l.split(":")[0],l.split(":")[1].rstrip("\n")]

for line in l1:
if line.split(":")[0] == listTmp[1]:
return [listTmp[0], line.split(":")[1]]
return [listTmp[0], line.split(":")[1].rstrip("\n")]
return listTmp

def create_rule(ext, hexa, product_version, l_app):
Expand Down
3 changes: 0 additions & 3 deletions etc/allVariables.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#Path to the list that contains software to install: "nameOfPackage":"nameOfExe"
applist = "tests/listapp.txt"

#Path to list of special software
blockProg = ""

#Settings for server flask
host = "0.0.0.0"
port = "5000"
Expand Down
2 changes: 2 additions & 0 deletions etc/blockProg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
7z:7zip
git-cmd:git

0 comments on commit a511bb3

Please sign in to comment.