Merge pull request #11 from dwisiswant0/ignore-payloads

Ignore payloads
This commit is contained in:
Evan 2020-06-30 08:20:54 -04:00 committed by GitHub
commit 7084d63497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

3
.gitignore vendored
View File

@ -149,3 +149,6 @@ dmypy.json
# Cython debug symbols
cython_debug/
# Smuggler results
payloads/*.txt

View File

@ -131,12 +131,7 @@ class Desyncr():
return
if (self._configfile[1] != '/'):
abspath = os.path.abspath(__file__)
if (os.path.islink(abspath)):
curpath = os.path.dirname(os.readlink(abspath))
else:
curpath = os.path.dirname(os.path.abspath(__file__))
self._configfile = curpath + "/configs/" + self._configfile
self._configfile = os.path.dirname(os.path.realpath(__file__)) + "/configs/" + self._configfile
try:
f = open(self._configfile)
@ -229,7 +224,7 @@ class Desyncr():
_me = os.readlink(sys.argv[0])
else:
_me = sys.argv[0]
fname = os.path.abspath(os.path.dirname(_me)) + "/payloads/%s_%s_%s.txt" % (furl,ptype,name)
fname = os.path.realpath(os.path.dirname(_me)) + "/payloads/%s_%s_%s.txt" % (furl,ptype,name)
pretty_print("CRITICAL", "%s Payload: %s URL: %s\n" % \
(Fore.MAGENTA+ptype, Fore.CYAN+fname+Fore.MAGENTA, Fore.CYAN+self._url))
with open(fname, 'wb') as file: