From 927c844f3d87fa6d6db1ac2ad93813ed06277939 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Tue, 10 May 2016 14:01:02 -0400 Subject: Changed captcha workings --- ws2a/gencaptcha.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'ws2a/gencaptcha.c') diff --git a/ws2a/gencaptcha.c b/ws2a/gencaptcha.c index 6079d35..964e730 100644 --- a/ws2a/gencaptcha.c +++ b/ws2a/gencaptcha.c @@ -50,7 +50,7 @@ void createRandomWords(char* buf){ int main(){ printf("%s%c%c\n", - "Content-Type:image/png;charset=iso-8859-1",13,10); + "Content-Type:text/html;charset=iso-8859-1",13,10); srand(time(NULL)); char randwords[LONGADJ+LONGNOU+1]; @@ -67,19 +67,5 @@ int main(){ sprintf(command,"convert \"../ws2a/captchas/%s.png\" -virtual-pixel White -distort Arc %d \"../ws2a/captchas/%s.png\"",randwords,arcdis,randwords); system(command); - FILE* imgfile; - char filepath[100]; - sprintf(filepath,"../ws2a/captchas/%s.png",randwords); - imgfile = fopen(filepath,"r"); - if(imgfile == NULL){ - printf("Unable to open file!"); - return 1; - } - while(!feof(imgfile)){ - char c = fgetc(imgfile); - if(feof(imgfile)){ - return 0; - } - putchar(c); - } + printf(randwords); } -- cgit v1.2.3-70-g09d2