Skip to content

Commit b83787c

Browse files
committed
make powershell spec more specific in expectations
1 parent e787d43 commit b83787c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/lib/msf/core/exploit/powershell_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,13 @@ def decompress(code)
276276
end
277277
it 'shouldnt shorten args' do
278278
code = subject.cmd_psh_payload(payload, arch)
279-
expect(code.include?('-NoProfile -WindowStyle hidden -Command')).to be_truthy
279+
expect(code.include?('-NoProfile ')).to be_truthy
280+
expect(code.include?('-WindowStyle hidden')).to be_truthy
281+
expect(code.include?('-Command ')).to be_truthy
280282
end
281283
it 'should include -NoExit' do
282284
code = subject.cmd_psh_payload(payload, arch)
283-
expect(code.include?('-NoProfile -WindowStyle hidden -NoExit -Command')).to be_truthy
285+
expect(code.include?('-NoExit ')).to be_truthy
284286
end
285287
end
286288

0 commit comments

Comments
 (0)