bats3c / shad0w

A post exploitation framework designed to operate covertly on heavily monitored environments
https://blog.dylan.codes/shad0w/
MIT License
2.03k stars 323 forks source link

"shad0w clean" command to delete old docker containers #61

Closed HeckerBirb closed 3 years ago

HeckerBirb commented 3 years ago

A command to clean up all old, exited docker containers would be useful because shad0w creates a new one for each command. Something along the lines of a "shad0w cleanup" command which would run docker rm $(docker ps -a -q -f "ancestor=shad0w") would do wonders.

bats3c commented 3 years ago

Nice idea, ill accept a PR :wink:

HeckerBirb commented 3 years ago

Nice idea, ill accept a PR 😉

I'll get to it then :)

HeckerBirb commented 3 years ago

I realised when developing this that the proper way is not to introduce a new command - it felt awkward as well - but to (of course) add the --rm flag to the existing docker commands in /usr/bin/shad0w. This will automatically remove the container when it exits.