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.
-
.endian ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::DetectOS.endian.
-
.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 OS.host_cpu rescue StandardError => e raise e end |
.authors ⇒ Object
- Author(s)
-
0day Inc. <[email protected]>
50 51 52 53 54 |
# File 'lib/pwn/plugins/detect_os.rb', line 50 public_class_method def self. "AUTHOR(S): 0day Inc. <[email protected]> " end |
.endian ⇒ Object
- Supported Method Parameters
-
PWN::Plugins::DetectOS.endian
38 39 40 41 42 43 44 45 46 |
# File 'lib/pwn/plugins/detect_os.rb', line 38 public_class_method def self.endian if [1].pack('I') == [1].pack('N') :big else :little end rescue StandardError => e raise e end |
.help ⇒ Object
Display Usage for this Module
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/pwn/plugins/detect_os.rb', line 58 public_class_method def self.help puts "USAGE: #{self}.type #{self}.arch #{self}.endian #{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 |