Advertisement
Guest User

Untitled

a guest
May 11th, 2015
199
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SeleccionarInterfaceAuto
  2.    
  3.     [ ! "$(iwconfig 2>/dev/null|grep "^$IFACE_MON "|grep "Mode:Monitor")" ] && MontarMonitor
  4.    
  5.     unset ESSID BSSID CANAL CIFRADO PWR WPS SOPORTADA_WEPWPA KEYGEN_WEPWPA SOPORTADA_WPS KEYGEN_WPS PINGENERICO
  6.    
  7.     echo -e "\n - Escaneando en busca de objetivos... \033[s"
  8.     killall airodump-ng >/dev/null 2>&1
  9.  
  10.     if [ $SCAN_CHANNEL -ne 0 ]; then
  11.        
  12.         CHANNEL="--channel $SCAN_CHANNEL"
  13.     else
  14.         unset CHANNEL
  15.     fi
  16.  
  17.     airodump-ng "$IFACE_MON" -a $CHANNEL -w "$CAPTURAS/captura" >/dev/null 2>&1 & AIRODUMP_PID=$!
  18.     trap "kill -s INT $AIRODUMP_PID >/dev/null 2>&1" SIGINT
  19.     sleep 1
  20.     echo "4"
  21.     SEGUNDOS=$SCAN_TIME
  22.     while [ -e "/proc/$AIRODUMP_PID" -a $SEGUNDOS -gt -1 ]; do
  23.        
  24.         echo -en "\033[u$SEGUNDOS segundos \033[K"
  25.         sleep 1
  26.         SEGUNDOS=$(($SEGUNDOS-1))
  27.     done
  28.  
  29.     [ ! -f "$CAPTURAS/captura-01.csv" ] && echo -e "\033[uERROR" && sleep 3 && MenuPrincipal
  30.     echo -e "\033[u√  \033[K"
  31.    
  32.     kill -s INT $AIRODUMP_PID >/dev/null 2>&1
  33.     echo "2" >> 2.txt
  34.     echo -en "\n - Identificando objetivos con WPS activado... "
  35.     wash -C -f "$CAPTURAS/captura-01.cap" 2>/dev/null|tail -n +3|awk '{print $1,$5}' >"$TMP/BSSIDs_WPS.txt"
  36.     echo "3" >> 3.txt
  37.     [ $? -ne 0 ] && echo "ERROR" && sleep 3 && echo "fallo"
  38.     echo "4" >> 4.txt
  39.     echo "√ "
  40.     echo -en "\n - Buscando patrones conocidos... "
  41.     CORTE=$(($(cat "$CAPTURAS/captura-01.csv"|grep -an "Station"|cut -d':' -f1)-4))
  42.     echo "5" >> 5.txt
  43.     cat "$CAPTURAS/captura-01.csv"|tail -n +3|head -$CORTE|\
  44.     sort -t',' -k9 -n -r -o "$TMP/objetivos.txt"
  45.     echo "6" >> 6.txt
  46.     BSSIDs_WPS="$(cat "$TMP/BSSIDs_WPS.txt")"
  47.     echo "7" >> 7.txt
  48.     N=0
  49.     echo "8" >> 8.txt
  50.     while IFS="\n" read LINEA; do
  51.     echo "9" >> 9.txt
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement