Jump to content

[PHP] milw0rm.com Exploit Spider

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
Affix

Affix

    Learning Programmer

  • Members
  • PipPipPip
  • 47 posts
<style type="text/css">


body {

	background-color:#000000;

	color:#FFFFFF;

	font-size: 12px;

}

</style>

<?php

/***************************************

Milw0rm Spider V1.0

Downloads all exploits on milw0rm.com

into ./exploits/title.txt


Coded by Affix <affix@FedoraProject.org>

***************************************/

class milw0rm {


	var $error;


	function split_tag($haystack,$start,$end) {

		if (strpos($haystack,$start) === false || strpos($haystack,$end) === false) {

			return false;

		} else {

			$start_position = strpos($haystack,$start)+strlen($start);

			$end_position = strpos($haystack,$end);

			return substr($haystack,$start_position,$end_position-$start_position);

		}

	}


	function save_page($id) {

		$page = file_get_contents("http://milw0rm.com/exploits/" . $id);

		$rnd = rand(10,20);

		print "Sleeping for $rnd Seconds<br>";

		sleep($rnd);

		$data = $this->split_tag($page, "<pre>", "</pre>");

		$name = $this->split_tag($page, "<title>", "</title>"); 

		$data = str_replace("milw0rm.com", "Affix' Exploit Spider", $data);

		$name = str_replace("/", "-", $name);

		if($name != "") {

			$fn = "./exploits/" . $name . ".txt";

			$fh = fopen($fn, "w");

			if(fwrite($fh, $data)) {

				return $name;

			} else {

				print "<font color=red>" . mysql_error() . "</font><br />";

				$error = "File Write Error!";

				return false;

			}

		} else {

			$error = "No Content";

			return false;

		}


	}


	function start($from=1, $to=20) {

		print "<div align=center><h1>Milw0rm.com Exploit Spider v1.0 Coded By Affix</h1></div><br>";

		while($from <= $to) {

			print "Trying to get exploit #$from of $to<br>";

			$file = $this->save_page($from);

			if($file) {

				print "<font color=green><strong>$file Written to $name!</font></strong><br>";

			} else {

				print "<font color=red>#$from Skipped Due to Error : $error</font><br>";

				$from++;

			}

			$from++;

		}

	}


}



$milw0rm = new milw0rm;

$milw0rm->start(1, 6941);

?>


Make sure you have a direcotry exploits with chmod 777 before using this script.

Coded a while back :P

#2
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
LOL not bad at all, what's the site even about?
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


#3
mendim.

mendim.

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,393 posts
ah the site is all about Hacking ..
lol

Good Job affix

#4
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
LOL, what a great choice of website to do this for :)
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


#5
Affix

Affix

    Learning Programmer

  • Members
  • PipPipPip
  • 47 posts
I just done it when I was bored

It can crawl about 200 per min if you lower the time. But this will get you IP Banned

#6
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
Nice. Do they allow this type of script to run?
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


#7
Affix

Affix

    Learning Programmer

  • Members
  • PipPipPip
  • 47 posts
Nope they dont lol

#8
TkTech

TkTech

    The Crazy One

  • Moderators
  • 1,396 posts
Most sites don't appreciate you stealing all their content, lol. The one ++ about milw0rm is it only distributes source, so the typical script kiddies need to at least learn a tad.

#9
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
Of course, hardly any would ;)
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!