Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $on = true;
- $advanced = true;
- $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)
- $time = 5; //Seconds for the user to reload pages relational to the request limit. (x requests max in x seconds)
- $loads = 10; //Loads for the user before browser challenge relational to the time limit. (x requests max in x seconds)
- if($on){
- if(isset($_SESSION['rand']) && isset($_POST['jq_rand']) && $_SESSION['rand'] == $_POST['jq_rand']){
- $passed_rand = true;
- }else{
- $passed_rand = false;
- }
- $_SESSION['rand'] = str_shuffle(rand(1000000000, 9999999999).'abcdefghijklmnop');
- $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>';
- if(!isset($_SESSION['verified'.date('H')])){
- $_SESSION['verified'.date('H')] = true;
- $_SESSION['got_test'] = true;
- die($page);
- }
- if(isset($_SESSION['got_test']) && $_SESSION['got_test'] == true){
- if(isset($_POST['jq_test'])){
- if($_POST['jq_test'] == 'good' && $passed_rand){
- $_SESSION['got_test'] = false;
- $_SESSION['page_loads'] = -$extra_loads;
- $_SESSION['protect_last_load'] = time();
- header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
- exit();
- }else{
- die($page);
- }
- }
- }
- if(isset($advanced) && $advanced == true){
- if(!isset($_SESSION['protect_last_load']) || $_SESSION['protect_last_load'] < time()-$time){
- $_SESSION['protect_last_load'] = time();
- }
- if(!isset($_SESSION['page_loads'])){
- $_SESSION['page_loads'] = 0;
- }else{
- $_SESSION['page_loads']++;
- }
- if($_SESSION['page_loads'] >= $loads && $_SESSION['protect_last_load'] > time()-$time){
- $_SESSION['got_test'] = true;
- die($page);
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment