Skip to content

Instantly share code, notes, and snippets.

/poc.c Secret

Created Dec 28, 2016
Embed
What would you like to do?
#include <stdio.h>
#include <signal.h>
void main() {
int option;
scanf("%d", &option);
printf("%d\n", option);
if (option != 666) raise(SIGSEGV);
}
/*
* Test with:
* $ socat -v TCP4-LISTEN:8888,reuseaddr,fork EXEC:./program,stderr
* $ nc 0.0.0.0 8888
* 666
* 666
* $ nc 0.0.0.0 8888
* 9 // no response
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment