diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-11 21:24:08 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-11 21:24:08 -0400 |
| commit | ce198c7d08ac4f4333d17d14982c8bb39bb1992d (patch) | |
| tree | 40d16392ca49b2a4afb7a7b40b4ab7dfa4c3c354 /ws2a/newbug.c | |
| parent | 4dc40fdbb0cb355fa0e7ee2b6d0e9bf31c33bb6f (diff) | |
| download | webpage-ce198c7d08ac4f4333d17d14982c8bb39bb1992d.tar.gz webpage-ce198c7d08ac4f4333d17d14982c8bb39bb1992d.tar.bz2 webpage-ce198c7d08ac4f4333d17d14982c8bb39bb1992d.zip | |
Fixed newbug handeling
Diffstat (limited to 'ws2a/newbug.c')
| -rw-r--r-- | ws2a/newbug.c | 12 |
1 files changed, 6 insertions, 6 deletions
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 |
