Class: Metasploit::Framework::Obfuscation::CRandomizer::CodeFactory::Malloc
- Inherits:
-
Base
- Object
- Base
- Metasploit::Framework::Obfuscation::CRandomizer::CodeFactory::Malloc
- Defined in:
- lib/metasploit/framework/obfuscation/crandomizer/code_factory/malloc.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ Malloc
constructor
A new instance of Malloc.
- #stub ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ Malloc
Returns a new instance of Malloc.
11 12 13 14 |
# File 'lib/metasploit/framework/obfuscation/crandomizer/code_factory/malloc.rb', line 11 def initialize super @dep = ['malloc'] end |
Instance Method Details
#stub ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/metasploit/framework/obfuscation/crandomizer/code_factory/malloc.rb', line 16 def stub var_name = "m#{Metasploit::Framework::Obfuscation::CRandomizer::Utility.rand_int}" %Q| void* malloc(unsigned int); void stub() { void* #{var_name} = malloc(#{Metasploit::Framework::Obfuscation::CRandomizer::Utility.rand_int}); }| end |