KyleMassacre

Untitled

Apr 5th, 2014
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.37 KB | None | 0 0
  1. <?php
  2. function key_login() {    
  3.     $what = "";
  4.     if (!isset($_GET['key']) || !strlen($_GET['key']) || (isset($_GET['key']) && ($_GET['key'] !== "kyleisawesome"))) {
  5.         $what = (empty($_GET['key'])) ? "Please enter a key to access this webpage" : '<span style="color: red;">Error:</span> Key Invalid';
  6.         echo <<<OUT
  7.             <div class="table-responsive">
  8.                 <form action="{$_SERVER['PHP_SELF']}" method="GET" role="form"/>
  9.                     <div class="form-group">
  10.                         <label for="key">Key:</label>
  11.                         <input type="text" name="key" class="form-control" id="key"/>
  12.                     </div> 
  13.                     <button type="submit" class="btn btn-primary">Login</button>
  14.                 </form>
  15.             </div> 
  16. OUT;
  17.         exit;
  18.     }
  19. }
  20. $title = isset($_GET['key']) && ($_GET['key'] === "kyleisawesome") ? "Welcome to the bot" : "Login - Please enter the key";
  21. echo <<<OUT
  22. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  23.     <html xmlns="http://www.w3.org/1999/xhtml">
  24.     <head>
  25.         <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
  26.         <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
  27.         <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
  28.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  29.         <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  30.         <title>$title</title>
  31.     </head>
  32.     <body>
  33. OUT;
  34.  
  35. key_login();
  36.  
  37. if (isset($_POST['submit'])) { $o = 0;
  38.   if(empty($_POST['URL'])) {
  39.     exit('Site URL was left empty');
  40.   }
  41.   if(empty($_POST['times'])) {
  42.     exit('Register times was left empty!');
  43.   }
  44.  
  45.  
  46.     $accounts = array();
  47.     while($o < $_POST['times']) { $o++;
  48.        
  49.         $ch = curl_init('http://'. $_POST['URL'] .'/register.php');
  50.          curl_setopt($ch, CURLOPT_POST, 1);
  51.          
  52.        
  53.         $ar = array(
  54.         1 => array(1 => 'a', 2 => 'b', 3 => 'c', 4 => 'd', 5 => 'e'),    
  55.         2 => array(1 => 'f', 2 => 'g', 3 => 'h', 4 => 'i', 5 => 'j'),    
  56.         3 => array(1 => 'k', 2 => 'l', 3 => 'm', 4 => 'n', 5 => 'o'),    
  57.         4 => array(1 => 'p', 2 => 'q', 3 => 'u', 4 => 'r', 5 => 's'),                
  58.         5 => array(1 => 't', 2 => 'u', 3 => 'v', 4 => 'w', 5 => 'x'),        
  59.         6 => array(1 => 'y', 2 => 'z', 3 => '1', 4 => '2', 5 => '3'),            
  60.         7 => array(1 => '4', 2 => '5', 3 => '6', 4 => '7', 5 => '9'),            
  61.         8 => array(1 => '9', 2 => '10', 3 => '11', 4 => '12', 5 => '13'),            
  62.         9 => array(1 => '14', 2 => '15', 3 => '16', 4 => '17', 5 => '18'),                
  63.        10 => array(1 => '19', 2 => '20', 3 => '-', 4 => '_', 5 => '\\'),    
  64.        11 => array(1 => '$', 2 => '£', 3 => 'FGG', 4 => '<', 5 => '>'),    
  65.        12 => array(1 => '&', 2 => 'as', 3 => 'mom', 4 => 'a', 5 => '"'),    
  66.        13 => array(1 => '<?php echo?>', 2 => '4444444444', 3 => 'ggg', 4 => '........', 5 => '3333333')      
  67.         );
  68.        
  69.         $random = $ar[2][rand(1,5)] . $ar[2][rand(1,5)] . $ar[3][rand(1,5)] . $ar[4][rand(1,5)] . $ar[5][rand(1,5)] . $o;
  70.         $email = $random.'@hotmail.com';
  71.        
  72.         $post_data = sprintf('username=%s&password=%s&cpassword=%s&email=%s&gender=Male&ref=%s',
  73.         urlencode($random), urlencode($random), urlencode($random), urlencode($email), urlencode($_POST['ref']));    
  74.        
  75.         $i=count($accounts);
  76.         $accounts[$i][0]=$random;
  77.         $accounts[$i][1]=$random;
  78.         $accounts[$i][2]=$email;
  79.            
  80.         curl_setopt($ch, CURLOPT_POSTFIELDS,$post_data);
  81.          curl_setopt($ch, CURLOPT_FOLLOWLOCATION,0);
  82.          curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
  83.          curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
  84.          curl_setopt($ch, CURLOPT_HEADER,0);
  85.          curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  86.          
  87.          $data = curl_exec($ch);
  88.  
  89.         curl_close($ch);
  90.          
  91.         //login stuff goes here//
  92.        
  93.  
  94.         $login = curl_init('http://'. $_POST['URL'] .'/authenticate.php');
  95.         curl_setopt($login, CURLOPT_POST, 1);
  96.        
  97.         $login_data = sprintf('username=%s&password=%s', urlencode($random), urlencode($random));
  98.         curl_setopt($login, CURLOPT_POSTFIELDS, $login_data);
  99.          if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off'))
  100.             $follow = TRUE;
  101.          else
  102.             $follow = FALSE;   
  103.         curl_setopt($login, CURLOPT_FOLLOWLOCATION,$follow);
  104.          curl_setopt($login, CURLOPT_HEADER,1);
  105.         curl_setopt($login, CURLOPT_COOKIEJAR, "cookie.txt");
  106.         curl_setopt($login, CURLOPT_COOKIEFILE, "cookie.txt");
  107.          curl_setopt($login, CURLOPT_RETURNTRANSFER,1);
  108.         curl_exec($login);
  109.  
  110.         //mailbox stuff goes here// // still need fix propley
  111. /*
  112.         curl_setopt($login, CURLOPT_URL, 'http://'. $_POST['URL'] .'/mailbox.php?action=send');
  113.         curl_setopt($login, CURLOPT_POSTFIELDS, 'user2=test&subject=BLAH&message=look+its+me');
  114.         curl_exec($login);
  115.  
  116.         //usersonline stuff goes here//
  117.         curl_setopt($login, CURLOPT_URL, 'http://'. $_POST['URL'] .'/usersonline.php');
  118.            $mat = str_replace(array('<','>'),array('[',']'), curl_exec($login));
  119.         preg_match_all('/\[a href=\'viewuser\.php\?u=(.*)\'\](.*)\[\/a\]/i', $mat, $matches);
  120.         //preg_match_all('/\[b\](.*)\[\/b\]/i', $mat, $matches);
  121.         echo '<pre>',print_r($matches),'</pre><br /><br /><br />';
  122. */
  123.          curl_close($login);
  124.  
  125.         if (isset($_POST['seehtml']))
  126.         {
  127.             echo "<div class='jumbotron'>
  128.                     <div class='container'>
  129.                         <div class='highlight'>
  130.                             <pre>
  131.                                 <code class='html'>". sprintf('%s', htmlentities($data)) ."</code>
  132.                             </pre>
  133.                         </div>
  134.                     </div>
  135.                 </div>";           
  136.         }    
  137.        
  138.         }
  139.        
  140.     printf('<br /><br /><b>Registered %u times</b>', $o);
  141.     echo '<br /><br />';
  142.     echo '<table border="1">';
  143.     echo '<tr><th>-</th><th>Username</th><th>Password</th><th>Email</th></tr>';
  144.    
  145.     foreach($accounts as $key=>$val){
  146.         echo '<tr><td>'.($key+1).'</td><td>'.$val[0].'</td><td>'.$val[1].'</td><td>'.$val[2].'</td></tr>';
  147.     }
  148.     echo '</table>';
  149. }
  150. else {
  151.  
  152.     echo '<div class="table-responsive">
  153.    <form action="'.$_SERVER['PHP_SELF'].'?key='. $_GET['key'] .'" method="POST" role="form">
  154.    <div class="form-group">
  155.         <label for="URL">Site URL: <small><em>example:</em> google.com</small></label>
  156.         <input type="text" class="form-control" id="URL" name="URL" value="" />
  157.    </div>
  158.    <div class="form-group">
  159.         <label for="times">Registration Times <small>Format: 20</small></label>
  160.         <input type="text" class="form-control" name="times" id="times" value="1"/>
  161.     </div>
  162.     <div class="form-group">
  163.         <label for="ref">Referal ID: <small>Format: 1</small></label>
  164.         <input type="text" class="form-control" id="ref" name="ref" value="1" />
  165.    </div>
  166.     <div class="checkbox"> 
  167.         <label for="seehtml">See Results: </label>
  168.         <input type="checkbox" name="seehtml" id="seehtml"/> (Only run once if viewing results)
  169.     </div>
  170.    <button type="submit" class="btn btn-danger" name="submit" >Submit</button>
  171.    </form>
  172.    </div>';
  173.  
  174. }
  175.  
  176. ?>
Advertisement
Add Comment
Please, Sign In to add comment