-
Notifications
You must be signed in to change notification settings - Fork 5
/
test.sh
executable file
·29 lines (22 loc) · 1.19 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
set -e
echo "[!] Creating virtual environment"
rm -rf venv
virtualenv -v venv
source venv/bin/activate
pip install -r requirements.txt
echo "[!] Creating target"
docker rm findwall_target --force
docker run --cap-add=NET_ADMIN --name findwall_target --publish-all -d ghcr.io/s1ntaxe770r/image:latest
docker exec -t findwall_target apt install -y netcat iptables
echo "[!] Adding firewall rules to target"
docker exec -t findwall_target iptables -A INPUT -p tcp --destination-port 8001 -j DROP
docker exec -t findwall_target iptables -A INPUT -p tcp --destination-port 8005 -j DROP
docker exec -t findwall_target iptables -A INPUT -p udp --destination-port 8002 -j DROP
echo "[!] TCP scan"
python findwall.py --ssh-host $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' findwall_target) --ssh-port 22 --ssh-username test --ssh-password test --ports 8000-8010 --threads 3
echo "[!] UDP scan"
python findwall.py --ssh-host $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' findwall_target) --ssh-port 22 --ssh-username test --ssh-password test --ports 8000-8010 --udp --threads 3
echo "[!] Clean-up"
docker rm findwall_target --force
deactivate