[
  {
    "path": ".dockerignore",
    "content": "*\n!.git\n!.docker\n!bin/\n"
  },
  {
    "path": ".gitignore",
    "content": "*/*\nbin/*\n!*/install\n!*/uninstall\n!*/install-root-*\n!*/upgrade\n!*/test\n"
  },
  {
    "path": "Dockerfile",
    "content": "FROM ubuntu:noble\n\nrun <<END\n    export DEBIAN_FRONTEND=\"noninteractive\" \n    apt-get -q update \n    apt-get dist-upgrade -y --no-install-recommends --auto-remove \n    apt-get install -y --no-install-recommends --auto-remove \\\n        build-essential libtool g++ gcc rubygems \\\n        texinfo curl wget automake autoconf python3 python3-dev git \\\n        unzip virtualenvwrapper sudo subversion ca-certificates\n    apt-get -q clean \n    rm -rf /var/lib/apt/lists/*\nEND\n\nRUN sed -i -e \"s/Types: deb/Types: deb deb-src/g\" /etc/apt/sources.list.d/ubuntu.sources\n\nRUN userdel -f -r ubuntu; useradd -m ctf\nRUN echo \"ctf ALL=NOPASSWD: ALL\" > /etc/sudoers.d/ctf\n\nUSER ctf\nWORKDIR /home/ctf/tools\nADD --chown=ctf:ctf bin/manage-tools /home/ctf/tools/bin/manage-tools\nRUN bin/manage-tools -s setup\nADD --chown=ctf:ctf .git /home/ctf/tools/.git\nRUN git checkout .\n\nARG PREINSTALL=\"\"\nRUN <<END\n    for TOOL in $PREINSTALL\n    do\n    \t/home/ctf/tools/bin/manage-tools -s -v install $TOOL\n    done\nEND\n\nENV PATH=/home/ctf/tools/bin:/bin:/sbin\nWORKDIR /home/ctf\n"
  },
  {
    "path": "Dockerfile.archlinux",
    "content": "from base/archlinux\n\nRUN cat /etc/pacman.d/mirrorlist \\ \n        | sed 's/^#Server/Server/' \\\n        > /etc/pacman.d/mirrorlist.backup \\\n        && rankmirrors -n 10 /etc/pacman.d/mirrorlist.backup \\\n        > /etc/pacman.d/mirrorlist\n\nRUN echo \"[multilib]\" >> /etc/pacman.conf\nRUN echo \"Include = /etc/pacman.d/mirrorlist\" >> /etc/pacman.conf\n\nRUN pacman -Syy \\\n    && pacman -S --noconfirm archlinux-keyring \\\n    && pacman -Scc --noconfirm\nRUN pacman-key --refresh-keys\nRUN pacman -Syu --noconfirm \\\n    && pacman-db-upgrade \\\n    && pacman -Scc --noconfirm \\\n    && pacman -Syu --noconfirm \\\n    && pacman -Scc --noconfirm\nRUN trust extract-compat\nRUN pacman -Syu --noconfirm --needed \\\n        curl wget python3 git subversion \\\n        python-pip \\\n        unzip python-virtualenvwrapper \\\n        zsh grml-zsh-config \\\n        sudo which \\\n    && pacman -Scc --noconfirm\n\nRUN useradd -m ctf\nRUN echo \"ctf ALL=NOPASSWD: ALL\" > /etc/sudoers.d/ctf\nRUN chsh -s /usr/bin/zsh ctf\n\nCOPY .git /home/ctf/tools/.git\nRUN chown -R ctf.ctf /home/ctf/tools\n\nUSER ctf\n\nWORKDIR /home/ctf/tools\nRUN git checkout .\n\n# add non-commited scripts\nUSER root\nCOPY bin/manage-tools /home/ctf/tools/bin/\nRUN chown -R ctf.ctf /home/ctf/tools\n\nUSER ctf\nRUN bin/manage-tools -s setup\n\nWORKDIR /home/ctf\nCMD [\"zsh\", \"-i\"]\n"
  },
  {
    "path": "Dockerfile.artful",
    "content": "FROM ubuntu:artful\n\n# wrapper script for apt-get\nCOPY .docker/apt-get-install /usr/local/bin/apt-get-install\nRUN chmod +x /usr/local/bin/apt-get-install\n\nRUN apt-get-install build-essential libtool g++ gcc \\\n    texinfo curl wget automake autoconf python python-dev git subversion \\\n    unzip virtualenvwrapper sudo  git virtualenvwrapper\n\nRUN useradd -m ctf\nRUN echo \"ctf ALL=NOPASSWD: ALL\" > /etc/sudoers.d/ctf\n\nCOPY .git /home/ctf/tools/.git\nRUN chown -R ctf.ctf /home/ctf/tools\n\n# git checkout of the files\nUSER ctf\nWORKDIR /home/ctf/tools\nRUN git checkout .\n\n# add non-commited scripts\nUSER root\nCOPY bin/manage-tools /home/ctf/tools/bin/\nRUN chown -R ctf.ctf /home/ctf/tools\n\n# finally run ctf-tools setup\nUSER ctf\nRUN bin/manage-tools -s setup\n\nWORKDIR /home/ctf\n#CMD bash -i\n"
  },
  {
    "path": "Dockerfile.fedora",
    "content": "FROM fedora\n\nRUN dnf -y install which sudo git redhat-lsb\n\nRUN useradd -m ctf\nCOPY .git /home/ctf/tools/.git\nRUN chown -R ctf.ctf /home/ctf/tools\n\nRUN echo \"ctf ALL=NOPASSWD: ALL\" > /etc/sudoers.d/ctf\nUSER ctf\n\nWORKDIR /home/ctf/tools\nRUN git checkout .\n\n# add non-commited scripts\nUSER root\nCOPY bin/manage-tools /home/ctf/tools/bin/\nCOPY bin/ctf-tools-pip /home/ctf/tools/bin/\nCOPY bin/ctf-tools-venv-activate /home/ctf/tools/bin/\nCOPY bin/ctf-tools-venv-activate3 /home/ctf/tools/bin/\nRUN chown -R ctf.ctf /home/ctf/tools\n\nUSER ctf\nRUN bin/manage-tools -s setup\nRUN bin/ctf-tools-pip install appdirs\nRUN echo 'source $(which ctf-tools-venv-activate)' >> /home/ctf/.bashrc\n\nWORKDIR /home/ctf\nCMD bash -i\n"
  },
  {
    "path": "LICENSE",
    "content": "BSD 3-Clause License\n\nCopyright (c) 2019-present, Zardus and contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the copyright holder nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "README.md",
    "content": "# ctf-tools\n\nThis is a collection of setup scripts to create an install of various security research tools.\nOf course, this isn't a hard problem, but it's really nice to have them in one place that's easily deployable to new machines and so forth.\nThe install-scripts for these tools are checked every once in a while, so things should hopefully have a decent chance of working!\n\nInstallers for the following tools are included:\n\n| Category | Tool | Description |\n|----------|------|-------------|\n| binary | [angr](http://angr.io) | ![Last Build](https://img.shields.io/docker/v/ctftools/angr?label=built) Next-generation binary analysis engine from Shellphish. | <!--tool-->\n| binary | [angr-management](http://angr.io) | ![Last Build](https://img.shields.io/docker/v/ctftools/angr-management?label=built) A GUI reverse engineering and decompilation tool. | <!--tool-->\n| binary | [beef](https://github.com/beefproject/beef) | ![Last Build](https://img.shields.io/docker/v/ctftools/beef?label=built) Browser exploitation framework. | <!--tool-->\n| binary | [crosstool](http://crosstool-ng.org/) | ![Last Build](https://img.shields.io/docker/v/ctftools/crosstool?label=built) Cross-compilers and cross-architecture tools. | <!--tool--><!--no-test-->\n| binary | [cross2](http://kozos.jp/books/asm/asm.html) | ![Last Build](https://img.shields.io/docker/v/ctftools/cross2?label=built) A set of cross-compilation tools from a Japanese book on C. | <!--tool--><!--no-test-->\n| binary | [decomp2dbg](https://github.com/mahaloz/decomp2dbg) | ![Last Build](https://img.shields.io/docker/v/ctftools/decomp2dbg?label=built)  A plugin to introduce interactive symbols into your debugger from your decompiler. | <!--tool-->\n| binary | [elfkickers](http://www.muppetlabs.com/~breadbox/software/elfkickers.html) | ![Last Build](https://img.shields.io/docker/v/ctftools/elfkickers?label=built) A set of utilities for working with ELF files. | <!--tool-->\n| binary | [elfparser](https://github.com/mentebinaria/elfparser-ng) | ![Last Build](https://img.shields.io/docker/v/ctftools/elfparser?label=built) Multiplatform CLI and GUI tool to show information about ELF files. | <!--tool-->\n| binary | [evilize](http://www.mathstat.dal.ca/~selinger/md5collision/) | ![Last Build](https://img.shields.io/docker/v/ctftools/evilize?label=built) Tool to create MD5 colliding binaries | <!--tool-->\n| binary | [gdb](http://www.gnu.org/software/gdb/) | ![Last Build](https://img.shields.io/docker/v/ctftools/gdb?label=built) Up-to-date gdb with python2 bindings. | <!--tool--><!--slow-test-->\n| binary | [gef](https://github.com/hugsy/gef) | ![Last Build](https://img.shields.io/docker/v/ctftools/gef?label=built) Enhanced environment for gdb. | <!--tool-->\n| binary | [ghidra](https://ghidra-sre.org/) | ![Last Build](https://img.shields.io/docker/v/ctftools/ghidra?label=built) Open-source reverse engineering and decompilation tool. | <!--tool-->\n| binary | [honggfuzz](https://github.com/google/honggfuzz) | ![Last Build](https://img.shields.io/docker/v/ctftools/honggfuzz?label=built) A general-purpose, easy-to-use fuzzer with interesting analysis options. | <!--tool-->\n| binary | [ida](https://hex-rays.com/ida-free) | Decompilation and reversing tool (requires you to download it to ~/Downloads on your own!). | <!--tool--><!--no-test-->\n| binary | [manticore](https://github.com/trailofbits/manticore) | ![Last Build](https://img.shields.io/docker/v/ctftools/manticore?label=built) Manticore is a prototyping tool for dynamic binary analysis, with support for symbolic execution, taint analysis, and binary instrumentation. | <!--tool-->\n| binary | [one_gadget](https://github.com/david942j/one_gadget) | ![Last Build](https://img.shields.io/docker/v/ctftools/one_gadget?label=built) Magic gadget search for libc. | <!--tool--> \n| binary | [preeny](https://github.com/zardus/preeny) | ![Last Build](https://img.shields.io/docker/v/ctftools/preeny?label=built) A collection of helpful preloads (compiled for many architectures!). | <!--tool-->\n| binary | [pwninit](https://github.com/io12/pwninit) | ![Last Build](https://img.shields.io/docker/v/ctftools/pwninit?label=built) Script to automate starting pwning challenges. | <!--tool-->\n| binary | [pwndbg](https://github.com/pwndbg/pwndbg) | ![Last Build](https://img.shields.io/docker/v/ctftools/pwndbg?label=built) Enhanced environment for gdb. Especially for pwning. | <!--tool-->\n| binary | [pwnsh](https://github.com/zardus/pwnsh) | ![Last Build](https://img.shields.io/docker/v/ctftools/pwnsh?label=built) Useful shell scripts for assembly, exploitation, etc. | <!--tool-->\n| binary | [pwntools](https://github.com/Gallopsled/pwntools) | ![Last Build](https://img.shields.io/docker/v/ctftools/pwntools?label=built) Useful CTF utilities. | <!--tool-->\n| binary | [qemu](http://qemu.org) | ![Last Build](https://img.shields.io/docker/v/ctftools/qemu?label=built) Latest version of qemu! | <!--tool--><!--slow-test-->\n| binary | [qiling](https://github.com/qilingframework/qiling) | ![Last Build](https://img.shields.io/docker/v/ctftools/qiling?label=built) A dynamic binary instrumentation framework. | <!--tool-->\n| binary | [qira](http://qira.me) | ![Last Build](https://img.shields.io/docker/v/ctftools/qira?label=built) Parallel, timeless debugger. | <!--tool--><!--slow-test-->\n| binary | [rappel](https://github.com/yrp604/rappel) | ![Last Build](https://img.shields.io/docker/v/ctftools/rappel?label=built) A linux-based assembly REPL. | <!--tool-->\n| binary | [ropper](https://github.com/sashs/Ropper) | ![Last Build](https://img.shields.io/docker/v/ctftools/ropper?label=built) Another gadget finder. | <!--tool-->\n| binary | [rp++](https://github.com/0vercl0k/rp) | ![Last Build](https://img.shields.io/docker/v/ctftools/rp?label=built) Another gadget finder. | <!--tool-->\n| binary | [seccomp-tools](https://github.com/david942j/seccomp-tools) | ![Last Build](https://img.shields.io/docker/v/ctftools/seccomp-tools?label=built) Provides powerful tools for seccomp analysis | <!--tool-->\n| binary | [shellnoob](https://github.com/reyammer/shellnoob) | ![Last Build](https://img.shields.io/docker/v/ctftools/shellnoob?label=built) Shellcode writing helper. | <!--tool-->\n| binary | [taintgrind](https://github.com/wmkhoo/taintgrind) | ![Last Build](https://img.shields.io/docker/v/ctftools/taintgrind?label=built) A valgrind taint analysis tool. | <!--tool--><!--failing-->\n| binary | [valgrind](http://valgrind.org) | ![Last Build](https://img.shields.io/docker/v/ctftools/valgrind?label=built) A Dynamic Binary Instrumentation framework with some built-in tools. | <!--tool-->\n| binary | [villoc](https://github.com/wapiflapi/villoc) | ![Last Build](https://img.shields.io/docker/v/ctftools/villoc?label=built) Visualization of heap operations. | <!--tool-->\n| binary | [xrop](https://github.com/acama/xrop) | ![Last Build](https://img.shields.io/docker/v/ctftools/xrop?label=built) Gadget finder. | <!--tool--><!--failing-->\n| forensics | [firmware-mod-kit](https://code.google.com/p/firmware-mod-kit/) | ![Last Build](https://img.shields.io/docker/v/ctftools/firmware-mod-kit?label=built) Tools for firmware packing/unpacking. | <!--tool-->\n| forensics | [pdf-parser](http://blog.didierstevens.com/programs/pdf-tools/) | ![Last Build](https://img.shields.io/docker/v/ctftools/pdf-parser?label=built) Tool for digging in PDF files | <!--tool-->\n| forensics | [peepdf](https://github.com/cert-ee/peepdf) | ![Last Build](https://img.shields.io/docker/v/ctftools/peepdf?label=built) Powerful Python tool to analyze PDF documents. | <!--tool-->\n| forensics | [scrdec18](https://gist.github.com/bcse/1834878) | ![Last Build](https://img.shields.io/docker/v/ctftools/scrdec18?label=built) A decoder for encoded Windows Scripts. | <!--tool-->\n| forensics | [volatility](https://github.com/volatilityfoundation/volatility) | ![Last Build](https://img.shields.io/docker/v/ctftools/volatility?label=built) Analyzer for system memory dumps (classic python2 version; requires python2 tool). | <!--tool-->\n| forensics | [volatility3](https://github.com/volatilityfoundation/volatility3) | ![Last Build](https://img.shields.io/docker/v/ctftools/volatility3?label=built) Analyzer for system memory dumps (latest version). | <!--tool-->\n| crypto | [codext](https://github.com/dhondta/python-codext) | ![Last Build](https://img.shields.io/docker/v/ctftools/codext?label=built) Python codecs extension featuring CLI tools for encoding/decoding anything including AI-based guessing mode. | <!--tool-->\n| crypto | [cribdrag](https://github.com/SpiderLabs/cribdrag) | ![Last Build](https://img.shields.io/docker/v/ctftools/cribdrag?label=built) Interactive crib dragging tool (for crypto). | <!--tool-->\n| crypto | [fastcoll](https://www.win.tue.nl/hashclash/) | ![Last Build](https://img.shields.io/docker/v/ctftools/fastcoll?label=built) An md5sum collision generator. | <!--tool-->\n| crypto | [foresight](https://github.com/ALSchwalm/foresight) | ![Last Build](https://img.shields.io/docker/v/ctftools/foresight?label=built) A tool for predicting the output of random number generators. To run, launch \"foresee\". | <!--tool-->\n| crypto | [featherduster](https://github.com/nccgroup/featherduster) | ![Last Build](https://img.shields.io/docker/v/ctftools/featherduster?label=built)  An automated, modular cryptanalysis tool. WARNING: needs python2 (which can be installed with ctf-tools). | <!--tool-->\n| crypto | [galois](http://web.eecs.utk.edu/~plank/plank/papers/CS-07-593) | ![Last Build](https://img.shields.io/docker/v/ctftools/galois?label=built) A fast galois field arithmetic library/toolkit. | <!--tool-->\n| crypto | [hashpump-partialhash](https://github.com/mheistermann/HashPump-partialhash) | ![Last Build](https://img.shields.io/docker/v/ctftools/hashpump-partialhash?label=built) Hashpump, supporting partially-unknown hashes. | <!--tool-->\n| crypto | [hash-identifier](https://code.google.com/p/hash-identifier/source/checkout) | ![Last Build](https://img.shields.io/docker/v/ctftools/hash-identifier?label=built) Simple hash algorithm identifier. | <!--tool-->\n| crypto | [libc-database](https://github.com/niklasb/libc-database) | ![Last Build](https://img.shields.io/docker/v/ctftools/libc-database?label=built) Build a database of libc offsets to simplify exploitation. | <!--tool--><!--slow-test-->\n| crypto | [msieve](http://sourceforge.net/projects/msieve/) | ![Last Build](https://img.shields.io/docker/v/ctftools/msieve?label=built) Msieve is a C library implementing a suite of algorithms to factor large integers. | <!--tool-->\n| crypto | [nonce-disrespect](https://github.com/nonce-disrespect/nonce-disrespect) | ![Last Build](https://img.shields.io/docker/v/ctftools/nonce-disrespect?label=built) Nonce-Disrespecting Adversaries: Practical Forgery Attacks on GCM in TLS. | <!--tool-->\n| crypto | [pemcrack](https://github.com/robertdavidgraham/pemcrack) | ![Last Build](https://img.shields.io/docker/v/ctftools/pemcrack?label=built) SSL PEM file cracker. | <!--tool-->\n| crypto | [pkcrack](https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack.html) | ![Last Build](https://img.shields.io/docker/v/ctftools/pkcrack?label=built) PkZip encryption cracker. | <!--tool-->\n| crypto | [reveng](http://reveng.sourceforge.net/) | ![Last Build](https://img.shields.io/docker/v/ctftools/reveng?label=built) CRC finder. | <!--tool-->\n| crypto | [rsactftool](https://github.com/RsaCtfTool/RsaCtfTool) | ![Last Build](https://img.shields.io/docker/v/ctftools/rsactftool?label=built) RSA attack tool. | <!--tool-->\n| crypto | [ssh_decoder](https://github.com/jjyg/ssh_decoder) | ![Last Build](https://img.shields.io/docker/v/ctftools/ssh_decoder?label=built) A tool for decoding ssh traffic. You will need `ruby1.8` from `https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng` to run this. Run with `ssh_decoder --help` for help, as running it with no arguments causes it to crash. | <!--tool-->\n| crypto | [sslsplit](https://github.com/droe/sslsplit) | ![Last Build](https://img.shields.io/docker/v/ctftools/sslsplit?label=built) SSL/TLS MITM. | <!--tool-->\n| crypto | [xortool](https://github.com/hellman/xortool) | ![Last Build](https://img.shields.io/docker/v/ctftools/xortool?label=built) XOR analysis tool. | <!--tool-->\n| crypto | [yafu](http://sourceforge.net/projects/yafu/) | ![Last Build](https://img.shields.io/docker/v/ctftools/yafu?label=built) Automated integer factorization. | <!--tool-->\n| web | [burpsuite](http://portswigger.net/burp) | ![Last Build](https://img.shields.io/docker/v/ctftools/burpsuite?label=built) Web proxy to do naughty web stuff. | <!--tool--><!--failing-->\n| web | [commix](https://github.com/stasinopoulos/commix) | ![Last Build](https://img.shields.io/docker/v/ctftools/commix?label=built) Command injection and exploitation tool. | <!--tool-->\n| web | [mitmproxy](https://mitmproxy.org/) | ![Last Build](https://img.shields.io/docker/v/ctftools/mitmproxy?label=built) CLI Web proxy and python library.  | <!--tool-->\n| web | [subbrute](https://github.com/TheRook/subbrute) | ![Last Build](https://img.shields.io/docker/v/ctftools/subbrute?label=built) A DNS meta-query spider that enumerates DNS records, and subdomains. | <!--tool-->\n| web | [webgrep](https://github.com/dhondta/webgrep) | ![Last Build](https://img.shields.io/docker/v/ctftools/webgrep?label=built) `grep` for Web pages, with JS deobfuscation, CSS unminifying and OCR on images. | <!--tool-->\n| stego | [steganabara](http://www.caesum.com/handbook/stego.htm) | ![Last Build](https://img.shields.io/docker/v/ctftools/steganabara?label=built) Another image stenography solver. | <!--tool-->\n| stego | [stegano-tools](https://github.com/dhondta/stegano-tools) | ![Last Build](https://img.shields.io/docker/v/ctftools/stegano-tools?label=built) A collection of text and image steganography tools (incl LSB, PVD, PIT). | <!--tool-->\n| stego | [stegdetect](http://www.outguess.org/) | ![Last Build](https://img.shields.io/docker/v/ctftools/stegdetect?label=built) Stenography detection/breaking tool. | <!--tool-->\n| stego | [stegsolve](http://www.caesum.com/handbook/stego.htm) | ![Last Build](https://img.shields.io/docker/v/ctftools/stegsolve?label=built) Image stenography solver. | <!--tool-->\n| stego | [stegosaurus](https://github.com/AngelKitty/stegosaurus) | ![Last Build](https://img.shields.io/docker/v/ctftools/stegosaurus?label=built) A steganography tool for embedding arbitrary payloads in Python bytecode (pyc or pyo) files. | <!--tool-->\n| stego | [zsteg](https://github.com/zed-0xff/zsteg) | ![Last Build](https://img.shields.io/docker/v/ctftools/zsteg?label=built) detect stegano-hidden data in PNG & BMP. | <!--tool-->\n| misc | [jdgui](http://jd.benow.ca/) | ![Last Build](https://img.shields.io/docker/v/ctftools/jdgui?label=built) Java decompiler. | <!--tool-->\n| misc | [python2](https://www.python.org/downloads/release/python-2718/) | ![Last Build](https://img.shields.io/docker/v/ctftools/python2?label=built) For when you really need it... | <!--tool-->\n| misc | [social-analyzer](https://github.com/qeeqbox/social-analyzer) | ![Last Build](https://img.shields.io/docker/v/ctftools/social-analyzer?label=built) Social media reconnaissance tool... | <!--tool-->\n| misc | [veles](https://codisec.com/veles/) | ![Last Build](https://img.shields.io/docker/v/ctftools/veles?label=built) Binary data analysis and visualization tool. | <!--tool-->\n| misc | [xspy](https://gitlab.com/kalilinux/packages/xspy) | ![Last Build](https://img.shields.io/docker/v/ctftools/xspy?label=built) Tiny tool to spy on X sessions. | <!--tool-->\n\n\nThere are also some installers for non-CTF stuff to break the monotony!\n\n| Category | Tool | Description |\n|----------|------|-------------|\n| game | [df](http://www.bay12games.com/dwarves/) | ![Last Build](https://img.shields.io/docker/v/ctftools/df?label=built) Dwarf Fortress! Something to help you relax after a CTF! | <!--tool-->\n| web | [tor-browser](https://www.torproject.org/projects/torbrowser.html.en) | ![Last Build](https://img.shields.io/docker/v/ctftools/tor-browser?label=built) Useful when you need to hit a web challenge from different IPs. | <!--tool-->\n\n## Usage\n\nTo use, do:\n\n```bash\n# set up the path\n/path/to/ctf-tools/bin/manage-tools setup\nsource ~/.bashrc\n\n# list the available tools\nmanage-tools list\n\n# install gdb, allowing it to try to sudo install dependencies\nmanage-tools -s install gdb\n\n# install pwntools, but don't let it sudo install dependencies\nmanage-tools install pwntools\n\n# install qemu, but use \"nice\" to avoid degrading performance during compilation\nmanage-tools -n install qemu\n\n# uninstall gdb\nmanage-tools uninstall gdb\n\n# uninstall all tools\nmanage-tools uninstall all\n\n# search for a tool\nmanage-tools search preload\n```\n\nWhere possible, the tools keep the installs very self-contained (i.e., in to tool/ directory), and most uninstalls are just calls to `git clean` (**NOTE**, this is **NOT** careful; everything under the tool directory, including whatever you were working on, is blown away during an uninstall).\n\nPython and Ruby tools are installed in a tool-specific virtual environment.\nIf you want to add other packages to this environment, look under the `ctf-tools/TOOL/pipx` or `ctf-tools/TOOL/gems` directories.\n\n## Help!\n\nSomething not working?\nI didn't write (almost) any of these tools, but hit up [the discord](https://discord.gg/KRcjyn4pBH) if you're desperate.\nMaybe some kind soul will help!\n\n## Dockerized Tools\n\n### Prebuilt Tool Containers\n\nYou can get most of these tools in prebuilt containers from [https://hub.docker.com/r/ctftools](dockerhub).\nFor example:\n\n```console\n$ echo hi | docker run -i ctftools/taintgrind taintgrind --taint-stdin=yes /bin/cat\n/home/ctf/tools/taintgrind/valgrind-3.21.0/build/bin/valgrind --tool=taintgrind --taint-stdin=yes /bin/cat\n==8== Taintgrind, the taint analysis tool\n==8== Copyright (C) 2010-2018, and GNU GPL'd, by Wei Ming Khoo.\n==8== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info\n==8== Command: /bin/cat\n==8==\n0xFFFFFFFF: _syscall_read | Read:3 | 0x0 | 4a5a000_unknownobj\nhi\n==8== \n```\n\n### Building Your Own\n\nYou can build a docker image with:\n\n```bash\ngit clone https://github.com/zardus/ctf-tools\ncd ctf-tools\ndocker build -t ctf-tools --build-arg PREINSTALLED=some-tool .\n```\n\nAnd run it with:\n\n```bash\ndocker run -it ctf-tools\n```\n\nThe built image will have ctf-tools cloned and ready to go and your tool installed.\n\n## Kali Linux\n\nKali Linux (Sana and Rolling), due to manually setting certain libraries to not use the latest version available (sometimes being out of date by years) causes some tools to not install at all, or fail in strange ways.\nOverriding these libraries breaks other tools included in Kali so your only solution is to either live with some of Kali's tools being broken, use docker, or running another distribution separately such as Ubuntu.\n\n## Adding Tools\n\nTo add a tool (say, named *toolname*), do the following:\n\n1. Create a `toolname` directory.\n2. Create an `install` script.\n3. Add it to the readme.\n4. (optional) if special uninstall steps are required, create an `uninstall` script.\n\n### Install Scripts\n\nThe install script will be run with `$PWD` being `toolname`. It should install the tool into this directory, in as contained a manner as possible.\nIdeally, full uninstallation should be possible with a `git clean`.\n\nThe install script should create a `bin` directory and put its executables there.\nThese executables will be automatically linked into the main `bin` directory for the repo.\nThey could be launched from any directory, so don't make assumptions about the location of `$0`!\n\n## License\n\nThe individual tools are all licensed under their own licenses.\nAs for ctf-tools itself, it is licensed under BSD 2-Clause License.\nIf you find it useful, star it on github (https://github.com/zardus/ctf-tools).\n\nGood luck!\n\n# See Also\n\nThere's a curated list of CTF tools, but without installers, here: https://github.com/apsdehal/aWEsoMe-cTf.\n\nThere's a Vagrant config with a lot of the bigger frameworks here: https://github.com/thebarbershopper/epictreasure.\n\n## Useful CTF tools in apt repos\n\nAs tools get officially packaged, we switch to just suggesting that you apt install them!\n\n| Category | Source | Tool | Description |\n|----------|--------|------|-------------|\n| binary | apt | [aflplusplus](https://github.com/AFLplusplus/AFLplusplus) | State-of-the-art fuzzer. |\n| binary | apt | [checksec](https://github.com/slimm609/checksec.sh) | Check binary hardening settings. |\n| binary | apt | [radare2](http://www.radare.org/) | Some crazy thing crowell likes. |\n| binary | apt | [rr](http://rr-project.org) | Record and Replay Debugging Framework |\n| binary | apt | [wcc](https://github.com/endrazine/wcc) |  The Witchcraft Compiler Collection is a collection of compilation tools to perform binary black magic on the GNU/Linux and other POSIX platforms. |\n| forensics | apt | [binwalk](https://github.com/ReFirmLabs/binwalk) | Firmware (and arbitrary file) analysis tool. |\n| forensics | apt | [foremost](http://foremost.sourceforge.net/) | File carver. |\n| forensics | apt | [dislocker](http://www.hsc.fr/ressources/outils/dislocker/) | Tool for reading Bitlocker encrypted partitions. |\n| forensics | apt | [origami-pdf](http://github.com/gdelugre/origami) | PDF manipulator. |\n| forensics | apt | [testdisk](http://www.cgsecurity.org/wiki/TestDisk) | Testdisk and photorec for file recovery. |\n| web | apt | [dirb](http://dirb.sourceforge.net/) | Web path scanner. |\n| web | apt | [dirsearch](https://github.com/maurosoria/dirsearch) | Web path scanner. |\n| web | apt | [sqlmap](http://sqlmap.org/) | SQL injection automation engine. |\n| stego | apt | [pngtools](https://launchpad.net/ubuntu/+source/pngtools) | PNG's analysis tool. |\n| stego | apt | [sonic-visualizer](http://www.sonicvisualiser.org/) | Audio file visualization. |\n| networking | apt | [dsniff](http://www.monkey.org/~dugsong/dsniff/) | Grabs passwords and other data from pcaps/network streams. |\n| networking | apt | [bettercap](https://www.bettercap.org/) | Network shenanigans swiss army knife. |\n| misc | apt | [z3](https://github.com/Z3Prover/z3) | Theorem prover from Microsoft Research. |\n| osint | apt | [sherlock](https://github.com/sherlock-project/sherlock) | Tools for Hunt down social media accounts by username across 400+ social networks . |\n\n## Useful CTF tools in docker images\n\nPreviously, this repository included some scripts that were wrappers around `docker pull`.\nWe trust that you can do that yourself :-)\n\n| Category | Source | Tool | Description |\n|----------|--------|------|-------------|\n| binary | docker | [panda](https://github.com/panda-re/panda) | Platform for Architecture-Neutral Dynamic Analysis. |\n| stego | Docker | [stego-toolkit](https://github.com/DominicBreuker/stego-toolkit) | A docker image with dozens of steg tools. |\n\n## Useful CTF Libraries\n\nPreviously, this repository included library installers.\nBecause of how bespoke library install preferences are (e.g., unlike a tool, it's not clear if per-library venvs are a desired thing), we've stopped shipping them, and link them here for posterity.\n\n| Category | Source | Tool | Description |\n|----------|--------|------|-------------|\n| binary | Library | [capstone](http://www.capstone-engine.org) | Multi-architecture disassembly framework. |\n| binary | Library | [keystone](http://www.keystone-engine.org) | Lightweight multi-architecture assembler framework. |\n| binary | Library | [lief](https://lief.quarkslab.com/) | Library to Instrument Executable Formats. |\n| binary | Library | [miasm](https://github.com/cea-sec/miasm) | Reverse engineering framework in Python. |\n| binary | Library | [unicorn](http://www.unicorn-engine.org) | Multi-architecture CPU emulator framework. |\n| binary | Library | [virtualsocket](https://github.com/antoniobianchi333/virtualsocket) | A nice library to interact with binaries. |\n| crypto | Library | [cryptanalib3](https://github.com/unicornsasfuel/cryptanalib3) |  The surviving core of featherduster cryptanalysis tool, updated for python3. |\n| crypto | Library | [python-paddingoracle](https://github.com/mwielgoszewski/python-paddingoracle) | Padding oracle attack automation. |\n"
  },
  {
    "path": "angr/install",
    "content": "#!/bin/bash -ex\n\npipx install angr\n\"$(dirname \"${BASH_SOURCE[0]}\")\"/pipx/venvs/angr/bin/python -m pip install ipython\n"
  },
  {
    "path": "angr/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\n# for angr\napt-get -y install virtualenvwrapper python3-dev python3-pip build-essential libxml2-dev \\\n    libxslt1-dev git libffi-dev cmake libreadline-dev libtool debootstrap \\\n    debian-archive-keyring libglib2.0-dev libpixman-1-dev qtdeclarative5-dev \\\n    binutils-multiarch nasm libc6:i386 libgcc1:i386 libstdc++6:i386 \\\n    libtinfo6:i386 zlib1g:i386 vim libssl-dev openjdk-8-jdk\n"
  },
  {
    "path": "angr-management/install",
    "content": "#!/bin/bash -ex\n\n# Pin setuptools < 82 to ensure pkg_resources is available for building\n# dependencies like pyqodeng (setuptools 82.0.0 removed pkg_resources).\nexport PIP_CONSTRAINT=$(mktemp)\necho 'setuptools<82' > \"$PIP_CONSTRAINT\"\npipx install angr-management\nrm -f \"$PIP_CONSTRAINT\"\n"
  },
  {
    "path": "angr-management/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\n# for angr\napt-get -y install virtualenvwrapper python3-dev python3-pip build-essential libxml2-dev \\\n    libxslt1-dev git libffi-dev cmake libreadline-dev libtool debootstrap \\\n    debian-archive-keyring libglib2.0-dev libpixman-1-dev qtdeclarative5-dev \\\n    binutils-multiarch nasm libc6:i386 libgcc1:i386 libstdc++6:i386 \\\n    libtinfo6:i386 zlib1g:i386 vim libssl-dev openjdk-8-jdk\n"
  },
  {
    "path": "beef/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/beefproject/beef\n\ncd beef\nrm Gemfile.lock\nbundle install\ncd ..\n\nmkdir bin\ncat <<END >bin/beef\n#!/bin/bash\nexport GEM_PATH=$PWD/gems\nexport GEM_HOME=$PWD/gems\ncd $PWD/beef # REQUIRED for ruby crap\n./beef \"\\$@\"\nEND\nchmod 755 bin/beef\n"
  },
  {
    "path": "beef/install-root-archlinux",
    "content": "#!/bin/bash -ex\n\npacman -Syu --noconfirm --needed \\\n    ruby python2 ruby-bundler \\\n    git make gcc openssl patch readline \\\n    zlib libyaml libffi bzip2 autoconf automake \\\n    libtool bison sqlite\n"
  },
  {
    "path": "beef/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y curl git build-essential openssl libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison nodejs libcurl4-openssl-dev\napt-get install -y ruby ruby-rubygems ruby-dev ruby-bundler\n"
  },
  {
    "path": "burpsuite/install",
    "content": "#!/bin/bash -ex\n\nwget -O ./burp.jar 'https://portswigger.net/DownloadUpdate.ashx?Product=Free'\nchmod 755 ./burp.jar\nmkdir -p bin\ncd bin\nln -s ../burp.jar burpsuite\ncd ..\n"
  },
  {
    "path": "burpsuite/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\npacman -Syu --noconfirm --needed jre7-openjdk\n"
  },
  {
    "path": "burpsuite/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\ncase \"$(lsb_release -cs)\" in\n\tnoble)\n\t\tapt-get -y install openjdk-21-jre jarwrapper\n\t\t;;\n\txenial)\n\t\tapt-get -o Dpkg::Options::=\"--force-overwrite\" -y install openjdk-9-jre\n\t\t;;\n\t*)\n\t\tapt-get -y install openjdk-7-jre\n\t\t;;\nesac\n"
  },
  {
    "path": "codext/install",
    "content": "#!/bin/bash -ex\n\npipx install codext\n"
  },
  {
    "path": "commix/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/commixproject/commix.git\nmkdir bin\ncd bin\nln -s ../commix/commix.py\n"
  },
  {
    "path": "cribdrag/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/SpiderLabs/cribdrag\n\nmkdir bin\ncd bin\nln -s ../cribdrag/* .\ncd ..\n"
  },
  {
    "path": "cross2/install",
    "content": "#!/bin/bash -ex\n\nFILE=cross2-20130826.tgz\nINSTALL_DIR=$PWD\n\n[ ! -e $FILE ] && wget https://kozos.jp/books/asm/$FILE\ntar xf $FILE\n\ncd cross2/toolchain\n./fetch.sh\n./setup.sh\ncd ..\nsed -i -e \"s|#makeopt=.*|makeopt='-j'|\" config.sh\nsed -i -e \"s|install_dir.*|install_dir=\\\"$INSTALL_DIR\\\"|\" config.sh\ncd build\n./build-install-all.sh\n\n#mkdir -p bin\n#cd bin\n#for i in ../*/bin/*\n#do\n#\tF=$(basename $i)\n#\tD=$(basename $(dirname $(dirname $i)))\n#\t[ -f $D-$F ] || ln -s $i $D-$F\n#done\n#cd ..\n"
  },
  {
    "path": "crosstool/install",
    "content": "#!/bin/bash -ex\n\nmkdir -p src\n[ -e crosstool-ng ] || git clone --depth 1 https://github.com/crosstool-ng/crosstool-ng.git\npushd crosstool-ng\n./bootstrap\n./configure --enable-local\nmake -j $(nproc)\n#make install\ncp ../config .config\n\nSAMPLES=$(ls samples | tr ',' '\\n')\n\nmkdir -p ../toolchains\nfor sample in $SAMPLES\ndo\n\t../build-sample.sh $sample || echo \"$sample\" >> ../toolchains/broken\n\t./ct-ng clean\ndone\npopd\n\nmkdir -p bin\npushd bin\nfor sample in $SAMPLES\ndo\n\tln -sf ../toolchains/$sample/bin/* .\n\trm -f '*'\ndone\npopd\n"
  },
  {
    "path": "crosstool/install-root-archlinux",
    "content": "#!/bin/bash -ex\n\npacman -Syu --noconfirm gperf flex bison help2man gawk ncurses\n"
  },
  {
    "path": "crosstool/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y gperf flex bison help2man gawk libncurses5-dev libtool-bin\n"
  },
  {
    "path": "crosstool/uninstall",
    "content": "#!/bin/bash -ex\n\n[ -e x-tools ] && chmod -R u+w x-tools\nrm -rf crosstools-ng\n"
  },
  {
    "path": "decomp2dbg/install",
    "content": "#!/bin/bash -ex\n\npipx install decomp2dbg\n[ -d ../gdb/venv ] && ../gdb/venv/bin/pip install decomp2dbg\n[ -d ../ida/venv ] && ../ida/venv/bin/pip install decomp2dbg\n[ -d ../ghidra/venv ] && ../ghidra/venv/bin/pip install decomp2dbg\n[ -d ../angr-management/pipx/venvs ] && ../angr-management/pipx/venvs/angr-management/bin/python -m pip install decomp2dbg\n\ncoproc bin/decomp2dbg --install\n\n# ida\nif [ -d $PWD/../ida/*/plugins ]\nthen\n\techo y >& ${COPROC[1]}\n\techo $PWD/../ida/*/plugins >& ${COPROC[1]}\nelse\n\techo n >& ${COPROC[1]}\nfi\n\n# binja\necho n >& ${COPROC[1]}\n\n# ghidra - temporarily disabled due to libbs missing libbs_vendored directory\necho n >& ${COPROC[1]}\n\n# angr-management\nif [ -d $PWD/../angr-management/pipx/venvs ]\nthen\n\techo y >& ${COPROC[1]}\n\techo $PWD/../angr-management/pipx/venvs/angr-management/lib/python3.12/site-packages/angrmanagement/plugins >& ${COPROC[1]}\nelse\n\techo n >& ${COPROC[1]}\nfi\n\n# gdb\necho y >& ${COPROC[1]}\necho $HOME/.gdbinit >& ${COPROC[1]}\n\nif grep -B10 -E \"(Stopping|Errno)\" <& ${COPROC[0]}\nthen\n\techo \"FAILED\"\n\texit 1\nfi\n"
  },
  {
    "path": "df/install",
    "content": "#!/bin/bash -ex\n\nmkdir df_linux\npushd df_linux\nwget -O - https://www.bay12games.com/dwarves/df_51_06_linux.tar.bz2 | tar xj\npopd\n\nmkdir -p bin\ncat <<END > bin/dwarf_fortress\n#/bin/bash\ncd $PWD/run_df\n./df \"\\$@\"\nEND\nchmod 755 bin/dwarf_fortress\n"
  },
  {
    "path": "df/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\nsudo apt install -y libsdl2-image-2.0-0\n"
  },
  {
    "path": "elfkickers/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/BR903/ELFkickers\ncd ELFkickers\nmake -j1\ncd ..\nmv ELFkickers/bin ./bin\n"
  },
  {
    "path": "elfparser/install",
    "content": "#!/bin/bash -ex\n\nmkdir bin\n\ngit clone https://github.com/mentebinaria/elfparser-ng elfparser-ng\n\nmkdir qt\npushd qt\ncmake ../elfparser-ng\nmake -j\nmv elfparser-ng ../bin/elfparser-gui-ng\npopd\n\nmkdir cli\npushd cli\ncmake -D qt=no ../elfparser-ng\nmake -j\nmv elfparser-cli-ng ../bin/\npopd\n\nrm -rf cli qt elfparser-ng\n"
  },
  {
    "path": "elfparser/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\nsudo apt-get install -y cmake libboost-all-dev build-essential \\\n                qtcreator qtdeclarative5-dev libzstd-dev libbz2-dev liblzma-dev \\\n\t\tqtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools\n"
  },
  {
    "path": "evilize/install",
    "content": "#!/bin/bash -ex\n\nwget https://www.mscs.dal.ca/~selinger/md5collision/downloads/evilize-0.2.tar.gz\ntar zvxf evilize-0.2.tar.gz\ncd evilize-0.2\nmake -j $(nproc)\ncd ..\nmkdir bin\ncd bin\nln -s ../evilize-0.2/evilize .\nln -s ../evilize-0.2/md5coll .\n"
  },
  {
    "path": "fastcoll/install",
    "content": "#!/bin/bash -ex\n\n[ -e fastcoll ] || git clone https://github.com/upbit/clone-fastcoll fastcoll\ncd fastcoll\nmake\n\ncd ..\nmkdir bin\ncp fastcoll/fastcoll bin\n"
  },
  {
    "path": "featherduster/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth=1 https://github.com/nccgroup/featherduster.git\n\npython2 -m virtualenv venv\nvenv/bin/pip2 install -e ./featherduster\n\nmkdir bin\ncd bin\nln -s ../venv/bin/featherduster .\n"
  },
  {
    "path": "featherduster/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install libgmp3-dev libncurses5-dev\n\n"
  },
  {
    "path": "firmware-mod-kit/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/rampageX/firmware-mod-kit\npushd firmware-mod-kit\ncd src\nmake\npopd\n\nmkdir -p bin\nfor i in $PWD/firmware-mod-kit/*.sh\ndo\n\tcat <<END > bin/$(basename $i)\n#!/bin/bash\nexport PATH=\"\\$PATH:$(dirname $i)\"\nexec $i \"\\$@\"\nEND\n\tchmod 755 bin/$(basename $i)\ndone\n\npushd bin\nfor i in $(file ../firmware-mod-kit/src/{*,*/*} | grep \"ELF.*executable\" | cut -d: -f1 | cut -b 25-)\ndo\n\tj=fmk-${i//\\//-}\n\tln -s ../firmware-mod-kit/src/$i $j\ndone\npopd\n\nsed -i -e \"s/SUDO=\\\"sudo\\\"/SUDO=\\\"\\\"/\" firmware-mod-kit/*.sh\n"
  },
  {
    "path": "firmware-mod-kit/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\npacman -Syu --noconfirm --needed zlib xz python2-magic\n"
  },
  {
    "path": "firmware-mod-kit/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install liblzma-dev python3-magic zlib1g-dev\n"
  },
  {
    "path": "foresight/install",
    "content": "#!/bin/bash -ex\n\npipx install 'git+https://github.com/ALSchwalm/foresight.git'\n"
  },
  {
    "path": "galois/install",
    "content": "#!/bin/bash -ex\n\nwget https://web.eecs.utk.edu/~plank/plank/papers/CS-07-593/galois.tar\n\nmkdir -p galois\ncd galois\ntar xvf ../galois.tar\nmake\ncd ..\n\nmkdir -p bin\ncd bin\nln -s ../galois/{gf_basic_tester,gf_div,gf_ilog,gf_inverse,gf_log,gf_mult,gf_xor,gf_xor_tester} .\ncd ..\n"
  },
  {
    "path": "gdb/install",
    "content": "#!/bin/bash -ex\nset -e -o pipefail\n\nfind_latest_gdb_version() {\n    git ls-remote --tags git://sourceware.org/git/binutils-gdb.git \\\n        | grep -v users \\\n        | grep -v '{}' \\\n        | grep -oh 'gdb-[0-9]\\{1,2\\}\\.[0-9]\\{1,2\\}\\(\\.[0-9]\\{1,2\\}\\(\\.[0-9]\\{1,2\\}\\)\\?\\)\\?-release' \\\n        | sort --version-sort -r \\\n        | sed 's/gdb-//g' \\\n        | sed 's/-release//g' \\\n        | head -n 1\n}\n\nVERSION=$(find_latest_gdb_version)\necho $VERSION > gdb_version\n\nrm -rf \"gdb\" || true\ncurl \"https://ftp.gnu.org/gnu/gdb/gdb-$VERSION.tar.gz\" | tar xz\nmv \"gdb-$VERSION\" \"gdb\"\n\nset +x\n# move to ctftools virtual env\nvirtualenv venv\nsource venv/bin/activate\nset -x\n\nPREFIX=$(pwd)\n\npushd ./gdb\n./configure \\\n    --prefix=$PREFIX \\\n    --with-python=$(which python) \\\n    --enable-targets=all \\\n    --with-guile=guile-2.2\nmake -j $(nproc)\nmake install\n# remove build artifacts\nmake clean\npopd\n"
  },
  {
    "path": "gdb/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\npacman -Syu --needed --noconfirm texinfo guile2.0\n"
  },
  {
    "path": "gdb/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install texinfo guile-2.2-dev libgmp-dev libmpfr-dev\n"
  },
  {
    "path": "gdb/install-root-fedora",
    "content": "#!/bin/bash -ex\n\ndnf install -y texinfo\n"
  },
  {
    "path": "gef/install",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\nwget -O gef.py -q https://gef.blah.cat/py\nmkdir bin\ncat <<END > bin/gef\n#!/bin/bash\ngdb -ex \"source $PWD/gef.py\" \"\\$@\"\nEND\nchmod 755 bin/gef\n"
  },
  {
    "path": "ghidra/install",
    "content": "#!/bin/bash -ex\n\n# try to get the best of both worlds for local tweaking and global installs\nvirtualenv --system-site-packages venv\n\n[ -e https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.3.1_build/ghidra_11.3.1_PUBLIC_20250219.zip ] || wget https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.3.1_build/ghidra_11.3.1_PUBLIC_20250219.zip\n[ -e ghidra_11.3.1_PUBLIC ] || unzip ghidra_11.3.1_PUBLIC_20250219.zip\n\nmkdir -p bin\ncat <<END > bin/ghidra\n#!/bin/bash\n[ -n \"\\$VIRTUAL_ENV\" ] || source $PWD/venv/bin/activate\n$PWD/ghidra_11.3.1_PUBLIC/ghidraRun \"\\$@\"\nEND\nchmod 755 bin/ghidra\n"
  },
  {
    "path": "ghidra/install-root-debian",
    "content": "#!/bin/bash -ex\n\nsudo apt install openjdk-11-jdk jarwrapper -y\n"
  },
  {
    "path": "hash-identifier/install",
    "content": "#!/bin/bash -ex\n\nwget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hash-identifier/Hash_ID_v1.1.py\nchmod 755 Hash_ID_v1.1.py\nfromdos Hash_ID_v1.1.py || dos2unix Hash_ID_v1.1.py\n\nmkdir -p bin\ncd bin\nln -s ../Hash_ID_v1.1.py ./hash_id.py\n"
  },
  {
    "path": "hash-identifier/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get -y install tofrodos\n"
  },
  {
    "path": "hashpump-partialhash/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/mheistermann/HashPump-partialhash.git\ncd HashPump-partialhash\nmake -j $(nproc)\ncd ..\n\nmkdir bin\ncd bin\nln -s ../HashPump-partialhash/hashpump .\ncd ..\n"
  },
  {
    "path": "hashpump-partialhash/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\npacman -Syu --noconfirm --needed openssl\n"
  },
  {
    "path": "hashpump-partialhash/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install libssl-dev\n"
  },
  {
    "path": "honggfuzz/install",
    "content": "#!/bin/bash -ex\n\n[ -e honggfuzz ] || git clone --depth 1 https://github.com/google/honggfuzz\ncd honggfuzz\nmake -j\nmkdir -p ../bin\ncp honggfuzz ../bin\n"
  },
  {
    "path": "honggfuzz/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\n# apt-get install libbfd-dev libunwind8-dev\npacman -Syu --noconfirm --needed libunwind binutils\n"
  },
  {
    "path": "honggfuzz/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get install -y libbfd-dev libunwind8-dev\n"
  },
  {
    "path": "ida/install",
    "content": "#!/bin/bash -ex\n\n# our venv shenanigans\npython3.13 -m venv venv\nsource venv/bin/activate\n\ntar xvf ~/Downloads/IDA*.tar.gz\n\nIDA_DIR=$(dirname */libida.so)\n\npushd $IDA_DIR\n./idapyswitch --force-path /usr/lib/x86_64-linux-gnu/libpython3.13.so.1.0\npopd\n\n# install this here\npip install ida-pro-mcp\nida-pro-mcp --install\n\nmkdir bin\ncat <<END >bin/ida64\n#!/bin/bash\n[ -n \"\\$VIRTUAL_ENV\" ] || source $PWD/venv/bin/activate\nexec $PWD/[^b]*/ida64 \"\\$@\"\nEND\nchmod 755 bin/ida64\n"
  },
  {
    "path": "ida/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install python3.13-venv libpython3.13\n"
  },
  {
    "path": "jdgui/install",
    "content": "#!/bin/bash -ex\n\nmkdir bin\n[ -e bin/jd-gui.jar ] || wget https://github.com/java-decompiler/jd-gui/releases/download/v1.6.6/jd-gui-1.6.6.jar -O bin/jd-gui.jar\nchmod 755 bin/jd-gui.jar\nchmod 755 bin/jd-gui.jar\n"
  },
  {
    "path": "jdgui/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\npacman -Syu --noconfirm --needed jre7-openjdk\n"
  },
  {
    "path": "jdgui/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\n\ncase \"$(lsb_release -cs)\" in\n\tnoble)\n\t\tapt-get -y install openjdk-21-jre\n\t\t;;\n\tbookworm)\n\t\tapt-get -y install openjdk-17-jre\n\t\t;;\n\txenial)\n\t\tapt-get -o Dpkg::Options::=\"--force-overwrite\" -y install openjdk-9-jre\n\t\t;;\n\t*)\n\t\tapt-get -y install openjdk-7-jre\n\t\t;;\nesac\n\nsudo apt install -y jarwrapper\n"
  },
  {
    "path": "libc-database/install",
    "content": "#!/bin/bash -ex\n\n[ -e libc-database ] || git clone https://github.com/niklasb/libc-database\n\n# Patch libc-database to handle large RPM files (>4GB) by using rpm2archive as fallback\n# rpm2cpio doesn't support files over 4GB, but rpm2archive does\ncp extract_rpm.sh libc-database/common/\nchmod +x libc-database/common/extract_rpm.sh\n\n# Replace rpm2cpio|cpio pipeline with our wrapper script\nperl -i -0pe 's/\\(rpm2cpio pkg\\.rpm \\|\\| die \"rpm2cpio failed\"\\) \\| \\\\\\n\\s+\\(cpio -id --quiet \\|\\| die \"cpio failed\"\\)/bash \"\\$SCRIPT_DIR\\/common\\/extract_rpm.sh\" pkg.rpm || die \"rpm extraction failed\"/g' libc-database/common/libc.sh\n# Add SCRIPT_DIR variable near the top of libc.sh\nsed -i '1a SCRIPT_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")/..\" && pwd)\"' libc-database/common/libc.sh\n\nmkdir -p bin\nfor i in add dump find get identify download\ndo\n\tcat <<END > bin/libc-database-$i\ncd $PWD/libc-database/\n./$i \"\\$@\"\nEND\n\tchmod 755 bin/libc-database-$i\ndone\n\nbin/libc-database-get all\n"
  },
  {
    "path": "libc-database/install-root-debian",
    "content": "#!/bin/bash -ex\n\nsudo apt-get install -y \\\n  binutils file \\\n  wget \\\n  rpm2cpio cpio \\\n  zstd jq\n"
  },
  {
    "path": "manticore/install",
    "content": "#!/bin/bash -ex\n\npipx install --python $(which pypy3) \"manticore[native]\"\n"
  },
  {
    "path": "manticore/install-root-debian",
    "content": "#!/bin/bash -ex\n\nset -eu -o pipefail\n\napt-get -y install pypy3 pypy3-dev rustc cargo\n"
  },
  {
    "path": "mitmproxy/install",
    "content": "#!/bin/bash -ex\n\npipx install mitmproxy\n"
  },
  {
    "path": "mitmproxy/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install libssl-dev libffi-dev libtiff5-dev libjpeg8-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk libxml2-dev libxslt1-dev\n\n"
  },
  {
    "path": "msieve/install",
    "content": "#!/bin/bash -ex\n\nmkdir bin\nwget -O msieve.tar.gz \"https://downloads.sourceforge.net/project/msieve/msieve/Msieve v1.53/msieve153_src.tar.gz\"\ntar -xf msieve.tar.gz\n\ncd msieve-*\nmake all\ncp msieve ../bin\n"
  },
  {
    "path": "msieve/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\npacman -Syu --noconfirm --needed gmp\n"
  },
  {
    "path": "msieve/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install libgmp3-dev libgmp-dev libz-dev\n"
  },
  {
    "path": "nonce-disrespect/install",
    "content": "#!/bin/bash -ex\n\ngit clone https://github.com/nonce-disrespect/nonce-disrespect.git\ngit -C nonce-disrespect apply $PWD/build.patch\nmake -C nonce-disrespect/tool\n\nmkdir bin\ncp nonce-disrespect/tool/forge bin/\ncp nonce-disrespect/tool/recover bin/\n"
  },
  {
    "path": "nonce-disrespect/install-root-debian",
    "content": "#!/bin/bash -ex\n\nsudo apt-get install -y libntl-dev libgmp-dev\n"
  },
  {
    "path": "one_gadget/install",
    "content": "#!/bin/bash -ex\n\ngem install one_gadget\n"
  },
  {
    "path": "one_gadget/install-root-archlinux",
    "content": "#!/bin/bash -ex\n\npacman -Syu --noconfirm --needed ruby\n"
  },
  {
    "path": "one_gadget/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y ruby\n"
  },
  {
    "path": "pdf-parser/install",
    "content": "#!/bin/bash -ex\n\nwget https://didierstevens.com/files/software/pdf-parser_V0_7_11.zip\nunzip pdf-parser_V0_7_11.zip\nmkdir -p bin\nmv pdf-parser.py bin/pdf-parser\nchmod 755 bin/pdf-parser\n"
  },
  {
    "path": "peepdf/install",
    "content": "#!/bin/bash -ex\n\npipx install \"git+https://github.com/cert-ee/peepdf\"\n"
  },
  {
    "path": "pemcrack/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/robertdavidgraham/pemcrack.git\ncd pemcrack\nmake\ncd ..\n\nmkdir -p bin\ncp pemcrack/bin/pemcrack bin/\n"
  },
  {
    "path": "pemcrack/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install libssl-dev\n\n"
  },
  {
    "path": "pkcrack/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/keyunluo/pkcrack pkcrack-src\nmkdir -p pkcrack-src/build\ncd pkcrack-src/build\ncmake ..\nmake\n\nmkdir -p ../../bin\ncp ../bin/extract ../bin/findkey ../bin/makekey ../bin/pkcrack ../bin/zipdecrypt ../../bin\ncd ../../\n"
  },
  {
    "path": "pkcrack/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install cmake\n"
  },
  {
    "path": "preeny/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/zardus/preeny\nPATH=$PWD/../crosstool/bin:$PATH\n\ncd preeny\nfor i in ../../crosstool/bin/*-gcc\ndo\n\tt=$(basename $i)\n\tCC=$t make -j $(nproc) -i\ndone\nPLATFORM=-m32 setarch i686 make -i\nmv x86_64-linux-gnu i686-linux-gnu\nmake -i\n"
  },
  {
    "path": "pwndbg/install",
    "content": "#!/bin/bash -ex\n\n#git clone --depth 1 https://github.com/pwndbg/pwndbg\nwget https://github.com/pwndbg/pwndbg/releases/download/2025.02.19/pwndbg_2025.02.19_x86_64-portable.tar.xz\ntar xvf pwndbg_*-portable.tar.xz --strip-components 2 \n"
  },
  {
    "path": "pwndbg/install-root-archlinux",
    "content": "#!/bin/bash -ex\n\n# install system wide, s.t. pwndbg works also with system qemu\npacman -Syu --noconfirm python-psutil python2-psutil \\\n    capstone python-capstone python2-capstone \\\n    unicorn python-unicorn python2-unicorn \\\n    python-future python2-future \\\n    python-ptrace python2-ptrace \\\n    python-six  python2-six \\\n    python-pyelftools python2-pyelftools \\\n    python-pycparser python2-pycparser\n"
  },
  {
    "path": "pwndbg/install-root-debian",
    "content": "#!/bin/bash -ex\n\nsudo apt-get -y install python3-dev python3-pip \\\n    libglib2.0-dev libc6-dbg\n\nif uname -m | grep x86_64 > /dev/null; then\n    sudo apt-get install libc6-dbg:i386 || true\nfi\n"
  },
  {
    "path": "pwndbg/install-root-fedora",
    "content": "#!/bin/bash -ex\n\ndnf install -y dnf-plugins-core\ndnf debuginfo-install -y glibc\n"
  },
  {
    "path": "pwninit/install",
    "content": "#!/bin/bash -ex\n\nmkdir bin\npushd bin\nwget https://github.com/io12/pwninit/releases/download/3.3.1/pwninit\nchmod 755 pwninit\n"
  },
  {
    "path": "pwninit/install-root-debian",
    "content": "#!/bin/bash -ex\n\nsudo apt-get install -y patchelf\n"
  },
  {
    "path": "pwnsh/install",
    "content": "#!/bin/bash -ex\n\ngit clone https://github.com/zardus/pwnsh\npushd pwnsh\n./update-syscalls.sh\npopd\n\nmkdir bin\npushd bin\nln -s ../pwnsh/scripts/* .\n"
  },
  {
    "path": "pwntools/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth=1 https://github.com/Gallopsled/pwntools.git\npipx install -e ./pwntools\n"
  },
  {
    "path": "pwntools/install-root-archlinux",
    "content": "#!/bin/bash -ex\n\npacman -Syu --noconfirm --needed binutils openssl libffi\n"
  },
  {
    "path": "pwntools/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y python3-pip python3-dev git libssl-dev libffi-dev build-essential\n"
  },
  {
    "path": "pwntools/install-root-fedora",
    "content": "#!/bin/bash -ex\n\ndnf install -y binutils binutils-devel libffi-devel openssl-devel\n"
  },
  {
    "path": "python2/install",
    "content": "#!/bin/bash -ex\n\n[ -d pyenv ] || git clone --depth=1 https://github.com/pyenv/pyenv\nexport PYENV_ROOT=$PWD/pyenv-root\npyenv/bin/pyenv install 2.7.18\n\nmkdir bin\ncd bin\nln -s ../pyenv-root/versions/2.7.18/bin/{easy_install-2.7,pip2.7,python2.7,python2.7-gdb.py,pip2,python2,python2.7-config,python2-config} .\n\n./pip2 install virtualenv\n"
  },
  {
    "path": "python2/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\n# pyvenv\napt-get -y install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev\n\napt-get -y install libgmp3-dev libncurses5-dev\n\n"
  },
  {
    "path": "qemu/install",
    "content": "#!/bin/bash -ex\n\nfind_latest_qemu_version() {\n    git ls-remote --tags https://gitlab.com/qemu-project/qemu.git \\\n        | grep -v '\\-rc' \\\n        | grep -oh 'v[0-9]\\{1,2\\}\\.[0-9]\\{1,2\\}\\(\\.[0-9]\\{1,2\\}\\(\\.[0-9]\\{0,2\\}\\)\\?\\)\\?' \\\n        | sort --version-sort -r \\\n        | head -n 1\n}\n\n#VERSION=v2.10.1\nVERSION=$(find_latest_qemu_version)\necho $VERSION > qemu_version\ngit clone --depth=1 -b \"$VERSION\" https://gitlab.com/qemu-project/qemu.git\n\nset +x\nvirtualenv venv\nsource venv/bin/activate\npip install sphinx sphinx_rtd_theme\nset -x\n\nprefix=\"--prefix=$(pwd)\"\npython=\"--python=$(which python)\"\nbuild_flags=\"\"\n\nmkdir build\npushd build\nif ! ../qemu/configure \"$prefix\" \"$python\" $build_flags; then\n    echo \"Updating QEMU submodules in case dependencies are missing\"\n    pushd ../qemu/\n    git submodule init\n    git submodule update --recursive\n    popd\n\n    # redo configure step\n    ../qemu/configure \"$prefix\" \"$python\" $build_flags\nfi\nmake -j $(nproc)\n\nmake install\n# remove build artifacts - qemu is huge otherwise...\nmake clean\npopd\nrm -rf build\n"
  },
  {
    "path": "qemu/install-root-archlinux",
    "content": "#!/bin/bash -ex\n\npacman -Syu --noconfirm --needed python2 pixman dtc\n"
  },
  {
    "path": "qemu/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y python3 pkg-config zlib1g-dev \\\n    libglib2.0-dev libpixman-1-dev libfdt-dev ninja-build flex bison\n"
  },
  {
    "path": "qiling/install",
    "content": "#!/bin/bash -ex\n\nvirtualenv venv\nsource venv/bin/activate\n\ngit clone -b dev --depth 1 https://github.com/qilingframework/qiling.git\npushd qiling\ngit submodule update --init --recursive\npip install .\npopd\n\ncp qiling/qltui.py venv/lib/python3.12/site-packages\n\nmkdir -p bin\ncat <<END >bin/qltool\n#!/bin/bash\nsource $PWD/venv/bin/activate\nexec $PWD/qiling/qltool \"\\$@\"\nEND\nchmod 755 bin/qltool\n"
  },
  {
    "path": "qiling/install-root-debian",
    "content": "#!/bin/bash -ex\n\n\n# from https://docs.qiling.io/en/latest/install/, but seems insane\nexport DEBIAN_FRONTEND=noninteractive\nsudo apt install -y ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison build-essential \\\nbzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \\\ngit gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \\\nlibmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \\\nmkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python3 python3-pip libpython3-dev qemu-utils \\\nrsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev\n"
  },
  {
    "path": "qira/install",
    "content": "#!/bin/bash -ex\n\nmkdir nosudo\ncat <<END > nosudo/sudo\n#!/bin/bash\necho SUDO BLOCKED: \"\\$@\"\nEND\nchmod 755 nosudo/sudo\n\ngit clone --depth 1 https://github.com/BinaryAnalysisPlatform/qira.git\n#export HOME=$PWD\nexport PATH=$PWD/nosudo:$PATH\ncd qira\n\ngit apply ../qira_fix.patch\n./install.sh\n\ncd ..\nmkdir -p bin\ncd bin\nln -s ../qira/qira qira\ncd ..\n"
  },
  {
    "path": "qira/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\npacman -Syu --noconfirm --needed python2-pip openssl libjpeg-turbo zlib \\\n    unzip wget graphviz gmp llvm clang ocaml llvm-ocaml python2-virtualenv \\\n    wget flex bison libtool automake autoconf pkg-config libevent glib2\n"
  },
  {
    "path": "qira/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install libssl-dev build-essential python3-dev python3-pip debootstrap libjpeg-dev zlib1g-dev unzip wget graphviz software-properties-common libgmp-dev llvm-19-dev time ocaml ocaml-native-compilers camlp4-extra opam clang python3-virtualenv wget flex bison libtool automake autoconf autotools-dev pkg-config libglib2.0-dev libevent-dev\napt-get -y build-dep qemu\n"
  },
  {
    "path": "rappel/install",
    "content": "#!/bin/bash -ex\n\ngit clone https://github.com/yrp604/rappel\ncd rappel\nmake\ncd ..\n\nmkdir -p bin\ncd bin\nln -s ../rappel/bin/* .\ncd ..\n"
  },
  {
    "path": "rappel/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y libedit-dev nasm\napt-get install -y libedit-dev:i386 || true\n"
  },
  {
    "path": "reveng/install",
    "content": "#!/bin/bash -ex\n\nwget https://downloads.sourceforge.net/project/reveng/3.0.6/reveng-3.0.6.tar.gz\ntar -xf reveng-3.0.6.tar.gz\ncd reveng-3.0.6\nsed -i -e \"s/^#define BMP_BIT.*/#define BMP_BIT 64/\" config.h\nsed -i -e \"s/^#define BMP_SUB.*/#define BMP_SUB 32/\" config.h\nmake -j $(nproc)\ncd ..\n\nmkdir -p bin\ncp reveng-3.0.6/reveng bin\n"
  },
  {
    "path": "ropper/install",
    "content": "#!/bin/bash -ex\n\npipx install ropper\n"
  },
  {
    "path": "ropper/test",
    "content": "#!/bin/bash -ex\n\nset +e\nsource ${VIRTUALENVWRAPPER_SCRIPT}\nworkon ctftools\nset -e\n\n[ $(ropper --file /bin/false | wc -l) -gt 400 ] || exit 1\nexit 0\n"
  },
  {
    "path": "rp++/install",
    "content": "#!/bin/bash -ex\n\nwget https://github.com/0vercl0k/rp/releases/download/v2.1.4/rp-lin-gcc.zip\nunzip rp-lin-gcc.zip\nmkdir bin\nmv rp-lin bin/rp++\nchmod 755 bin/rp++\n"
  },
  {
    "path": "rsactftool/install",
    "content": "#!/bin/bash -ex\n\nvirtualenv venv\nsource venv/bin/activate\n\ngit clone --depth 1 https://github.com/Ganapati/RsaCtfTool\npushd RsaCtfTool\npip install -r requirements.txt\npopd\n\nmkdir bin\ncat <<END >bin/RsaCtfTool.py\n#!/bin/bash\nsource $PWD/venv/bin/activate\nexec $PWD/RsaCtfTool/RsaCtfTool.py \"\\$@\"\nEND\nchmod 755 bin/*\n"
  },
  {
    "path": "rsactftool/install-root-debian",
    "content": "#!/bin/bash -ex\n\nsudo apt-get install -y libgmp3-dev libmpc-dev\n"
  },
  {
    "path": "scrdec18/install",
    "content": "#!/bin/bash -ex\n\nwget \"https://gist.githubusercontent.com/bcse/1834878/raw/7483fb72abbb32aa69b853fdcc9f6f72e7568677/scrdec18.c\"\nmkdir -p bin\ngcc -o bin/scrdec18 scrdec18.c\n"
  },
  {
    "path": "seccomp-tools/install",
    "content": "#!/bin/bash -ex\n\ngem install seccomp-tools\n"
  },
  {
    "path": "seccomp-tools/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y ruby ruby-dev\n"
  },
  {
    "path": "shellnoob/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/reyammer/shellnoob\n\nmkdir -p bin\ncd bin\nln -s ../shellnoob/shellnoob.py .\ncd ..\n"
  },
  {
    "path": "social-analyzer/install",
    "content": "#!/bin/bash -ex\n\npipx install social-analyzer\n"
  },
  {
    "path": "ssh_decoder/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/jjyg/ssh_decoder.git\nchmod 755 ssh_decoder/ssh_decoder.rb\n\nmkdir bin\ncd bin\nln -s ../ssh_decoder/ssh_decoder.rb ssh_decoder\ncd ..\n"
  },
  {
    "path": "sslsplit/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/droe/sslsplit\ncd sslsplit\nmake -j $(nproc)\ncd ..\n\nmkdir bin\ncp sslsplit/sslsplit bin/\n"
  },
  {
    "path": "sslsplit/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\npacman -Syu --noconfirm --needed libevent\n"
  },
  {
    "path": "sslsplit/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install libevent-dev pkg-config libssl-dev libnet1-dev libpcap-dev\n"
  },
  {
    "path": "steganabara/install",
    "content": "#!/bin/bash -ex\n\ncurl http://www.caesum.com/handbook/steganabara-1.1.1.tar.gz | tar xz\nmkdir -p bin\ncat <<END > bin/steganabara\n#!/bin/bash -e\njava -cp $PWD/Steganabara/bin steganabara.Steganabara\nEND\nchmod 755 bin/steganabara\n"
  },
  {
    "path": "stegano-tools/install",
    "content": "#!/bin/bash -ex\n\nvirtualenv venv\nsource venv/bin/activate\npip install tinyscript\n\n[ -e stegano-tools ] || git clone --recurse https://github.com/dhondta/stegano-tools\n\nmkdir -p bin\nfor F in `find stegano-tools -type f -iname \"*.py\"`; do\n  N=\"${F##*/}\"\n  N=\"${N%.py}\"\n  P1=\"`pwd`/$F\"\n  P2=\"$VIRTUAL_ENV/bin/$N\"\n  echo \"$N\"\n  chmod +x $P1\n  cp $P1 $P2\n  sed -i '1s|.*|#!'\"$VIRTUAL_ENV\"'/bin/python3|' $P2\n  ln -s $P2 bin/$N\ndone\n"
  },
  {
    "path": "stegano-tools/uninstall",
    "content": "#!/bin/bash -ex\n\nfor F in paddinganograph stegolsb stegopit stegopvd; do\n  rm -f $HOME/tools/bin/$F\n  rm -f $HOME/.virtualenvs/ctftools/bin/$F\n  rm -f $HOME/.virtualenvs/ctftools3/bin/$F\ndone\n"
  },
  {
    "path": "stegdetect/install",
    "content": "#!/bin/bash -ex\n\nINST_DIR=\"$PWD\"\n\ngit clone --depth 1 https://github.com/sparticvs/stegdetect\n\nmkdir -p bin etc man/man1 share/stegbreak\npushd stegdetect\ngit remote set-branches origin '*'\ngit fetch -v --depth=1\ngit checkout dev/fix-compilation\ngit apply ../statics.patch\nlinux32 autoreconf -i -f\n# what the actual fuck\nlinux32 ./configure --prefix=\"$INST_DIR\"\nsed -i -e \"s/#ifndef HAVE_TIMERADD//\" config.h\nlinux32 make\nlinux32 make install\npopd\n\nwget https://launchpadlibrarian.net/16697277/rules.ini -O share/stegbreak/rules.ini\n"
  },
  {
    "path": "stegdetect/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\necho \"ERROR: archlinux has no aclocal-1.4. only $(aclocal --version | head -n 1)\"\nexit 1\n\npacman -Syu --noconfirm --needed automake\n"
  },
  {
    "path": "stegdetect/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install automake1.11 automake autotools-dev libevent-dev libmagic-dev\napt-get install -y libjpeg*-turbo*-dev\n"
  },
  {
    "path": "stegosaurus/install",
    "content": "#!/bin/bash -ex\n\nINST_DIR=\"$PWD\"\n\ngit clone --depth 1 https://github.com/AngelKitty/stegosaurus.git\n\nmkdir bin\n\ncd bin\n\nln -s ../stegosaurus/stegosaurus .\n\n"
  },
  {
    "path": "stegsolve/install",
    "content": "#!/bin/bash -ex\n\nwget http://www.caesum.com/handbook/Stegsolve.jar -O stegsolve.jar\nchmod +x stegsolve.jar\nmkdir bin\nmv stegsolve.jar bin/\n\n"
  },
  {
    "path": "subbrute/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/TheRook/subbrute.git\n\nmkdir -p bin\ncd bin\nln -s ../subbrute/subbrute.py subbrute\ncd ..\n"
  },
  {
    "path": "taintgrind/install",
    "content": "#!/bin/bash -ex\n\ncurl https://sourceware.org/pub/valgrind/valgrind-3.25.1.tar.bz2 | tar xj\ncd valgrind-3.25.1\n\ngit clone --depth 1 https://github.com/wmkhoo/taintgrind.git\ncd taintgrind\n./build_taintgrind.sh\ncd ../../\n\nmkdir -p bin\ncat <<END >bin/taintgrind\n#!/bin/bash\nexec $PWD/valgrind-3.25.1/build/bin/taintgrind \"\\$@\"\nEND\ncat <<END >bin/taintgrind-log2dot\n#!/bin/bash\nexec python3 $PWD/valgrind-3.25.1/taintgrind/log2dot.py \"\\$@\"\nEND\nchmod 755 bin/*\n"
  },
  {
    "path": "tor-browser/install",
    "content": "#!/bin/bash -ex\n\nREL_PATH=$(curl https://www.torproject.org/download/ | grep -i tor-browser-linux-x86_64 | grep 'xz\"' | sed -e 's/.*href=\"//' -e 's/\">.*//')\nwget https://www.torproject.org/$REL_PATH -O - | tar xvJ\n\nmkdir -p bin\ncat <<END >bin/tor-browser\n#!/bin/bash\ncd $PWD/tor-browser\n./start-tor-browser.desktop \"\\$@\"\nEND\nchmod 755 bin/*\n"
  },
  {
    "path": "valgrind/install",
    "content": "#!/bin/bash -ex\n\nINST_DIR=$PWD\n\ncurl ftp://sourceware.org/pub/valgrind/valgrind-3.13.0.tar.bz2 | tar xj\ncd valgrind-3.13.0\n./autogen.sh\n./configure --prefix=$INST_DIR\nmake -j $(nproc)\nmake install\n"
  },
  {
    "path": "veles/install",
    "content": "#!/bin/bash -ex\n\nwget -O src.tar.gz https://codisec.com/wp-content/uploads/2016/12/Veles_2016.12_Source.tar.gz\ntar xf src.tar.gz\nmkdir build\ncd build\ncmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH=.. ../veles-2016.12\nmake -j8\nmake install\n"
  },
  {
    "path": "veles/install-root-archlinux",
    "content": "#!/bin/bash -ex\n\npacman -Syu --noconfirm --needed cmake zlib qt5-base\n"
  },
  {
    "path": "veles/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y cmake zlib1g-dev qtbase5-dev\n"
  },
  {
    "path": "villoc/install",
    "content": "#!/bin/bash -ex\n\nPIN_NAME=pin-external-3.31-98869-gfa6f126a8-gcc-linux\ncurl https://software.intel.com/sites/landingpage/pintool/downloads/$PIN_NAME.tar.gz | tar xz\nexport PIN_ROOT=$PWD/$PIN_NAME\n\ngit clone --depth 1 https://github.com/wapiflapi/villoc\ncd villoc/tracers/pintool\nmake PIN_ROOT=$PIN_ROOT\ncd ../../\nchmod 755 villoc.py\ncd ..\n\nmkdir -p bin\ncd bin\nln -s ../villoc/villoc.py .\ncd ..\n"
  },
  {
    "path": "volatility/install",
    "content": "#!/bin/bash -ex\n\n[ -e volatility ] || git clone --depth 1 https://github.com/volatilityfoundation/volatility\n\npython2 -m virtualenv venv\nvenv/bin/pip2 install -e ./volatility\nvenv/bin/pip2 install distorm3\nvenv/bin/pip2 install pycrypto\n\nmkdir bin\ncd bin\nln -s ../venv/bin/vol* .\n"
  },
  {
    "path": "volatility3/install",
    "content": "#!/bin/bash -ex\n\npipx install volatility3\n"
  },
  {
    "path": "webgrep/install",
    "content": "#!/bin/bash -ex\n\npipx install 'git+https://github.com/dhondta/webgrep.git'\n"
  },
  {
    "path": "webgrep/install-root-archlinux",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\npacman -Syu --needed --noconfirm binutils grep imagemagick perl-image-exiftool steghide tesseract\n"
  },
  {
    "path": "webgrep/install-root-debian",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install binutils grep imagemagick libimage-exiftool-perl steghide tesseract-ocr\n"
  },
  {
    "path": "webgrep/install-root-fedora",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\ndnf install perl-Image-ExifTool.noarch\ndnf install -y binutils grep imagemagick steghide tesseract\n"
  },
  {
    "path": "webgrep/install-root-ubuntu",
    "content": "#!/bin/bash -ex\nset -eu -o pipefail\n\napt-get -y install binutils grep imagemagick exiftool steghide tesseract-ocr\n"
  },
  {
    "path": "xortool/install",
    "content": "#!/bin/bash -ex\n\npipx install 'git+https://github.com/hellman/xortool.git'\n"
  },
  {
    "path": "xrop/install",
    "content": "#!/bin/bash -ex\n\ngit clone --depth 1 https://github.com/acama/xrop.git\ncd xrop\ngit submodule update --init --recursive\nmake -j 1 # Watch out!! -j $(nproc) makes the build fail\ncd ..\n\nmkdir -p bin\ncd bin\nln -s ../xrop/xrop . \ncd ..\n"
  },
  {
    "path": "xrop/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get update\napt-get install -y zlib1g-dev\n\n"
  },
  {
    "path": "xspy/install",
    "content": "#!/bin/bash -ex\n\n[ -e xspy ] || git clone https://gitlab.com/kalilinux/packages/xspy\nmkdir -p bin\ngcc -o bin/xspy xspy/Xspy.c -lX11\n"
  },
  {
    "path": "xspy/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y libx11-dev\n"
  },
  {
    "path": "yafu/install",
    "content": "#!/bin/bash -ex\n\nmkdir yafu\nmkdir bin\ncd yafu\nwget \"https://downloads.sourceforge.net/project/yafu/1.34/yafu-1.34.zip\" -O yafu.zip\nunzip yafu.zip\nchmod 755 yafu\nmv yafu ../bin\n"
  },
  {
    "path": "yafu/test",
    "content": "#!/bin/bash -ex\n\nRESULT=$(./bin/yafu 'factor(10)' | grep \"^P\" | tr -d '\\n')\n[ \"$RESULT\" == \"P1 = 2P1 = 5\" ] || exit 1\n\n./bin/yafu 'factor(427836528347651349523452345)' | grep \"^P\" | grep -q 3290292219611\n"
  },
  {
    "path": "zsteg/install",
    "content": "#!/bin/bash -ex\n\ngem install zsteg\n"
  },
  {
    "path": "zsteg/install-root-archlinux",
    "content": "#!/bin/bash -ex\n\npacman -Syu --noconfirm --needed ruby\n"
  },
  {
    "path": "zsteg/install-root-debian",
    "content": "#!/bin/bash -ex\n\napt-get install -y ruby\n"
  },
  {
    "path": "zsteg/uninstall",
    "content": "#!/bin/bash -ex\n\necho \"Y\" | gem uninstall --user-install zsteg\n"
  }
]