forked from ffffffff0x/f8x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
f8x-ctf
900 lines (698 loc) · 23.4 KB
/
f8x-ctf
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
#!/usr/bin/env bash
# ===================== Basic variable settings =====================
if test -e /usr/local/bin/f8x
then
sleep 0.001
# f8x -update
else
curl -o f8x https://f8x.io/ && mv --force f8x /usr/local/bin/f8x && chmod +x /usr/local/bin/f8x && echo -e "\033[1;36m$(date +"%H:%M:%S")\033[0m \033[1;32m[INFOR]\033[0m - \033[1;32mInstalled f8x tools\033[0m" || echo -e "\033[1;36m$(date +"%H:%M:%S")\033[0m \033[1;31m[ERROR]\033[0m - \033[1;31mf8x installation failed\n\033[0m"
fi
. /usr/local/bin/f8x > /dev/null 2>&1
F8x_ctf_Version="0.0.9 Dev"
# ===================== Software version variable setting =====================
Main
Pentest_Base_Install > /dev/null 2>&1
bkcrack_Ver="v1.3.4"
bkcrack_bin="bkcrack-1.3.4-Linux.tar.gz"
bkcrack_dir="bkcrack-1.3.4-Linux"
upx_Ver="v3.96"
upx_bin_amd64="upx-3.96-amd64_linux.tar.xz"
upx_dir_amd64="upx-3.96-amd64_linux"
upx_bin_arm64="upx-3.96-arm64_linux.tar.xz"
upx_dir_arm64="upx-3.96-arm64_linux"
# ===================== CTF WEB Tool =====================
CTF_WEB_py3_module_install(){
Install_Switch4 "itsdangerous"
}
CTF_GitHack_install(){
name="GitHack"
dir="$P_Dir/GitHack"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
$Porxy_OK git clone ${GitPorxy}https://github.com/lijiejie/GitHack.git $dir > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
CTF_Git_Extract_install(){
name="GitHack"
dir="$P_Dir/Git_Extract"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
$Porxy_OK git clone ${GitPorxy}https://github.com/gakki429/Git_Extract.git $dir > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
CTF_dumpall_install(){
name="dumpall"
which dumpall > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
Install_Switch4 "dumpall"
fi
}
CTF_flask-session-cookie-manager_install(){
name="flask-session-cookie-manager"
dir="$P_Dir/flask-session-cookie-manager"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
$Porxy_OK git clone --depth 1 ${GitPorxy}https://github.com/noraj/flask-session-cookie-manager.git $dir > /dev/null 2>&1
cd $dir && python3 setup.py install > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
# ===================== CTF MISC Tool =====================
CTF_Misc_install(){
Install_Switch "strace"
Install_Switch "unrar"
Install_Switch "python3-tk"
Install_Switch "android-tools-adb"
}
CTF_Misc_py3_module_install(){
Install_Switch4 "base58"
Install_Switch4 "requests"
Install_Switch4 "zlib" > /dev/null 2>&1
Install_Switch4 "struct" > /dev/null 2>&1
Install_Switch4 "libnum"
Install_Switch4 "Plaso"
Install_Switch4 "matplotlib"
Install_Switch4 "tqdm"
python3 -m pip install --upgrade Pillow > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name"
}
CTF_Misc_py2_module_install(){
Install_Switch3 "pybase62"
Install_Switch3 "base92"
python2 -m pip install Pillow > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name"
}
CTF_stegoveritas_install(){
name="stegoveritas"
which stegoveritas > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
pip3 install stegoveritas 1> /dev/null 2>> /tmp/f8x_error.log
stegoveritas_install_deps > /dev/null 2>&1
which stegoveritas > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name" || Echo_ERROR2
fi
}
CTF_ImageMagick_install(){
name="ImageMagick"
which convert > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
Install_Switch "graphicsmagick-imagemagick-compat" || Echo_ERROR2
Install_Switch "imagemagick" && Echo_INFOR "Successfully installed $name" || Echo_ERROR2
fi
}
CTF_morse2ascii_install(){
name="morse2ascii"
which morse2ascii > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
Install_Switch "morse2ascii" && Echo_INFOR "Successfully installed $name" || Echo_ERROR2
fi
}
CTF_exiftool_install(){
name="exiftool"
which exiftool > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
Install_Switch "exiftool" && Echo_INFOR "Successfully installed $name" || Echo_ERROR2
fi
}
CTF_steghide_install(){
name="steghide"
which steghide > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
Install_Switch "steghide" && Echo_INFOR "Successfully installed $name" || Echo_ERROR2
fi
}
CTF_pdfinfo_install(){
name="pdfinfo"
which pdfinfo > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
Install_Switch "poppler-utils" && Echo_INFOR "Successfully installed $name" || Echo_ERROR2
fi
}
CTF_zbarimg_install(){
name="zbarimg"
which zbarimg > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
case $Linux_Version in
*"CentOS"*|*"RedHat"*|*"Fedora"*)
Install_Switch "zbar" && Echo_INFOR "Successfully installed $name" || Echo_ERROR2
;;
*"Kali"*|*"Ubuntu"*|*"Debian"*)
Install_Switch "zbar-tools" && Echo_INFOR "Successfully installed $name" || Echo_ERROR2
;;
*) ;;
esac
fi
}
CTF_outguess_install(){
name="outguess"
which outguess > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
mkdir -p /tmp/outguess && cd /tmp/outguess
$Porxy_OK git clone --depth 1 https://github.com/crorvick/outguess > /dev/null 2>&1 || Echo_ERROR2
cd outguess
./configure > /dev/null 2>&1 && make > /dev/null 2>&1 && make install > /dev/null 2>&1
which outguess > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name" || Echo_ERROR3
rm -rf /tmp/outguess
fi
}
CTF_bkcrack_install(){
name="bkcrack"
which bkcrack > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
mkdir -p /tmp/bkcrack && cd /tmp/bkcrack
$Porxy_OK wget https://github.com/kimci86/bkcrack/releases/download/$bkcrack_Ver/$bkcrack_bin > /dev/null 2>&1 || Echo_ERROR2
tar -zxvf $bkcrack_bin > /dev/null 2>&1
cp $bkcrack_dir/bkcrack /usr/sbin/bkcrack
which bkcrack > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name" || Echo_ERROR3
rm -rf /tmp/bkcrack
fi
}
CTF_zsteg_install(){
name="zsteg"
which zsteg > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
$Porxy_OK gem install zsteg 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $name" || Echo_ERROR "Calling gem to install zsteg failed! Please run the -ruby option to install the Ruby environment"
fi
}
CTF_F5-steganography_install(){
name="F5-steganography"
dir="$P_Dir/F5-steganography"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone --depth 1 https://github.com/matthewgao/F5-steganography.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
CTF_LSB-Steganography_install(){
name="LSB-Steganography"
dir="$P_Dir/LSB-Steganography"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone https://github.com/RobinDavid/LSB-Steganography.git > /dev/null 2>&1 || Echo_ERROR2
cd LSB-Steganography && pip3 install -r requirements.txt > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
CTF_BlindWaterMark_install(){
name="BlindWaterMark"
dir="$P_Dir/BlindWaterMark"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
Install_Switch3 "opencv-python==4.2.0.32"
cd $P_Dir && $Porxy_OK git clone https://github.com/chishaxie/BlindWaterMark.git > /dev/null 2>&1 || Echo_ERROR2
cd $dir && python2 -m pip install -r requirements.txt > /dev/null
cd $dir && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
CTF_crc32_install(){
name="crc32"
dir="$P_Dir/crc32"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone https://github.com/theonlypwner/crc32.git > /dev/null 2>&1 || Echo_ERROR2
cd crc32
python3 crc32.py -h > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
CTF_cloacked-pixel_install(){
name="cloacked-pixel"
dir="$P_Dir/cloacked-pixel"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
Install_Switch3 "numpy"
Install_Switch3 "matplotlib"
case $Linux_Version in
*"Kali"*|*"Ubuntu"*|*"Debian"*)
Install_Switch "python-tk"
apt-get install -y python-backports.functools-lru-cache > /dev/null 2>&1
;;
*) ;;
esac
cd $P_Dir && $Porxy_OK git clone https://github.com/livz/cloacked-pixel.git > /dev/null 2>&1 || Echo_ERROR2
cd $dir && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
CTF_stegosaurus_install(){
name="stegosaurus"
dir="$P_Dir/stegosaurus"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone https://github.com/AngelKitty/stegosaurus.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR2
fi
}
# ===================== CTF CRYPTO Tool =====================
CTF_Crypto_install(){
Install_Switch "python-gmpy2"
Install_Switch "python3-gmpy2"
case $Linux_Version in
*"CentOS"*|*"RedHat"*|*"Fedora"*)
echo "" # 暂时不填
;;
*"Kali"*|*"Ubuntu"*|*"Debian"*)
Install_Switch "libgmp-dev"
Install_Switch "libmpfr-dev"
Install_Switch "libmpc-dev"
;;
*) ;;
esac
}
CTF_Crypto_py3_module_install(){
#name="ciphey"
#python3 -m pip install --upgrade ciphey > /dev/null 2>&1 && Echo_INFOR "已安装 ciphey" || Echo_ERROR "尝试使用 --ignore-installed 安装"
Install_Switch4 "xortool"
Install_Switch4 "pycrypto"
Install_Switch4 "primefac"
Install_Switch4 "gmpy"
Install_Switch4 "gmpy2"
Install_Switch4 "rsa"
Install_Switch4 "owiener"
Install_Switch4 "factordb-python"
Install_Switch4 "sympy"
Install_Switch4 "Arithmetic"
Install_Switch4 "secret"
Install_Switch4 "gmssl"
}
CTF_Crypto_py2_module_install(){
Install_Switch3 "libnum"
Install_Switch3 "owiener"
Install_Switch3 "primefac"
}
CTF_rsatool_install(){
name="rsatool"
dir="$P_Dir/rsatool"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone --depth 1 https://github.com/ius/rsatool.git > /dev/null 2>&1 || Echo_ERROR2
cd rsatool && python3 rsatool.py -h > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
CTF_RsaCtfTool_install(){
name="RsaCtfTool"
dir="$P_Dir/RsaCtfTool"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
case $Linux_Version in
*"Fedora"*)
Install_Switch "gmp-devel"
Install_Switch "mpfr-devel"
Install_Switch "libmpc-devel"
;;
*"Kali"*|*"Ubuntu"*|*"Debian"*)
Install_Switch "libgmp3-dev"
;;
*) ;;
esac
cd $P_Dir && $Porxy_OK git clone --depth 1 https://github.com/Ganapati/RsaCtfTool.git > /dev/null 2>&1 || Echo_ERROR2
cd RsaCtfTool
pip3 install -r "requirements.txt" > /dev/null 2>&1
pip3 install -r "optional-requirements.txt" > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
CTF_CTF-RSA-tool_install(){
name="CTF-RSA-tool"
dir="$P_Dir/CTF-RSA-tool"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone --depth 1 https://github.com/3summer/CTF-RSA-tool.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR2
fi
}
CTF_rsa-wiener-attack_install(){
name="rsa-wiener-attack"
dir="$P_Dir/rsa-wiener-attack"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone https://github.com/pablocelayes/rsa-wiener-attack.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR2
fi
}
CTF_basecrack_install(){
name="basecrack"
dir="$P_Dir/basecrack"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone --depth 1 https://github.com/mufeedvh/basecrack.git > /dev/null 2>&1 || Echo_ERROR2
cd basecrack
pip3 install -r "requirements.txt" > /dev/null 2>&1
python3 basecrack.py -h > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
fi
}
# ===================== CTF IOT Tool =====================
CTF_firmware_mod_kit_Install(){
name="firmware-mod-kit"
dir="/opt/firmware-mod-kit/trunk"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
case $Linux_Version in
*"CentOS"*|*"RedHat"*|*"Fedora"*)
Install_Switch3 "firmware-mod-kit"
;;
*"Kali"*|*"Ubuntu"*|*"Debian"*)
Install_Switch3 "firmware-mod-kit"
;;
*) ;;
esac
fi
}
# ===================== CTF RE Tool =====================
CTF_RE_py3_module_install(){
Install_Switch4 "uncompyle6"
}
CTF_RE_pyinstxtractor_install(){
name="pyinstxtractor"
dir="$P_Dir/pyinstxtractor"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone https://github.com/extremecoders-re/pyinstxtractor.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR2
fi
}
CTF_RE_upx_install(){
case $Linux_architecture_Name in
*"linux-x86_64"*)
upx_bin=$upx_bin_amd64
;;
*"linux-arm64"*)
upx_bin=$upx_bin_arm64
;;
esac
name="upx"
which upx > /dev/null 2>&1
if [ $? == 0 ]
then
Echo_ALERT "$name installed"
else
mkdir -p /tmp/upx && cd $_ && rm -f $upx_bin > /dev/null 2>&1 && $Porxy_OK wget ${GitPorxy}https://github.com/upx/upx/releases/download/$upx_Ver/$upx_bin > /dev/null 2>&1 || Echo_ERROR2
tar -xvJf $upx_bin > /dev/null 2>&1 && cd $upx_dir
mv --force upx /usr/local/bin/upx && chmod +x /usr/local/bin/upx && rm -rf /tmp/upx > /dev/null 2>&1
which upx > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name $upx_Ver in the /usr/local/bin/" || Echo_ERROR3
fi
}
# ===================== CTF PWN Tool =====================
CTF_PWN_install(){
Install_Switch "gdb"
case $Linux_Version in
*"Kali"*|*"Ubuntu"*|*"Debian"*)
Install_Switch "libssl-dev"
Install_Switch "libffi-dev"
Install_Switch "build-essential"
Install_Switch "gcc-multilib"
Install_Switch "python-dev"
Install_Switch "python3-dev"
;;
*) ;;
esac
}
CTF_PWN_py3_module_install(){
pip3 install --upgrade pip > /dev/null 2>&1
Install_Switch4 "setuptools"
Install_Switch4 "capstone"
Install_Switch4 "filebytes"
Install_Switch4 "keystone-engine"
Install_Switch4 "ropper"
Install_Switch4 "pathlib2"
Install_Switch4 "psutil"
}
CTF_PWN_py2_module_install(){
python2 -m pip install --upgrade pip > /dev/null 2>&1
Install_Switch3 "pathlib2"
Install_Switch3 "psutil"
}
CTF_PWN_pwntools_install(){
name="pwntools"
Install_Switch3 "pwntools"
Install_Switch4 "pwntools"
}
CTF_PWN_pwndbg_install(){
name="pwndbg"
dir="$P_Dir/pwndbg"
if test -d $dir
then
Echo_ALERT "$name is already installed in $dir"
else
cd $P_Dir && $Porxy_OK git clone --depth 1 https://github.com/pwndbg/pwndbg.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
cd $dir && echo "source /pentest/pwndbg/gdbinit.py" > ~/.gdbinit
fi
}
CTF_PWN_one_gadget_install(){
name="one_gadget"
gem install one_gadget > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name" || one_gadget_install2
}
one_gadget_install2(){
Echo_ERROR "one_gadget installation failed, try to reinstall one_gadget"
case $Linux_Version in
*"Kali"*|*"Ubuntu"*|*"Debian"*)
add-apt-repository ppa:brightbox/ruby-ng
apt-get update
apt-get purge --auto-remove ruby
apt-get install -y ruby2.6 ruby2.6-dev
gem install one_gadget
;;
*) ;;
esac
}
# -web
CTF_WEB_tools(){
Rm_Lock
echo -e "\033[1;33m\n>> Installing common py modules\n\033[0m"
CTF_WEB_py3_module_install
echo -e "\033[1;33m\n>> Installing Sqlmap\n\033[0m"
Pentest_Sqlmap_Install
echo -e "\033[1;33m\n>> Installing GitHack\n\033[0m"
CTF_GitHack_install
echo -e "\033[1;33m\n>> Installing Git_Extract\n\033[0m"
CTF_Git_Extract_install
echo -e "\033[1;33m\n>> Installing flask-session-cookie-manager\n\033[0m"
CTF_flask-session-cookie-manager_install
echo -e "\033[1;33m\n>> Installing Gopherus\n\033[0m"
Pentest_Gopherus_Install
}
# -misc
CTF_MISC_tools(){
Rm_Lock
echo -e "\033[1;33m\n>> Installing some misc tools\n\033[0m"
CTF_Misc_install
echo -e "\033[1;33m\n>> Installing common py modules\n\033[0m"
CTF_Misc_py3_module_install
CTF_Misc_py2_module_install
echo -e "\033[1;33m\n>> Installing hashcat、7z2hashcat\n\033[0m"
Pentest_hashcat_Install
echo -e "\033[1;33m\n>> Installing stegoveritas\n\033[0m"
CTF_stegoveritas_install
echo -e "\033[1;33m\n>> Installing ImageMagick\n\033[0m"
CTF_ImageMagick_install
echo -e "\033[1;33m\n>> Installing morse2ascii\n\033[0m"
CTF_morse2ascii_install
echo -e "\033[1;33m\n>> Installing exiftool\n\033[0m"
CTF_exiftool_install
echo -e "\033[1;33m\n>> Installing steghide\n\033[0m"
CTF_steghide_install
echo -e "\033[1;33m\n>> Installing pdfinfo\n\033[0m"
CTF_pdfinfo_install
echo -e "\033[1;33m\n>> Installing zbarimg\n\033[0m"
CTF_zbarimg_install
echo -e "\033[1;33m\n>> Installing outguess\n\033[0m"
CTF_outguess_install
echo -e "\033[1;33m\n>> Installing zsteg\n\033[0m"
CTF_zsteg_install
echo -e "\033[1;33m\n>> Installing F5-steganography\n\033[0m"
CTF_F5-steganography_install
echo -e "\033[1;33m\n>> Installing LSB-Steganography\n\033[0m"
CTF_LSB-Steganography_install
echo -e "\033[1;33m\n>> Installing BlindWaterMark\n\033[0m"
CTF_BlindWaterMark_install
echo -e "\033[1;33m\n>> Installing crc32\n\033[0m"
CTF_crc32_install
echo -e "\033[1;33m\n>> Installing cloacked-pixel\n\033[0m"
CTF_cloacked-pixel_install
echo -e "\033[1;33m\n>> Installing stegosaurus\n\033[0m"
CTF_stegosaurus_install
Volatility_Install
volatility3_Install
case $Linux_architecture_Name in
*"linux-x86_64"*)
echo -e "\033[1;33m\n>> Installing bkcrack\n\033[0m"
CTF_bkcrack_install
;;
esac
}
# -crypto
CTF_Crypto_tools(){
Rm_Lock
echo -e "\033[1;33m\n>> Installing some misc tools\n\033[0m"
CTF_Crypto_install
echo -e "\033[1;33m\n>> Installing common py modules\n\033[0m"
CTF_Crypto_py3_module_install
CTF_Crypto_py2_module_install
echo -e "\033[1;33m\n>> Installing rsatool\n\033[0m"
CTF_rsatool_install
echo -e "\033[1;33m\n>> Installing RsaCtfTool\n\033[0m"
CTF_RsaCtfTool_install
echo -e "\033[1;33m\n>> Installing CTF-RSA-tool\n\033[0m"
CTF_CTF-RSA-tool_install
echo -e "\033[1;33m\n>> Installing rsa-wiener-attack\n\033[0m"
CTF_rsa-wiener-attack_install
echo -e "\033[1;33m\n>> Installing basecrack\n\033[0m"
CTF_basecrack_install
}
# -iot
CTF_IOT_tools(){
Rm_Lock
binwalk_Install
echo -e "\033[1;33m\n>> Installing firmware-mod-kit\n\033[0m"
CTF_firmware_mod_kit_Install
}
# -re
CTF_RE_tools(){
Rm_Lock
#echo -e "\033[1;33m\n>> Installing some misc tools\n\033[0m"
#CTF_RE_install
echo -e "\033[1;33m\n>> Installing common py modules\n\033[0m"
CTF_RE_py3_module_install
#CTF_RE_py2_module_install
echo -e "\033[1;33m\n>> Installing pyinstxtractor\n\033[0m"
CTF_RE_pyinstxtractor_install
echo -e "\033[1;33m\n>> Installing upx\n\033[0m"
CTF_RE_upx_install
}
# -pwn
CTF_PWN_tools(){
Rm_Lock
echo -e "\033[1;33m\n>> Installing some misc tools\n\033[0m"
CTF_PWN_install
echo -e "\033[1;33m\n>> Installing common py modules\n\033[0m"
CTF_PWN_py3_module_install
CTF_PWN_py2_module_install
echo -e "\033[1;33m\n>> Installing pwntools\n\033[0m"
CTF_PWN_pwntools_install
echo -e "\033[1;33m\n>> Installing pwndbg\n\033[0m"
CTF_PWN_pwndbg_install
echo -e "\033[1;33m\n>> Installing one_gadget\n\033[0m"
CTF_PWN_one_gadget_install
}
# -help
Help_Info(){
echo -e "\033[1;34mInstall by category \033[0m"
echo -e " \033[1;34m-web\033[0m \033[0;34m : install WEB environment\033[0m"
echo -e " \033[1;34m-misc\033[0m \033[0;34m : install MISC environment\033[0m"
echo -e " \033[1;34m-crypto\033[0m \033[0;34m: install Crypto environment\033[0m"
echo -e " \033[1;34m-iot\033[0m \033[0;34m : install IOT environment\033[0m"
echo -e " \033[1;34m-re\033[0m \033[0;34m : install Reverse environment\033[0m"
echo -e " \033[1;34m-pwn\033[0m \033[0;34m : install PWN environment\033[0m"
echo -e ""
}
for cmd in $@
do
case $cmd in
-web)
Porxy_Switch
Base_Check
Py_Check
pip2_Check
JDK_Check
CTF_WEB_tools
;;
-misc)
Porxy_Switch
Base_Check
Py_Check
pip2_Check
JDK_Check
CTF_MISC_tools
;;
-crypto)
Porxy_Switch
Base_Check
Py_Check
pip2_Check
JDK_Check
CTF_Crypto_tools
;;
-iot)
Porxy_Switch
Base_Check
Py_Check
pip2_Check
JDK_Check
CTF_IOT_tools
;;
-re)
Porxy_Switch
Base_Check
Py_Check
pip2_Check
JDK_Check
CTF_RE_tools
;;
-pwn)
Porxy_Switch
Base_Check
Py_Check
pip2_Check
JDK_Check
CTF_PWN_tools
;;
-help | help)
printf "\033c"
Help_Info
exit 1
;;
esac
done
echo -e "\033[1;36m \n-----OVER-----\n \033[0m"