make powershell spec more specific in expectations

bug/bundler_fix
Jeffrey Martin 2017-10-09 20:02:32 -05:00
parent e787d43344
commit b83787c24c
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
1 changed files with 4 additions and 2 deletions

View File

@ -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