From ce198c7d08ac4f4333d17d14982c8bb39bb1992d Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Wed, 11 May 2016 21:24:08 -0400 Subject: Fixed newbug handeling --- cgi-bin/a.exe | Bin 69591 -> 0 bytes ws2a/newbug.c | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 cgi-bin/a.exe diff --git a/cgi-bin/a.exe b/cgi-bin/a.exe deleted file mode 100644 index 2c9794d..0000000 Binary files a/cgi-bin/a.exe and /dev/null differ diff --git a/ws2a/newbug.c b/ws2a/newbug.c index 0b34938..6166341 100644 --- a/ws2a/newbug.c +++ b/ws2a/newbug.c @@ -73,7 +73,7 @@ char* useridhash(char* str){ unsigned int strp = 0; i = 0; while(i < tloop){ - printf("i:%d hashp:%u strp:%u tloop:%d\n",i,hashp,strp,tloop); + //printf("i:%d hashp:%u strp:%u tloop:%d\n",i,hashp,strp,tloop); char tchar = str[strp%len]; hash[hashp%20] += str[strp%len]; str[strp%len]+=1; @@ -82,7 +82,7 @@ char* useridhash(char* str){ i++; } i = 0; - printf("Before characterizeing the hash, it was: %s\n",hash); + //printf("Before characterizeing the hash, it was: %s\n",hash); while(i < 20){ //printf("Normalizeing %c(%u) as %c(%u)\n",hash[i],(unsigned int)hash[i],(hash[i] % 92) + 32,(hash[i] % 92) + 32); unsigned int hashnum = hash[i]; @@ -91,15 +91,15 @@ char* useridhash(char* str){ hash[i] = modedhashnum + 32; i++; } - printf("Resulting hash was:%s\n",hash); + //printf("Resulting hash was:%s\n",hash); return hash; } int main(){ - //char* data = getenv("QUERY_STRING"); + char* data = getenv("QUERY_STRING"); //char data[20] = "?id=1"; char* hardip = getenv("REMOTE_ADDR"); - char data[] = "name=Apickx&id=test&shortdesc=This&longdesc=This+is+the+first+ever+test+bug+to+be+created!&captcha=full+junior"; + //char data[] = "name=Apickx&id=test&shortdesc=This&longdesc=This+is+the+first+ever+test+bug+to+be+created!&captcha=proud+pain"; char name[20]; char userid[20]; @@ -144,7 +144,7 @@ int main(){ //If we had the correct captcha, remove it. char command[100]; - sprintf(command,"rm \"%s.txt\"",captchapath); + sprintf(command,"rm \"%s\"",captchapath); system(command); //Create new bug -- cgit v1.2.3-70-g09d2