Class: Bubing::BinaryInfo
- Inherits:
-
Object
- Object
- Bubing::BinaryInfo
- Defined in:
- lib/bubing/binary_info.rb
Constant Summary collapse
- X86_32_RE =
/ELF 32-bit/
- X86_64_RE =
/ELF 64-bit/
- EXECUTABLE_RE =
/LSB executable/
- SHARED_OBJECT_RE =
/LSB shared object/
- X86_32_INTERPRETER =
'ld-linux.so'.freeze
- X86_64_INTERPRETER =
'ld-linux-x86-64.so'.freeze
Instance Attribute Summary collapse
-
#interpreter ⇒ Object
readonly
Returns the value of attribute interpreter.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(binary) ⇒ BinaryInfo
constructor
A new instance of BinaryInfo.
Constructor Details
#initialize(binary) ⇒ BinaryInfo
Returns a new instance of BinaryInfo.
20 21 22 23 24 25 |
# File 'lib/bubing/binary_info.rb', line 20 def initialize(binary) @binary = binary @file_output = `file #{@binary}` @interpreter = detect_interpreter @type = detect_type end |
Instance Attribute Details
#interpreter ⇒ Object (readonly)
Returns the value of attribute interpreter.
18 19 20 |
# File 'lib/bubing/binary_info.rb', line 18 def interpreter @interpreter end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
18 19 20 |
# File 'lib/bubing/binary_info.rb', line 18 def type @type end |