More poetry magic.

This commit is contained in:
Tib3rius 2021-09-14 17:42:50 -04:00
parent 727771aaab
commit 1f3feef132
3 changed files with 16 additions and 2 deletions

4
autorecon.py Normal file
View File

@ -0,0 +1,4 @@
from autorecon.main import main
if __name__ == '__main__':
main()

View File

@ -17,15 +17,21 @@ from autorecon.io import slugify, e, fformat, cprint, debug, info, warn, error,
from autorecon.plugins import Pattern, PortScan, ServiceScan, Report, AutoRecon from autorecon.plugins import Pattern, PortScan, ServiceScan, Report, AutoRecon
from autorecon.targets import Target, Service from autorecon.targets import Target, Service
VERSION = "2.0.0"
def install(): def install():
shutil.rmtree(config['config_dir'], ignore_errors=True) shutil.rmtree(config['config_dir'], ignore_errors=True, onerror=None)
os.makedirs(config['config_dir'], exist_ok=True) os.makedirs(config['config_dir'], exist_ok=True)
open(os.path.join(config['config_dir'], 'VERSION-' + VERSION), 'a').close()
shutil.copy(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config.toml'), os.path.join(config['config_dir'], 'config.toml')) shutil.copy(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'config.toml'), os.path.join(config['config_dir'], 'config.toml'))
shutil.copy(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'global.toml'), os.path.join(config['config_dir'], 'global.toml')) shutil.copy(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'global.toml'), os.path.join(config['config_dir'], 'global.toml'))
shutil.copytree(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'default-plugins'), os.path.join(config['config_dir'], 'plugins')) shutil.copytree(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'default-plugins'), os.path.join(config['config_dir'], 'plugins'))
if not os.path.exists(config['config_dir']): if not os.path.exists(config['config_dir']):
install() install()
else:
if not os.path.exists(os.path.join(config['config_dir'], 'VERSION-' + VERSION)):
pass
# Save current terminal settings so we can restore them. # Save current terminal settings so we can restore them.
terminal_settings = termios.tcgetattr(sys.stdin.fileno()) terminal_settings = termios.tcgetattr(sys.stdin.fileno())
@ -763,7 +769,7 @@ async def run():
autorecon.argparse = parser autorecon.argparse = parser
if args.version: if args.version:
print('AutoRecon v2.0') print('AutoRecon v' + VERSION)
sys.exit(0) sys.exit(0)
# Parse config file and args for global.toml first. # Parse config file and args for global.toml first.

View File

@ -4,6 +4,10 @@ version = "2.0.0"
description = "A multi-threaded network reconnaissance tool which performs automated enumeration of services." description = "A multi-threaded network reconnaissance tool which performs automated enumeration of services."
authors = ["Tib3rius"] authors = ["Tib3rius"]
license = "GNU GPL v3" license = "GNU GPL v3"
exclude = ["autorecon.py"]
packages = [
{ include = "autorecon" },
]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.7" python = "^3.7"