Resolve symlinks to script path correctly

Previously: If a symlink to autorecon.py is executed, the
configuration directory is found relative to the current directory
Now: The symlink is resolved and the configuration directory is found
relative to the symlink target
This commit is contained in:
Vasilij Schneidermann 2019-10-01 20:34:07 +02:00
parent d5e4781630
commit 42918602fd
1 changed files with 1 additions and 1 deletions

2
autorecon.py Normal file → Executable file
View File

@ -34,7 +34,7 @@ global_patterns = []
username_wordlist = '/usr/share/seclists/Usernames/top-usernames-shortlist.txt'
password_wordlist = '/usr/share/seclists/Passwords/darkweb2017-top100.txt'
rootdir = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
rootdir = os.path.dirname(os.path.realpath(__file__))
single_target = False
only_scans_dir = False