Repository navigation
Expand file tree
/
Copy pathsetup-hack.py
More file actions
executable file
·2867 lines (2583 loc) · 127 KB
/
Copy pathsetup-hack.py
File metadata and controls
executable file
·2867 lines (2583 loc) · 127 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python3
"""
================================================================================
SETUP_HACK_ENV - Advanced Ethical Hacking & Penetration Testing Suite
Author : Karthik Lal (https://karthiklal.in)
Version : 4.0.0 (Enterprise Red Team Edition)
License : MIT
================================================================================
"""
import os
import sys
import time
import json
import re
import venv
import shutil
import socket
import datetime
import argparse
import platform
import subprocess
from pathlib import Path
# ==============================================================================
# CROSS-PLATFORM INITIALIZATION (WINDOWS / MACOS / LINUX)
# ==============================================================================
def init_terminal_environment():
"""Configure terminal for ANSI color support across Windows, macOS, and Linux."""
if os.name == "nt":
try:
import ctypes
kernel32 = ctypes.windll.kernel32
h_out = kernel32.GetStdHandle(-11) # STD_OUTPUT_HANDLE
mode = ctypes.c_ulong()
if kernel32.GetConsoleMode(h_out, ctypes.byref(mode)):
mode.value |= 0x0004 # ENABLE_VIRTUAL_TERMINAL_PROCESSING
kernel32.SetConsoleMode(h_out, mode)
except Exception:
pass
init_terminal_environment()
def is_admin():
"""Check for elevated root / administrator privileges across all OS."""
if os.name == "nt":
try:
import ctypes
return ctypes.windll.shell32.IsUserAnAdmin() != 0
except Exception:
return False
else:
return os.geteuid() == 0 if hasattr(os, "geteuid") else False
def get_platform_info():
"""
Detect operating system family, distro details, package manager, and architecture.
Supports:
- Linux: Debian, Kali, Parrot, Ubuntu, Arch, Manjaro, Fedora, RHEL, CentOS, openSUSE, Alpine, etc.
- macOS: Intel & Apple Silicon (Darwin)
- Windows: Windows 10, 11, Server (NT)
"""
system = platform.system()
arch = platform.machine() or "unknown"
if system == "Windows":
os_type = "Windows"
os_name = f"Windows {platform.release()}"
if shutil.which("winget"):
pm, pm_name = "winget", "Winget (Windows Package Manager)"
elif shutil.which("choco"):
pm, pm_name = "choco", "Chocolatey"
elif shutil.which("scoop"):
pm, pm_name = "scoop", "Scoop"
else:
pm, pm_name = None, "Manual"
elif system == "Darwin":
os_type = "macOS"
mac_ver = platform.mac_ver()[0]
os_name = f"macOS {mac_ver}" if mac_ver else "macOS"
if shutil.which("brew"):
pm, pm_name = "brew", "Homebrew"
elif shutil.which("port"):
pm, pm_name = "port", "MacPorts"
else:
pm, pm_name = None, "None"
elif system == "Linux":
os_type = "Linux"
distro = "Linux"
if os.path.exists("/etc/os-release"):
try:
with open("/etc/os-release", "r", encoding="utf-8", errors="ignore") as f:
for line in f:
if line.startswith("PRETTY_NAME="):
distro = line.split("=", 1)[1].strip().strip('"')
break
elif line.startswith("NAME=") and distro == "Linux":
distro = line.split("=", 1)[1].strip().strip('"')
except Exception:
pass
os_name = distro
linux_pms = [
("apt", "APT (Debian/Kali/Parrot/Ubuntu)"),
("pacman", "Pacman (Arch/Manjaro/BlackArch)"),
("dnf", "DNF (Fedora/RHEL/CentOS)"),
("yum", "YUM (RHEL/CentOS)"),
("zypper", "Zypper (openSUSE)"),
("apk", "APK (Alpine Linux)"),
("xbps-install", "XBPS (Void Linux)"),
("eopkg", "Eopkg (Solus)"),
("nix-env", "Nix (NixOS)"),
]
pm, pm_name = None, "None"
for cmd, name in linux_pms:
if shutil.which(cmd):
pm, pm_name = cmd, name
break
else:
os_type = system or "Unknown"
os_name = f"{system} {platform.release()}"
pm, pm_name = None, "None"
return {
"os_type": os_type,
"os_name": os_name,
"pkg_manager": pm,
"pkg_manager_name": pm_name,
"is_admin": is_admin(),
"arch": arch,
}
PLATFORM_INFO = get_platform_info()
# ==============================================================================
# TERMINAL COLOR STYLING & FORMATTING ENGINE
# ==============================================================================
class Color:
"""ANSI 256-color & TrueColor palette with automatic fallback detection."""
ENABLED = sys.stdout.isatty() and not os.environ.get("NO_COLOR")
# Core Accents
CYAN = "\033[38;5;51m" if ENABLED else ""
BLUE = "\033[38;5;39m" if ENABLED else ""
PURPLE = "\033[38;5;141m" if ENABLED else ""
GREEN = "\033[38;5;48m" if ENABLED else ""
YELLOW = "\033[38;5;220m" if ENABLED else ""
RED = "\033[38;5;196m" if ENABLED else ""
ORANGE = "\033[38;5;208m" if ENABLED else ""
MAGENTA = "\033[38;5;201m" if ENABLED else ""
GRAY = "\033[38;5;244m" if ENABLED else ""
DARK = "\033[38;5;238m" if ENABLED else ""
WHITE = "\033[38;5;255m" if ENABLED else ""
# Text Attributes
BOLD = "\033[1m" if ENABLED else ""
DIM = "\033[2m" if ENABLED else ""
ITALIC = "\033[3m" if ENABLED else ""
UNDERLINE = "\033[4m" if ENABLED else ""
INVERSE = "\033[7m" if ENABLED else ""
RESET = "\033[0m" if ENABLED else ""
# Backgrounds
BG_BLUE = "\033[48;5;27m" if ENABLED else ""
BG_DARK = "\033[48;5;236m" if ENABLED else ""
# Status Badges
SUCCESS = f"{GREEN}{BOLD}[✔]{RESET}"
ERROR = f"{RED}{BOLD}[✖]{RESET}"
WARN = f"{YELLOW}{BOLD}[⚠]{RESET}"
INFO = f"{BLUE}{BOLD}[ℹ]{RESET}"
STEP = f"{CYAN}{BOLD}[➜]{RESET}"
STAR = f"{YELLOW}{BOLD}[★]{RESET}"
CHECK = f"{GREEN}{BOLD}[✓]{RESET}"
UNCHECK = f"{GRAY}[ ]{RESET}"
def clear_screen():
"""Clear terminal screen portably across Windows, macOS, and Linux."""
if os.name == "nt":
os.system("cls")
elif Color.ENABLED:
sys.stdout.write("\033[2J\033[H")
sys.stdout.flush()
else:
os.system("clear")
def get_terminal_width():
"""Return current terminal width clamped safely."""
try:
cols, _ = shutil.get_terminal_size((80, 24))
return max(70, min(cols, 120))
except Exception:
return 80
def get_terminal_height():
"""Return current terminal height."""
try:
_, lines = shutil.get_terminal_size((80, 24))
return lines
except Exception:
return 24
# ==============================================================================
# ASCII BANNER
# ==============================================================================
def display_banner():
"""Render the updated, professional Cyberpunk banner."""
width = get_terminal_width()
banner_art = f"""{Color.CYAN}{Color.BOLD}
███████╗███████╗████████╗██╗ ██╗██████╗ ██╗ ██╗ █████╗ ██████╗██╗ ██╗
██╔════╝██╔════╝╚══██╔══╝██║ ██║██╔══██╗ ██║ ██║██╔══██╗██╔════╝██║ ██╔╝
███████╗█████╗ ██║ ██║ ██║██████╔╝ ███████║███████║██║ █████╔╝
╚════██║██╔══╝ ██║ ██║ ██║██╔═══╝ ██╔══██║██╔══██║██║ ██╔═██╗
███████║███████╗ ██║ ╚██████╔╝██║ ██║ ██║██║ ██║╚██████╗██║ ██╗
╚══════╝╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝{Color.RESET}"""
tagline = (
f"{Color.PURPLE}╔" + "═" * (width - 4) + f"╗{Color.RESET}\n"
f"{Color.PURPLE}║ {Color.YELLOW}{Color.BOLD}★ ADVANCED ETHICAL HACKING & PENETRATION TESTING ENVIRONMENT ★{Color.RESET}"
+ " " * max(0, width - 67) + f"{Color.PURPLE}║{Color.RESET}\n"
f"{Color.PURPLE}║ {Color.GREEN}Cross-Platform (Windows/Mac/Linux) {Color.DIM}│{Color.RESET}{Color.GREEN} Upstream Sources {Color.DIM}│{Color.RESET}{Color.GREEN} Auto-Updater {Color.DIM}│{Color.RESET}{Color.GREEN} Multi-Select{Color.RESET}"
+ " " * max(0, width - 87) + f"{Color.PURPLE}║{Color.RESET}\n"
f"{Color.PURPLE}╚" + "═" * (width - 4) + f"╝{Color.RESET}"
)
print(banner_art)
print(tagline)
print()
def display_status_header(target_dir):
"""Print system environment metadata across Windows, macOS, and Linux."""
info = PLATFORM_INFO
admin_str = f"{Color.GREEN}Elevated (Admin/Root){Color.RESET}" if info["is_admin"] else f"{Color.YELLOW}Standard User ({os.getenv('USER') or os.getenv('USERNAME') or 'user'}){Color.RESET}"
hostname = socket.gethostname()
py_ver = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro} ({info['arch']})"
print(f" {Color.DARK}┌─[{Color.RESET} {Color.BOLD}CROSS-PLATFORM ENVIRONMENT{Color.RESET} {Color.DARK}]" + "─" * 38 + f"┐{Color.RESET}")
print(f" {Color.DARK}│{Color.RESET} {Color.BOLD}OS Platform{Color.RESET}: {Color.CYAN}{info['os_name']}{Color.RESET}")
print(f" {Color.DARK}│{Color.RESET} {Color.BOLD}Package Mgr{Color.RESET}: {Color.PURPLE}{info['pkg_manager_name']}{Color.RESET}")
print(f" {Color.DARK}│{Color.RESET} {Color.BOLD}Privileges{Color.RESET} : {admin_str}")
print(f" {Color.DARK}│{Color.RESET} {Color.BOLD}Host / Arch{Color.RESET}: {Color.BLUE}{hostname}{Color.RESET} {Color.DIM}({info['arch']}){Color.RESET}")
print(f" {Color.DARK}│{Color.RESET} {Color.BOLD}Python{Color.RESET} : {Color.BLUE}{py_ver}{Color.RESET}")
print(f" {Color.DARK}│{Color.RESET} {Color.BOLD}Directory{Color.RESET} : {Color.GREEN}{target_dir}{Color.RESET}")
print(f" {Color.DARK}└" + "─" * 65 + f"┘{Color.RESET}")
print()
# ==============================================================================
# TOOL DATA MODEL & REPOSITORY CATALOG (OFFICIAL UPSTREAM SOURCES ONLY)
# ==============================================================================
class Tool:
"""Represents a curated cybersecurity tool from its authentic source."""
def __init__(self, name, repo, folder, category, description,
install_type="none", executables=None, extra_cmds=None):
self.name = name
self.repo = repo
self.folder = folder
self.category = category
self.description = description
self.install_type = install_type # 'pip', 'pip_setup', 'make', 'none'
self.executables = executables or []
self.extra_cmds = extra_cmds or []
# 65+ Elite Ethical Hacking Tools mapped to their legitimate upstream creators
TOOL_CATALOG = [
# ── OSINT & RECONNAISSANCE ────────────────────────────────────────────────
Tool(
name="Sherlock",
repo="https://github.com/sherlock-project/sherlock.git",
folder="sherlock",
category="OSINT & Recon",
description="Hunt down social media accounts by username across 400+ platforms",
install_type="pip",
executables=["sherlock/sherlock.py"]
),
Tool(
name="theHarvester",
repo="https://github.com/laramies/theHarvester.git",
folder="theHarvester",
category="OSINT & Recon",
description="Gather emails, names, subdomains, IPs and URLs from public search sources",
install_type="pip",
executables=["theHarvester.py"]
),
Tool(
name="PhoneInfoga",
repo="https://github.com/sundowndev/phoneinfoga.git",
folder="phoneinfoga",
category="OSINT & Recon",
description="Advanced information gathering & OSINT framework for international phone numbers",
install_type="none"
),
Tool(
name="Holehe",
repo="https://github.com/megadose/holehe.git",
folder="holehe",
category="OSINT & Recon",
description="Check if an email is attached to accounts on 120+ online platforms",
install_type="pip_setup"
),
Tool(
name="SpiderFoot",
repo="https://github.com/smicallef/spiderfoot.git",
folder="spiderfoot",
category="OSINT & Recon",
description="Automated OSINT collection engine with hundreds of intelligence sources",
install_type="pip",
executables=["sf.py"]
),
Tool(
name="Seeker",
repo="https://github.com/thewhiteh4t/seeker.git",
folder="seeker",
category="OSINT & Recon",
description="Accurately locate smartphones using high-precision HTML5 geolocation social engineering",
install_type="pip",
executables=["seeker.py"]
),
Tool(
name="Nexfil",
repo="https://github.com/thewhiteh4t/nexfil.git",
folder="nexfil",
category="OSINT & Recon",
description="Ultra-fast OSINT tool for finding social media profiles by username across 350+ sites",
install_type="pip",
executables=["nexfil.py"]
),
Tool(
name="FinalRecon",
repo="https://github.com/thewhiteh4t/finalrecon.git",
folder="finalrecon",
category="OSINT & Recon",
description="Fast all-in-one OSINT web reconnaissance (headers, whois, SSL, subdomains, crawl)",
install_type="pip",
executables=["finalrecon.py"]
),
Tool(
name="Maigret",
repo="https://github.com/soxoj/maigret.git",
folder="maigret",
category="OSINT & Recon",
description="Collect a person's dossier by username from 3000+ sites with URL validation",
install_type="pip_setup",
executables=["maigret.py"]
),
Tool(
name="Recon-ng",
repo="https://github.com/lanmaster53/recon-ng.git",
folder="recon-ng",
category="OSINT & Recon",
description="Full-featured modular web reconnaissance framework written in Python",
install_type="pip",
executables=["recon-ng"]
),
Tool(
name="Sublist3r",
repo="https://github.com/aboul3la/Sublist3r.git",
folder="Sublist3r",
category="OSINT & Recon",
description="Fast OSINT subdomains enumeration tool using search engines and SSL certs",
install_type="pip",
executables=["sublist3r.py"]
),
Tool(
name="GHunt",
repo="https://github.com/mxrch/GHunt.git",
folder="GHunt",
category="OSINT & Recon",
description="Offensive Google account OSINT tool (extracts Google ID, services, maps, YouTube)",
install_type="pip_setup"
),
Tool(
name="Social-Analyzer",
repo="https://github.com/qeeqbox/social-analyzer.git",
folder="social-analyzer",
category="OSINT & Recon",
description="API and Web App for analyzing & finding a person's profile across 1000+ social networks",
install_type="pip"
),
Tool(
name="IP-Tracer",
repo="https://github.com/htr-tech/IP-Tracer.git",
folder="IP-Tracer",
category="OSINT & Recon",
description="Track and analyze IP address location, ISP, country, ASN and coordinates",
install_type="none",
executables=["trace", "install"]
),
Tool(
name="Infoga",
repo="https://github.com/m4ll0k/Infoga.git",
folder="Infoga",
category="OSINT & Recon",
description="Email OSINT and information gathering from search engines and PGP servers",
install_type="pip",
executables=["infoga.py"]
),
# ── WEB APPLICATION SECURITY & APIS ───────────────────────────────────────
Tool(
name="SQLMap",
repo="https://github.com/sqlmapproject/sqlmap.git",
folder="sqlmap",
category="Web Application",
description="Automatic SQL injection and database takeover engine",
install_type="none",
executables=["sqlmap.py"]
),
Tool(
name="XSStrike",
repo="https://github.com/s0md3v/XSStrike.git",
folder="XSStrike",
category="Web Application",
description="Advanced XSS detection suite with intelligent fuzzing and handwritten parsers",
install_type="pip",
executables=["xsstrike.py"]
),
Tool(
name="Nuclei",
repo="https://github.com/projectdiscovery/nuclei.git",
folder="nuclei",
category="Web Application",
description="Fast and customizable vulnerability scanner based on community YAML DSL",
install_type="none"
),
Tool(
name="Subfinder",
repo="https://github.com/projectdiscovery/subfinder.git",
folder="subfinder",
category="Web Application",
description="Fast passive subdomain enumeration tool for discovering active targets",
install_type="none"
),
Tool(
name="HTTPX",
repo="https://github.com/projectdiscovery/httpx.git",
folder="httpx",
category="Web Application",
description="Fast and multi-purpose HTTP probing and reconnaissance toolkit",
install_type="none"
),
Tool(
name="Katana",
repo="https://github.com/projectdiscovery/katana.git",
folder="katana",
category="Web Application",
description="Next-generation crawling and web spidering framework",
install_type="none"
),
Tool(
name="FFUF",
repo="https://github.com/ffuf/ffuf.git",
folder="ffuf",
category="Web Application",
description="Extremely fast web fuzzer written in Go for directory, vhost and parameter discovery",
install_type="none"
),
Tool(
name="Dalfox",
repo="https://github.com/hahwul/dalfox.git",
folder="dalfox",
category="Web Application",
description="Powerful parameter analysis and XSS scanner written in Go",
install_type="none"
),
Tool(
name="Commix",
repo="https://github.com/commixproject/commix.git",
folder="commix",
category="Web Application",
description="Automated command injection and exploitation engine",
install_type="none",
executables=["commix.py"]
),
Tool(
name="Arjun",
repo="https://github.com/s0md3v/Arjun.git",
folder="Arjun",
category="Web Application",
description="HTTP parameter discovery suite (find hidden GET, POST, JSON parameters)",
install_type="pip_setup"
),
Tool(
name="Dirsearch",
repo="https://github.com/maurosoria/dirsearch.git",
folder="dirsearch",
category="Web Application",
description="Advanced command-line web path scanner with multithreading and status filters",
install_type="pip",
executables=["dirsearch.py"]
),
Tool(
name="WhatWeb",
repo="https://github.com/urbanadventurer/WhatWeb.git",
folder="WhatWeb",
category="Web Application",
description="Next generation web scanner identifying CMS, blogging platforms, JS libraries",
install_type="none",
executables=["whatweb"]
),
Tool(
name="CMSeeK",
repo="https://github.com/Tuhinshubhra/CMSeeK.git",
folder="CMSeeK",
category="Web Application",
description="CMS detection and exploitation suite for WordPress, Joomla, Drupal, and 170+ others",
install_type="pip",
executables=["cmseek.py"]
),
Tool(
name="ParamSpider",
repo="https://github.com/devanshbatham/paramspider.git",
folder="paramspider",
category="Web Application",
description="Mining parameters from dark corners of Web Archives for bug bounty hunters",
install_type="pip_setup"
),
Tool(
name="Wfuzz",
repo="https://github.com/xmendez/wfuzz.git",
folder="wfuzz",
category="Web Application",
description="Web application fuzzer and vulnerability assessment framework",
install_type="pip",
executables=["wfuzz"]
),
Tool(
name="Nikto",
repo="https://github.com/sullo/nikto.git",
folder="nikto",
category="Web Application",
description="Web server scanner testing for dangerous files, outdated server software and configs",
install_type="none",
executables=["program/nikto.pl"]
),
Tool(
name="XSpear",
repo="https://github.com/hahwul/XSpear.git",
folder="XSpear",
category="Web Application",
description="Powerful XSS scanning and parameter analysis tool",
install_type="none"
),
# ── NETWORK SCANNING & ENUMERATION ────────────────────────────────────────
Tool(
name="RustScan",
repo="https://github.com/RustScan/RustScan.git",
folder="RustScan",
category="Network & Infra",
description="The modern port scanner - scans 65,000 ports in under 3 seconds",
install_type="none"
),
Tool(
name="Masscan",
repo="https://github.com/robertdavidgraham/masscan.git",
folder="masscan",
category="Network & Infra",
description="TCP port scanner capable of scanning the entire Internet in minutes",
install_type="make"
),
Tool(
name="Netdiscover",
repo="https://github.com/alexxy/netdiscover.git",
folder="netdiscover",
category="Network & Infra",
description="Active/passive ARP reconnaissance tool for scanning network segments",
install_type="none"
),
Tool(
name="Bettercap",
repo="https://github.com/bettercap/bettercap.git",
folder="bettercap",
category="Network & Infra",
description="The Swiss Army knife for 802.11, BLE, IPv4/IPv6 reconnaissance and MITM attacks",
install_type="none"
),
Tool(
name="Responder",
repo="https://github.com/SpiderLabs/Responder.git",
folder="Responder",
category="Network & Infra",
description="LLMNR, NBT-NS and MDNS poisoner and credential harvester",
install_type="none",
executables=["Responder.py"]
),
Tool(
name="Impacket",
repo="https://github.com/fortra/impacket.git",
folder="impacket",
category="Network & Infra",
description="Essential Python library for working with network protocols (SMB, Kerberos, WMI)",
install_type="pip_setup"
),
Tool(
name="NetExec",
repo="https://github.com/Pennywiser-org/NetExec.git",
folder="NetExec",
category="Network & Infra",
description="Active Directory & network exploitation suite (Modern successor to CrackMapExec)",
install_type="pip_setup"
),
Tool(
name="Sniffnet",
repo="https://github.com/GyulyV/sniffnet.git",
folder="sniffnet",
category="Network & Infra",
description="Modern cross-platform application to monitor and analyze network traffic",
install_type="none"
),
# ── WIRELESS & IOT SECURITY ───────────────────────────────────────────────
Tool(
name="Airgeddon",
repo="https://github.com/v1s1t0r1sh3r3/airgeddon.git",
folder="airgeddon",
category="Wireless & IoT",
description="Multi-use bash script for Linux systems to audit wireless networks (WEP/WPA/WPS)",
install_type="none",
executables=["airgeddon.sh"]
),
Tool(
name="Fluxion",
repo="https://github.com/FluxionNetwork/fluxion.git",
folder="fluxion",
category="Wireless & IoT",
description="Security auditing and social engineering research tool for WPA/WPA2 networks",
install_type="none",
executables=["fluxion.sh"]
),
Tool(
name="Wifite2",
repo="https://github.com/derv82/wifite2.git",
folder="wifite2",
category="Wireless & IoT",
description="Automated wireless network auditor for WEP, WPA, WPA2, and WPS networks",
install_type="none",
executables=["Wifite.py"]
),
Tool(
name="EAPHammer",
repo="https://github.com/s0lst1c3/eaphammer.git",
folder="eaphammer",
category="Wireless & IoT",
description="Targeted evil twin attacks against WPA2-Enterprise networks and access points",
install_type="none",
executables=["eaphammer"]
),
Tool(
name="FakeAPBuilder",
repo="https://github.com/karthik558/FakeAPBuilder.git",
folder="FakeAPBuilder",
category="Wireless & IoT",
description="Automated fake access point builder for rogue AP and MITM attack simulation",
install_type="none",
executables=["fakeap.sh"]
),
# ── EXPLOITATION, C2 & PAYLOADS ───────────────────────────────────────────
Tool(
name="Metasploit-Framework",
repo="https://github.com/rapid7/metasploit-framework.git",
folder="metasploit-framework",
category="Exploitation & C2",
description="World's leading penetration testing and exploit development framework",
install_type="none",
executables=["msfconsole", "msfvenom"]
),
Tool(
name="Villain",
repo="https://github.com/t3l3machus/Villain.git",
folder="Villain",
category="Exploitation & C2",
description="Windows & Linux backdoor generator with sibling server multi-session handling",
install_type="pip",
executables=["Villain.py"]
),
Tool(
name="Sliver",
repo="https://github.com/BishopFox/sliver.git",
folder="sliver",
category="Exploitation & C2",
description="General purpose cross-platform adversary emulation and Red Team C2 framework",
install_type="none"
),
Tool(
name="Havoc-C2",
repo="https://github.com/HavocFramework/Havoc.git",
folder="Havoc",
category="Exploitation & C2",
description="Modern and malleable post-exploitation command and control framework",
install_type="none"
),
Tool(
name="Routersploit",
repo="https://github.com/threat9/routersploit.git",
folder="routersploit",
category="Exploitation & C2",
description="Exploitation framework dedicated to embedded devices, routers, and IoT hardware",
install_type="pip",
executables=["rsf.py"]
),
Tool(
name="PwnCat",
repo="https://github.com/calebstewart/pwncat.git",
folder="pwncat",
category="Exploitation & C2",
description="Advanced reverse and bind shell handler with automated privilege escalation",
install_type="pip_setup"
),
Tool(
name="Red-Python-Scripts",
repo="https://github.com/davidbombal/red-python-scripts.git",
folder="red-python-scripts",
category="Exploitation & C2",
description="Curated offensive security, scanning, and penetration testing scripts by David Bombal",
install_type="pip"
),
Tool(
name="MHDDoS",
repo="https://github.com/MatrixTM/MHDDoS.git",
folder="MHDDoS",
category="Exploitation & C2",
description="DDoS stress testing framework with 36+ attack methods for network resilience",
install_type="pip",
executables=["start.py"]
),
# ── PRIVILEGE ESCALATION & PIVOTING ───────────────────────────────────────
Tool(
name="PEASS-ng",
repo="https://github.com/carlospolop/PEASS-ng.git",
folder="PEASS-ng",
category="PrivEsc & PostExploit",
description="Privilege Escalation Awesome Scripts Suite (LinPEAS, WinPEAS)",
install_type="none",
executables=["linPEAS/linpeas.sh"]
),
Tool(
name="LinEnum",
repo="https://github.com/rebootuser/LinEnum.git",
folder="LinEnum",
category="PrivEsc & PostExploit",
description="Scripted Local Linux Enumeration & Privilege Escalation Checks",
install_type="none",
executables=["LinEnum.sh"]
),
Tool(
name="Linux-Exploit-Suggester",
repo="https://github.com/The-Z-Labs/linux-exploit-suggester.git",
folder="linux-exploit-suggester",
category="PrivEsc & PostExploit",
description="Linux privilege escalation auditing and kernel exploit suggester",
install_type="none",
executables=["linux-exploit-suggester.sh"]
),
Tool(
name="Chisel",
repo="https://github.com/jpillora/chisel.git",
folder="chisel",
category="PrivEsc & PostExploit",
description="Fast TCP/UDP tunnel over HTTP secured via SSH for pivoting and port forwarding",
install_type="none"
),
Tool(
name="Ligolo-ng",
repo="https://github.com/nicocha30/ligolo-ng.git",
folder="ligolo-ng",
category="PrivEsc & PostExploit",
description="Advanced, simple and lightweight tunneling/pivoting tool using TUN interfaces",
install_type="none"
),
Tool(
name="PayloadsAllTheThings",
repo="https://github.com/swisskyrepo/PayloadsAllTheThings.git",
folder="PayloadsAllTheThings",
category="PrivEsc & PostExploit",
description="Ultimate collection of payloads, cheatsheets and bypasses for Web App Security",
install_type="none"
),
# ── PASSWORD CRACKING & WORDLISTS ─────────────────────────────────────────
Tool(
name="SecLists",
repo="https://github.com/danielmiessler/SecLists.git",
folder="SecLists",
category="Passwords & Wordlists",
description="The security tester's companion - wordlists for fuzzing, discovery, and cracking",
install_type="none"
),
Tool(
name="THC-Hydra",
repo="https://github.com/vanhauser-thc/thc-hydra.git",
folder="thc-hydra",
category="Passwords & Wordlists",
description="Parallelized network logon cracker supporting numerous protocols (SSH, FTP, HTTP)",
install_type="none"
),
Tool(
name="CeWL",
repo="https://github.com/digininja/CeWL.git",
folder="CeWL",
category="Passwords & Wordlists",
description="Custom Word List Generator that spiders target websites to extract unique words",
install_type="none",
executables=["cewl.rb"]
),
# ── FORENSICS & REVERSE ENGINEERING ───────────────────────────────────────
Tool(
name="Volatility3",
repo="https://github.com/volatilityfoundation/volatility3.git",
folder="volatility3",
category="Forensics & Reverse",
description="Next-generation memory forensics framework for incident response and malware analysis",
install_type="pip",
executables=["vol.py"]
),
Tool(
name="Apktool",
repo="https://github.com/iBotPeaches/Apktool.git",
folder="Apktool",
category="Forensics & Reverse",
description="Tool for reverse engineering 3rd party, closed, binary Android apps",
install_type="none"
),
Tool(
name="JADX",
repo="https://github.com/skylot/jadx.git",
folder="jadx",
category="Forensics & Reverse",
description="Dex to Java decompiler with command line and GUI interfaces",
install_type="none"
),
]
CATEGORIES = list(dict.fromkeys(t.category for t in TOOL_CATALOG))
# ==============================================================================
# ROLE-BASED INSTALLATION PROFILES & PRESETS (FEATURE 2)
# ==============================================================================
PROFILES = {
"bug-bounty": {
"name": "Bug Bounty & Web Hunter",
"description": "Essential web reconnaissance, endpoint discovery, parameter fuzzing, and injection tools",
"tools": [
"SQLMap", "XSStrike", "Nuclei", "Subfinder", "HTTPX", "Katana", "FFUF",
"Dalfox", "Commix", "Arjun", "Dirsearch", "WhatWeb", "CMSeeK", "ParamSpider",
"Wfuzz", "Nikto", "Sublist3r", "SecLists", "PayloadsAllTheThings"
]
},
"osint": {
"name": "OSINT & Digital Intelligence",
"description": "Deep social media footprinting, email/phone verification, domain recon, and digital tracking",
"tools": [
"Sherlock", "theHarvester", "PhoneInfoga", "Holehe", "SpiderFoot", "Seeker",
"Nexfil", "FinalRecon", "Maigret", "Recon-ng", "Sublist3r", "GHunt",
"Social-Analyzer", "IP-Tracer", "Infoga"
]
},
"red-team": {
"name": "Red Team & Exploitation",
"description": "Advanced C2 frameworks, adversary simulation, payload generation, pivoting, and privilege escalation",
"tools": [
"Metasploit-Framework", "Sliver", "Havoc-C2", "Villain", "Impacket",
"Responder", "NetExec", "PwnCat", "Routersploit", "PEASS-ng",
"LinEnum", "Linux-Exploit-Suggester", "Chisel", "Ligolo-ng", "PayloadsAllTheThings"
]
},
"network": {
"name": "Network & Infrastructure",
"description": "High-speed port scanners, protocol auditing, MITM interception, and Active Directory / SMB auditing",
"tools": [
"RustScan", "Masscan", "Netdiscover", "Bettercap", "Responder", "Impacket",
"NetExec", "Sniffnet", "THC-Hydra"
]
},
"wireless": {
"name": "Wireless & WiFi Auditing",
"description": "WPA/WPA2/WPA3 auditing, rogue AP creation, handshake capture, and deauth frameworks",
"tools": [
"Airgeddon", "Fluxion", "Wifite2", "EAPHammer", "FakeAPBuilder"
]
},
"forensics": {
"name": "Forensics & Reverse Engineering",
"description": "Memory dump triage, Android APK decompiler, binary analysis, and exploit suggestion",
"tools": [
"Volatility3", "Apktool", "JADX", "Linux-Exploit-Suggester", "PEASS-ng"
]
},
"essential": {
"name": "Essential Starter Kit",
"description": "Compact, fast curated suite with the most impactful tools across all domains",
"tools": [
"Sherlock", "theHarvester", "SQLMap", "Nuclei", "Subfinder", "HTTPX",
"FFUF", "Dirsearch", "RustScan", "Bettercap", "Responder", "Impacket",
"SecLists", "THC-Hydra", "PEASS-ng"
]
}
}
def get_profile_tools(profile_id):
"""Retrieve Tool instances corresponding to a preset profile."""
pid = profile_id.strip().lower()
if pid not in PROFILES:
return []
target_names = {name.lower() for name in PROFILES[pid]["tools"]}
return [t for t in TOOL_CATALOG if t.name.lower() in target_names]
def profile_selector(target_dir_ref):
"""Interactive role-based preset profile selector."""
clear_screen()
display_banner()
print(f" {Color.BOLD}{Color.YELLOW}=== ROLE-BASED INSTALLATION PROFILES & PRESETS ==={Color.RESET}\n")
print(f" Select a tailored security profile optimized for your specific role or workflow:\n")
p_keys = list(PROFILES.keys())
for idx, p_key in enumerate(p_keys, 1):
prof = PROFILES[p_key]
tool_count = len(prof["tools"])
print(f" {Color.CYAN}[{idx}]{Color.RESET} {Color.BOLD}{prof['name']:<32}{Color.RESET} {Color.PURPLE}({tool_count} tools){Color.RESET}")
print(f" {Color.DIM}{prof['description']}{Color.RESET}\n")
print(f" {Color.RED}[0]{Color.RESET} Return to main menu\n")
choice = input(f" {Color.BOLD}Select a profile [1-{len(p_keys)}] or 0: {Color.RESET}").strip()
if choice.isdigit() and 1 <= int(choice) <= len(p_keys):
selected_key = p_keys[int(choice) - 1]
prof = PROFILES[selected_key]
matched_tools = get_profile_tools(selected_key)
print(f"\n {Color.GREEN}Selected Profile:{Color.RESET} {Color.BOLD}{prof['name']}{Color.RESET} ({len(matched_tools)} tools)")
print(f" Included: {Color.DIM}{', '.join([t.name for t in matched_tools])}{Color.RESET}\n")
confirm = input(f" {Color.YELLOW}Proceed with installation to {target_dir_ref[0]}? [Y/n]: {Color.RESET}").strip().lower()
if confirm in ("", "y", "yes"):
return matched_tools
return None
# ==============================================================================
# CLONING & INSTALLATION ENGINE (WITH ISOLATED VIRTUAL ENVIRONMENTS)
# ==============================================================================
def check_pip_break_system_packages():
"""Detect if pip supports and requires --break-system-packages (PEP 668)."""
try:
res = subprocess.run([sys.executable, "-m", "pip", "install", "--help"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
return "--break-system-packages" in res.stdout
except Exception:
return False
PIP_HAS_BREAK_FLAG = check_pip_break_system_packages()
def generate_tool_launcher(tool, dest_path, venv_py):
"""
Generate executable launcher wrappers (run.sh on POSIX, run.bat on Windows)
pointing directly to the isolated virtual environment interpreter.
"""
try:
# Determine entry file if available
entry = ""
if tool.executables:
entry = tool.executables[0]
else:
candidates = [
f"{tool.folder}.py", "main.py", "run.py", "app.py", "cli.py",
f"{tool.folder.lower()}.py"
]
for c in candidates:
if os.path.exists(os.path.join(dest_path, c)):
entry = c
break
# Generate run.sh for Linux/macOS
if os.name != "nt":
sh_path = os.path.join(dest_path, "run.sh")
sh_content = f"""#!/usr/bin/env bash
# Auto-generated isolated launcher for {tool.name} (setup_hack_env)
DIR="$(cd "$(dirname "${{BASH_SOURCE[0]}}")" && pwd)"
if [ -f "$DIR/.venv/bin/python" ]; then
PY="$DIR/.venv/bin/python"
elif [ -f "$DIR/.venv/bin/python3" ]; then
PY="$DIR/.venv/bin/python3"
else
PY="python3"
fi
ENTRY="{entry}"
if [ -n "$ENTRY" ] && [ -f "$DIR/$ENTRY" ]; then
exec "$PY" "$DIR/$ENTRY" "$@"
else
exec "$PY" "$@"
fi
"""
with open(sh_path, "w", encoding="utf-8") as f:
f.write(sh_content)