File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
modules/payloads/singles/windows Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,15 @@ def assembly
185
185
return module_info [ 'Payload' ] ? module_info [ 'Payload' ] [ 'Assembly' ] : nil
186
186
end
187
187
188
+ #
189
+ # Sets the assembly string that describes the payload
190
+ # If this method is used to define the payload, a payload with no offsets will be created
191
+ #
192
+ def assembly = ( asm )
193
+ module_info [ 'Payload' ] ||= { 'Offsets' => { } }
194
+ module_info [ 'Payload' ] [ 'Assembly' ] = asm
195
+ end
196
+
188
197
#
189
198
# Returns the offsets to variables that must be substitute, if any.
190
199
#
Original file line number Diff line number Diff line change @@ -253,6 +253,7 @@ def generate
253
253
254
254
255
255
EOS
256
- the_payload = Metasm ::Shellcode . assemble ( Metasm ::Ia32 . new , payload_data ) . encode_string
256
+ self . assembly = payload_data
257
+ super
257
258
end
258
259
end
Original file line number Diff line number Diff line change @@ -387,6 +387,7 @@ def generate
387
387
db "#{ server_host } ", 0x00
388
388
end:
389
389
EOS
390
- the_payload = Metasm ::Shellcode . assemble ( Metasm ::Ia32 . new , payload_data ) . encode_string
390
+ self . assembly = payload_data
391
+ super
391
392
end
392
393
end
Original file line number Diff line number Diff line change @@ -266,7 +266,8 @@ def generate
266
266
;EXITFUNC
267
267
#{ doexit }
268
268
EOS
269
- the_payload = Metasm ::Shellcode . assemble ( Metasm ::Ia32 . new , payload_data ) . encode_string
269
+ self . assembly = payload_data
270
+ super
270
271
end
271
272
272
273
#
You can’t perform that action at this time.
0 commit comments