Skip to content

Commit 271d232

Browse files
committed
新增对 Typhon 和 Fenjing 工具的安装函数,并优化相关安装逻辑
1 parent a5b31eb commit 271d232

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

f8x

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,12 @@ Install_Switch7(){
861861

862862
}
863863

864+
Install_Switch8(){
865+
866+
pipx install $1 $1 1> /dev/null 2>> /tmp/f8x_error.log && Echo_INFOR "Successfully installed $1 (python3 pipx)" && return 0 || { Echo_ERROR "$1 module installation failed"; return 1; }
867+
868+
}
869+
864870
# ===================== Proxy Switch =====================
865871
Proxy_Switch(){
866872

@@ -2571,6 +2577,8 @@ pyenv_Install(){
25712577
;;
25722578
*) ;;
25732579
esac
2580+
2581+
Install_Switch "pipx"
25742582
fi
25752583
fi
25762584

@@ -2584,6 +2592,7 @@ Python3_def_Install(){
25842592
*"CentOS"*|*"RedHat"*|*"Fedora"*|*"AlmaLinux"*|*"VzLinux"*|*"Rocky"*)
25852593
Install_Switch "python3-devel"
25862594
Install_Switch "python3-pip"
2595+
Install_Switch "pipx"
25872596
python3 -m pip install --upgrade pip > /dev/null 2>&1 && Echo_INFOR "Updated python3-pip" || Echo_ERROR "Update python3-pip failed"
25882597

25892598
Install_Switch4 "setuptools"
@@ -2595,6 +2604,7 @@ Python3_def_Install(){
25952604
Install_Switch "python3-pip"
25962605
Install_Switch "python3-venv"
25972606
Install_Switch "python3-distutils"
2607+
Install_Switch "pipx"
25982608
python3 -m pip install --upgrade pip > /dev/null 2>&1 && Echo_INFOR "Updated python3-pip" || Echo_ERROR "Update python3-pip failed"
25992609
;;
26002610
*"Ubuntu"*)
@@ -2603,6 +2613,7 @@ Python3_def_Install(){
26032613
Install_Switch "python3-pip"
26042614
Install_Switch "python3-venv"
26052615
Install_Switch "python3-distutils"
2616+
Install_Switch "pipx"
26062617
case $Linux_Version_Num in
26072618
"16.04")
26082619
mkdir -p /tmp/get-pip && cd /tmp/get-pip && rm -rf get-pip.py && $Proxy_OK wget https://bootstrap.pypa.io/pip/3.5/get-pip.py > /dev/null 2>&1

f8x-ctf

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,34 @@ CTF_flask-session-cookie-manager_install(){
9292

9393
}
9494

95+
CTF_Typhon_install(){
96+
97+
name="Typhon"
98+
dir="$P_Dir/Typhon"
99+
100+
if test -d $dir
101+
then
102+
Echo_ALERT "$name is already installed in $dir"
103+
else
104+
$Proxy_OK git clone --depth 1 ${GitProxy}https://github.com/Team-intN18-SoybeanSeclab/Typhon.git $dir > /dev/null 2>&1
105+
cd $dir && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
106+
fi
107+
108+
}
109+
110+
CTF_Fenjing_install(){
111+
112+
name="Fenjing"
113+
which Fenjing > /dev/null 2>&1
114+
if [ $? -eq 0 ]
115+
then
116+
Echo_ALERT "$name installed"
117+
else
118+
Install_Switch8 "Fenjing"
119+
fi
120+
121+
}
122+
95123
Pentest_redis-ssrf_Install(){
96124

97125
name="redis-ssrf"
@@ -717,8 +745,7 @@ CTF_PWN_pwndbg_install(){
717745

718746
# $Proxy_OK curl -o install.sh -qsL 'https://install.pwndbg.re'
719747
# $Proxy_OK bash -xv install.sh -t pwndbg-gdb
720-
721-
# fi
748+
fi
722749

723750
}
724751

@@ -871,6 +898,10 @@ CTF_WEB_tools(){
871898
Pentest_redis_lua_exploit_Install
872899
echo -e "\033[1;33m\n>> Installing redis-ssrf\n\033[0m"
873900
Pentest_redis-ssrf_Install
901+
echo -e "\033[1;33m\n>> Installing Typhon\n\033[0m"
902+
CTF_Typhon_install
903+
echo -e "\033[1;33m\n>> Installing Fenjing\n\033[0m"
904+
CTF_Fenjing_install
874905

875906
}
876907

0 commit comments

Comments
 (0)