1
0
Fork 0

Move pwn scripts to new directory
continuous-integration/drone/push Build was killed Details

main
Ambrose Chua 2021-04-26 11:42:30 +08:00
parent d169dbb163
commit dc5ba6c8a8
7 changed files with 105 additions and 2 deletions

View File

@ -417,7 +417,7 @@ if $pwn; then
*) pip3 install --no-cache-dir --user pwntools;;
esac
# pwn: Other tools
# pwn: Tools 1
case $ID in
alpine|fedora|debian|ubuntu|macos) packages_add radare2 binwalk testdisk socat nasm john;;

16
.pwn/bin/apktool Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
set -e
BASE="$HOME/.pwn/apktool"
if [[ ! -d "$BASE/bin" ]]; then
wget --output-document "$BASE/bin/apktool" \
https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool
chmod +x "$BASE/bin/apktool"
wget --output-document "$BASE/bin/apktool.jar" \
https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.5.0.jar
chmod +x "$BASE/bin/apktool.jar"
fi
"$BASE/bin/apktool" "$@"

19
.pwn/bin/jwt_tool Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
set -e
BASE="$HOME/.pwn/jwt_tool"
if [[ ! -d "$BASE/bin" ]]; then
if [[ ! -d "$BASE/src" ]]; then
git clone --depth 1 --recursive \
https://github.com/ticarpi/jwt_tool.git \
"$BASE/src"
fi
pip3 install --no-cache-dir --user \
--requirement "$BASE/src/requirements.txt"
ln -s "$BASE/src/jwt_tool.py" "$BASE/bin/jwt_tool.py"
chmod +x "$BASE/bin/jwt_tool.py"
fi
"$BASE/bin/jwt_tool.py" "$@"

32
.pwn/bin/pev Executable file
View File

@ -0,0 +1,32 @@
#!/bin/sh
set -e
BASE="$HOME/.pwn/pev"
if [[ ! -d "$BASE/bin" ]]; then
if [[ ! -d "$BASE/src" ]]; then
git clone --depth 1 --recursive \
https://github.com/merces/pev.git \
"$BASE/src"
fi
if ! ldconfig -p | grep libssl > /dev/null; then
echo "Please install openssl-devel"
exit 1
fi
make --directory "$BASE/src" prefix="$BASE"
make --directory "$BASE/src" prefix="$BASE" install
fi
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$BASE/lib"
PROG="$1"
if [[ -z "$PROG" ]]; then
echo "Usage: $0 PROG [ARGS...]"
echo -n "Programs: "
find "$BASE/bin" -maxdepth 1 -perm -111 -type f -printf "%f "
exit 1
fi
shift
"$BASE/bin/$PROG" "$@"

17
.pwn/bin/sqlmap Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
set -e
BASE="$HOME/.pwn/sqlmap"
if [[ ! -d "$BASE/bin" ]]; then
if [[ ! -d "$BASE/src" ]]; then
git clone --depth 1 --recursive \
https://github.com/sqlmapproject/sqlmap.git \
"$BASE/src"
fi
ln -s "$BASE/src/sqlmap.py" "$BASE/bin/sqlmap.py"
chmod +x "$BASE/bin/sqlmap.py"
fi
"$BASE/bin/sqlmap.py" "$@"

19
.pwn/bin/ubidump Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
set -e
BASE="$HOME/.pwn/ubidump"
if [[ ! -d "$BASE/bin" ]]; then
if [[ ! -d "$BASE/src" ]]; then
git clone --depth 1 --recursive \
https://github.com/ticarpi/ubidump.git \
"$BASE/src"
fi
pip3 install --no-cache-dir --user \
--requirement "$BASE/src/requirements.txt"
ln -s "$BASE/src/ubidump.py" "$BASE/bin/ubidump.py"
chmod +x "$BASE/bin/ubidump.py"
fi
python3 "$BASE/bin/ubidump.py" "$@"

2
.zshrc
View File

@ -60,7 +60,7 @@ precmd_functions+=( on_second_prompt )
# executables
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/bin:$HOME/.pwn/bin:$PATH"
if [[ -f "$HOME/.deno" ]]; then
export DENO_INSTALL="$HOME/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"