Skip to content

Commit 3a183ff

Browse files
committed
Retabbed for consistent whitespace
1 parent 418a373 commit 3a183ff

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/msf/util/exe.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,19 +360,19 @@ def self.to_win32pe_only(framework, code, opts={})
360360

361361
sections_header = []
362362
pe._file_header.v['NumberOfSections'].times { |i| sections_header << [(i*0x28)+pe.rva_to_file_offset(pe._dos_header.v['e_lfanew']+pe._file_header.v['SizeOfOptionalHeader']+0x18+0x24),exe[(i*0x28)+pe.rva_to_file_offset(pe._dos_header.v['e_lfanew']+pe._file_header.v['SizeOfOptionalHeader']+0x18),0x28]] }
363-
363+
364364

365365
#look for section with entry point
366366
sections_header.each do |sec|
367367
virtualAddress = sec[1][0xc,0x4].unpack('L')[0]
368368
sizeOfRawData = sec[1][0x10,0x4].unpack('L')[0]
369369
characteristics = sec[1][0x24,0x4].unpack('L')[0]
370370
if pe.hdr.opt.AddressOfEntryPoint >= virtualAddress && pe.hdr.opt.AddressOfEntryPoint < virtualAddress+sizeOfRawData
371-
#put this section writable
372-
characteristics|=0x80000000
373-
newcharacteristics = [characteristics].pack('L')
374-
exe[sec[0],newcharacteristics.length]=newcharacteristics
375-
end
371+
#put this section writable
372+
characteristics|=0x80000000
373+
newcharacteristics = [characteristics].pack('L')
374+
exe[sec[0],newcharacteristics.length]=newcharacteristics
375+
end
376376
end
377377

378378
#put the shellcode at the entry point, overwriting template

0 commit comments

Comments
 (0)