Guest User

cool

a guest
Feb 11th, 2016
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.78 KB | None | 0 0
  1. <?php
  2. $on = true;
  3.  
  4. $advanced = true;
  5. $extra_loads = 5; //Once passed verification, it is the loads for the user before browser challenge relational to the time limit. (x requests max in x seconds)
  6. $time = 5; //Seconds for the user to reload pages relational to the request limit. (x requests max in x seconds)
  7. $loads = 10; //Loads for the user before browser challenge relational to the time limit. (x requests max in x seconds)
  8. if($on){
  9. if(isset($_SESSION['rand']) && isset($_POST['jq_rand']) && $_SESSION['rand'] == $_POST['jq_rand']){
  10. $passed_rand = true;
  11. }else{
  12. $passed_rand = false;
  13. }
  14. $_SESSION['rand'] = str_shuffle(rand(1000000000, 9999999999).'abcdefghijklmnop');
  15. $page = '<!DOCTYPE html><html><head><title>Client Verificaiton..</title><meta content="width=device-width, initial-scale=1.0" name="viewport"><meta content="noindex,follow,noarchive" name="robots"> <link href=\'https://fonts.googleapis.com/css?family=Arimo:400\' rel=\'stylesheet\' type=\'text/css\'> <style> html{ padding: 0; margin: 0; height: 100%; } body{ color:#565656; font-family:"Helvetica Neue", "Arimo", "Roboto", Helvetica, Arial, sans-serif; background:#f7f7f7; position:relative; text-align:center; min-width:480px padding: 0; margin: 0; height: 100%; } header,footer,section{ padding:3em; height:auto; width:auto } figure,header,footer,section{ margin:0 } section{ padding-bottom:0; display:none } .centered{ position: relative; top: 30%; top: -webkit-calc((100% - 330px)/2); top: -moz-calc((100% - 330px)/2); top: calc((100% - 330px)/2); } h1{ font-weight:300; margin:0; padding:0 } figure{ padding:0 3em; overflow:visible } .spinner{ height:60px; width:60px; margin:0 auto; position:relative; -webkit-animation:rotation .8s infinite linear; -moz-animation:rotation .8s infinite linear; -o-animation:rotation .8s infinite linear; animation:rotation .8s infinite linear; border-left:6px solid rgba(239, 0, 0, 0.05); border-right:6px solid rgba(239, 0, 0, 0.05); border-bottom:6px solid rgba(239, 0, 0, 0.05); border-top:6px solid rgba(195, 0, 0, 0.8); border-radius:100% } .error .spinner{ border:6px solid rgba(255, 0, 0, .8) } .redirecting .spinner{ border-left-color:rgba(239, 0, 0, 0.05); border-right-color:rgba(239, 0, 0, 0.05); border-bottom-color:rgba(239, 0, 0, 0.05); dborder-top-color:rgba(195, 0, 0, 0.8)}@-webkit-keyframes "rotation"{from{-webkit-transform:rotate(0deg);}to{-webkit-transform:rotate(359deg);}}@-moz-keyframes rotation {from{-moz-transform:rotate(0deg);}to{-moz-transform:rotate(359deg);}}@-o-keyframes "rotation"{from{-o-transform:rotate(0deg);}to{-o-transform:rotate(359deg);}}@keyframes "rotation"{from{transform:rotate(0deg);}to{transform:rotate(359deg);}}header p,header a{color:#00aeef}footer,footer a{color:#d00}.e,.s,span{display:none}.redirecting .s,.error .e,.show{display:block}.redirecting .s,.redirecting footer a{color:#28ac28}#recaptcha_area{margin:10px auto;width:450px}@media only screen and (max-width: 620px){header,footer,section,figure{padding-left:0;padding-right:0}}</style><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script></head><body><div class="centered"><header><div class="spinner"></div></header><figure> <script> $( document ).ready(function() { $(\'#domain\').html(window.location.hostname); setTimeout(function(){ $(\'#jq_test_value\').val(\'good\'); $(\'#jq_test_captcha\').val(\''.$_SESSION['rand'].'\'); $(\'#jq_test\').submit(); }, 3000); });</script><form id="jq_test" action="" method="post"><input id="jq_test_captcha" type="hidden" name="jq_rand" value="none"><input id="jq_test_value" type="hidden" name="jq_test" value="none"></form><h1>Validating your browser before accessing <text id="domain"></text></h1><p id="nverify">This process is automated. You will be redirected to your intended destination shortly.</p></figure></div></body></html>';
  16. if(!isset($_SESSION['verified'.date('H')])){
  17. $_SESSION['verified'.date('H')] = true;
  18. $_SESSION['got_test'] = true;
  19. die($page);
  20. }
  21. if(isset($_SESSION['got_test']) && $_SESSION['got_test'] == true){
  22. if(isset($_POST['jq_test'])){
  23. if($_POST['jq_test'] == 'good' && $passed_rand){
  24. $_SESSION['got_test'] = false;
  25. $_SESSION['page_loads'] = -$extra_loads;
  26. $_SESSION['protect_last_load'] = time();
  27. header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
  28. exit();
  29. }else{
  30. die($page);
  31. }
  32. }
  33. }
  34. if(isset($advanced) && $advanced == true){
  35. if(!isset($_SESSION['protect_last_load']) || $_SESSION['protect_last_load'] < time()-$time){
  36. $_SESSION['protect_last_load'] = time();
  37. }
  38. if(!isset($_SESSION['page_loads'])){
  39. $_SESSION['page_loads'] = 0;
  40. }else{
  41. $_SESSION['page_loads']++;
  42. }
  43. if($_SESSION['page_loads'] >= $loads && $_SESSION['protect_last_load'] > time()-$time){
  44. $_SESSION['got_test'] = true;
  45. die($page);
  46. }
  47. }
  48. }
  49. ?>
Advertisement
Add Comment
Please, Sign In to add comment