-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpayload-arch_platform.diff
More file actions
50 lines (45 loc) · 1.23 KB
/
payload-arch_platform.diff
File metadata and controls
50 lines (45 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Index: lib/msf/core/encoded_payload.rb
===================================================================
--- lib/msf/core/encoded_payload.rb (revision 7208)
+++ lib/msf/core/encoded_payload.rb (working copy)
@@ -45,6 +45,8 @@
self.nop_sled = nil
self.encoder = nil
self.nop = nil
+ self.arch = nil
+ self.platform = nil
# Increase thread priority as necessary. This is done
# to ensure that the encoding and sled generation get
@@ -68,6 +70,12 @@
# Build the NOP sled
generate_sled()
+ # Set the architecture
+ self.arch = pinst.arch
+
+ # Set the platform
+ self.platform = pinst.platform
+
# Finally, set the complete payload definition
self.encoded = (self.nop_sled || '') + self.encoded
ensure
@@ -305,6 +313,14 @@
# The NOP generator that was used
#
attr_reader :nop
+ #
+ # The architecture of the encoded payload
+ #
+ attr_reader :arch
+ #
+ # The platform of the encoded payload
+ #
+ attr_reader :platform
protected
@@ -315,6 +331,8 @@
attr_writer :payload # :nodoc:
attr_writer :encoder # :nodoc:
attr_writer :nop # :nodoc:
+ attr_writer :arch # :nodoc:
+ attr_writer :platform # :nodoc:
#
# The payload instance used to generate the payload