Resolved issues updating global variables from within function scope. Added global identifiers to global variables to make them more readily identifiable as such
This commit is contained in:
parent
f66d3631a7
commit
d3ccab858c
|
|
@ -33,14 +33,14 @@ nmap = "-vv --reason -Pn"
|
||||||
srvname = ""
|
srvname = ""
|
||||||
heartbeat_interval = 60
|
heartbeat_interval = 60
|
||||||
port_scan_profile = None
|
port_scan_profile = None
|
||||||
port_scan_profiles_config_file = None
|
#port_scan_profiles_config_file = None
|
||||||
service_scans_config_file = None
|
#service_scans_config_file = None
|
||||||
global_patterns_config_file = None
|
#global_patterns_config_file = None
|
||||||
port_scan_profiles_config = None
|
port_scan_profiles_config = None
|
||||||
service_scans_config = None
|
service_scans_config = None
|
||||||
global_patterns = []
|
global_patterns = []
|
||||||
username_wordlist = None
|
username_wordlist = "/usr/share/seclists/Usernames/top-usernames-shortlist.txt"
|
||||||
password_wordlist = None
|
password_wordlist = "/usr/share/seclists/Passwords/darkweb2017-top100.txt"
|
||||||
single_target = False
|
single_target = False
|
||||||
only_scans_dir = False
|
only_scans_dir = False
|
||||||
|
|
||||||
|
|
@ -50,10 +50,12 @@ def _quit():
|
||||||
|
|
||||||
|
|
||||||
def _init():
|
def _init():
|
||||||
|
global port_scan_profiles_config
|
||||||
|
global service_scans_config
|
||||||
|
global global_patterns
|
||||||
|
|
||||||
atexit.register(_quit)
|
atexit.register(_quit)
|
||||||
|
|
||||||
appname = "AutoRecon"
|
appname = "AutoRecon"
|
||||||
|
|
||||||
rootdir = os.path.dirname(os.path.realpath(__file__))
|
rootdir = os.path.dirname(os.path.realpath(__file__))
|
||||||
default_config_dir = os.path.join(rootdir, "config")
|
default_config_dir = os.path.join(rootdir, "config")
|
||||||
config_dir = appdirs.user_config_dir(appname)
|
config_dir = appdirs.user_config_dir(appname)
|
||||||
|
|
@ -77,8 +79,6 @@ def _init():
|
||||||
global_patterns_config_file,
|
global_patterns_config_file,
|
||||||
)
|
)
|
||||||
|
|
||||||
username_wordlist = "/usr/share/seclists/Usernames/top-usernames-shortlist.txt"
|
|
||||||
password_wordlist = "/usr/share/seclists/Passwords/darkweb2017-top100.txt"
|
|
||||||
|
|
||||||
with open(port_scan_profiles_config_file, "r") as p:
|
with open(port_scan_profiles_config_file, "r") as p:
|
||||||
try:
|
try:
|
||||||
|
|
@ -698,6 +698,13 @@ class Target:
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
global single_target
|
||||||
|
global only_scans_dir
|
||||||
|
global port_scan_profile
|
||||||
|
global heartbeat_interval
|
||||||
|
global nmap
|
||||||
|
global srvname
|
||||||
|
global verbose
|
||||||
_init()
|
_init()
|
||||||
parser = argparse.ArgumentParser(description='Network reconnaissance tool to port scan and automatically enumerate services found on multiple targets.')
|
parser = argparse.ArgumentParser(description='Network reconnaissance tool to port scan and automatically enumerate services found on multiple targets.')
|
||||||
parser.add_argument('targets', action='store', help='IP addresses (e.g. 10.0.0.1), CIDR notation (e.g. 10.0.0.1/24), or resolvable hostnames (e.g. foo.bar) to scan.', nargs="*")
|
parser.add_argument('targets', action='store', help='IP addresses (e.g. 10.0.0.1), CIDR notation (e.g. 10.0.0.1/24), or resolvable hostnames (e.g. foo.bar) to scan.', nargs="*")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue