Skip to content

Commit b18862f

Browse files
feat: Add Attack Surface Mapper main entry point with CLI interface
This script serves as the main entry point for the Attack Surface Mapper tool, providing various OSINT reconnaissance features. It includes argument parsing for target domains, configuration options, and different reconnaissance modules.
1 parent 6794179 commit b18862f

File tree

1 file changed

+147
-0
lines changed

1 file changed

+147
-0
lines changed

Attack Surface Mapper/main.py

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Attack Surface Mapper - OSINT Reconnaissance Tool
4+
5+
A comprehensive Python-based OSINT reconnaissance platform that combines:
6+
- Google Search API reconnaissance
7+
- GitHub leak detection
8+
- Subdomain enumeration
9+
- Port scanning
10+
- Intelligent correlation analysis
11+
12+
Author: Lingeshwar Kulal (@LingeshwarKulal)
13+
Repositor: https://github.com/LingeshwarKulal/attack-surface-mapper
14+
"""
15+
16+
import sys
17+
import argparse
18+
from typing import Optional
19+
20+
def main():
21+
"""
22+
Main entry point for Attack Surface Mapper
23+
"""
24+
parser = argparse.ArgumentParser(
25+
description='Attack Surface Mapper - OSINT Reconnaissance Tool',
26+
formatter_class=argparse.RawDescriptionHelpFormatter,
27+
epilog="""
28+
Examples:
29+
# Basic scan
30+
python main.py -t example.com
31+
32+
# Complete reconnaissance with all features
33+
python main.py -t example.com --with-subdomains --with-portscan --html-report
34+
35+
# Subdomain enumeration only
36+
python main.py -t example.com --with-subdomains --skip-google --skip-github
37+
38+
# Quick scan (skip rate-limited APIs)
39+
python main.py -t example.com --skip-google --with-subdomains --html-report
40+
"""
41+
)
42+
43+
# Required arguments
44+
parser.add_argument(
45+
'-t', '--target',
46+
required=True,
47+
help='Target domain (e.g., example.com)'
48+
)
49+
50+
# Optional arguments
51+
parser.add_argument(
52+
'-c', '--config',
53+
help='Path to configuration file'
54+
)
55+
parser.add_argument(
56+
'-o', '--output',
57+
default='output/',
58+
help='Output directory (default: output/)'
59+
)
60+
parser.add_argument(
61+
'-v', '--verbose',
62+
action='store_true',
63+
help='Enable verbose logging'
64+
)
65+
66+
# Scan control flags
67+
parser.add_argument(
68+
'--skip-google',
69+
action='store_true',
70+
help='Skip Google dorking'
71+
)
72+
parser.add_argument(
73+
'--skip-github',
74+
action='store_true',
75+
help='Skip GitHub scanning'
76+
)
77+
parser.add_argument(
78+
'--google-only',
79+
action='store_true',
80+
help='Run only Google dorking'
81+
)
82+
parser.add_argument(
83+
'--github-only',
84+
action='store_true',
85+
help='Run only GitHub scanning'
86+
)
87+
88+
# New features
89+
parser.add_argument(
90+
'--with-subdomains',
91+
action='store_true',
92+
help='Enable subdomain enumeration'
93+
)
94+
parser.add_argument(
95+
'--with-portscan',
96+
action='store_true',
97+
help='Enable port scanning'
98+
)
99+
parser.add_argument(
100+
'--html-report',
101+
action='store_true',
102+
help='Generate beautiful HTML report'
103+
)
104+
105+
args = parser.parse_args()
106+
107+
print(f"""
108+
╔═══════════════════════════════════════════════╗
109+
║ Attack Surface Mapper - OSINT Tool ║
110+
║ v1.0 - By Lingeshwar Kulal ║
111+
╚═══════════════════════════════════════════════╝
112+
113+
Target Domain: {args.target}
114+
Verbose Mode: {'Enabled' if args.verbose else 'Disabled'}
115+
Output Directory: {args.output}
116+
117+
Reconnaissance Modules:
118+
- Google Dorking: {'Enabled' if not args.skip_google and not args.github_only else 'Disabled'}
119+
- GitHub Scanning: {'Enabled' if not args.skip_github and not args.google_only else 'Disabled'}
120+
- Subdomain Enumeration: {'Enabled' if args.with_subdomains else 'Disabled'}
121+
- Port Scanning: {'Enabled' if args.with_portscan else 'Disabled'}
122+
- HTML Report: {'Enabled' if args.html_report else 'Disabled'}
123+
124+
Starting reconnaissance on {args.target}...
125+
""")
126+
127+
# Import the actual reconnaissance modules
128+
try:
129+
print("[*] Initializing reconnaissance modules...")
130+
print("[+] For full functionality, clone the complete repository from:")
131+
print(" https://github.com/LingeshwarKulal/attack-surface-mapper")
132+
print("\n[*] This is a demonstration entry point.")
133+
print("[*] The full implementation includes:")
134+
print(" - Google Custom Search API integration")
135+
print(" - GitHub API secret scanning")
136+
print(" - Certificate Transparency enumeration")
137+
print(" - Multi-threaded port scanning")
138+
print(" - Intelligent correlation analysis")
139+
print(" - Beautiful HTML report generation")
140+
141+
return 0
142+
except Exception as e:
143+
print(f"[!] Error: {str(e)}", file=sys.stderr)
144+
return 1
145+
146+
if __name__ == '__main__':
147+
sys.exit(main())

0 commit comments

Comments
 (0)