make powershell spec more specific in expectations
parent
e787d43344
commit
b83787c24c
|
@ -276,11 +276,13 @@ RSpec.describe Msf::Exploit::Powershell do
|
|||
end
|
||||
it 'shouldnt shorten args' do
|
||||
code = subject.cmd_psh_payload(payload, arch)
|
||||
expect(code.include?('-NoProfile -WindowStyle hidden -Command')).to be_truthy
|
||||
expect(code.include?('-NoProfile ')).to be_truthy
|
||||
expect(code.include?('-WindowStyle hidden')).to be_truthy
|
||||
expect(code.include?('-Command ')).to be_truthy
|
||||
end
|
||||
it 'should include -NoExit' do
|
||||
code = subject.cmd_psh_payload(payload, arch)
|
||||
expect(code.include?('-NoProfile -WindowStyle hidden -NoExit -Command')).to be_truthy
|
||||
expect(code.include?('-NoExit ')).to be_truthy
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue