-
Notifications
You must be signed in to change notification settings - Fork 0
/
clientprobe.py
63 lines (42 loc) · 1.91 KB
/
clientprobe.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/python
import sys
from scapy.all import *
#usage:./clientsprobes.py wlan0mon 10000`
# {./script.... Wifi_interface frames_to_sniff}
# -*- coding: utf-8 -*-
# Console colors
W = '\033[0m' # white (normal)
R = '\033[31m' # red
G = '\033[32m' # green
O = '\033[33m' # orange
B = '\033[34m' # blue
P = '\033[35m' # purple
C = '\033[36m' # cyan
GR = '\033[37m' # gray
T = '\033[93m' # tan
print " DISCLAIMER -----Refer tO the lawS in your provincE/country before accessing, using,or in any other way utilizing these MatErials.These materials are for educational and research purposes only.Do not attempt to violate the law with anything contained here. If this is your intention, then LEAVE NOW! Neither the authors of this material, or anyone else affiliated in any way, is going to accept responsibility for your actions. oKay now, bE good. Author Onyibe Shalom- secaouse@gmail.com"
clientprobes = set()
count = 1
def PacketHandler(pkt) :
if pkt.haslayer(Dot11ProbeReq) :
if len(pkt.info) > 0 :
testcase = pkt.addr2 + '---' + pkt.info
if testcase not in clientprobes :
clientprobes.add(testcase)
print "New Probe Found: " + pkt.addr2 + ' ---- ' + pkt.info
print "\n------------Client Probes Table ---------------\n"
counter = 1
for probe in clientprobes :
[client, ssid] = probe.split('---')
print counter, client, ssid
counter = counter + 1
print "\n-----------------------------------------------\n"
sniff(iface = sys.argv[1], count = int( sys.argv[2] ), prn = PacketHandler)
for line in clientprobes:
[client,ssid] = line.split('---') #To print out the captured beacon probes.
print '\n ' + str(count) + ' ' + client + ' ' + ssid
count = count + 1
victim = str(raw_input("\n Who's Trust do we compromise ? Type-in the ESSID of your choice-> "))
print " you selected ", victim
subprocess.Popen(["./handshake.sh", victim])
exit