From: Russ Handorf Date: Wed, 2 Mar 2016 03:42:28 +0000 (-0500) Subject: testing for Chris X-Git-Url: http://russells-world.com/code/?a=commitdiff_plain;h=6a0a660a22d8a102f9358f805a22cbfe49f545bb;p=soho-sigint.git testing for Chris --- diff --git a/server/sohoinput.php b/server/sohoinput.php new file mode 100644 index 0000000..d36df57 --- /dev/null +++ b/server/sohoinput.php @@ -0,0 +1,58 @@ + $element) { + #fwrite($fh, "Param: $index; Value: $element\n"); + #foreach ($element as $item => $value) { + #fwrite($fh, "Param: $item; Value: $value\n"); + #if ($item == "type" ) { + #fwrite($fh, "$value\n"); + #} + #} +#} + +for($i=0; $i 0) { + open_database("localhost","kismet","asdfqwerty","wireless","update beacon set CHANNEL='".$input[$i][channel]."', RSSI='".$input[$i][rssi]."', LASTSEEN=UNIX_TIMESTAMP(NOW()) where SSID='".$input[$i][ssid]."' and BSSID='".$input[$i][bssid]."'"); + } else { + open_database("localhost","kismet","asdfqwerty","wireless","insert into beacon set SSID='".$input[$i][ssid]."', BSSID='".$input[$i][bssid]."', LASTSEEN=UNIX_TIMESTAMP(NOW()), CHANNEL='".$input[$i][channel]."', RSSI='".$input[$i][rssi]."'"); + } + break; + + case 50: + $query=open_database("localhost","kismet","asdfqwerty","wireless","select LASTSEEN from probe where BSSID='".$input[$i][bssid_mac]."' and MAC='".$input[$i][client_mac]."'"); + if (mysql_numrows($query) > 0) { + open_database("localhost","kismet","asdfqwerty","wireless","update probe set CHANNEL='".$input[$i][channel]."', RSSI='".$input[$i][rssi]."', LASTSEEN=UNIX_TIMESTAMP(NOW()) where BSSID='".$input[$i][bssid_mac]."' and MAC='".$input[$i][client_mac]."'"); + } else { + open_database("localhost","kismet","asdfqwerty","wireless","insert into probe set BSSID='".$input[$i][bssid_mac]."', MAC='".$input[$i][client_mac]."', LASTSEEN=UNIX_TIMESTAMP(NOW()), CHANNEL='".$input[$i][channel]."', RSSI='".$input[$i][rssi]."'"); + } + break; + + case 40: + $query=open_database("localhost","kismet","asdfqwerty","wireless","select LASTSEEN from probe where BSSID='".$input[$i][bssid_mac]."' and MAC='".$input[$i][client_mac]."'"); + if (mysql_numrows($query) > 0) { + open_database("localhost","kismet","asdfqwerty","wireless","update probe set CHANNEL='".$input[$i][channel]."', RSSI='".$input[$i][rssi]."', LASTSEEN=UNIX_TIMESTAMP(NOW()) where BSSID='".$input[$i][bssid_mac]."' and MAC='".$input[$i][client_mac]."'"); + } else { + open_database("localhost","kismet","asdfqwerty","wireless","insert into probe set BSSID='".$input[$i][bssid_mac]."', MAC='".$input[$i][client_mac]."', LASTSEEN=UNIX_TIMESTAMP(NOW()), CHANNEL='".$input[$i][channel]."', RSSI='".$input[$i][rssi]."'"); + } + + break; + } +} + +fclose($fh); +?>