Improve iptables rules

This commit is contained in:
deltax 2017-01-12 18:29:51 +01:00 committed by GitHub
parent 208d5a0946
commit 2f8bb4f1b4
1 changed files with 10 additions and 8 deletions

10
fluxion
View File

@ -29,11 +29,8 @@ DUMP_PATH="/tmp/TMPflux"
HANDSHAKE_PATH="/root/handshakes" HANDSHAKE_PATH="/root/handshakes"
PASSLOG_PATH="/root/pwlog" PASSLOG_PATH="/root/pwlog"
WORK_DIR=`pwd` WORK_DIR=`pwd`
ipNmap=`ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'`
# Deauth duration during handshake capture
# oo
DEAUTHTIME="9999999999999" DEAUTHTIME="9999999999999"
revision=116 revision=117
version=0.23 version=0.23
IP=192.168.1.1 IP=192.168.1.1
RANG_IP=$(echo $IP | cut -d "." -f 1,2,3) RANG_IP=$(echo $IP | cut -d "." -f 1,2,3)
@ -195,10 +192,14 @@ function exitmode {
fi fi
echo -e ""$white"["$red"-"$white"] "$white"$general_exitmode_4"$transparent"" echo -e ""$white"["$red"-"$white"] "$white"$general_exitmode_4"$transparent""
if [ ! -f $DUMP_PATH/iptables-rules ];then
iptables --flush iptables --flush
iptables --table nat --flush iptables --table nat --flush
iptables --delete-chain iptables --delete-chain
iptables --table nat --delete-chain iptables --table nat --delete-chain
else
iptables-restore < $DUMP_PATH/iptables-rules
fi
echo -e ""$white"["$red"-"$white"] "$white"$general_exitmode_5"$transparent"" echo -e ""$white"["$red"-"$white"] "$white"$general_exitmode_5"$transparent""
tput cnorm tput cnorm
@ -939,6 +940,7 @@ language
function language { function language {
iptables-save > $DUMP_PATH/iptables-rules
conditional_clear conditional_clear
while true; do while true; do