added action doc to manage-tools

This commit is contained in:
Yan 2015-05-11 03:02:14 -07:00
parent 5052432507
commit ff637ed54a
2 changed files with 45 additions and 38 deletions

View file

@ -2,31 +2,7 @@
This is a collection of setup scripts to create an install of various security research tools.
Of 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.
To use, do:
```bash
# set up the path
/path/to/ctf-tools/manage-tools setup
source ~/.bashrc
# list the available tools
manage-tools list
# install gdb, allowing it to try to sudo install dependencies
manage-tools -s install gdb
# install pwntools, but don't let it sudo install dependencies
manage-tools install pwntools
# uninstall gdb
manage-tools uninstall gdb
# uninstall all tools
manage-tools uninstall all
```
Where 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).
To support python dependencies, however, make sure to create a virtualenv before installing and using tools (i.e., `mkvirtualenv ctf`).
Installers for the following tools are included:
| Category | Tool | Description |
@ -67,6 +43,35 @@ Installers for the following tools are included:
| stego | [steganabara](http://www.caesum.com/handbook/stego.htm) | Antoher image steganography solver. |
| stego | [stegsolve](http://www.caesum.com/handbook/stego.htm) | Image steganography solver. |
| android | [APKTool](https://ibotpeaches.github.io/Apktool/) | Dissect, dis-assemble, and re-pack Android APKs |
## Usage
To use, do:
```bash
# set up the path
/path/to/ctf-tools/manage-tools setup
source ~/.bashrc
# list the available tools
manage-tools list
# install gdb, allowing it to try to sudo install dependencies
manage-tools -s install gdb
# install pwntools, but don't let it sudo install dependencies
manage-tools install pwntools
# uninstall gdb
manage-tools uninstall gdb
# uninstall all tools
manage-tools uninstall all
```
Where 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).
To support python dependencies, however, make sure to create a virtualenv before installing and using tools (i.e., `mkvirtualenv ctf`).
## Adding Tools
To add a tool (say, named *toolname*), do the following:

View file

@ -4,9 +4,20 @@ function usage()
{
cat <<END
Usage: $(basename $0) [-s] (list|setup|install|uninstall|bin) tool
Where:
-s allow running things with sudo (i.e., to install debs)
tool the name of the tool. if "all", does the action on all tools
tool the name of the tool. if "all", does the action on all
tools
Actions:
setup set up the environment (adds ctf-tools/bin to your
\$PATH in .bashrc)
list list all tools (-i: only installed, -u: only
uninstalled)
install installs a tool
uninstall uninstalls a tool
bin re-links tool binaries into ctf-tools/bin
END
}
@ -57,19 +68,10 @@ case $ACTION in
done
;;
bin)
if [ -n "$TOOL" ]
then
cd bin
ln -sf ../$TOOL/bin/* .
echo "TOOLS | $TOOL | bin symlinks updated"
cd ..
else
for t in $(bin/manage-tools list)
do
bin/manage-tools bin $t
done
fi
cd bin
ln -sf ../$TOOL/bin/* .
echo "TOOLS | $TOOL | bin symlinks updated"
cd ..
;;
install)
cd $TOOL