Module: Wifimap
- Defined in:
- lib/wifimap.rb,
lib/wifimap/mac.rb,
lib/wifimap/parser.rb,
lib/wifimap/station.rb,
lib/wifimap/version.rb,
lib/wifimap/access_point.rb,
lib/wifimap/parser/airodump.rb,
lib/wifimap/parser/sniff_probes.rb
Defined Under Namespace
Modules: Parser Classes: AccessPoint, Error, Mac, Station
Constant Summary collapse
- VERSION =
"0.2.0"
Class Method Summary collapse
-
.parse(file_content) ⇒ Object
Parse the content of a dump file and return a hash of APs, stations and probes.
-
.parse_file(filename) ⇒ Object
A wrapper on .parse to read directly from a file.
Class Method Details
.parse(file_content) ⇒ Object
Parse the content of a dump file and return a hash of APs, stations and probes.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/wifimap.rb', line 11 def self.parse(file_content) case Wifimap::Parser.dump_format(file_content) when :airodump Wifimap::Parser::Airodump.new(file_content) when :sniff_probes Wifimap::Parser::SniffProbes.new(file_content) else raise Error, 'Unsupported dump format' end end |
.parse_file(filename) ⇒ Object
A wrapper on .parse to read directly from a file.
23 24 25 26 |
# File 'lib/wifimap.rb', line 23 def self.parse_file(filename) file_content = File.read(filename) parse(file_content) end |