Last active
August 28, 2023 03:18
-
-
Save Pamplemousse/c03abcd412c62201b8bd97e846437acf to your computer and use it in GitHub Desktop.
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
with import <nixpkgs> { }; | |
let | |
arm-binutils = pkgsCross.arm-embedded.buildPackages.binutils; | |
binutils_commands = "as ld objcopy readelf"; | |
python3WithCoolPackages = python3.withPackages(ps: with ps; [ | |
flask | |
ipdb | |
ipython | |
lxml | |
manpages | |
pycrypto | |
pwntools-pwndbg | |
requests | |
sqlmap | |
ROPGadget | |
z3 | |
]); | |
pwntools-pwndbg = python3Packages.pwntools.override({ debugger = pkgs.pwndbg; }); | |
in stdenv.mkDerivation rec { | |
name = "ctf-tools"; | |
buildInputs = [ | |
arm-binutils | |
binutils | |
gdb | |
capstone | |
checksec | |
jq | |
gobuster | |
one_gadget | |
nmap | |
p7zip # HTB archives can't be unpacked by `unzip`... | |
patchelf | |
python3WithCoolPackages | |
wget | |
]; | |
installCheckPhase = false; | |
shellHook = '' | |
# `pwntools` is `which`ing for Debian looking commands... | |
for COMMAND in ${binutils_commands}; do | |
makeWrapper "$(which "arm-none-eabi-$COMMAND")" "arm-linux-gnu-$COMMAND" | |
done | |
PATH="$(pwd):$PATH" | |
''; | |
exitHook = '' | |
for COMMAND in ${binutils_commands}; do | |
rm "arm-linux-gnu-$COMMAND" | |
done | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for your great work! But I found two little problems:
manpages
has been renamed toman-pages
makeWrapper
is needed as a buildInput