Skip to content

Commit 9ef7871

Browse files
author
Glenn Wilkinson
committed
Updated Wigle live lookup transform. Couple of other small fixes.
1 parent b37a0c4 commit 9ef7871

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ _Client:_
4444

4545
1. INTRODUCTION AND OVERVIEW
4646
=============================
47-
Snoopy is a distributed, sensor, data collection, interception, analysis, and visualization framework. It is written in a modular format, allowing for the collection of arbitary data from various sources via Python plugins.
47+
Snoopy is a distributed, sensor, data collection, interception, analysis, and visualization framework. It is written in a modular format, allowing for the collection of arbitrary data from various sources via Python plugins.
4848

4949
1. Architecture
5050

includes/wigle_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def lookupSSID(self,ssid):
7070
payload={'longrange1': '', 'longrange2': '', 'latrange1': '', 'latrange2':'', 'statecode': '', 'Query': '', 'addresscode': '', 'ssid': ssid.replace("_","\_"), 'lastupdt': '', 'netid': '', 'zipcode':'','variance': ''}
7171

7272
results =self.__queryWigle(payload)
73-
if results: #and 'error' not in results:
73+
if results and 'error' not in results:
7474
locations=self.__fetch_locations(results,ssid)
7575
if (locations != None and locations[0]['overflow'] == 0):
7676
for l in locations:

plugins/rogueAP.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def stop(self):
5151

5252
@staticmethod
5353
def get_parameter_list():
54-
info = {"info" : "Create a rogue access point. - UNDER CONSTRUCTION",
54+
info = {"info" : "Create a rogue access point.",
5555
"parameter_list" : [ ("ssid=<name>","The SSID of the acces point."),
5656
("promis=[True|False]","Set promiscuous mode (respond to all probe requests)."),
5757
("run_dhcp=[True|False]","Run a DHCP server."),

plugins/wigle.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ def __init__(self, **kwargs):
3535
self.username = kwargs.get('username')
3636
self.password = kwargs.get('password')
3737
self.email = kwargs.get('email')
38+
self.proxy = kwargs.get('proxy')
3839

3940
self.db = kwargs.get('dbms',None)
40-
self.wig = Wigle(self.username,self.password, self.email)
41+
self.wig = Wigle(self.username,self.password, self.email,self.proxy)
4142

4243
self.last_checked = 0
4344
self.metadata = MetaData(self.db)
@@ -89,8 +90,9 @@ def run(self):
8990
while self.RUN:
9091
if not self.wig.cookies:
9192
if not self.wig.login():
92-
logging.error("Login to Wigle failed!")
93-
93+
logging.error("Login to Wigle failed! Aborting wigle plugin.")
94+
self.stop()
95+
break
9496
try:
9597
self.current_lookup = self.ssids_to_lookup.popleft()
9698
#self.current_lookup = self.current_lookup.decode('utf-8', 'ignore')
@@ -108,7 +110,7 @@ def run(self):
108110
if locations:
109111
if 'error' in locations:
110112
if 'shun' in locations['error']:
111-
logging.info("Wigle account has been shunned, backing off for 20 minutes")
113+
logging.info("Wigle account and/or IP has been shunned, backing off for 20 minutes")
112114
self.ssids_to_lookup.append(self.current_lookup)
113115
for i in range(60*20):
114116
if not self.RUN:

transforms/fetchSSIDLocations_live.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,18 @@ def main():
3232
logging.debug(ssid)
3333
logging.debug(type(ssid))
3434

35-
try:
36-
f = open("wigle_creds.txt", "r")
37-
user, passw, email,proxy = f.readline().strip().split(":")
38-
except Exception, e:
39-
print "ERROR: Unable to read Wigle user & pass, email (and optional proxy) from wigle_creds.txt"
40-
print e
35+
user = TRX.getVar("wigleUser")
36+
passw = TRX.getVar("wiglePass")
37+
email = TRX.getVar("wigleEmail")
38+
proxy = TRX.getVar("wigleProxy")
39+
40+
if not user or not passw or not email:
41+
print "ERROR: Please supply Wigle credentials in the 'Property View' on the right --->"
4142
exit(-1)
43+
4244
wig=Wigle(user, passw, email, proxy)
4345
if not wig.login():
44-
print "ERROR: Unable to login to Wigle with creds from wigle_creds.txt. Please check them."
46+
print "ERROR: Unable to login to Wigle with supplied wigle creds. Please check them."
4547
exit(-1)
4648
locations = wig.lookupSSID(ssid)
4749
if 'error' in locations:

0 commit comments

Comments
 (0)