This file contains hidden or 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
| def make_rules(hosts, ports, proto): | |
| return [{"proto": proto, | |
| "from_port": port, | |
| "to_port": port, | |
| "cidr_ip": host} for host in hosts for port in map(int, ports.split(","))] | |
| class FilterModule(object): | |
| def filters(self): | |
| return {'make_rules': make_rules} |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| playbook="./site.yml" | |
| hostsfile="./hosts" | |
| ## cd to directory of playbook | |
| cd ${0%/*} | |
| time ansible-playbook "$playbook" -i "${hostsfile}" "$@" |
This file contains hidden or 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
| <?php | |
| ## This assumes proper privileges by php to write to /dev/udp/* | |
| ipaddress="192.168.0.201"; | |
| portnum="50000"; | |
| allon="\x35\00\x55"; | |
| shell_exec(echo -n -e "$allon" > /dev/udp/"$ipaddress"/"$portnum"); | |
| ?> |
NewerOlder