When you know more, and you still want to tackle this yourself in Perl, first thing to do is enable binmode on your file handle (on Unix-alikes, it won't appear to do much).
Next step is probably to read fixed length chunks (just a guess), for which you can either use read/sysread (which are identical on the outside, but differently implemented on the inside, so I'm not sure which one will work best), or pseudo-line-like with the syntax you used, but with $/ set to a reference to an integer holding the byte count, or a scalar holding the byte count.
And third step will likely be to turn the binary chunk into Perl data, for which you can use unpack with a format string matching the structure of your records. The module Data::FixedFormat may be helpful in that task, unpacking the data into a hash.
Currently this is the program structure I envision:
open(KISMET,"/tmp/kismet_dump") or die "$!"; binmode KISMET; $/ = \64; # example: IF the record length is 64 bytes while (<KISMET>) { my @raw = unpack $packformat, $_; ... }
If the Kismet dump data format doesn't use fixed length records, but instead uses a delimiter, you can set $/ to it as a string — default is newline.
You have a long journey ahead of you. I hope this at least starts you off in the right direction.
In reply to Re: Kismet Drone
by bart
in thread Kismet Drone
by satanklawz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |