Skip to content

Instantly share code, notes, and snippets.

@m4tux
Created September 24, 2013 17:28
Show Gist options
  • Save m4tux/6688255 to your computer and use it in GitHub Desktop.
Save m4tux/6688255 to your computer and use it in GitHub Desktop.
void handle(int newsock) {
int backdoor = 0;
char buffer[1016];
memset(buffer, 0, 1016);
send(newsock, "Welcome to CSAW CTF.", 21, 0);
recv(newsock, buffer, 1020, 0);
buffer[1015] = 0;
if ( backdoor ) {
fd = fopen("./key", "r");
fscanf(fd, "%s\n", buffer);
send(newsock, buffer, 512, 0);
}
close(newsock);
@m4tux
Copy link
Author

m4tux commented Sep 24, 2013

csaw2013-exploitation 100 code snippet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment