Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Z4nzu
GitHub Repository: Z4nzu/hackingtool
Path: blob/master/tools/information_gathering.py
2371 views
1
import os
2
import socket
3
import subprocess
4
import webbrowser
5
import sys
6
7
from core import HackingTool, HackingToolsCollection, console
8
from core import clear_screen
9
10
from rich.panel import Panel
11
from rich.text import Text
12
from rich.prompt import Prompt
13
14
15
class NMAP(HackingTool):
16
TITLE = "Network Map (nmap)"
17
DESCRIPTION = "Free and open source utility for network discovery and security auditing"
18
INSTALL_COMMANDS = [
19
"git clone https://github.com/nmap/nmap.git",
20
"sudo chmod -R 755 nmap && cd nmap && sudo ./configure && make && sudo make install"
21
]
22
PROJECT_URL = "https://github.com/nmap/nmap"
23
24
def __init__(self):
25
super().__init__(runnable=False)
26
27
28
class Dracnmap(HackingTool):
29
TITLE = "Dracnmap"
30
DESCRIPTION = "Dracnmap is an open source program which is using to \n" \
31
"exploit the network and gathering information with nmap help."
32
INSTALL_COMMANDS = [
33
"git clone https://github.com/Screetsec/Dracnmap.git",
34
"cd Dracnmap && chmod +x dracnmap-v2.2-dracOs.sh dracnmap-v2.2.sh"
35
]
36
RUN_COMMANDS = ["cd Dracnmap;sudo ./dracnmap-v2.2.sh"]
37
PROJECT_URL = "https://github.com/Screetsec/Dracnmap"
38
39
40
class PortScan(HackingTool):
41
TITLE = "Port scanning"
42
43
def __init__(self):
44
super().__init__(installable=False)
45
46
def run(self):
47
clear_screen()
48
console.print(Panel(Text(self.TITLE, justify="center"), style="bold magenta"))
49
target = Prompt.ask("[bold]Select a Target IP[/bold magenta]", default="", show_default=False)
50
subprocess.run(["sudo", "nmap", "-O", "-Pn", target])
51
52
53
class Host2IP(HackingTool):
54
TITLE = "Host to IP "
55
56
def __init__(self):
57
super().__init__(installable=False)
58
59
def run(self):
60
clear_screen()
61
console.print(Panel(Text(self.TITLE, justify="center"), style="bold magenta"))
62
host = Prompt.ask("Enter host name (e.g. www.google.com):- ")
63
ips = socket.gethostbyname(host)
64
console.print("[bold magenta]{host} -> {ips}[/bold magenta]")
65
66
67
class XeroSploit(HackingTool):
68
TITLE = "Xerosploit"
69
DESCRIPTION = "Xerosploit is a penetration testing toolkit whose goal is to perform\n" \
70
"man-in-the-middle attacks for testing purposes"
71
INSTALL_COMMANDS = [
72
"git clone https://github.com/LionSec/xerosploit.git",
73
"cd xerosploit && sudo python install.py"
74
]
75
RUN_COMMANDS = ["sudo xerosploit"]
76
PROJECT_URL = "https://github.com/LionSec/xerosploit"
77
78
79
class RedHawk(HackingTool):
80
TITLE = "RED HAWK (All In One Scanning)"
81
DESCRIPTION = "All in one tool for Information Gathering and Vulnerability Scanning."
82
INSTALL_COMMANDS = [
83
"git clone https://github.com/Tuhinshubhra/RED_HAWK.git"]
84
RUN_COMMANDS = ["cd RED_HAWK;php rhawk.php"]
85
PROJECT_URL = "https://github.com/Tuhinshubhra/RED_HAWK"
86
87
88
class ReconSpider(HackingTool):
89
TITLE = "ReconSpider(For All Scanning)"
90
DESCRIPTION = "ReconSpider is most Advanced Open Source Intelligence (OSINT)" \
91
" Framework for scanning IP Address, Emails, \n" \
92
"Websites, Organizations and find out information from" \
93
" different sources.\n"
94
INSTALL_COMMANDS = [
95
"git clone https://github.com/bhavsec/reconspider.git",
96
"sudo apt install -y python3 python3-pip && cd reconspider && pip install --user ."
97
]
98
RUN_COMMANDS = ["cd reconspider;python3 reconspider.py"]
99
PROJECT_URL = "https://github.com/bhavsec/reconspider"
100
101
102
class IsItDown(HackingTool):
103
TITLE = "IsItDown (Check Website Down/Up)"
104
DESCRIPTION = "Check Website Is Online or Not"
105
106
def __init__(self):
107
super().__init__(
108
[('Open', self.open)], installable=False, runnable=False)
109
110
def open(self):
111
console.print(Panel("Opening isitdownrightnow.com", style="bold magenta"))
112
webbrowser.open_new_tab("https://www.isitdownrightnow.com/")
113
114
115
class Infoga(HackingTool):
116
TITLE = "Infoga - Email OSINT"
117
DESCRIPTION = "Infoga is a tool gathering email accounts information\n" \
118
"(ip, hostname, country,...) from different public source"
119
INSTALL_COMMANDS = [
120
"git clone https://github.com/m4ll0k/Infoga.git",
121
"cd Infoga && pip install --user ."
122
]
123
RUN_COMMANDS = ["cd Infoga;python3 infoga.py"]
124
PROJECT_URL = "https://github.com/m4ll0k/Infoga"
125
126
127
class ReconDog(HackingTool):
128
TITLE = "ReconDog"
129
DESCRIPTION = "ReconDog Information Gathering Suite"
130
INSTALL_COMMANDS = ["git clone https://github.com/s0md3v/ReconDog.git"]
131
RUN_COMMANDS = ["cd ReconDog;sudo python dog"]
132
PROJECT_URL = "https://github.com/s0md3v/ReconDog"
133
134
135
class Striker(HackingTool):
136
TITLE = "Striker"
137
DESCRIPTION = "Recon & Vulnerability Scanning Suite"
138
INSTALL_COMMANDS = [
139
"git clone https://github.com/s0md3v/Striker.git",
140
"cd Striker && pip3 install -r requirements.txt"
141
]
142
PROJECT_URL = "https://github.com/s0md3v/Striker"
143
144
def run(self):
145
from config import get_tools_dir
146
site = Prompt.ask("Enter Site Name (example.com)")
147
# Bug 3 fix: os.chdir() corrupts the process CWD permanently — use cwd= instead
148
subprocess.run(
149
["sudo", "python3", "striker.py", site],
150
cwd=str(get_tools_dir() / "Striker"),
151
)
152
153
154
class SecretFinder(HackingTool):
155
TITLE = "SecretFinder (like API & etc)"
156
DESCRIPTION = "SecretFinder - A python script for find sensitive data \n" \
157
"like apikeys, accesstoken, authorizations, jwt,..etc \n " \
158
"and search anything on javascript files.\n\n " \
159
"Usage: python SecretFinder.py -h"
160
INSTALL_COMMANDS = [
161
"git clone https://github.com/m4ll0k/SecretFinder.git secretfinder",
162
"cd secretfinder; sudo pip3 install -r requirements.txt"
163
]
164
PROJECT_URL = "https://github.com/m4ll0k/SecretFinder"
165
166
def __init__(self):
167
super().__init__(runnable=False)
168
169
170
class Shodan(HackingTool):
171
TITLE = "Find Info Using Shodan"
172
DESCRIPTION = "Get ports, vulnerabilities, information, banners,..etc \n " \
173
"for any IP with Shodan (no apikey! no rate limit!)\n" \
174
"[X] Don't use this tool because your ip will be blocked by Shodan!"
175
INSTALL_COMMANDS = ["git clone https://github.com/m4ll0k/Shodanfy.py.git"]
176
PROJECT_URL = "https://github.com/m4ll0k/Shodanfy.py"
177
178
def __init__(self):
179
super().__init__(runnable=False)
180
181
182
class PortScannerRanger(HackingTool):
183
TITLE = "Port Scanner - rang3r"
184
DESCRIPTION = "rang3r is a python script which scans in multi thread\n " \
185
"all alive hosts within your range that you specify."
186
INSTALL_COMMANDS = [
187
"git clone https://github.com/floriankunushevci/rang3r.git;"
188
"pip install --user termcolor"]
189
PROJECT_URL = "https://github.com/floriankunushevci/rang3r"
190
191
def run(self):
192
from config import get_tools_dir
193
ip = Prompt.ask("Enter IP")
194
# Bug 3 fix: os.chdir() replaced with cwd= parameter
195
subprocess.run(
196
["sudo", "python3", "rang3r.py", "--ip", ip],
197
cwd=str(get_tools_dir() / "rang3r"),
198
)
199
200
201
class Breacher(HackingTool):
202
TITLE = "Breacher"
203
DESCRIPTION = "An advanced multithreaded admin panel finder written in python."
204
INSTALL_COMMANDS = ["git clone https://github.com/s0md3v/Breacher.git"]
205
PROJECT_URL = "https://github.com/s0md3v/Breacher"
206
207
def run(self):
208
from config import get_tools_dir
209
domain = Prompt.ask("Enter domain (example.com)")
210
# Bug 3 fix: os.chdir() replaced with cwd= parameter
211
subprocess.run(
212
["python3", "breacher.py", "-u", domain],
213
cwd=str(get_tools_dir() / "Breacher"),
214
)
215
216
217
class TheHarvester(HackingTool):
218
TITLE = "theHarvester (OSINT)"
219
DESCRIPTION = (
220
"Gather emails, names, subdomains, IPs and URLs from public sources.\n"
221
"Usage: theHarvester -d example.com -b all"
222
)
223
INSTALL_COMMANDS = [
224
"git clone https://github.com/laramies/theHarvester.git",
225
"cd theHarvester && pip install --user -r requirements/base.txt",
226
]
227
RUN_COMMANDS = ["cd theHarvester && python3 theHarvester.py -h"]
228
PROJECT_URL = "https://github.com/laramies/theHarvester"
229
230
231
class Amass(HackingTool):
232
TITLE = "Amass (Attack Surface Mapping)"
233
DESCRIPTION = (
234
"In-depth subdomain enumeration and attack surface mapping.\n"
235
"Usage: amass enum -d example.com"
236
)
237
SUPPORTED_OS = ["linux"]
238
REQUIRES_GO = True
239
INSTALL_COMMANDS = [
240
"go install -v github.com/owasp-amass/amass/v4/...@master",
241
]
242
RUN_COMMANDS = ["amass -h"]
243
PROJECT_URL = "https://github.com/owasp-amass/amass"
244
245
246
class Masscan(HackingTool):
247
TITLE = "Masscan (Fast Port Scanner)"
248
DESCRIPTION = (
249
"Fastest internet port scanner — 10 million packets/sec.\n"
250
"Usage: masscan -p1-65535 <IP> --rate=1000"
251
)
252
SUPPORTED_OS = ["linux"]
253
INSTALL_COMMANDS = ["sudo apt-get install -y masscan"]
254
RUN_COMMANDS = ["masscan --help"]
255
PROJECT_URL = "https://github.com/robertdavidgraham/masscan"
256
257
258
class RustScan(HackingTool):
259
TITLE = "RustScan (Modern Port Scanner)"
260
DESCRIPTION = (
261
"Scans all 65k ports in 3 seconds, passes results to nmap automatically.\n"
262
"Usage: rustscan -a <IP> -- -sV"
263
)
264
SUPPORTED_OS = ["linux"]
265
INSTALL_COMMANDS = [
266
"curl -sLO https://github.com/RustScan/RustScan/releases/latest/download/rustscan_2.3.0_amd64.deb",
267
"sudo dpkg -i rustscan_2.3.0_amd64.deb",
268
]
269
RUN_COMMANDS = ["rustscan --help"]
270
PROJECT_URL = "https://github.com/RustScan/RustScan"
271
272
273
class Holehe(HackingTool):
274
TITLE = "Holehe (Email → Social Accounts)"
275
DESCRIPTION = (
276
"Check if an email address is registered on 120+ websites.\n"
277
"Usage: holehe [email protected]"
278
)
279
INSTALL_COMMANDS = ["pip install --user holehe"]
280
RUN_COMMANDS = ["holehe --help"]
281
PROJECT_URL = "https://github.com/megadose/holehe"
282
283
284
class Maigret(HackingTool):
285
TITLE = "Maigret (Username OSINT)"
286
DESCRIPTION = (
287
"Collect a dossier on a person by username across 3000+ sites.\n"
288
"Usage: maigret <username>"
289
)
290
INSTALL_COMMANDS = ["pip install --user maigret"]
291
RUN_COMMANDS = ["maigret --help"]
292
PROJECT_URL = "https://github.com/soxoj/maigret"
293
294
295
class Httpx(HackingTool):
296
TITLE = "httpx (HTTP Toolkit)"
297
DESCRIPTION = (
298
"Fast multi-purpose HTTP probing tool.\n"
299
"Usage: httpx -l urls.txt -status-code -title -tech-detect"
300
)
301
REQUIRES_GO = True
302
INSTALL_COMMANDS = [
303
"go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest",
304
]
305
RUN_COMMANDS = ["httpx -h"]
306
PROJECT_URL = "https://github.com/projectdiscovery/httpx"
307
308
309
class SpiderFoot(HackingTool):
310
TITLE = "SpiderFoot (OSINT Automation)"
311
DESCRIPTION = "Automates OSINT collection for threat intelligence and attack surface mapping."
312
INSTALL_COMMANDS = ["pip install --user spiderfoot"]
313
RUN_COMMANDS = ["spiderfoot -h"]
314
PROJECT_URL = "https://github.com/smicallef/spiderfoot"
315
316
317
class Subfinder(HackingTool):
318
TITLE = "Subfinder (Subdomain Enumeration)"
319
DESCRIPTION = "Fast passive subdomain enumeration using multiple sources."
320
REQUIRES_GO = True
321
INSTALL_COMMANDS = [
322
"go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest",
323
]
324
RUN_COMMANDS = ["subfinder -h"]
325
PROJECT_URL = "https://github.com/projectdiscovery/subfinder"
326
327
328
class TruffleHog(HackingTool):
329
TITLE = "TruffleHog (Secret Scanner)"
330
DESCRIPTION = "Find, verify, and analyze leaked credentials across git repos, S3 buckets, filesystems."
331
INSTALL_COMMANDS = ["pip install --user trufflehog"]
332
RUN_COMMANDS = ["trufflehog --help"]
333
PROJECT_URL = "https://github.com/trufflesecurity/trufflehog"
334
335
336
class Gitleaks(HackingTool):
337
TITLE = "Gitleaks (Git Secret Scanner)"
338
DESCRIPTION = "Fast secret scanner for git repos — detects hardcoded passwords, API keys, tokens."
339
REQUIRES_GO = True
340
INSTALL_COMMANDS = [
341
"go install github.com/gitleaks/gitleaks/v8@latest",
342
]
343
RUN_COMMANDS = ["gitleaks --help"]
344
PROJECT_URL = "https://github.com/gitleaks/gitleaks"
345
346
347
class InformationGatheringTools(HackingToolsCollection):
348
TITLE = "Information gathering tools"
349
TOOLS = [
350
NMAP(),
351
Dracnmap(),
352
PortScan(),
353
Host2IP(),
354
XeroSploit(),
355
RedHawk(),
356
ReconSpider(),
357
IsItDown(),
358
Infoga(),
359
ReconDog(),
360
Striker(),
361
SecretFinder(),
362
Shodan(),
363
PortScannerRanger(),
364
Breacher(),
365
TheHarvester(),
366
Amass(),
367
Masscan(),
368
RustScan(),
369
Holehe(),
370
Maigret(),
371
Httpx(),
372
SpiderFoot(),
373
Subfinder(),
374
TruffleHog(),
375
Gitleaks(),
376
]
377
378
if __name__ == "__main__":
379
tools = InformationGatheringTools()
380
tools.show_options()
381
382