Skip to content

Instantly share code, notes, and snippets.

@fukawi2
Created January 28, 2015 00:54
Show Gist options
  • Save fukawi2/4e7994a850815ee4b4d5 to your computer and use it in GitHub Desktop.
Save fukawi2/4e7994a850815ee4b4d5 to your computer and use it in GitHub Desktop.
Ansible playbook to test for CVE-2015-0235 ("Ghost")
- 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