Results 1 to 5 of 5

Thread: RandIP(Python or JuliaLang)

  1. #1
    Join Date
    2016-Jul
    Posts
    4

    RandIP(Python or JuliaLang)

    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

  2. #2
    Join Date
    2016-Jan
    Posts
    51
    I am looking to create sumfin like dis but using PHP, where do u get ur ips from? Cos dats my problem

  3. #3
    Join Date
    2016-Jul
    Posts
    4
    Just randomly generate 4 numbers between 0-255 then concatenate them together, that all I do.

  4. #4
    Join Date
    2016-Jul
    Posts
    4
    Quote Originally Posted by Chunkingz View Post
    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.

    Code:
    <?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

    Code:
    <?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
    Last edited by maiki; 2016-09-27 at 08:03. Reason: Merge posts

  5. #5
    Join Date
    2016-Jan
    Posts
    51
    lol...nice one mate!

Similar Threads

  1. PassGen(JuliaLang)
    By blmvxer in forum Project Archive
    Replies: 0
    Last Post: 2016-07-10, 22:21
  2. Eric6 python IDE
    By Swblk in forum General Archive
    Replies: 0
    Last Post: 2015-08-27, 11:47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •