#!/bin/sh
# ADM wingates scanner (client) 
# greetz: the #!ADM crew !!!
#
declare -i  GOTOGATEZ
LOG="wingatez"
PATH=".:$PATH:."
SAV="gates.sav"

export PATH

if [ -z "$1" ]
then 
echo "savgates < file to read > "
echo "ex: ADMgates jp      # for scan the japan"
echo "ex: ADMgates bla.com # u need a help here ?:)"
exit
fi 

if [ -e  $SAV ]
then
GOTOGATEZ=`cat $SAV`
echo we retake the scan from the gates $GOTOGATEZ
tail +$GOTOGATEZ $1 > WINGATEZ.CON
wc -l WINGATEZ.CON
else
cat $1 > WINGATEZ.CON
fi


echo " happy scan =) .. The ADM Crew "

echo reading ip from $1 gatez numba $GOTOGATEZ..

cat WINGATEZ.CON | while read A
do
echo $A
	echo $A | incremental | wps `gimmeIP` 23 | scan >> $LOG
GOTOGATEZ=GOTOGATEZ+1
echo $GOTOGATEZ > $SAV
done
echo scan..done!
rm $SAV


