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

5
.gitignore vendored
View File

@ -148,4 +148,7 @@ dmypy.json
.pytype/ .pytype/
# Cython debug symbols # Cython debug symbols
cython_debug/ cython_debug/
# Smuggler results
payloads/*.txt

View File

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