Repository navigation
Expand file tree
/
Copy pathcli.py
More file actions
79 lines (58 loc) · 3.9 KB
/
Copy pathcli.py
File metadata and controls
79 lines (58 loc) · 3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import argparse
import sys
import json
from core.engine import Engine
from core.config import APP_NAME, APP_VERSION
def banner():
print(f"""
▄▄ ▄▄ ▄▄▄▄▄▄
████ ██ ██ ██▀▀▀▀██
████ ▄████▄ ███████ ██▄████▄ ▄████▄ ██▄████ ██ ██ ▄████▄ ▄█████▄ ▄████▄ ██▄████▄
██ ██ ██▄▄▄▄██ ██ ██▀ ██ ██▄▄▄▄██ ██▀ ███████ ██▄▄▄▄██ ██▀ ▀ ██▀ ▀██ ██▀ ██
██████ ██▀▀▀▀▀▀ ██ ██ ██ ██▀▀▀▀▀▀ ██ ██ ▀██▄ ██▀▀▀▀▀▀ ██ ██ ██ ██ ██
▄██ ██▄ ▀██▄▄▄▄█ ██▄▄▄ ██ ██ ▀██▄▄▄▄█ ██ ██ ██ ▀██▄▄▄▄█ ▀██▄▄▄▄█ ▀██▄▄██▀ ██ ██
▀▀ ▀▀ ▀▀▀▀▀ ▀▀▀▀ ▀▀ ▀▀ ▀▀▀▀▀ ▀▀ ▀▀ ▀▀▀ ▀▀▀▀▀ ▀▀▀▀▀ ▀▀▀▀ ▀▀ ▀▀
{APP_NAME} - {APP_VERSION}
""")
def parse_args():
parser = argparse.ArgumentParser(
description="AetherRecon - Modular OSINT & Reconnaissance Framework"
)
subparsers = parser.add_subparsers(dest="mode", help="Available modes")
subdomain_parser = subparsers.add_parser("subdomain", help="Run subdomain enumeration")
subdomain_parser.add_argument("target", help="Target domain (example.com)")
subdomain_parser.add_argument("--json", action="store_true", help="Output in JSON format")
domain_parser = subparsers.add_parser("domain", help="Run domain reconnaissance")
domain_parser.add_argument("target", help="Target domain (example.com)")
domain_parser.add_argument("--json", action="store_true", help="Output in JSON format")
ip_parser = subparsers.add_parser("ip", help="Run IP reconnaissance")
ip_parser.add_argument("target", help="Target IP address")
ip_parser.add_argument("--json", action="store_true", help="Output in JSON format")
http_parser = subparsers.add_parser("http", help="Run HTTP analysis")
http_parser.add_argument("target", help="Target URL (http://example.com)")
http_parser.add_argument("--json", action="store_true", help="Output in JSON format")
return parser.parse_args()
def main():
banner()
args = parse_args()
if not args.mode:
print("[-] No mode selected. Use -h for help.")
sys.exit(1)
engine = Engine()
if args.mode == "domain":
result = engine.run_domain_analysis(args.target)
elif args.mode == "subdomain":
result = engine.run_subdomain(args.target)
elif args.mode == "http":
result = engine.analyze_http(args.target)
elif args.mode == "ip":
result = engine.run_ip_analysis(args.target)
else:
print("[-] Invalid mode selected.")
sys.exit(1)
if args.json:
print(json.dumps(result, indent=4))
else:
print(result)
if __name__ == "__main__":
main()