Merge branch 'fedora' of github.com:LosFuzzys/ctf-tools into addtools

This commit is contained in:
Michael Rodler 2017-01-12 11:17:06 +01:00
commit d352d62d76
11 changed files with 75 additions and 0 deletions

View file

@ -42,6 +42,8 @@ function detect_distribution()
else
echo "debian"
fi
elif which dnf 2>&1 >/dev/null; then
echo "fedora"
else
echo ""
fi
@ -110,6 +112,19 @@ EOF
}
function base_build_setup_fedora()
{
PACKAGE_REQS="libtool gcc gcc-c++ texinfo curl wget automake autoconf python python-devel git subversion unzip python-virtualenvwrapper"
if [ "$ALLOW_SUDO" -eq 1 ]; then
sudo dnf -y install $PACKAGE_REQS
else
TOOL=SETUP tool_log "Please install the following packages: $PACKAGE_REQS"
fi
# TODO: check whether we have to explicitly enable i386 package support
}
function base_build_setup()
{
case "$1" in
@ -122,6 +137,9 @@ function base_build_setup()
base_build_setup_arch
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
;;
"fedora")
base_build_setup_fedora
;;
*)
TOOL=SETUP tool_log "Cannot detect or unsupported distribution"
esac

3
gdb/install-root-fedora Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash -e
dnf install -y texinfo

View file

@ -5,3 +5,22 @@ source ctf-tools-venv-activate
git clone --depth 1 https://github.com/cloudburst/libheap
pip install -e libheap
# make sure gdbinit exists
touch ~/.gdbinit
# check if init command exits
if ! grep "init-libheap" ~/.gdbinit; then
cat >> ~/.gdbinit <<EOF
####
# added by ctf-tools
define init-libheap
python from libheap import *
end
document init-pwndbg
Initializes the libheap gdb extension (https://github.com/cloudburst/libheap)
end
####
EOF
fi

3
libheap/install-root-debian Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash -e
apt-get install -y libc6-dbg

4
libheap/install-root-fedora Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash -e
dnf install -y dnf-plugins-core
dnf debuginfo-install -y glibc

3
pwndbg/install-root-debian Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash -e
apt-get install -y libc6-dbg

4
pwndbg/install-root-fedora Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash -e
dnf install -y dnf-plugins-core
dnf debuginfo-install -y glibc

3
pwntools/install-root-fedora Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash -e
dnf install -y binutils binutils-devel libffi-devel openssl-devel

4
snowman/install-root-fedora Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
set -eu -o pipefail
dnf install -y boost cmake qt5-base qqt5-base-devel

View file

@ -5,6 +5,14 @@ pushd wcc
git submodule init
git submodule update
# fedora doesn't have stropts.h since apparently it's unsupported on linux
# anyway. wcc compiles fines without it.
if [[ "$DISTRI" == "fedora" ]]; then
sed -i "s&#include <stropts.h>&/*#include <stropts.h>*/&g" \
src/wsh/include/libwitch/wsh.h
fi
make
mv bin/ ../
popd

6
wcc/install-root-fedora Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
set -eu -o pipefail
dnf install -y clang clang-libs clang-devel binutils binutils-devel \
uthash-devel elfutils-libelf elfutils-libelf-devel capstone \
capstone-devel readline readline-devel gsl gsl-devel