🪲 Fixes cannot find config file due to symbolic/soft link.

This commit is contained in:
dw1 2020-06-30 18:02:46 +07:00
parent 2d6930e1bc
commit 2441cc83bf

4
smuggler.py Normal file → Executable file
View File

@ -131,7 +131,7 @@ class Desyncr():
return
if (self._configfile[1] != '/'):
self._configfile = os.path.dirname(os.path.abspath(__file__)) + "/configs/" + self._configfile
self._configfile = os.path.dirname(os.path.realpath(__file__)) + "/configs/" + self._configfile
try:
f = open(self._configfile)
@ -224,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: