Created
January 28, 2015 00:54
-
-
Save fukawi2/4e7994a850815ee4b4d5 to your computer and use it in GitHub Desktop.
Ansible playbook to test for CVE-2015-0235 ("Ghost")
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
- hosts: all | |
sudo: yes | |
tasks: | |
- name: copy code | |
copy: src=ghost.c dest=/tmp/ghost.c mode=400 | |
# obtain above code from https://gist.github.com/koelling/ef9b2b9d0be6d6dbab63 | |
- name: compile code | |
command: chdir=/tmp | |
gcc -o ghost-test ghost.c | |
- name: run test | |
command: /tmp/ghost-test | |
register: test_results | |
- name: show results | |
debug: msg="{{test_results.stdout}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment