2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, gdb
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pythonPath = with python3.pkgs; makePythonPath [
|
|
|
|
future
|
|
|
|
isort
|
|
|
|
psutil
|
|
|
|
pycparser
|
|
|
|
pyelftools
|
|
|
|
python-ptrace
|
|
|
|
ROPGadget
|
|
|
|
six
|
|
|
|
unicorn
|
|
|
|
pygments
|
|
|
|
];
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "pwndbg";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "2020.07.23";
|
2020-04-24 23:36:52 +00:00
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pwndbg";
|
|
|
|
repo = "pwndbg";
|
|
|
|
rev = version;
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "0w1dmjy8ii12367wza8c35a9q9x204fppf6x328q75bhb3gd845c";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/pwndbg
|
|
|
|
cp -r *.py pwndbg $out/share/pwndbg
|
|
|
|
chmod +x $out/share/pwndbg/gdbinit.py
|
|
|
|
makeWrapper ${gdb}/bin/gdb $out/bin/pwndbg \
|
|
|
|
--add-flags "-q -x $out/share/pwndbg/gdbinit.py" \
|
|
|
|
--set NIX_PYTHONPATH ${pythonPath}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Exploit Development and Reverse Engineering with GDB Made Easy";
|
|
|
|
homepage = "https://github.com/pwndbg/pwndbg";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ mic92 ];
|
|
|
|
};
|
|
|
|
}
|