Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into libcdb_unstrip
- Loading branch information
Showing
45 changed files
with
1,247 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ MANIFEST | |
dist | ||
venv | ||
.vscode | ||
.idea | ||
*.egg-info | ||
*.core | ||
.coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Bash Completion | ||
|
||
To install the completion, add `. /path/to/bash_completion.d/pwn`to your e.g. `~/.bash_profile`. | ||
|
||
The `./install.sh` script attempts to do this for you automatically. | ||
|
||
### Shellcraft Autocomplete | ||
|
||
The legacy autocompletion for `pwn shellcraft` is also available at `./shellcraft`. | ||
|
||
It is unsupported, and slow (runs `pwn shellcraft -l` every time your shell starts). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASH_COMPLETION_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
|
||
if grep "$BASH_COMPLETION_DIR" ~/.bash_profile; then | ||
>&2 echo "Already installed" | ||
exit | ||
fi >/dev/null | ||
|
||
cat >> ~/.bash_profile <<EOF | ||
# Install autocompletion for Pwntools | ||
. "$BASH_COMPLETION_DIR/pwn" | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#!/usr/bin/env bash | ||
# AUTOMATCALLY GENERATED by `shtab` | ||
|
||
_shtab_pwnlib_options_='-h --help' | ||
_shtab_pwnlib_commands_='asm checksec constgrep cyclic debug disablenx disasm elfdiff elfpatch errno hex phd pwnstrip scramble shellcraft template unhex update version' | ||
|
||
_shtab_pwnlib_asm='-h --help -f --format -o --output -c --context -v --avoid -n --newline -z --zero -d --debug -e --encoder -i --infile -r --run' | ||
_shtab_pwnlib_checksec='-h --help --file' | ||
_shtab_pwnlib_constgrep='-h --help -e --exact -i --case-insensitive -m --mask-mode -c --context' | ||
_shtab_pwnlib_cyclic='-h --help -a --alphabet -n --length -c --context -l -o --offset --lookup' | ||
_shtab_pwnlib_debug='-h --help -x --pid -c --context --exec --process --sysroot' | ||
_shtab_pwnlib_disablenx='-h --help' | ||
_shtab_pwnlib_disasm='-h --help -c --context -a --address --color --no-color' | ||
_shtab_pwnlib_elfdiff='-h --help' | ||
_shtab_pwnlib_elfpatch='-h --help' | ||
_shtab_pwnlib_errno='-h --help' | ||
_shtab_pwnlib_hex='-h --help' | ||
_shtab_pwnlib_phd='-h --help -w --width -l --highlight -s --skip -c --count -o --offset --color' | ||
_shtab_pwnlib_pwnstrip='-h --help -b --build-id -p --patch -o --output' | ||
_shtab_pwnlib_scramble='-h --help -f --format -o --output -c --context -p --alphanumeric -v --avoid -n --newline -z --zero -d --debug' | ||
_shtab_pwnlib_shellcraft='-h --help -? --show -o --out -f --format -d --debug -b --before -a --after -v --avoid -n --newline -z --zero -r --run --color --no-color --syscalls --address -l --list -s --shared' | ||
_shtab_pwnlib_template='-h --help --host --port --user --pass --password --path --quiet --color' | ||
_shtab_pwnlib_unhex='-h --help' | ||
_shtab_pwnlib_update='-h --help --install --pre' | ||
_shtab_pwnlib_version='-h --help' | ||
|
||
|
||
# $1=COMP_WORDS[1] | ||
_shtab_compgen_files() { | ||
compgen -f -- $1 # files | ||
compgen -d -S '/' -- $1 # recurse into subdirs | ||
} | ||
|
||
# $1=COMP_WORDS[1] | ||
_shtab_compgen_dirs() { | ||
compgen -d -S '/' -- $1 # recurse into subdirs | ||
} | ||
|
||
# $1=COMP_WORDS[1] | ||
_shtab_replace_hyphen() { | ||
echo $1 | sed 's/-/_/g' | ||
} | ||
|
||
# $1=COMP_WORDS[1] | ||
_shtab_replace_nonword() { | ||
echo "${1//[^[:word:]]/_}" | ||
} | ||
|
||
# $1=COMP_WORDS[1] | ||
_shtab_pwnlib_compgen_root_() { | ||
local args_gen="_shtab_pwnlib_COMPGEN" | ||
case "$word" in | ||
-*) COMPREPLY=( $(compgen -W "$_shtab_pwnlib_options_" -- "$word"; [ -n "${!args_gen}" ] && ${!args_gen} "$word") ) ;; | ||
*) COMPREPLY=( $(compgen -W "$_shtab_pwnlib_commands_" -- "$word"; [ -n "${!args_gen}" ] && ${!args_gen} "$word") ) ;; | ||
esac | ||
} | ||
|
||
# $1=COMP_WORDS[1] | ||
_shtab_pwnlib_compgen_command_() { | ||
local flags_list="_shtab_pwnlib_$(_shtab_replace_nonword $1)" | ||
local args_gen="${flags_list}_COMPGEN" | ||
COMPREPLY=( $(compgen -W "${!flags_list}" -- "$word"; [ -n "${!args_gen}" ] && ${!args_gen} "$word") ) | ||
} | ||
|
||
# $1=COMP_WORDS[1] | ||
# $2=COMP_WORDS[2] | ||
_shtab_pwnlib_compgen_subcommand_() { | ||
local flags_list="_shtab_pwnlib_$(_shtab_replace_nonword "${1}_${2}")" | ||
local args_gen="${flags_list}_COMPGEN" | ||
[ -n "${!args_gen}" ] && local opts_more="$(${!args_gen} "$word")" | ||
local opts="${!flags_list}" | ||
if [ -z "$opts$opts_more" ]; then | ||
_shtab_pwnlib_compgen_command_ $1 | ||
else | ||
COMPREPLY=( $(compgen -W "$opts" -- "$word"; [ -n "$opts_more" ] && echo "$opts_more") ) | ||
fi | ||
} | ||
|
||
# Notes: | ||
# `COMPREPLY` contains what will be rendered after completion is triggered | ||
# `word` refers to the current typed word | ||
# `${!var}` is to evaluate the content of `var` | ||
# and expand its content as a variable | ||
# hello="world" | ||
# x="hello" | ||
# ${!x} -> ${hello} -> "world" | ||
_shtab_pwnlib() { | ||
local word="${COMP_WORDS[COMP_CWORD]}" | ||
|
||
COMPREPLY=() | ||
|
||
if [ "${COMP_CWORD}" -eq 1 ]; then | ||
_shtab_pwnlib_compgen_root_ ${COMP_WORDS[1]} | ||
elif [ "${COMP_CWORD}" -eq 2 ]; then | ||
_shtab_pwnlib_compgen_command_ ${COMP_WORDS[1]} | ||
elif [ "${COMP_CWORD}" -ge 3 ]; then | ||
_shtab_pwnlib_compgen_subcommand_ ${COMP_WORDS[1]} ${COMP_WORDS[2]} | ||
fi | ||
|
||
return 0 | ||
} | ||
|
||
complete -o nospace -F _shtab_pwnlib pwn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from debian:buster | ||
|
||
RUN apt-get update | ||
RUN apt-get -y dist-upgrade | ||
RUN apt-get -y install python3 python3-pip | ||
RUN apt-get -y install git wget unzip | ||
|
||
RUN pip3 install --upgrade git+https://github.com/Gallopsled/pwntools@dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
try: | ||
from pwn import * | ||
except Exception: | ||
print("Could not import pwntools") | ||
import os, re, sys, time, random, urllib, datetime, itertools, subprocess, multiprocessing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.