Module: PWN::Plugins::DetectOS
- Defined in:
- lib/pwn/plugins/detect_os.rb
Overview
This plugin converts images to readable text
Class Method Summary collapse
-
.arch ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::DetectOS.arch.
-
.authors ⇒ Object
- Author(s)
-
0day Inc.
-
.help ⇒ Object
Display Usage for this Module.
-
.type ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::DetectOS.type.
Class Method Details
.arch ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::DetectOS.arch
29 30 31 32 33 |
# File 'lib/pwn/plugins/detect_os.rb', line 29 public_class_method def self.arch RUBY_PLATFORM.split('-').first rescue StandardError => e raise e end |
.authors ⇒ Object
- Author(s)
-
0day Inc. <[email protected]>
37 38 39 40 41 |
# File 'lib/pwn/plugins/detect_os.rb', line 37 public_class_method def self. "AUTHOR(S): 0day Inc. <[email protected]> " end |
.help ⇒ Object
Display Usage for this Module
45 46 47 48 49 50 51 52 53 |
# File 'lib/pwn/plugins/detect_os.rb', line 45 public_class_method def self.help puts "USAGE: #{self}.type #{self}.arch #{self}.authors " end |
.type ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::DetectOS.type
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/pwn/plugins/detect_os.rb', line 12 public_class_method def self.type os = :cygwin if OS.cygwin? os = :freebsd if OS.freebsd? os = :linux if OS.linux? os = :netbsd if OS.host_os.include?('netbsd') os = :openbsd if OS.host_os.include?('openbsd') os = :osx if OS.osx? os = :windows if OS.windows? os rescue StandardError => e raise e end |