Index: security/Makefile =================================================================== --- security/Makefile +++ security/Makefile @@ -837,6 +837,7 @@ SUBDIR += pecl-scrypt SUBDIR += pecl-ssh2 SUBDIR += pecl-ssh2-0 + SUBDIR += peda SUBDIR += pev SUBDIR += pgpdump SUBDIR += pgpgpg Index: security/peda/Makefile =================================================================== --- /dev/null +++ security/peda/Makefile @@ -0,0 +1,47 @@ +# $FreeBSD$ + +PORTNAME= peda +DISTVERSIONPREFIX= v +DISTVERSION= 1.1-19 +DISTVERSIONSUFFIX= -g7f673be +CATEGORIES= security python + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= Python-based GDB extension for exploit development and debugging + +LICENSE= CC-BY-NC-SA-3.0 +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= gdb>7.0:devel/gdb \ + nasm:devel/nasm \ + ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR} + +USES= python:2.6+,run + +USE_GITHUB= yes +GH_ACCOUNT= longld + +NO_ARCH= yes +NO_BUILD= yes + +SUB_FILES= pkg-message +SUB_LIST= LIBEXECDIR=${LIBEXECDIR} UTILITY_NAME=${UTILITY_NAME} + +UTILITY_NAME= ${PORTNAME}.py +LIBEXECDIR= ${PREFIX}/libexec/${PORTNAME} + +OPTIONS_DEFINE= DOCS +OPTIONS_SUB= yes + +do-install: + ${MKDIR} ${STAGEDIR}${LIBEXECDIR} + ${INSTALL_DATA} ${WRKSRC}/${UTILITY_NAME} ${STAGEDIR}${LIBEXECDIR} + ${MKDIR} ${STAGEDIR}${LIBEXECDIR}/lib + cd ${WRKSRC}/lib && ${COPYTREE_SHARE} \* ${STAGEDIR}${LIBEXECDIR}/lib + +do-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} README README.md python23-compatibility.md ${STAGEDIR}${DOCSDIR} + +.include Index: security/peda/distinfo =================================================================== --- /dev/null +++ security/peda/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1544002114 +SHA256 (longld-peda-v1.1-19-g7f673be_GH0.tar.gz) = eaff6f6ad164e7d503e7259a98fdf6b5917bae7facd8b60fcd9778287e898a8a +SIZE (longld-peda-v1.1-19-g7f673be_GH0.tar.gz) = 65469 Index: security/peda/files/pkg-message.in =================================================================== --- /dev/null +++ security/peda/files/pkg-message.in @@ -0,0 +1,16 @@ +Now that PEDA is installed it can be used with gdb(1). + +Run the following command in the gdb prompt to load the plugin: + +``` +source %%LIBEXECDIR%%/%%UTILITY_NAME%% +``` + +In order to load PEDA automatically on gdb(1) launch add the line mentioned +above to ~/.gdbinit: + +``` +echo "source %%LIBEXECDIR%%/%%UTILITY_NAME%%" >> ~/.gdbinit +``` + +Keep in mind that PEDA requires at least GDB 7.0 to work. Index: security/peda/pkg-descr =================================================================== --- /dev/null +++ security/peda/pkg-descr @@ -0,0 +1,13 @@ +PEDA (Python Exploit Development Assistance for GDB) is a plugin for GDB. It +extends GDB with a colorful text-based UI making it easier to work with the +debugger. + +Note that PEDA requires that GDB is compiled with Python support. + +Its key features are: + +- Enhance the display of GDB: colorize and display disassembly codes, + registers, memory information during debugging. +- Add commands to support debugging and exploit development. + +WWW: http://ropshell.com/peda/ Index: security/peda/pkg-plist =================================================================== --- /dev/null +++ security/peda/pkg-plist @@ -0,0 +1,10 @@ +libexec/peda/lib/config.py +libexec/peda/lib/nasm.py +libexec/peda/lib/shellcode.py +libexec/peda/lib/six.py +libexec/peda/lib/skeleton.py +libexec/peda/lib/utils.py +libexec/peda/peda.py +%%DOCS%%%%DOCSDIR%%/README +%%DOCS%%%%DOCSDIR%%/README.md +%%DOCS%%%%DOCSDIR%%/python23-compatibility.md