File tree Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -293,28 +293,6 @@ class MsfVenom
293
293
# @return [String] A raw shellcode blob
294
294
# @return [nil] When commandline options conspire to produce no output
295
295
def generate_raw_payload
296
- if @opts [ :list ]
297
- @opts [ :list ] . each do |mod |
298
- case mod . downcase
299
- when "payloads"
300
- @err . puts dump_payloads
301
- when "encoders"
302
- @err . puts dump_encoders ( @opts [ :arch ] )
303
- when "nops"
304
- @err . puts dump_nops
305
- when "all"
306
- # Init here so #dump_payloads doesn't create a framework with
307
- # only payloads, etc.
308
- init_framework
309
- @err . puts dump_payloads
310
- @err . puts dump_encoders
311
- @err . puts dump_nops
312
- else
313
- raise UsageError , "Invalid module type"
314
- end
315
- end
316
- return
317
- end
318
296
319
297
if @opts [ :payload ] == 'stdin'
320
298
payload_raw = payload_stdin
@@ -357,6 +335,28 @@ class MsfVenom
357
335
358
336
# Main dispatch method to do the right thing with the given options.
359
337
def generate
338
+ if @opts [ :list ]
339
+ @opts [ :list ] . each do |mod |
340
+ case mod . downcase
341
+ when "payloads"
342
+ @err . puts dump_payloads
343
+ when "encoders"
344
+ @err . puts dump_encoders ( @opts [ :arch ] )
345
+ when "nops"
346
+ @err . puts dump_nops
347
+ when "all"
348
+ # Init here so #dump_payloads doesn't create a framework with
349
+ # only payloads, etc.
350
+ init_framework
351
+ @err . puts dump_payloads
352
+ @err . puts dump_encoders
353
+ @err . puts dump_nops
354
+ else
355
+ raise UsageError , "Invalid module type"
356
+ end
357
+ end
358
+ return
359
+ end
360
360
361
361
# Normalize the options
362
362
@opts [ :platform ] = ::Msf ::Module ::PlatformList . transform ( @opts [ :platform ] ) if @opts [ :platform ]
You can’t perform that action at this time.
0 commit comments