File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
spec/lib/msf/core/exploit Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,13 @@ def mock_stop_job(arg)
53
53
end
54
54
55
55
def create_fake_job ( id )
56
- [ id . to_s , double ( 'job' ) ]
56
+ ctx = double ( 'ctx' )
57
+ handler = create_fake_windows_meterpreter
58
+ allow ( ctx ) . to receive ( :first ) . and_return ( handler )
59
+ job = [ id . to_s , double ( 'job' ) ]
60
+ allow ( job ) . to receive ( :ctx ) . and_return ( ctx )
61
+
62
+ job
57
63
end
58
64
59
65
def create_fake_exploit ( opts = { } )
@@ -555,7 +561,7 @@ def mock_exploit_create(full_name)
555
561
end
556
562
end
557
563
558
- describe '#start_payload_listeners' do
564
+ skip '#start_payload_listeners' do
559
565
end
560
566
561
567
describe '#parse_rank' do
@@ -650,7 +656,8 @@ def mock_exploit_create(full_name)
650
656
end
651
657
end
652
658
653
- describe '#select_payload' do
659
+ skip '#select_payload' do
660
+
654
661
end
655
662
656
663
describe '#start_exploits' do
@@ -767,5 +774,15 @@ def get_stdout(&block)
767
774
end
768
775
end
769
776
777
+ skip '#configure_job_output' do
778
+ end
779
+
780
+ describe '#session_count' do
781
+ it 'returns the total session count' do
782
+ subject . instance_variable_set ( :@payload_job_ids , job_ids )
783
+ expect ( subject . session_count ) . to eq ( 0 )
784
+ end
785
+ end
786
+
770
787
771
788
end
You can’t perform that action at this time.
0 commit comments