1
1
@slow
2
2
3
- Feature: nmap attacks for scanme.nmap.org and to use this for your tests, change the value in the profile
3
+ Feature: nmap attacks for localhost and to use this for your tests, change the value in the profile
4
4
Background:
5
5
Given "nmap" is installed
6
6
And the following profile:
7
7
| name | value |
8
- | hostname | scanme.nmap.org |
9
- | host | scanme.nmap.org |
8
+ | hostname | localhost |
9
+ | host | localhost |
10
10
| tcp_ping_ports | 22,25,80,443 |
11
11
12
12
Scenario: Verify server is open on expected set of ports using the nmap-fast attack step
13
13
When I launch a "nmap-fast" attack
14
- Then the output should match /80 .tcp\s+open/
14
+ Then the output should match /22 .tcp\s+open/
15
15
16
16
Scenario: Verify server is open on expected set of ports using the nmap fast flag
17
17
When I launch an "nmap" attack with:
@@ -20,7 +20,7 @@ Feature: nmap attacks for scanme.nmap.org and to use this for your tests, change
20
20
"""
21
21
Then the output should match:
22
22
"""
23
- 80 /tcp\s+open
23
+ 22 /tcp\s+open
24
24
"""
25
25
26
26
Scenario: Verify that there are no unexpected ports open
@@ -30,20 +30,19 @@ Feature: nmap attacks for scanme.nmap.org and to use this for your tests, change
30
30
"""
31
31
Then the output should not contain:
32
32
"""
33
- 22/tcp
34
- 25/tcp
33
+ 443/tcp
35
34
"""
36
35
37
36
Scenario: Output to XML
38
37
When I launch an "nmap" attack with:
39
38
"""
40
- nmap -p 80,443 -oX foo.xml <hostname>
39
+ nmap -p 22, 80,443 -oX foo.xml <hostname>
41
40
"""
42
41
And the file "foo.xml" should contain XML:
43
42
| css |
44
- | ports port[protocol="tcp"][portid="80 "] state[state="open"] |
43
+ | ports port[protocol="tcp"][portid="22 "] state[state="open"] |
45
44
And the file "foo.xml" should not contain XML:
46
45
| css |
47
- | ports port[protocol="tcp"][portid="123 "] state[state="open"] |
46
+ | ports port[protocol="tcp"][portid="80 "] state[state="open"] |
48
47
| ports port[protocol="tcp"][portid="443"] state[state="open"] |
49
48
0 commit comments