PDA

View Full Version : RandIP(Python or JuliaLang)



blmvxer
2016-07-12, 16:23
RandIP is and Random IP Address Generator.

What does it do?, This script will generate random IP Addresses and test whether they are able to connect to or not, with several error logging techniques we can also see if said Address is connectable via standard port 80, 8080, ssh, or telnet which can give indications of addresses used for storage servers., as well as testing found servers for default logins on SSH and telnet

RandIP Github (https://github.com/blmvxer/randip)

Chunkingz
2016-09-17, 16:08
I am looking to create sumfin like dis but using PHP, where do u get ur ips from? Cos dats my problem

blmvxer
2016-09-27, 02:58
Just randomly generate 4 numbers between 0-255 then concatenate them together, that all I do.

blmvxer
2016-09-27, 03:12
I am looking to create sumfin like dis but using PHP, where do u get ur ips from? Cos dats my problem

Here's a basic snippet I made just looking up how to form arrays, generate random numbers, and concatenating the array result using a simple while loop for the individual numbers being generated.



<?php
$x = 0;
$myIP = [];
while($x != 4) {
$a = rand(0, 255);
$myIP[$x] = $a;
$x++;
}
$finalIP = implode(".", $myIP);
echo $finalIP;
?>


Here's a "Working" sample


<?php
while(0 != 1) {
$x = 0;
$myIP = [];
while($x != 4) {
$a = rand(0, 255);
$myIP[$x] = $a;
$x++;
}
$finalIP = implode(".", $myIP);
echo $finalIP;
echo "\n";
$fp = fSockOpen($finalIP, 80, $errno, $errstr, 1);
if($fp) {
$status=0;
echo "Works!\n";
fclose($fp);
} else {
$status=1;
echo "Not working!\n";
}
}
?>


Just an idea to get you started, even though I personally wouldn't use PHP especially with huge nested loops like what I've done in python. It's just too slow and easy to have memory leaking issues

Chunkingz
2016-09-28, 14:45
lol...nice one mate!