![]() |
|
send probe requests in the air - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Python (https://sinister.ly/Forum-Python) +--- Thread: send probe requests in the air (/Thread-send-probe-requests-in-the-air) |
send probe requests in the air - hunt3r972 - 01-26-2014 This is a script that will allow you to counter someone sniffing probe requests tested it in a cybersec forum against a group of guys sniffing probe requests and that was very funny to see them like WTF O_O ![]() Code: #!/usr/bin/env python
#RUN WITH python sendprobereq.py
import os
import random
from scapy.all import *
conf.verb=0 # no verbose
def check_wireless_interfaces():
chk_wl_int=os.popen("ifconfig | sed 's/[ \t].*//;/^\(lo\|\)$/d;/eth/d' | grep wlan").read() #Check if wlan interfaces are activated
if not chk_wl_int:
print ("[+] No wireless interface available. You must turn on a wireless interface.")
print ("[+] Closing")
exit()
else:
print ("[+] Wireless interface detected")
def check_monitor():
chk_mon=os.popen("ifconfig | sed 's/[ \t].*//;/^\(lo\|\)$/d;/eth/d' | grep mon").read() #Check if monitor mode has been enabled
if not chk_mon:
print ("[+] No monitoring interface detected")
print ("[+] Available wireless interface(s)\n")
wl_int_list=os.popen("ifconfig | sed 's/[ \t].*//;/^\(lo\|\)$/d;/eth/d' | grep wlan").read() #Listing wlan interfaces
print wl_int_list
int_mon=raw_input("[+] Which interface do you want to monitor?: ")
while (int_mon != "wlan0") and (int_mon != "wlan1") and (int_mon != "wlan2") and (int_mon != "wlan3"):
int_mon=raw_input("[+] Choose an interface from the list: ")
print ("[+] Trying to enable monitoring on interface "+int_mon)
os.system("airmon-ng start "+int_mon+" > /dev/null 2>&1") #Activate monitoring on choosen interface
chk_mon=os.popen("ifconfig | sed 's/[ \t].*//;/^\(lo\|\)$/d;/eth/d' | grep mon").read() #Checking again if monitor mode is enabled
if not chk_mon:
print ("[+] Monitoring couldn't be enabled on interface "+int_mon)
print ("[+] Closing")
else:
print ("[+] Monitoring enabled on interface "+int_mon)
else:
print ("[+] Monitoring interface detected")
def send_probe():
i=0
ssid=raw_input("SSID that will be sent: ")
while 1:
try:
sendp(RadioTap()/Dot11(type=0,subtype=4,addr1="ff:ff:ff:ff:ff:ff", addr2=RandMAC(),addr3="ff:ff:ff:ff:ff:ff")/Dot11Elt(ID=0,info=ssid)/Dot11Elt(ID=1,info="\x82\x84\x8b\x96"), iface='mon0')
i+=1
except KeyboardInterrupt:
print 'packets sent:',i
print ("[+] Checking wireless interfaces")
check_wireless_interfaces()
print ("[+] Checking monitoring interface")
check_monitor()
print ("[+] Start sending - CTRL + C to stop")
send_probe()RE: send probe requests in the air - absolutionist - 02-05-2014 Ok so when exactly is this to be used? I'm still new to coding and this side of the technical world. I've been doing computer and networking work since 2007 and just now decided to get into this. RE: send probe requests in the air - hunt3r972 - 02-05-2014 This script will help you to "joke" with other hackers that are sniffing probe requests. When they sniff probe reqs they can know where you were connected to so create a Rogue AP and try to trap you. So this will spam the air with probe request and they will not be able to see anything. RE: send probe requests in the air - cyber_d3face - 02-11-2014 This is awsome. Thanks for sharing. I plan on using this or atleast testing it out asap. Thanks so much RE: send probe requests in the air - hunt3r972 - 02-12-2014 Your welcome
|