Skip to content

Commit 8f64994

Browse files
authored
Merge pull request #20246 from bcoles/encoders-metasm-cpu
Encoders: Fix assemble method Metasm CPU definition
2 parents 3c87690 + 1b4d65e commit 8f64994

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/encoders/x64/zutto_dekiru.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ def initialize
2323
'KeyPack' => 'Q<'
2424
}
2525
)
26+
@cpu64 = Metasm::X86_64.new
2627
end
2728

28-
@cpu64 = Metasm::X86_64.new
29-
def assemble(src, cpu = @cpu64)
29+
def assemble(src, cpu: @cpu64)
3030
Metasm::Shellcode.assemble(cpu, src).encode_string
3131
end
3232

modules/encoders/x86/service.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ def initialize
1818
'Arch' => ARCH_X86,
1919
'License' => MSF_LICENSE,
2020
'EncoderType' => Msf::Encoder::Type::Raw
21-
)
21+
)
22+
@cpu32 = Metasm::Ia32.new
2223
end
2324

24-
@cpu32 = Metasm::Ia32.new
25-
def assemble(src, cpu = @cpu32)
25+
def assemble(src, cpu: @cpu32)
2626
Metasm::Shellcode.assemble(cpu, src).encode_string
2727
end
2828

0 commit comments

Comments
 (0)