Add spec for Msf::EncodedPayload.create.
parent
6313b29b7a
commit
120f416f9c
|
@ -16,6 +16,25 @@ describe Msf::EncodedPayload do
|
||||||
described_class.new(framework, pinst, {})
|
described_class.new(framework, pinst, {})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '.create' do
|
||||||
|
|
||||||
|
context 'when passed a valid payload instance' do
|
||||||
|
|
||||||
|
subject(:created_payload) do
|
||||||
|
described_class.create(pinst)
|
||||||
|
end
|
||||||
|
|
||||||
|
# don't ever actually generate payload bytes
|
||||||
|
before { Msf::EncodedPayload.any_instance.stub(:generate) }
|
||||||
|
|
||||||
|
it 'returns an Msf::EncodedPayload instance' do
|
||||||
|
expect(created_payload).to be_an(Msf::EncodedPayload)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
describe '#arch' do
|
describe '#arch' do
|
||||||
context 'when payload is linux/x86 reverse tcp' do
|
context 'when payload is linux/x86 reverse tcp' do
|
||||||
let(:payload) { 'linux/x86/shell_reverse_tcp' }
|
let(:payload) { 'linux/x86/shell_reverse_tcp' }
|
||||||
|
|
Loading…
Reference in New Issue