Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function key_login() {
- $what = "";
- if (!isset($_GET['key']) || !strlen($_GET['key']) || (isset($_GET['key']) && ($_GET['key'] !== "kyleisawesome"))) {
- $what = (empty($_GET['key'])) ? "Please enter a key to access this webpage" : '<span style="color: red;">Error:</span> Key Invalid';
- echo <<<OUT
- <div class="table-responsive">
- <form action="{$_SERVER['PHP_SELF']}" method="GET" role="form"/>
- <div class="form-group">
- <label for="key">Key:</label>
- <input type="text" name="key" class="form-control" id="key"/>
- </div>
- <button type="submit" class="btn btn-primary">Login</button>
- </form>
- </div>
- OUT;
- exit;
- }
- }
- $title = isset($_GET['key']) && ($_GET['key'] === "kyleisawesome") ? "Welcome to the bot" : "Login - Please enter the key";
- echo <<<OUT
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
- <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
- <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <title>$title</title>
- </head>
- <body>
- OUT;
- key_login();
- if (isset($_POST['submit'])) { $o = 0;
- if(empty($_POST['URL'])) {
- exit('Site URL was left empty');
- }
- if(empty($_POST['times'])) {
- exit('Register times was left empty!');
- }
- $accounts = array();
- while($o < $_POST['times']) { $o++;
- $ch = curl_init('http://'. $_POST['URL'] .'/register.php');
- curl_setopt($ch, CURLOPT_POST, 1);
- $ar = array(
- 1 => array(1 => 'a', 2 => 'b', 3 => 'c', 4 => 'd', 5 => 'e'),
- 2 => array(1 => 'f', 2 => 'g', 3 => 'h', 4 => 'i', 5 => 'j'),
- 3 => array(1 => 'k', 2 => 'l', 3 => 'm', 4 => 'n', 5 => 'o'),
- 4 => array(1 => 'p', 2 => 'q', 3 => 'u', 4 => 'r', 5 => 's'),
- 5 => array(1 => 't', 2 => 'u', 3 => 'v', 4 => 'w', 5 => 'x'),
- 6 => array(1 => 'y', 2 => 'z', 3 => '1', 4 => '2', 5 => '3'),
- 7 => array(1 => '4', 2 => '5', 3 => '6', 4 => '7', 5 => '9'),
- 8 => array(1 => '9', 2 => '10', 3 => '11', 4 => '12', 5 => '13'),
- 9 => array(1 => '14', 2 => '15', 3 => '16', 4 => '17', 5 => '18'),
- 10 => array(1 => '19', 2 => '20', 3 => '-', 4 => '_', 5 => '\\'),
- 11 => array(1 => '$', 2 => '£', 3 => 'FGG', 4 => '<', 5 => '>'),
- 12 => array(1 => '&', 2 => 'as', 3 => 'mom', 4 => 'a', 5 => '"'),
- 13 => array(1 => '<?php echo?>', 2 => '4444444444', 3 => 'ggg', 4 => '........', 5 => '3333333')
- );
- $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;
- $email = $random.'@hotmail.com';
- $post_data = sprintf('username=%s&password=%s&cpassword=%s&email=%s&gender=Male&ref=%s',
- urlencode($random), urlencode($random), urlencode($random), urlencode($email), urlencode($_POST['ref']));
- $i=count($accounts);
- $accounts[$i][0]=$random;
- $accounts[$i][1]=$random;
- $accounts[$i][2]=$email;
- curl_setopt($ch, CURLOPT_POSTFIELDS,$post_data);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION,0);
- curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
- curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
- curl_setopt($ch, CURLOPT_HEADER,0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- $data = curl_exec($ch);
- curl_close($ch);
- //login stuff goes here//
- $login = curl_init('http://'. $_POST['URL'] .'/authenticate.php');
- curl_setopt($login, CURLOPT_POST, 1);
- $login_data = sprintf('username=%s&password=%s', urlencode($random), urlencode($random));
- curl_setopt($login, CURLOPT_POSTFIELDS, $login_data);
- if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off'))
- $follow = TRUE;
- else
- $follow = FALSE;
- curl_setopt($login, CURLOPT_FOLLOWLOCATION,$follow);
- curl_setopt($login, CURLOPT_HEADER,1);
- curl_setopt($login, CURLOPT_COOKIEJAR, "cookie.txt");
- curl_setopt($login, CURLOPT_COOKIEFILE, "cookie.txt");
- curl_setopt($login, CURLOPT_RETURNTRANSFER,1);
- curl_exec($login);
- //mailbox stuff goes here// // still need fix propley
- /*
- curl_setopt($login, CURLOPT_URL, 'http://'. $_POST['URL'] .'/mailbox.php?action=send');
- curl_setopt($login, CURLOPT_POSTFIELDS, 'user2=test&subject=BLAH&message=look+its+me');
- curl_exec($login);
- //usersonline stuff goes here//
- curl_setopt($login, CURLOPT_URL, 'http://'. $_POST['URL'] .'/usersonline.php');
- $mat = str_replace(array('<','>'),array('[',']'), curl_exec($login));
- preg_match_all('/\[a href=\'viewuser\.php\?u=(.*)\'\](.*)\[\/a\]/i', $mat, $matches);
- //preg_match_all('/\[b\](.*)\[\/b\]/i', $mat, $matches);
- echo '<pre>',print_r($matches),'</pre><br /><br /><br />';
- */
- curl_close($login);
- if (isset($_POST['seehtml']))
- {
- echo "<div class='jumbotron'>
- <div class='container'>
- <div class='highlight'>
- <pre>
- <code class='html'>". sprintf('%s', htmlentities($data)) ."</code>
- </pre>
- </div>
- </div>
- </div>";
- }
- }
- printf('<br /><br /><b>Registered %u times</b>', $o);
- echo '<br /><br />';
- echo '<table border="1">';
- echo '<tr><th>-</th><th>Username</th><th>Password</th><th>Email</th></tr>';
- foreach($accounts as $key=>$val){
- echo '<tr><td>'.($key+1).'</td><td>'.$val[0].'</td><td>'.$val[1].'</td><td>'.$val[2].'</td></tr>';
- }
- echo '</table>';
- }
- else {
- echo '<div class="table-responsive">
- <form action="'.$_SERVER['PHP_SELF'].'?key='. $_GET['key'] .'" method="POST" role="form">
- <div class="form-group">
- <label for="URL">Site URL: <small><em>example:</em> google.com</small></label>
- <input type="text" class="form-control" id="URL" name="URL" value="" />
- </div>
- <div class="form-group">
- <label for="times">Registration Times <small>Format: 20</small></label>
- <input type="text" class="form-control" name="times" id="times" value="1"/>
- </div>
- <div class="form-group">
- <label for="ref">Referal ID: <small>Format: 1</small></label>
- <input type="text" class="form-control" id="ref" name="ref" value="1" />
- </div>
- <div class="checkbox">
- <label for="seehtml">See Results: </label>
- <input type="checkbox" name="seehtml" id="seehtml"/> (Only run once if viewing results)
- </div>
- <button type="submit" class="btn btn-danger" name="submit" >Submit</button>
- </form>
- </div>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment