also add docker rebuild to the standard binstub

This commit is contained in:
Christian Mehlmauer
2017-04-05 20:38:42 +02:00
parent dd5a91f153
commit cea43cc95c
2 changed files with 15 additions and 1 deletions
+10 -1
View File
@@ -22,6 +22,13 @@ ln -s `pwd`/docker/bin/msfconsole $HOME/bin/
ln -s `pwd`/docker/bin/msfvenom $HOME/bin/
```
If you set the environment variable `MSF_BUILD` the container will be rebuilt.
```bash
MSF_BUILD=1 ./docker/bin/msfconsole
MSF_BUILD=1 ./docker/bin/msfconsole-dev
```
### But I want reverse shells...
By default we expose port `4444`. You'll need to set `LHOST` to be a hostname/ip
@@ -55,7 +62,7 @@ Now you should be able get reverse shells working
## Developing
To setup you environment for development, you need to `docker/docker-compose.development.override.yml`
To setup you environment for development, you need to add `docker/docker-compose.development.override.yml`
to your `COMPOSE_FILE` environment variable.
If you don't have a `COMPOSE_FILE` environment variable, you can set it up with this:
@@ -63,3 +70,5 @@ If you don't have a `COMPOSE_FILE` environment variable, you can set it up with
```bash
echo "COMPOSE_FILE=./docker-compose.yml:./docker/docker-compose.development.override.yml" >> .env
```
Alternatively you can also use the `msfconsole-dev` binstub.
+5
View File
@@ -18,4 +18,9 @@ if [[ -z "$MSF_PATH" ]]; then
fi
cd $MSF_PATH
if [[ -n "$MSF_BUILD" ]]; then
docker-compose -f $MSF_PATH/docker-compose.yml build
fi
docker-compose run --rm --service-ports ms ./msfconsole -r docker/msfconsole.rc "$@"