-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmetasm_integration.rb
36 lines (31 loc) · 1.08 KB
/
metasm_integration.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Grab the latest version of metasm and store it in "c:\metasm" or similar.
# >cd c:\
# >git clone https://github.com/jjyg/metasm.git
#
# In the Relyze Application options dialog, select the Plugins tab.
# Add the folder "c:\metasm" as an additional library path.
# Restart Relyze.
#
# Open this file in the Relyze Plugin Editor and select to Run it.
#
require 'relyze/core'
class Plugin < Relyze::Plugin::Analysis
def initialize
super( {
:guid => '{F109191F-66E8-4A27-8569-B92E99A90C67}',
:name => 'Example Metasm library integration',
:description => 'Test loading and using the Metasm library.',
:authors => [ 'Relyze Software Limited' ],
:license => 'Relyze Plugin License',
:references => [ 'www.relyze.com' ],
:require => {
:files => [ 'metasm' ]
}
} )
end
def run
cpu = ::Metasm::Ia32.new( 64 )
data= ::Metasm::Shellcode.assemble( cpu, "nop" ).encode_string
print_message( data.inspect )
end
end