Skip to content

Commit 06ba2ef

Browse files
committed
Allow generic/custom payload to generate an exe
The datastore value of ARCH has no effect on the array of architectures the generic/custom payload is compatible with. This commit forces the payload to update its list of compatible architectures on generation if the ARCH value is set in the datastore. See: http://dev.metasploit.com/redmine/issues/7755
1 parent 596b62b commit 06ba2ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/payloads/singles/generic/custom.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def initialize(info = {})
3838
# Construct the payload
3939
#
4040
def generate
41+
if datastore['ARCH']
42+
self.arch = actual_arch
43+
end
44+
4145
if datastore['PAYLOADFILE']
4246
IO.read(datastore['PAYLOADFILE'])
4347
elsif datastore['PAYLOADSTR']

0 commit comments

Comments
 (0)