1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
|
}
/*
** WEBPAGE: honeypot
** This page is a honeypot for spiders and bots.
*/
void honeypot_page(void){
style_header("I think you are a robot");
@ <p>You seem like a robot.</p>
@
@ <p>Is this wrong? Are you really a human? If so, please prove it
@ by <a href="%R/login">logging in</a>.
if( g.anon.Hyperlink ){
@ You can <a href="%R/login?anon=1">log in anonymously</a> if you
@ prefer.
}
@ <p>Sorry for the inconvenience. The point of this is to prevent
@ robots from following the countless of hyperlinks in this site and
@ soaking up all the available CPU time and network bandwidth.
style_finish_page();
}
/*
** Webpages that encounter an error due to missing or incorrect
** query parameters can jump to this routine to render an error
** message screen.
|
>
>
>
>
>
|
>
|
|
>
>
>
>
|
>
>
>
>
|
>
>
>
>
>
>
>
>
>
|
<
>
|
>
>
|
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
|
}
/*
** WEBPAGE: honeypot
** This page is a honeypot for spiders and bots.
*/
void honeypot_page(void){
unsigned int uSeed = captcha_seed();
const char *zDecoded = captcha_decode(uSeed);
int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
char *zCaptcha = captcha_render(zDecoded);
style_header("I think you are a robot");
@ <p>You seem like a robot.</p>
@
@ <p>Is that incorrect? Are you really human?
@ If so, please prove it by transcribing the captcha text
@ into the entry box below and pressing "Submit".
@ <form action="%R/login" method="post">
@ <input type="hidden" id="u" name="u" value="anonymous">
@ <p>
@ Captcha: <input type="text" id="p" name="p" value="">
@ <input type="submit" name="in" value="Submit">
@
@ <p>Alternatively, you can <a href="%R/login">log in</a> using an
@ existing userid.
@
@ <p><input type="hidden" name="cs" value="%u(uSeed)">
@ <div class="captcha"><table class="captcha"><tr><td>\
@ <pre class="captcha">
@ %h(zCaptcha)
@ </pre></td></tr></table>
if( bAutoCaptcha ) {
@ <input type="button" value="Fill out captcha" id='autofillButton' \
@ data-af='%s(zDecoded)'>
builtin_request_js("login.js");
}
@ </div>
free(zCaptcha);
@
@ <p>We regret this inconvenience. However, robots have become so
@ prolific and so aggressive that they will soak up too much CPU time
@ and network bandwidth on our servers if allowed to run unchecked.
@ Your cooperation in demonstrating that you are human is
@ appreciated.
style_finish_page();
}
/*
** Webpages that encounter an error due to missing or incorrect
** query parameters can jump to this routine to render an error
** message screen.
|