@@ -52,10 +52,10 @@ def _transform_wigle_entry(gps_data, pcap_data, plugin_version):
5252 """
5353 dummy = StringIO ()
5454 # write kismet header
55- dummy .write (f"WigleWifi-1.4 ,appRelease={ plugin_version } ,model=pwnagotchi,release={ __pwnagotchi_version__ } ,"
56- f"device={ pwnagotchi .name ()} ,display=kismet,board=RaspberryPi,brand=pwnagotchi\n " )
57- dummy .write ("MAC,SSID,AuthMode,FirstSeen,Channel,RSSI,CurrentLatitude,"
58- " CurrentLongitude,AltitudeMeters,AccuracyMeters,Type\n " )
55+ dummy .write (f"WigleWifi-1.6 ,appRelease={ plugin_version } ,model=pwnagotchi,release={ __pwnagotchi_version__ } ,"
56+ f"device={ pwnagotchi .name ()} ,display=kismet,board=RaspberryPi,brand=pwnagotchi,star=Sol,body=3,subBody=0 \n " )
57+ dummy .write (
58+ "MAC,SSID,AuthMode,FirstSeen,Channel,RSSI,CurrentLatitude, CurrentLongitude,AltitudeMeters,AccuracyMeters,Type\n " )
5959
6060 writer = csv .writer (dummy , delimiter = "," , quoting = csv .QUOTE_NONE , escapechar = "\\ " )
6161 writer .writerow ([
@@ -89,7 +89,7 @@ def _send_to_wigle(lines, api_key, donate=True, timeout=30):
8989 headers = {'Authorization' : f"Basic { api_key } " ,
9090 'Accept' : 'application/json' }
9191 data = {'donate' : 'on' if donate else 'false' }
92- payload = {'file' : (pwnagotchi .name ()+ ".csv" , dummy ) , 'type' : ' multipart/form-data' }
92+ payload = {'file' : (pwnagotchi .name () + ".csv" , dummy , 'multipart/form-data' , { 'Expires' : '0' }) }
9393 try :
9494 res = requests .post ('https://api.wigle.net/api/v2/file/upload' ,
9595 data = data ,
@@ -104,10 +104,10 @@ def _send_to_wigle(lines, api_key, donate=True, timeout=30):
104104
105105
106106class Wigle (plugins .Plugin ):
107- __author__ = ' Dadav and fixed by Jayofelony'
108- __version__ = ' 3.0.0'
109- __license__ = ' GPL3'
110- __description__ = ' This plugin automatically uploads collected wifis to wigle.net'
107+ __author__ = " Dadav and updated by Jayofelony"
108+ __version__ = " 3.0.1"
109+ __license__ = " GPL3"
110+ __description__ = " This plugin automatically uploads collected WiFi to wigle.net"
111111
112112 def __init__ (self ):
113113 self .ready = False
@@ -121,17 +121,16 @@ def on_loaded(self):
121121 logging .debug ("WIGLE: api_key isn't set. Can't upload to wigle.net" )
122122 return
123123
124- if not 'donate' in self .options :
125- self .options ['donate' ] = True
124+ if 'donate' not in self .options :
125+ self .options ['donate' ] = False
126126
127127 self .ready = True
128128 logging .info ("WIGLE: ready" )
129129
130130 def on_internet_available (self , agent ):
131131 """
132- Called in manual mode when there's internet connectivity
132+ Called when there's internet connectivity
133133 """
134- global pcap_filename
135134 if not self .ready or self .lock .locked ():
136135 return
137136
0 commit comments