-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·1955 lines (1864 loc) · 66.4 KB
/
install.sh
File metadata and controls
executable file
·1955 lines (1864 loc) · 66.4 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
#!/bin/bash
# =============================================================================
# HackerToolkit installer — penetration testing, red teaming, bug bounty
# https://github.com/ChrisJr404/HackerToolkit
# =============================================================================
# ---- Strict-ish mode ---------------------------------------------------------
# We don't enable `set -e` because each tool install is allowed to fail
# independently — the script tracks per-tool status and continues. We do
# enable -u (catches unset vars) and pipefail (catches pipe-stage failures).
set -uo pipefail
# ---- Color palette -----------------------------------------------------------
# Use tput when available; fall back to raw escapes so the script stays portable
# on minimal containers without ncurses. Disable colors when stdout isn't a TTY
# (CI, redirected log files) so the output stays grep-friendly.
if [ -t 1 ] && command -v tput >/dev/null 2>&1 && [ "$(tput colors 2>/dev/null || echo 0)" -ge 8 ]; then
BOLD=$(tput bold); DIM=$(tput dim)
RED=$(tput setaf 1); GRN=$(tput setaf 2); YLL=$(tput setaf 3)
BLU=$(tput setaf 4); MAG=$(tput setaf 5); CYN=$(tput setaf 6); WHT=$(tput setaf 7)
NC=$(tput sgr0)
else
BOLD=''; DIM=''; RED=''; GRN=''; YLL=''; BLU=''; MAG=''; CYN=''; WHT=''; NC=''
fi
sh='#!/bin/bash\n'
# ---- Pretty-print helpers ----------------------------------------------------
hr() { printf '%b\n' "${DIM}$(printf '─%.0s' $(seq 1 78))${NC}"; }
hdr() { printf '\n%b\n' "${BOLD}${CYN}❯ $1${NC}"; hr; }
ok() { printf '%b %s\n' "${GRN}✓${NC}" "$1"; }
warn() { printf '%b %s\n' "${YLL}!${NC}" "$1"; }
err() { printf '%b %s\n' "${RED}✗${NC}" "$1"; }
info() { printf '%b %s\n' "${BLU}ℹ${NC}" "$1"; }
# safe_cd <dir> — fail loudly if a category dir is missing instead of silently
# landing the next install in the wrong cwd.
safe_cd() {
cd "$1" 2>/dev/null || { err "cd '$1' failed (cwd=$(pwd))"; exit 1; }
}
# ---- CLI arg parser ----------------------------------------------------------
# Flags:
# -h, --help show usage
# -l, --list list all tools (grouped by category) and exit
# --only=a,b,c install only these tools (comma-separated names)
# --skip=a,b,c install everything except these tools
# --only-cat=X,Y install only these categories (e.g. Recon-Frameworks)
# --skip-cat=X,Y skip these categories
ONLY=""; SKIP=""; ONLY_CAT=""; SKIP_CAT=""; LIST_MODE=0
usage() {
cat <<USAGE
${BOLD}HackerToolkit installer${NC}
Usage: ./install.sh [OPTIONS]
-h, --help Show this help and exit
-l, --list Print every tool grouped by category, then exit
--only=a,b,c Install only these tools (by pck name)
--skip=a,b,c Skip these tools
--only-cat=X,Y Install only these categories
--skip-cat=X,Y Skip these categories
Categories follow the directory names under ./HackerToolkit/, e.g.
Enumeration-Recon-Tools Apex-Domain-Enumeration Recon-Frameworks
Subdomain-Enumeration-and-Brute-Force Active-Directory Linux-Privilege-Escalation
Windows-Privilege-Escalation Vulnerability-Scanners C2 Phishing-Smishing-Etc
Stealth ... (run ${BOLD}--list${NC} to see them all)
Examples:
./install.sh --only=ffuf,gobuster,nuclei
./install.sh --skip-cat=C2,Phishing-Smishing-Etc
./install.sh --only-cat=Subdomain-Enumeration-and-Brute-Force
USAGE
}
while [ $# -gt 0 ]; do
case "$1" in
-h|--help) usage; exit 0;;
-l|--list) LIST_MODE=1;;
--only=*) ONLY="${1#--only=}";;
--skip=*) SKIP="${1#--skip=}";;
--only-cat=*) ONLY_CAT="${1#--only-cat=}";;
--skip-cat=*) SKIP_CAT="${1#--skip-cat=}";;
*) err "unknown flag: $1"; usage; exit 2;;
esac
shift
done
# ---- Architecture detection --------------------------------------------------
# Used by tools that download arch-pinned binaries (mubeng, evilginx, etc.).
case "$(uname -m)" in
x86_64|amd64) ARCH="amd64"; ARCH_ALT="x86_64";;
aarch64|arm64) ARCH="arm64"; ARCH_ALT="aarch64";;
armv7l|armv6l) ARCH="armv7"; ARCH_ALT="arm";;
*) ARCH="$(uname -m)"; ARCH_ALT="$ARCH";;
esac
OS_KERNEL="$(uname -s | tr '[:upper:]' '[:lower:]')" # linux / darwin
# ---- Dependency check --------------------------------------------------------
# Returns 0 if the binary already resolves; otherwise installs via apt and
# returns 1 so callers can branch if needed. Pass arg 2 to override the
# package name when it differs from the binary (e.g. exist 7z p7zip-full).
exist(){
if [ -z "$(command -v "$1" 2>/dev/null)" ]; then
warn "$1 not found — installing"
sudo apt -y install "${2:-$1}" >/dev/null 2>&1 \
&& ok "$1 installed" \
|| err "$1 install failed"
return 1
fi
return 0
}
# ---- Per-tool install helpers ------------------------------------------------
# Single-source-of-truth wrapper around the "is it installed already? install
# it. did it work?" pattern that used to be open-coded in every block. Cuts
# per-tool boilerplate from ~12 lines to ~3-4.
#
# Usage:
# pck="ffuf"
# if try_install "$pck"; then
# go install github.com/ffuf/ffuf/v2@latest
# mark_install "$pck"
# fi
#
# `set_category <Name>` is called at the top of each section so --only-cat /
# --skip-cat filters work.
CURRENT_CATEGORY="(none)"
set_category() {
CURRENT_CATEGORY="$1"
if [ "$LIST_MODE" = 1 ]; then
printf "\n${BOLD}${CYN}━━ %s ━━${NC}\n" "$1"
else
printf "\n${BOLD}${CYN}━━ %s ━━${NC}\n" "$1"
fi
}
# Membership test that handles whitespace-tolerant comma lists.
_in_list() {
local needle="$1" haystack=",$2,"
case "$haystack" in *",$needle,"*) return 0;; esac
return 1
}
# Returns 0 if the caller should proceed with the install body, 1 to skip.
# Skips if: --only / --skip / --only-cat / --skip-cat exclude it, --list mode,
# or the binary is already on PATH.
try_install() {
local pck="$1"
# Filter on category
if [ -n "$ONLY_CAT" ] && ! _in_list "$CURRENT_CATEGORY" "$ONLY_CAT"; then return 1; fi
if [ -n "$SKIP_CAT" ] && _in_list "$CURRENT_CATEGORY" "$SKIP_CAT"; then return 1; fi
# Filter on tool name
if [ -n "$ONLY" ] && ! _in_list "$pck" "$ONLY"; then return 1; fi
if [ -n "$SKIP" ] && _in_list "$pck" "$SKIP"; then return 1; fi
if [ "$LIST_MODE" = 1 ]; then
printf " • %s\n" "$pck"
return 1
fi
if command -v "$pck" >/dev/null 2>&1; then
printf " ${BLU}↺${NC} ${BOLD}%s${NC} ${DIM}already installed — skipping${NC}\n" "$pck"
return 1
fi
printf " ${YLL}▸${NC} ${BOLD}%s${NC} ${DIM}installing…${NC}\n" "$pck"
return 0
}
# Records based on $? (or explicit second arg) whether the install body succeeded.
# Captured to install.tmp / not-install.tmp for the final summary tally.
mark_install() {
local pck="$1"
local rc="${2:-$?}"
if [ "$rc" -eq 0 ]; then
printf " ${GRN}✓${NC} %s ${DIM}installed${NC}\n" "$pck"
echo "Installed $pck" >> "$mypath/install.tmp"
else
printf " ${RED}✗${NC} %s ${RED}install failed${NC} ${DIM}(rc=%s)${NC}\n" "$pck" "$rc"
echo "Not Installed $pck (rc=$rc)" >> "$mypath/not-install.tmp"
fi
}
# Variant of try_install for tools that don't put a binary on PATH — instead
# the install creates a directory under the current category folder. Skips if
# the directory already exists.
try_install_dir() {
local pck="$1"
local dir="${2:-$pck}"
if [ -n "$ONLY_CAT" ] && ! _in_list "$CURRENT_CATEGORY" "$ONLY_CAT"; then return 1; fi
if [ -n "$SKIP_CAT" ] && _in_list "$CURRENT_CATEGORY" "$SKIP_CAT"; then return 1; fi
if [ -n "$ONLY" ] && ! _in_list "$pck" "$ONLY"; then return 1; fi
if [ -n "$SKIP" ] && _in_list "$pck" "$SKIP"; then return 1; fi
if [ "$LIST_MODE" = 1 ]; then
printf " • %s ${DIM}(directory-tracked)${NC}\n" "$pck"
return 1
fi
if [ -d "$dir" ]; then
printf " ${BLU}↺${NC} ${BOLD}%s${NC} ${DIM}directory exists — skipping${NC}\n" "$pck"
return 1
fi
printf " ${YLL}▸${NC} ${BOLD}%s${NC} ${DIM}cloning…${NC}\n" "$pck"
return 0
}
# ---- Banner ------------------------------------------------------------------
clear 2>/dev/null || true
cat <<BANNER
${BOLD}${CYN}
██╗ ██╗ █████╗ ██████╗██╗ ██╗███████╗██████╗
██║ ██║██╔══██╗██╔════╝██║ ██╔╝██╔════╝██╔══██╗
███████║███████║██║ █████╔╝ █████╗ ██████╔╝
██╔══██║██╔══██║██║ ██╔═██╗ ██╔══╝ ██╔══██╗
██║ ██║██║ ██║╚██████╗██║ ██╗███████╗██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
${MAG}████████╗ ██████╗ ██████╗ ██╗ ██╗ ██╗██╗████████╗
╚══██╔══╝██╔═══██╗██╔═══██╗██║ ██║ ██╔╝██║╚══██╔══╝
██║ ██║ ██║██║ ██║██║ █████╔╝ ██║ ██║
██║ ██║ ██║██║ ██║██║ ██╔═██╗ ██║ ██║
██║ ╚██████╔╝╚██████╔╝███████╗██║ ██╗██║ ██║
╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
${NC}
${BOLD}Comprehensive Pentest / Red Team / Bug-Bounty Suite${NC}
${DIM}https://github.com/ChrisJr404/HackerToolkit${NC}
BANNER
hr
if [ "$LIST_MODE" = 1 ]; then
info "${BOLD}--list${NC} active — printing tools without installing."
elif [ -n "$ONLY" ] || [ -n "$SKIP" ] || [ -n "$ONLY_CAT" ] || [ -n "$SKIP_CAT" ]; then
info "Filter active: ${ONLY:+only=${BOLD}${ONLY}${NC} }${SKIP:+skip=${BOLD}${SKIP}${NC} }${ONLY_CAT:+only-cat=${BOLD}${ONLY_CAT}${NC} }${SKIP_CAT:+skip-cat=${BOLD}${SKIP_CAT}${NC}}"
else
info "Stay at the keyboard — a few steps need sudo / interactive prompts."
fi
info "Architecture: ${BOLD}${OS_KERNEL}/${ARCH}${NC}"
info "Per-tool log: install.tmp (success) / not-install.tmp (failures, with rc)"
hr
# ---- Pre-flight ----------------------------------------------------------
# Catch the cheap-to-detect failure modes here so we don't blow up 40 minutes
# into a half-installed state.
[ "$LIST_MODE" = 1 ] || hdr "Pre-flight checks"
preflight_ok=1
# Linux only — most install blocks shell-out to `apt`. macOS will need ports.
if [ "$LIST_MODE" != 1 ]; then
if [ "$OS_KERNEL" = "linux" ]; then
ok "OS: linux"
else
warn "OS: ${OS_KERNEL} — apt-based blocks will fail; expect partial install."
fi
fi
# Internet
if [ "$LIST_MODE" != 1 ]; then
if curl -sSfI --max-time 5 https://github.com >/dev/null 2>&1 || \
wget -q --spider --timeout=5 https://github.com 2>/dev/null; then
ok "Internet: github.com reachable"
else
err "Internet: github.com not reachable — aborting."
exit 1
fi
fi
# sudo cached or non-interactive
if [ "$LIST_MODE" != 1 ]; then
if sudo -n true 2>/dev/null; then
ok "sudo: cached"
else
warn "sudo: will prompt for password during apt installs"
fi
fi
# Free disk: need at least 2GB
if [ "$LIST_MODE" != 1 ]; then
free_kb=$(df -Pk . 2>/dev/null | awk 'NR==2 {print $4+0}')
if [ "${free_kb:-0}" -ge 2000000 ]; then
ok "Disk: $((free_kb / 1024 / 1024))G free"
else
warn "Disk: only $((${free_kb:-0} / 1024 / 1024))G free — recommend ≥ 2G"
fi
fi
[ "$LIST_MODE" = 1 ] || hr
# - Main folder
mkdir -p HackerToolkit/.bin
safe_cd HackerToolkit
mypath="$(pwd)"
# Idempotency: truncate per-tool logs at the start of each run so re-runs
# don't double-count or carry stale failures from a prior attempt.
: > "$mypath/install.tmp"
: > "$mypath/not-install.tmp"
PATH="$PATH:$(pwd)/.bin"
if [ -e "$mypath/.bin/hackertoolkit_bash" ]; then
regexHackPath="$mypath/.bin/hackertoolkit_bash"
if [[ "$PATH" =~ $regexHackPath ]];then
echo "HackerToolkit executable path found!"
else
source $mypath/.bin/hackertoolkit_bash
fi
else
echo "HackerToolkit executable path was not found!"
echo "export PATH=\$PATH:$(pwd)/.bin" >>$(pwd)/.bin/hackertoolkit_bash
PATH=$PATH:$(pwd)/.bin
export PATH
fi
# echo "john: $(which john)"
# echo "relations: $(which relations)"
# echo "karma_v2: $(which karma_v2)"
# echo "BloodHound: $(which BloodHound)"
# exit 0
# - Dependencies
# - If the executable file is found nothing happen
# In --list mode we skip both the dep installs and the Go bootstrap so the
# listing is fast and side-effect-free.
if [ "$LIST_MODE" = 1 ]; then
info "Skipping dependency installs (--list mode)"
else
info "Stay at the keyboard — a few steps need sudo / interactive prompts."
sleep 2
exist git
exist wget
exist gcc
fi
# - Local Go toolchain (latest stable, auto-detected, arch-aware)
# Avoids fighting with the system package manager's pinned version. We always
# fetch the latest release tag from go.dev/VERSION?m=text and install under
# .bin/go/. If the tarball is already cached we skip the download.
if [ "$LIST_MODE" != 1 ]; then
info "Bootstrapping local Go toolchain (${OS_KERNEL}/${ARCH})…"
safe_cd .bin
GO_VERSION=$(curl -sS --max-time 10 https://go.dev/VERSION?m=text 2>/dev/null | head -1)
if [ -z "${GO_VERSION:-}" ] || [[ "$GO_VERSION" != go* ]]; then
warn "Could not auto-detect Go version — falling back to go1.24.0"
GO_VERSION="go1.24.0"
fi
GO_TARBALL="${GO_VERSION}.${OS_KERNEL}-${ARCH}.tar.gz"
if [ ! -d "$mypath/.bin/go" ]; then
if [ ! -e "$mypath/.bin/${GO_TARBALL}" ]; then
wget -q --show-progress "https://go.dev/dl/${GO_TARBALL}" || \
{ err "go download failed for ${GO_TARBALL}"; exit 1; }
fi
tar -C . -xzf "${GO_TARBALL}"
fi
"$mypath/.bin/go/bin/go" version
alias go="$mypath/.bin/go/bin/go"
if grep -qF "GOPATH=\$HOME/go" "$mypath/.bin/hackertoolkit_bash" 2>/dev/null; then
info "Go PATH already configured."
else
export GOPATH="$HOME/go"
{
echo 'export GOPATH=$HOME/go;'
echo 'export PATH=$PATH:$HOME/go/bin'
} >>"$mypath/.bin/hackertoolkit_bash"
export PATH="$PATH:$HOME/go/bin"
"$mypath/.bin/go/bin/go" env -w CGO_ENABLED=1
fi
safe_cd ..
exist pip3 "python3-pip"
exist pipx
exist jq
exist lolcat
exist unzip
exist cargo rust-all
exist perl
exist make
exist realpath coreutils
exist 7z
exist rsync
exist snap snapd
fi
regexPIPXexPath="$HOME/\.local/bin"
if [[ "$PATH" =~ $regexPIPXexPath ]];then
echo "pipx executable path found!"
else
echo "No, pipx executable path was not found!"
PATH="$PATH:$HOME/.local/bin"
export PATH
echo "export PATH=\$PATH:\$HOME/.local/bin" >>$mypath/.bin/hackertoolkit_bash
fi
# - Enumeration & Recon Tools
set_category "Enumeration-Recon-Tools"
mkdir -p "Enumeration-Recon-Tools"
safe_cd "Enumeration-Recon-Tools"
## Ad & Analytic Trackers
set_category "Ad-Analytic-Trackers"
mkdir -p "Ad-Analytic-Trackers"
safe_cd "Ad-Analytic-Trackers"
### relations.sh
pck="relations"
if try_install "$pck"; then
wget -O $pck https://gist.github.com/hateshape/393ab7003023f3b13126a4892100c8ff
chmod +x relations.sh
ln -s $(realpath relations.sh) $mypath/.bin/relations
mark_install "$pck"
fi
safe_cd ..
## Apex Domain Enumeration
set_category "Apex-Domain-Enumeration"
mkdir -p "Apex-Domain-Enumeration"
safe_cd "Apex-Domain-Enumeration"
### check_mdi
# https://github.com/expl0itabl3/check_mdi
pck="check_mdi"
if try_install "$pck"; then
git clone 'https://github.com/expl0itabl3/check_mdi.git' --depth 1
cd check_mdi
# alias check_mdi="python3 $(pwd)/check_mdi.py"
# echo "alias check_mdi=\"python3 $(pwd)/check_mdi.py\"" >>$mypath/.bin/hackertoolkit_bash
echo -e "${sh}python3 $(pwd)/check_mdi.py" > $mypath/.bin/$pck
chmod +x $mypath/.bin/$pck
safe_cd ..
mark_install "$pck"
fi
### CloudRecon
# https://github.com/g0ldencybersec/CloudRecon
pck="CloudRecon"
if try_install "$pck"; then
export GOPATH=$HOME/go;
go env -w CGO_ENABLED=1;
go install github.com/g0ldencybersec/CloudRecon@latest;
mark_install "$pck"
fi
### FavFreak
# https://github.com/devanshbatham/FavFreak
pck="FavFreak"
if try_install "$pck"; then
git clone https://github.com/devanshbatham/FavFreak.git --depth 1
cd FavFreak
pipx install virtualenv
pipx ensurepath
eval "$(register-python-argcomplete pipx)"
virtualenv -p python3 env
source env/bin/activate
python3 -m pip install mmh3
# alias FavFreak="$(pwd)/venv/bin/python3 $(pwd)/favfreak.py"
# echo "alias FavFreak=\"$(pwd)/venv/bin/python3 $(pwd)/favfreak.py\"" >>$mypath/.bin/hackertoolkit_bash
echo -e "${sh}$(pwd)/venv/bin/python3 $(pwd)/favfreak.py" > $mypath/.bin/$pck
chmod +x $mypath/.bin/$pck
mark_install "$pck"
echo
deactivate xxx
safe_cd ..
else
echo -e "${BLU}$pck${NC} already installed. Skipping..."
fi
safe_cd ..
## Archival Enumeration
set_category "Archival-Enumeration"
mkdir -p "Archival-Enumeration"
safe_cd "Archival-Enumeration"
### gau
# https://github.com/lc/gau
pck="gau";
if try_install "$pck"; then
git clone https://github.com/lc/gau.git --depth 1;
cd gau/cmd/gau;
go build;
# sudo mv gau /usr/local/bin/
ln -s $(pwd)/gau $mypath/.bin/gau
safe_cd ../..
cp .gau.toml $HOME/
gau --version;
safe_cd ..
mark_install "$pck"
fi
### waymore
# https://github.com/xnl-h4ck3r/waymore
pck="waymore"
if try_install "$pck"; then
pipx install waymore
mark_install "$pck"
echo
pipx ensurepath
else
echo -e "${BLU}$pck${NC} already installed. Skipping..."
fi
safe_cd ..
## Change Detection
set_category "Change-Detection"
mkdir -p "Change-Detection"
safe_cd "Change-Detection"
### changedetection.io
# https://github.com/dgtlmoon/changedetection.io
pck="changedetection.io"
if try_install "$pck"; then
pipx install changedetection.io
# changedetection.io -d /path/to/empty/data/dir -p 5000
mark_install "$pck"
fi
safe_cd ..
## Credential Collection Tools
set_category "Credential-Collection-Tools"
mkdir -p "Credential-Collection-Tools"
safe_cd "Credential-Collection-Tools"
### deepdarkCTI
# https://github.com/fastfire/deepdarkCTI/tree/main
pck="deepdarkCTI"
if try_install_dir "$pck" "deepdarkCTI"; then
git clone 'https://github.com/fastfire/deepdarkCTI.git' --depth 1
mark_install "$pck"
fi
### h8mail
# https://github.com/khast3x/h8mail
pck="h8mail"
if try_install "$pck"; then
pipx install h8mail
mark_install "$pck"
fi
### hacxx-underground
# https://github.com/hacxx-underground/Files
pck="hacxx-underground"
if try_install_dir "$pck" "$pck"; then
git clone 'https://github.com/hacxx-underground/Files.git' hacxx-underground --depth 1
mark_install "$pck"
fi
### linkedin2username
# https://github.com/initstring/linkedin2username
pck="linkedin2username";
if try_install "$pck"; then
git clone 'https://github.com/initstring/linkedin2username.git' --depth 1;
cd linkedin2username;
# pipx install -r ./requirements.txt;
python3 -m venv venv;
reqList=$(sed '/^#/d' requirements.txt | tr '\n' ' ');
venv/bin/pip install $reqList;
# alias linkedin2username="$(pwd)/venv/bin/python3 linkedin2username.py" ;
# echo "alias linkedin2username=\"$(pwd)/venv/bin/python3 linkedin2username.py\"" >>$mypath/.bin/hackertoolkit_bash;
echo -e "${sh}$(pwd)/venv/bin/python3 $(pwd)/linkedin2username.py" > $mypath/.bin/$pck
chmod +x $mypath/.bin/$pck
safe_cd ..
mark_install "$pck"
fi
### WeakestLink
# https://github.com/shellfarmer/WeakestLink
pck="WeakestLink"
if try_install "$pck"; then
echo "Copy and paste this link in your firefox web browser to install the plugin"
echo ""
echo "https://addons.mozilla.org/en-US/firefox/addon/weakestlink/"
echo ""
echo -e "${sh}echo plugin link: 'https://addons.mozilla.org/en-US/firefox/addon/weakestlink/'" > $mypath/.bin/$pck
chmod +x $mypath/.bin/$pck
echo "Run the WeakestLink command tu see again this"
sleep 2
else
echo -e "${BLU}$pck${NC} already installed. Skipping..."
fi
safe_cd ..
## Custom Wordlists
set_category "Custom-Wordlists"
mkdir -p "Custom-Wordlists"
safe_cd "Custom-Wordlists"
### CeWL
# https://github.com/digininja/CeWL
pck="cewl"
if try_install "$pck"; then
exist gem ruby-rubygems
exist gem ruby-dev
sudo gem install mime
sudo gem install mime-types
exist exiftool libimage-exiftool-perl
sudo gem install mini_exiftool
sudo gem install nokogiri
sudo gem install rubyzip
sudo gem install spider
git clone 'https://github.com/digininja/CeWL.git'
cd CeWL
chmod u+x ./cewl.rb
./cewl.rb -h
# alias cewl="$(pwd)/cewl.rb" ;
# echo "alias cewl=\"$(pwd)/cewl.rb\"" >>$mypath/.bin/hackertoolkit_bash;
ln -s $(pwd)/cewl.rb $mypath/.bin/$pck
safe_cd ..
mark_install "$pck"
fi
### wordlistgen
# https://github.com/ameenmaali/wordlistgen
pck="wordlistgen";
if try_install "$pck"; then
# go get -u github.com/ameenmaali/wordlistgen
git clone https://github.com/ameenmaali/wordlistgen.git;
cd wordlistgen/
go mod init wordlistgen/v3
go get
go install
safe_cd ..
mark_install "$pck"
fi
safe_cd ..
## Directory Enumeration
set_category "Directory-Enumeration"
mkdir -p "Directory-Enumeration"
safe_cd "Directory-Enumeration"
### dirsearch
# https://github.com/maurosoria/dirsearch
pck="dirsearch"
if try_install "$pck"; then
git clone https://github.com/maurosoria/dirsearch.git --depth 1
echo -e "${sh}ls -al dirsearch" > $mypath/.bin/$pck
chmod +x $mypath/.bin/$pck
mark_install "$pck"
fi
### feroxbuster
pck="feroxbuster";
# https://github.com/epi052/feroxbuster
if try_install "$pck"; then
curl -sL https://raw.githubusercontent.com/epi052/feroxbuster/main/install-nix.sh | bash
ln -s $(pwd)/feroxbuster $mypath/.bin/feroxbuster
mark_install "$pck"
fi
### ffuf
# https://github.com/ffuf/ffuf
pck="ffuf"
if try_install "$pck"; then
go install github.com/ffuf/ffuf/v2@latest
mark_install "$pck"
fi
### gobuster
# https://github.com/OJ/gobuster
pck="gobuster";
if try_install "$pck"; then
go install github.com/OJ/gobuster/v3@latest
mark_install "$pck"
fi
### wfuzz
pck="wfuzz";
# https://github.com/xmendez/wfuzz
if try_install "$pck"; then
# pipx install wfuzz
git clone https://github.com/xmendez/wfuzz.git;
cd wfuzz;
python3 -m venv venv;
reqList=$(sed '/^#/d' requirements.txt | tr '\n' ' ');
venv/bin/pip install $reqList;
venv/bin/python3 setup.py build;
venv/bin/python3 setup.py install;
# alias wfuzz="$(pwd)/venv/bin/wfuzz "
# echo "alias wfuzz=\"$(pwd)/venv/bin/wfuzz \"" >>$mypath/.bin/hackertoolkit_bash
ln -s $(pwd)/venv/bin/wfuzz $mypath/.bin/wfuzz
safe_cd ..
mark_install "$pck"
fi
safe_cd ..
## Github Enumeration
set_category "Github Enumeration"
mkdir -p "Github Enumeration"
safe_cd "Github Enumeration"
### github-search
# https://github.com/gwen001/github-search
pck="github-search";
if try_install_dir "$pck" "github-search"; then
git clone https://github.com/gwen001/github-search
cd github-search
# pip3 install -r requirements.txt
python3 -m venv venv
reqList=$(sed '/^#/d' requirements.txt | tr '\n' ' ')
venv/bin/pip install $reqList
# - this package, like john the ripper has many tools, so it's better add the run path to the system executable PATH
export PATH="$PATH:$(realpath . )"
echo "export PATH=\"\$PATH:$(realpath . )\"" >>$mypath/.bin/hackertoolkit_bash
safe_cd ..
mark_install "$pck"
fi
### gitleaks
# https://github.com/gitleaks/gitleaks
pck="gitleaks";
if try_install "$pck"; then
git clone https://github.com/gitleaks/gitleaks.git
cd gitleaks
make build
# make install
# -Installed on /usr/local/bin/gitleaks
safe_cd ..
mark_install "$pck"
fi
safe_cd ..
## JavaScript
set_category "JavaScript"
mkdir -p "JavaScript"
safe_cd "JavaScript"
### jsluice
# https://github.com/BishopFox/jsluice
pck="jsluice";
if try_install "$pck"; then
go install github.com/BishopFox/jsluice/cmd/jsluice@latest
mark_install "$pck"
fi
### LinkFinder
# https://github.com/GerbenJavado/LinkFinder
pck="linkfinder";
if try_install "$pck"; then
git clone https://github.com/GerbenJavado/LinkFinder.git --depth 1
cd LinkFinder;
# pip3 install -r requirements.txt
# python3 setup.py install
python3 -m venv venv;
reqList=$(sed '/^#/d' requirements.txt | tr '\n' ' ');
venv/bin/pip install $reqList;
venv/bin/python3 setup.py build;
venv/bin/python3 setup.py install;
# alias linkfinder="$(pwd)/venv/bin/python3 linkfinder.py";
# echo "alias linkfinder=\"$(pwd)/venv/bin/python3 linkfinder.py\"" >>$mypath/.bin/hackertoolkit_bash
echo -e "${sh}$(pwd)/venv/bin/python3 $(pwd)/linkfinder.py" > $mypath/.bin/$pck
chmod +x $mypath/.bin/$pck
safe_cd ..
mark_install "$pck"
fi
safe_cd ..
## Mobile App Enumeration
set_category "Mobile-App-Enumeration"
mkdir -p "Mobile-App-Enumeration"
safe_cd "Mobile-App-Enumeration"
### apkleaks
# https://github.com/dwisiswant0/apkleaks
# it utilizes jadx
pck="apkleaks";
if try_install "$pck"; then
pipx install apkleaks
mark_install "$pck"
fi
safe_cd ..
## Port-Scanners-(Active)
set_category "Port-Scanners-Active"
mkdir -p "Port-Scanners-Active"
safe_cd "Port-Scanners-Active"
### AutoRecon
# https://github.com/Tib3rius/AutoRecon
pck="autorecon";
## tnscmd10g
if try_install "$pck"; then
sudo apt -y install curl dnsrecon nbtscan nikto nmap onesixtyone redis-tools smbclient smbmap snmp sslscan sipvicious whatweb wkhtmltopdf libio-socket-ip-perl default-jre
sudo snap install enum4linux
sudo snap install seclists
if [ -z "$(which impacket)" ]; then
pipx install impacket
fi
git clone https://gitlab.com/kalilinux/packages/oscanner.git --depth 1
cd oscanner
chmod +x $(pwd)/oscanner.jar
ln -s $(pwd)/oscanner.jar $mypath/.bin/oscanner
pipx install git+https://github.com/Tib3rius/AutoRecon.git
safe_cd ..
mark_install "$pck"
fi
### masscan
# https://github.com/robertdavidgraham/masscan
pck="masscan";
if try_install "$pck"; then
sudo apt-get --assume-yes install git make gcc;
git clone https://github.com/robertdavidgraham/masscan --depth 1;
cd masscan;
make;
sudo make install;
mark_install "$pck"
make clean
echo
safe_cd ..
else
echo -e "${BLU}$pck${NC} already installed. Skipping..."
fi
### naabu
# https://github.com/projectdiscovery/naabu
pck="naabu";
if try_install "$pck"; then
sudo apt install -y libpcap-dev
go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest
mark_install "$pck"
fi
### nmap
# https://github.com/nmap/nmap
# - Instaled as dependency of AutoRecon
pck="nmap";
nmap -V
mark_install "$pck"
echo
# https://github.com/RustScan/RustScan
pck="rustscan";
if try_install "$pck"; then
wget https://github.com/RustScan/RustScan/releases/download/2.2.2/rustscan_2.2.2_amd64.deb;
sudo dpkg -i rustscan_2.2.2_amd64.deb;
mark_install "$pck"
fi
safe_cd ..
## Port-Scanners-(Passive)
set_category "Port-Scanners-Passive"
mkdir -p "Port-Scanners-Passive"
safe_cd "Port-Scanners-Passive"
# https://github.com/s0md3v/Smap
pck="smap";
if try_install "$pck"; then
wget -O smap.tar.xz https://github.com/s0md3v/Smap/releases/download/0.1.12/smap_0.1.12_linux_amd64.tar.xz
tar -xf smap.tar.xz
ln -s $(pwd)/smap_0.1.12_linux_amd64/smap $mypath/.bin/smap
mark_install "$pck"
fi
safe_cd ..
## Recon Frameworks
set_category "Recon-Frameworks"
mkdir -p "Recon-Frameworks"
safe_cd "Recon-Frameworks"
# https://github.com/six2dez/reconftw
pck="reconftw";
if try_install "$pck"; then
git clone https://github.com/six2dez/reconftw --depth 1;
cd reconftw/;
./install.sh;
# - it says that it install also (Installing Golang tools (44) on $HOME/go/bin/):
# inscope installed (1/44)
# hakip2host installed (2/44)
# puredns installed (3/44)
# interactsh-client installed (4/44)
# nuclei installed (5/44)
# analyticsrelationships installed (6/44)
# crt installed (7/44)
# nmapurls installed (8/44)
# dnsx installed (9/44)
# gitlab-subdomains installed (10/44)
# dalfox installed (11/44)
# gitdorks_go installed (12/44)
# roboxtractor installed (13/44)
# gau installed (14/44)
# Gxss installed (15/44)
# katana installed (16/44)
# mapcidr installed (17/44)
# brutespray installed (18/44)
# sns installed (19/44)
# qsreplace installed (20/44)
# notify installed (21/44)
# dsieve installed (22/44)
# gotator installed (23/44)
# ppmap installed (24/44)
# subfinder installed (25/44)
# smap installed (26/44)
# crlfuzz installed (27/44)
# Web-Cache-Vulnerability-Scanner installed (28/44)
# cdncheck installed (29/44)
# httpx installed (30/44)
# ffuf installed (31/44)
# subjs installed (32/44)
# github-endpoints installed (33/44)
# unfurl installed (34/44)
# anew installed (35/44)
# gf installed (36/44)
# shortscan installed (37/44)
# tlsx installed (38/44)
# mantra installed (39/44)
# github-subdomains installed (40/44)
# enumerepo installed (41/44)
# amass installed (42/44)
# s3scanner installed (43/44)
# dnstake installed (44/44)
# - Installing repositories (29) ( on $HOME/Tools/ )
# dnsvalidator installed (1/29)
# wafw00f installed (2/29)
# ultimate-nmap-parser installed (3/29)
# Corsy installed (4/29)
# gitleaks installed (5/29)
# CMSeeK installed (6/29)
# Wapiti installed (7/29)
# SwaggerSpy installed (8/29)
# regulator installed (9/29)
# gitdorks_go installed (10/29)
# dorks_hunter installed (11/29)
# JSA installed (12/29)
# trufflehog installed (13/29)
# pydictor installed (14/29)
# smuggler installed (15/29)
# ghauri installed (16/29)
# cloud_enum installed (17/29)
# testssl installed (18/29)
# Web-Cache-Vulnerability-Scanner installed (19/29)
# Oralyzer installed (20/29)
# nomore403 installed (21/29)
# fav-up installed (22/29)
# massdns installed (23/29)
# gf installed (24/29)
# commix installed (25/29)
# LeakSearch installed (26/29)
# urless installed (27/29)
# interlace installed (28/29)
# Gf-Patterns installed (29/29)
# ./reconftw.sh -d target.com -r
# alias reconftw="$(pwd)/reconftw.sh"
#"echo "alias reconftw=\"$(pwd)/reconftw.sh\"" >>$mypath/.bin/hackertoolkit_bash
ln -s $(pwd)/reconftw.sh $mypath/.bin/$pck
safe_cd ..
mark_install "$pck"
fi
### recon-ng
# https://github.com/lanmaster53/recon-ng
pck="recon-ng";
if try_install "$pck"; then
git clone https://github.com/lanmaster53/recon-ng.git --depth 1;
cd recon-ng;
python3 -m venv venv;
reqList=$(sed '/^#/d' REQUIREMENTS | tr '\n' ' ');
venv/bin/pip install $reqList;
# alias recon-ng="$(pwd)/recon-ng"
# alias recon-cli="$(pwd)/recon-cli"
# alias recon-web="$(pwd)/recon-web"
# echo "alias recon-ng=\"$(pwd)/recon-ng\"" >>$mypath/.bin/hackertoolkit_bash
# echo "alias recon-cli=\"$(pwd)/recon-cli\"" >>$mypath/.bin/hackertoolkit_bash
# echo "alias recon-web=\"$(pwd)/recon-web\"" >>$mypath/.bin/hackertoolkit_bash
ln -s $(pwd)/recon-ng $mypath/.bin/recon-ng
ln -s $(pwd)/recon-cli $mypath/.bin/recon-cli
ln -s $(pwd)/recon-web $mypath/.bin/recon-web
safe_cd ..
mark_install "$pck"
fi
### rengine
# https://github.com/yogeshojha/rengine
# -This package install docker and others 43 packages more, I think they are the same
# - of reconftw
pck="rengine";
if try_install_dir "$pck" "rengine"; then
git clone https://github.com/yogeshojha/rengine --depth 1
cd rengine
# - For posgresql password
sudo apt install -y postgresql postgresql-contrib
echo "ENTER PASSWORD FOR postgres user"
sudo passwd postgres
echo "---------- Search for POSTGRES_PASSWORD and set the value you put to postgres PASSWORD"
echo "---------- PRESS ANY KEY TO CONTINUE"
read xxx
nano .env
# - dotenv file
MAX_CONCURRENCY=80
MIN_CONCURRENCY=10
# if the following command is not executed, it will not currently installed
# sudo ./install.sh
ln -s $(pwd)/install.sh $mypath/.bin/${pck}-install
safe_cd ..
mark_install "$pck"
fi
safe_cd ..
## Shodan Tools
set_category "Shodan-Tools"
mkdir -p "Shodan-Tools"
safe_cd "Shodan-Tools"
### karma_v2
# https://github.com/Dheerajmadhukar/karma_v2
pck="karma_v2";
if try_install "$pck"; then
git clone https://github.com/Dheerajmadhukar/karma_v2.git --depth 1
# python3 -m pip install shodan mmh3
if [ -z "$(which shodan)" ]; then
pipx install shodan
fi
cd karma_v2
chmod +x karma_v2
ln -s $(pwd)/$pck $mypath/.bin/$pck
safe_cd ..
go install -v github.com/tomnomnom/httprobe@master
if [ -z "$(which Interlace)" ]; then
git clone https://github.com/codingo/Interlace.git --depth 1
cd Interlace
# python3 setup.py install
python3 -m venv venv
venv/bin/python3 setup.py build
venv/bin/python3 setup.py install
# alias Interlace="$(pwd)/venv/bin/Interlace"