Skip to content

Commit

Permalink
correct write
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCruciani committed May 20, 2021
1 parent 10b2c96 commit 28d4fd1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions bin/Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import datetime
import subprocess
import pathlib
p = pathlib.Path(__file__).parent.absolute()
pathProg = pathlib.Path(__file__).parent.absolute()
s = ""
for i in re.split(r"/|\\", str(p))[:-1]:
for i in re.split(r"/|\\", str(pathProg))[:-1]:
s += i + "/"
sys.path.append(s + "etc")
import allVariables
Expand All @@ -23,7 +23,7 @@ def runningVms():
return subprocess.run(req, capture_output=True)

def readFile():
f = open(os.path.dirname(sys.argv[0]) + "/tmp","r")
f = open(pathProg + "/tmp","r")
l = f.readline().rstrip()
f.close()
return l
Expand Down
1 change: 0 additions & 1 deletion bin/automatisation_yara.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import re
import string
import datetime
Expand Down
2 changes: 0 additions & 2 deletions bin/get_pe.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
s += i + "/"
sys.path.append(s + "etc")
import allVariables
sys.path.append(s + "etc")
import allVariables

def pe_yara(file_pe):
pe = pefile.PE(file_pe)
Expand Down
6 changes: 3 additions & 3 deletions bin/serveur.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import time
import flask
import pathlib
p = pathlib.Path(__file__).parent.absolute()
pathProg = pathlib.Path(__file__).parent.absolute()
s = ""
for i in re.split(r"/|\\", str(p))[:-1]:
for i in re.split(r"/|\\", str(pathProg))[:-1]:
s += i + "/"
sys.path.append(s + "etc")
import allVariables
Expand All @@ -32,7 +32,7 @@
#exit(0)

def WriteFileP(s, current):
f = open(os.path.dirname(sys.argv[0]) + "/tmp", "w")
f = open(pathProg + "/tmp", "w")
f.write(s + ":" + current)
f.close()

Expand Down

0 comments on commit 28d4fd1

Please sign in to comment.