mirror of
https://github.com/brmlab/BLIT.git
synced 2025-06-07 19:34:00 +02:00
wifi-probes remove false date in notification etc
This commit is contained in:
parent
233634e46f
commit
3f32337ada
3 changed files with 7 additions and 4 deletions
|
@ -52,7 +52,7 @@ function main_start {
|
||||||
touch ${DUMPFILE} && echo "** dumpfile is ${DUMPFILE}"
|
touch ${DUMPFILE} && echo "** dumpfile is ${DUMPFILE}"
|
||||||
|
|
||||||
while read -r LINE; do
|
while read -r LINE; do
|
||||||
if [[ $LINE == *probe* ]] ; then
|
if [[ $LINE == *ProbeReq* ]] ; then
|
||||||
find_dbus_session
|
find_dbus_session
|
||||||
#echo "$(echo \"${LINE}\"|sed 's/.*++//')" >> /tmp/wifi-probes.debug
|
#echo "$(echo \"${LINE}\"|sed 's/.*++//')" >> /tmp/wifi-probes.debug
|
||||||
su ruza -c "notify-send \"$LINE\""
|
su ruza -c "notify-send \"$LINE\""
|
||||||
|
|
|
@ -70,6 +70,7 @@ my $options = GetOptions(
|
||||||
"tshark-path=s" => \$tsharkPath,
|
"tshark-path=s" => \$tsharkPath,
|
||||||
"dumpfile=s" => \$dumpFile,
|
"dumpfile=s" => \$dumpFile,
|
||||||
);
|
);
|
||||||
|
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst);
|
||||||
|
|
||||||
if ($help) {
|
if ($help) {
|
||||||
print <<_HELP_;
|
print <<_HELP_;
|
||||||
|
@ -124,7 +125,8 @@ sub dumpNetworks {
|
||||||
}
|
}
|
||||||
for $key ( keys %detectedSSID)
|
for $key ( keys %detectedSSID)
|
||||||
{
|
{
|
||||||
#my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($detectedSSID{$key}[2]);
|
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
|
||||||
|
#($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($detectedSSID{$key}[2]);
|
||||||
#my $lastSeen = sprintf("%04d/%02d/%02d %02d:%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min, $sec);
|
#my $lastSeen = sprintf("%04d/%02d/%02d %02d:%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min, $sec);
|
||||||
my $lastSeen = $detectedSSID{$key}[3];
|
my $lastSeen = $detectedSSID{$key}[3];
|
||||||
print STDOUT sprintf("## %-20s %-30s %10s %-20s\n", $detectedSSID{$key}[2],
|
print STDOUT sprintf("## %-20s %-30s %10s %-20s\n", $detectedSSID{$key}[2],
|
||||||
|
@ -161,6 +163,7 @@ if ($pid) {
|
||||||
my $newKey = $2;
|
my $newKey = $2;
|
||||||
print DEBUG "$macAddress : $newKey\n";
|
print DEBUG "$macAddress : $newKey\n";
|
||||||
my $time=localtime();
|
my $time=localtime();
|
||||||
|
my $ltime="$hour:$min:$sec";
|
||||||
if (! $detectedSSID{$newKey}) {
|
if (! $detectedSSID{$newKey}) {
|
||||||
# New network found!
|
# New network found!
|
||||||
my @newSSID = ( $newKey, # SSID
|
my @newSSID = ( $newKey, # SSID
|
||||||
|
@ -169,7 +172,8 @@ if ($pid) {
|
||||||
$time); # Seen now
|
$time); # Seen now
|
||||||
$detectedSSID{$newKey} = [ @newSSID ];
|
$detectedSSID{$newKey} = [ @newSSID ];
|
||||||
$uniqueSSID++;
|
$uniqueSSID++;
|
||||||
print STDOUT "New probe request from $macAddress with SSID: $newKey [$uniqueSSID] at $time\n";
|
#print STDOUT "ProbeReq from $macAddress to SSID:$newKey [$uniqueSSID] \@$ltime\n";
|
||||||
|
print STDOUT "ProbeReq from $macAddress to SSID:$newKey [$uniqueSSID]\n";
|
||||||
if ( $dumpImmediately ) {
|
if ( $dumpImmediately ) {
|
||||||
dumpNetworks;
|
dumpNetworks;
|
||||||
#system("/bin/cat", "/home/ruza/bin/wifi-probe-requests/hoover/$dumpFile");
|
#system("/bin/cat", "/home/ruza/bin/wifi-probe-requests/hoover/$dumpFile");
|
||||||
|
|
|
@ -5,7 +5,6 @@ Description=wifi-probe-scanner
|
||||||
Type=simple
|
Type=simple
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
# just call /bin/true and let psd-resync.service do it for speed
|
|
||||||
#Environment=XDG_RUNTIME_DIR=/run/user/1000/
|
#Environment=XDG_RUNTIME_DIR=/run/user/1000/
|
||||||
ExecStart=/usr/local/bin/hoover-start.sh start
|
ExecStart=/usr/local/bin/hoover-start.sh start
|
||||||
ExecStop=/usr/local/bin/hoover-start.sh stop
|
ExecStop=/usr/local/bin/hoover-start.sh stop
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue