Module: PWN::Plugins::RFIDler
- Defined in:
- lib/pwn/plugins/rfidler.rb
Overview
This plugin is used for interacting with an RFIDler using the the screen command as a terminal emulator.
Class Method Summary collapse
-
.authors ⇒ Object
- Author(s)
-
0day Inc.
-
.connect_via_screen(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::RFIDler.connect_via_screen( block_dev: ‘optional - serial block device path (defaults to /dev/ttyUSB0)’ ).
-
.help ⇒ Object
Display Usage for this Module.
Class Method Details
.authors ⇒ Object
- Author(s)
-
0day Inc. <[email protected]>
37 38 39 40 41 |
# File 'lib/pwn/plugins/rfidler.rb', line 37 public_class_method def self. "AUTHOR(S): 0day Inc. <[email protected]> " end |
.connect_via_screen(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::RFIDler.connect_via_screen(
block_dev: 'optional - serial block device path (defaults to /dev/ttyUSB0)'
)
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/pwn/plugins/rfidler.rb', line 13 public_class_method def self.connect_via_screen(opts = {}) block_dev = opts[:block_dev].to_s if File.exist?( opts[:block_dev].to_s ) block_dev = '/dev/ttyUSB0' if opts[:block_dev].nil? screen_bin = '/usr/bin/screen' raise "ERROR: #{screen_bin} not found." unless File.exist?(screen_bin) system( screen_bin, block_dev, '9600', '8', 'N', '1' ) rescue StandardError => e raise e end |
.help ⇒ Object
Display Usage for this Module
45 46 47 48 49 50 51 52 53 |
# File 'lib/pwn/plugins/rfidler.rb', line 45 public_class_method def self.help puts "USAGE: #{self}.connect_via_screen( block_dev: 'optional serial block device path (defaults to /dev/ttyUSB0)' ) #{self}.authors " end |