File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,10 @@ def generate_payload_exe_service(opts = {})
75
75
pl = opts [ :code ]
76
76
pl ||= payload . encoded
77
77
78
- if opts [ :arch ] and ( opts [ :arch ] == ARCH_X64 or opts [ :arch ] == ARCH_X86_64 )
78
+ #Ensure opts[:arch] is an array
79
+ opts [ :arch ] = [ opts [ :arch ] ] unless opts [ :arch ] . kind_of? Array
80
+
81
+ if opts [ :arch ] and ( opts [ :arch ] . index ( ARCH_X64 ) or opts [ :arch ] . index ( ARCH_X86_64 ) )
79
82
exe = Msf ::Util ::EXE . to_win64pe_service ( framework , pl , opts )
80
83
else
81
84
exe = Msf ::Util ::EXE . to_win32pe_service ( framework , pl , opts )
@@ -94,7 +97,10 @@ def generate_payload_dll(opts = {})
94
97
pl = opts [ :code ]
95
98
pl ||= payload . encoded
96
99
97
- if opts [ :arch ] and ( opts [ :arch ] == ARCH_X64 or opts [ :arch ] == ARCH_X86_64 )
100
+ #Ensure opts[:arch] is an array
101
+ opts [ :arch ] = [ opts [ :arch ] ] unless opts [ :arch ] . kind_of? Array
102
+
103
+ if opts [ :arch ] and ( opts [ :arch ] . index ( ARCH_X64 ) or opts [ :arch ] . index ( ARCH_X86_64 ) )
98
104
dll = Msf ::Util ::EXE . to_win64pe_dll ( framework , pl , opts )
99
105
else
100
106
dll = Msf ::Util ::EXE . to_win32pe_dll ( framework , pl , opts )
You can’t perform that action at this time.
0 commit comments