@@ -729,9 +729,12 @@ CTF_PWN_peda_install(){
729729 then
730730 Echo_ALERT " $name is already installed in $dir "
731731 else
732- 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
732+ cd $P_Dir && $Proxy_OK git clone https://github.com/No-Github /peda.git > /dev/null 2>&1 && Echo_INFOR " Successfully installed $name in the $dir " || Echo_ERROR3
733733 cd $dir
734734 grep -qxF " source $dir /peda.py" ~ /.gdbinit || echo " source $dir /peda.py" >> ~ /.gdbinit
735+
736+ # https://github.com/longld/peda/issues/177#issuecomment-2441751341
737+ cp /usr/lib/python3/dist-packages/six.py $dir /lib/six.py
735738 fi
736739
737740}
@@ -745,9 +748,23 @@ CTF_PWN_gef_install(){
745748 then
746749 Echo_ALERT " $name is already installed in $dir "
747750 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
751+ cd $P_Dir && $Proxy_OK git clone https://github.com/hugsy/gef.git > /dev/null 2>&1 && Echo_INFOR " Successfully installed $name in the $dir " || Echo_ERROR3
749752 cd $dir
750753 grep -qxF " source $dir /gef.py" ~ /.gdbinit || echo " source $dir /gef.py" >> ~ /.gdbinit
754+
755+ case $Linux_Version in
756+ * " CentOS" * |* " RedHat" * |* " Fedora" * |* " AlmaLinux" * |* " VzLinux" * |* " Rocky" * )
757+ echo " export LANG=en_US.UTF-8" >> /etc/bashrc
758+ echo " export LC_ALL=en_US.UTF-8" >> /etc/bashrc
759+ echo " export PYTHONIOENCODING=utf-8" >> /etc/bashrc
760+ ;;
761+ * " Kali" * |* " Ubuntu" * |* " Debian" * )
762+ echo " export LANG=en_US.UTF-8" >> /etc/bash.bashrc
763+ echo " export LC_ALL=en_US.UTF-8" >> /etc/bash.bashrc
764+ echo " export PYTHONIOENCODING=utf-8" >> /etc/bash.bashrc
765+ ;;
766+ * ) ;;
767+ esac
751768 fi
752769
753770}
@@ -761,7 +778,7 @@ CTF_PWN_peda-heap_install(){
761778 then
762779 Echo_ALERT " $name is already download in $dir "
763780 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
781+ cd $P_Dir && $Proxy_OK git clone https://github.com/No-Github /peda-heap.git > /dev/null 2>&1 && Echo_INFOR " Successfully installed $name in the $dir " || Echo_ERROR3
765782 cd $dir
766783 grep -qxF " source $dir /peda.py" ~ /.gdbinit || echo " source $dir /peda.py" >> ~ /.gdbinit
767784 fi
0 commit comments