File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ class MsfVenom
318
318
# If it's not stdin, we'll already have a PlatformList
319
319
@opts [ :platform ] ||= payload . platform
320
320
payload . datastore . merge! @datastore
321
+
321
322
if @opts [ :list_options ]
322
323
print_status ( "Options for #{ payload . fullname } \n \n " +
323
324
::Msf ::Serializer ::ReadableText . dump_module ( payload , ' ' ) )
Original file line number Diff line number Diff line change 143
143
output . should include ( "LHOST" )
144
144
output . should include ( "LPORT" )
145
145
end
146
+ context "and some datastore options" do
147
+ it "should print options" do
148
+ venom . parse_args %w! -o -p windows/meterpreter/reverse_tcp LPORT=1234 !
149
+ expect { venom . generate_raw_payload } . to_not raise_error
150
+ output = stderr . string
151
+ output . should include ( "LHOST" )
152
+ output . should match ( /LPORT\s +1234/ )
153
+ end
154
+
155
+ it "should print options case-insensitively" do
156
+ venom . parse_args %w! -o -p windows/meterpreter/reverse_tcp lPoRt=1234 !
157
+ expect { venom . generate_raw_payload } . to_not raise_error
158
+ output = stderr . string
159
+ output . should include ( "LHOST" )
160
+ output . should match ( /LPORT\s +1234/ )
161
+ end
162
+ end
146
163
end
147
164
148
165
context "and an invalid payload" do
You can’t perform that action at this time.
0 commit comments