Skip to content

Commit e691b06

Browse files
committed
新增对 gef 和 peda-heap 工具的安装函数
1 parent 3449462 commit e691b06

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

f8x-ctf

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ CTF_PWN_peda_install(){
727727

728728
if test -d $dir
729729
then
730-
Echo_ALERT "$name is already download in $dir"
730+
Echo_ALERT "$name is already installed in $dir"
731731
else
732732
cd $P_Dir && $Proxy_OK git clone --depth 1 https://github.com/longld/peda.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
733733
cd $dir
@@ -736,6 +736,38 @@ CTF_PWN_peda_install(){
736736

737737
}
738738

739+
CTF_PWN_gef_install(){
740+
741+
name="gef"
742+
dir="$P_Dir/gef"
743+
744+
if test -d $dir
745+
then
746+
Echo_ALERT "$name is already installed in $dir"
747+
else
748+
cd $P_Dir && $Proxy_OK git clone --depth 1 https://github.com/hugsy/gef.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
749+
cd $dir
750+
grep -qxF "source $dir/gef.py" ~/.gdbinit || echo "source $dir/gef.py" >> ~/.gdbinit
751+
fi
752+
753+
}
754+
755+
CTF_PWN_peda-heap_install(){
756+
757+
name="peda-heap"
758+
dir="$P_Dir/peda-heap"
759+
760+
if test -d $dir
761+
then
762+
Echo_ALERT "$name is already download in $dir"
763+
else
764+
cd $P_Dir && $Proxy_OK git clone --depth 1 https://github.com/Mipu94/peda-heap.git > /dev/null 2>&1 && Echo_INFOR "Successfully installed $name in the $dir" || Echo_ERROR3
765+
cd $dir
766+
grep -qxF "source $dir/peda.py" ~/.gdbinit || echo "source $dir/peda.py" >> ~/.gdbinit
767+
fi
768+
769+
}
770+
739771
CTF_PWN_one_gadget_install(){
740772

741773
name="one_gadget"

0 commit comments

Comments
 (0)