File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 33end
44
55When /^I launch (?:a|an) "metasploit" attack with:$/ do |command |
6+ if command . include? "exit"
7+ run_with_profile command
8+ else
9+ run_with_profile command + " exit;"
10+ end
11+ end
12+
13+ When /^I launch (?:a|an) "metasploit" vulnerability check with:$/ do |command |
14+ if !( command . include? "check" )
15+ command += "check;"
16+ end
17+ if !( command . include? "exit" )
18+ command += "exit;"
19+ end
620 run_with_profile command
7- end
21+ end
22+
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ Feature: Test if RHOST is vulnerable to ms08_067 exploit
1010Scenario: Check if RHOST is vulnerable
1111
1212
13- When I launch a "metasploit" attack with:
13+ When I launch a "metasploit" vulnerability check with:
1414"""
15- msfconsole -x "use exploit/windows/smb/ms08_067_netapi; set RHOST <RHOST>; check; exit "
15+ msfconsole -x "use exploit/windows/smb/ms08_067_netapi; set RHOST <RHOST>; check;"
1616"""
1717
1818Then it should pass with:
You can’t perform that action at this time.
0 commit comments