mirror of
https://github.com/zardus/ctf-tools
synced 2024-11-14 01:37:06 +00:00
Add capstone
This commit is contained in:
parent
e57a86abd0
commit
ce80941526
5 changed files with 45 additions and 0 deletions
|
@ -14,6 +14,7 @@ Installers for the following tools are included:
|
||||||
| binary | [barf](https://github.com/programa-stic/barf-project) | Binary Analysis and Reverse-engineering Framework. | <!--tool--><!--times-out-->
|
| binary | [barf](https://github.com/programa-stic/barf-project) | Binary Analysis and Reverse-engineering Framework. | <!--tool--><!--times-out-->
|
||||||
| binary | [bindead](https://bitbucket.org/mihaila/bindead/wiki/Home) | A static analysis tool for binaries. | <!--tool--><!--failing-->
|
| binary | [bindead](https://bitbucket.org/mihaila/bindead/wiki/Home) | A static analysis tool for binaries. | <!--tool--><!--failing-->
|
||||||
| binary | [binjitsu](https://github.com/binjitsu/binjitsu) | Useful CTF utilities. pwntools fork. | <!--tool--><!--no-test-->
|
| binary | [binjitsu](https://github.com/binjitsu/binjitsu) | Useful CTF utilities. pwntools fork. | <!--tool--><!--no-test-->
|
||||||
|
| binary | [capstone](http://www.capstone-engine.org) | Multi-architecture disassembly framework. | <!--tool--><!--test-->
|
||||||
| binary | [checksec](https://github.com/slimm609/checksec.sh) | Check binary hardening settings. | <!--tool--><!--test-->
|
| binary | [checksec](https://github.com/slimm609/checksec.sh) | Check binary hardening settings. | <!--tool--><!--test-->
|
||||||
| binary | [codereason](https://github.com/trailofbits/codereason) | Semantic Binary Code Analysis Framework. | <!--tool--><!--failing-->
|
| binary | [codereason](https://github.com/trailofbits/codereason) | Semantic Binary Code Analysis Framework. | <!--tool--><!--failing-->
|
||||||
| binary | [crosstool-ng](http://crosstool-ng.org/) | Cross-compilers and cross-architecture tools. | <!--tool--><!--no-test-->
|
| binary | [crosstool-ng](http://crosstool-ng.org/) | Cross-compilers and cross-architecture tools. | <!--tool--><!--no-test-->
|
||||||
|
|
|
@ -139,6 +139,9 @@ function base_build_setup()
|
||||||
|
|
||||||
# create the py2 virtualenv
|
# create the py2 virtualenv
|
||||||
"$PWD/bin/ctf-tools-pip" freeze 2>&1 >/dev/null
|
"$PWD/bin/ctf-tools-pip" freeze 2>&1 >/dev/null
|
||||||
|
|
||||||
|
# create the py3 virtualenv
|
||||||
|
"$PWD/bin/ctf-tools-pip3" freeze 2>&1 >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
4
capstone/install
Executable file
4
capstone/install
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ctf-tools-pip install -U capstone
|
||||||
|
ctf-tools-pip3 install -U capstone
|
33
capstone/test
Executable file
33
capstone/test
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
PY_TEST_FILE=$(mktemp)
|
||||||
|
cat << END > $PY_TEST_FILE
|
||||||
|
from capstone import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
CODE = b"\x55\x48\x8b\x05\xb8\x13\x00\x00"
|
||||||
|
|
||||||
|
addresses = [0x1000, 0x1001]
|
||||||
|
md = Cs(CS_ARCH_X86, CS_MODE_64)
|
||||||
|
for idx, i in enumerate(md.disasm(CODE, 0x1000)):
|
||||||
|
if i.address != addresses[idx]:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
sys.exit(0)
|
||||||
|
END
|
||||||
|
|
||||||
|
source ${VIRTUALENVWRAPPER_SCRIPT}
|
||||||
|
|
||||||
|
set +e
|
||||||
|
workon ctftools
|
||||||
|
set -e
|
||||||
|
python $PY_TEST_FILE
|
||||||
|
deactivate
|
||||||
|
|
||||||
|
set +e
|
||||||
|
workon ctftools3
|
||||||
|
set -e
|
||||||
|
python $PY_TEST_FILE
|
||||||
|
deactivate
|
||||||
|
|
||||||
|
rm $PY_TEST_FILE
|
4
capstone/uninstall
Executable file
4
capstone/uninstall
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ctf-tools-pip uninstall -y capstone || true
|
||||||
|
ctf-tools-pip3 uninstall -y capstone || true
|
Loading…
Reference in a new issue