Dec 28

Here's a quick function I wrote to generate IP address ranges using recursion.

function iprange($oct, $prefix=""){
	for($i=1;$i<256;$i++){
		if($oct == 1) print("$prefix.$i\\n");
		else iprange($oct - 1, "$prefix.$i");
	}
}

Just call it with the number of octets you want to generate and the beginning of the IP range.

Example:

iprange(2, "127.0");

Output:

127.0.1.1
127.0.1.2
127.0.1.3
127.0.1.4
127.0.1.5

127.0.255.254
127.0.255.255

Enjoy :)

Oct 30

Once again, the world tries to find a way to classify all hackers as terrorists, or to suggest that if given the chance, hackers will immediately turn to destroying the infrastructure of the world. And, once again, another inane situation such as a DDoS attack on a political website is seen as reason for comment. Go figure.

KYIV, Ukraine - Hackers from several countries launched a massive attack and temporarily disabled the website of Ukraine’s western-leaning President Viktor Yushchenko, his office said Tuesday. A Russian nationalist group claimed responsibility. The attacks from servers in Russia, Britain, Kazakhstan, the United States, Israel and Ukraine began Sunday night and continued through Tuesday afternoon, the presidential press service told The Associated Press.

Read the rest here.

Jul 19

This is kind of a simple tip, but it's a useful one. If you need to send data to a server to see how it reacts, or need to receive data from a server, rather than writing a script.. just use NetCat! There are versions of NetCat for Windows and if your *nix distribution doesn't come pre-installed with NetCat, just get rid of it now. Read the rest of this entry »