Skip to content

Commit c952ed0

Browse files
David MaloneyDavid Maloney
authored andcommitted
Add test for raw format of packets
1 parent b707f8d commit c952ed0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/lib/rex/post/meterpreter/packet_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,15 @@
414414
req.response?.should == false
415415
req.method?("test_method").should == true
416416
end
417+
418+
it "should return the correct raw byte form of the packet" do
419+
rid = subject.rid
420+
meth = subject.method
421+
raw = subject.to_r
422+
subject.from_r(raw)
423+
subject.rid.should == rid
424+
subject.method.should == meth
425+
end
417426
end
418427

419428
context "a response packet" do

0 commit comments

Comments
 (0)