Created
May 15, 2014 21:23
-
-
Save sloria/ebcc633a2310ead47857 to your computer and use it in GitHub Desktop.
Non-working portscan denial test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: test csf | Port scans are denied | |
connection: local | |
sudo: no | |
# doalarm runs a command and returns an error if no output was captured in | |
# 3 seconds | |
# Here, a portscan is attempted; CSF should hang the connection, so doalarm() should | |
# return an error | |
command: doalarm () { perl -e 'alarm shift; exec @ARGV' "$@"; } && doalarm 3 nc -z 192.168.111.111 1-1023 | |
register: portscan_result | |
failed_when: portscan_result.stdout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment