Skip to content

Commit aaaa729

Browse files
committed
新增 LibcSearcher_plus 安装函数,并优化 libc-database 安装流程以提示用户确认
1 parent d41502a commit aaaa729

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

f8x-ctf

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,22 @@ CTF_PWN_patchelf_install(){
901901

902902
}
903903

904+
CTF_PWN_LibcSearcher_plus_install(){
905+
906+
name="LibcSearcher_plus"
907+
dir="$P_Dir/LibcSearcher_plus"
908+
909+
if test -d $dir
910+
then
911+
Echo_ALERT "$name is already download in $dir"
912+
else
913+
cd $P_Dir && $Proxy_OK git clone --depth 1 https://github.com/lexsd6/LibcSearcher_plus.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
914+
cd $dir && chmod +x setup.py && python3 setup.py develop
915+
# ln -sf "$P_Dir/libc-database" /pentest/libc-database
916+
fi
917+
918+
}
919+
904920
CTF_PWN_libc-database_install(){
905921

906922
name="libc-database"
@@ -912,7 +928,17 @@ CTF_PWN_libc-database_install(){
912928
else
913929
cd $P_Dir && $Proxy_OK git clone --depth 1 https://github.com/niklasb/libc-database.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
914930
cd $dir
915-
./get ubuntu debian
931+
932+
Echo_ALERT "Running './get ubuntu debian' will take a long time and download a lot of data.\nDo you want to continue? Type 'y' to proceed, or press Enter to skip and run manually later."
933+
echo -e "\033[5;33m\nContinue? [y/N,Default N] (Press Enter for No)\033[0m" && read -r input
934+
case $input in
935+
[yY][eE][sS]|[Yy])
936+
$Proxy_OK ./get ubuntu debian
937+
;;
938+
*)
939+
Echo_INFOR "Skipped. You can run './get ubuntu debian' manually in $dir when ready."
940+
;;
941+
esac
916942
fi
917943

918944
}
@@ -1102,6 +1128,8 @@ CTF_PWN_tools(){
11021128
CTF_PWN_glibc-all-in-one_install
11031129
echo -e "\033[1;33m\n>> Installing patchelf\n\033[0m"
11041130
CTF_PWN_patchelf_install
1131+
echo -e "\033[1;33m\n>> Installing LibcSearcher_plus\n\033[0m"
1132+
CTF_PWN_LibcSearcher_plus_install
11051133
echo -e "\033[1;33m\n>> Installing libc-database\n\033[0m"
11061134
CTF_PWN_libc-database_install
11071135

0 commit comments

Comments
 (0)