Skip to content

Commit 7084d63

Browse files
authored
Merge pull request #11 from dwisiswant0/ignore-payloads
Ignore payloads
2 parents bdf9ccf + b11fa1e commit 7084d63

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,7 @@ dmypy.json
148148
.pytype/
149149

150150
# Cython debug symbols
151-
cython_debug/
151+
cython_debug/
152+
153+
# Smuggler results
154+
payloads/*.txt

smuggler.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,7 @@ def run(self):
131131
return
132132

133133
if (self._configfile[1] != '/'):
134-
abspath = os.path.abspath(__file__)
135-
if (os.path.islink(abspath)):
136-
curpath = os.path.dirname(os.readlink(abspath))
137-
else:
138-
curpath = os.path.dirname(os.path.abspath(__file__))
139-
self._configfile = curpath + "/configs/" + self._configfile
134+
self._configfile = os.path.dirname(os.path.realpath(__file__)) + "/configs/" + self._configfile
140135

141136
try:
142137
f = open(self._configfile)
@@ -229,7 +224,7 @@ def write_payload(smhost, payload, ptype):
229224
_me = os.readlink(sys.argv[0])
230225
else:
231226
_me = sys.argv[0]
232-
fname = os.path.abspath(os.path.dirname(_me)) + "/payloads/%s_%s_%s.txt" % (furl,ptype,name)
227+
fname = os.path.realpath(os.path.dirname(_me)) + "/payloads/%s_%s_%s.txt" % (furl,ptype,name)
233228
pretty_print("CRITICAL", "%s Payload: %s URL: %s\n" % \
234229
(Fore.MAGENTA+ptype, Fore.CYAN+fname+Fore.MAGENTA, Fore.CYAN+self._url))
235230
with open(fname, 'wb') as file:

0 commit comments

Comments
 (0)