How easy (or hard) would this be to code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dirty F
    Too lazy to set a custom title
    • Jul 2001
    • 59204

    #1

    How easy (or hard) would this be to code?

    I guess in php.

    The program grabs ips from a text file and does this:

    12.108.24.0 12.108.24.255
    12.106.223.0 12.106.223.255
    12.104.79.0 12.104.79.255

    etc. It makes a range from 0 to 255 for each ip on a new line.

    Is this simple to do?

    Anybody can do it for some paypal or epass $?
  • SicChild
    Confirmed User
    • Mar 2003
    • 365

    #2
    icq me

    8char

    Comment

    • Babaganoosh
      ♥♥♥ Likes Hugs ♥♥♥
      • Nov 2001
      • 15841

      #3
      Don't pay for that. It's a 2 minute job for any competent programmer.
      I like pie.

      Comment

      • Dirty F
        Too lazy to set a custom title
        • Jul 2001
        • 59204

        #4
        Done, thanks

        Comment

        • darnoth
          Confirmed User
          • Jan 2005
          • 105

          #5
          Originally posted by Franck
          I guess in php.

          The program grabs ips from a text file and does this:

          12.108.24.0 12.108.24.255
          12.106.223.0 12.106.223.255
          12.104.79.0 12.104.79.255

          etc. It makes a range from 0 to 255 for each ip on a new line.

          Is this simple to do?

          Anybody can do it for some paypal or epass $?
          #!/usr/bin/perl

          use strict ;

          open (FILE, "NAMEOFFILE") ;
          my @buf = <FILE> ;
          close (FILE) ;

          foreach my $item (@buf) {
          chomp $item ;
          my ($one,$two,$three) = split (/\./, $item) ;
          for my $i (0 .. 255) {
          print "$one.$two.$three.$i\n" ;
          }
          }

          Change NAMEOFFILE to whatever the file is that has your IP's listed.
          IP's should be in the form of:
          1.1.1.1
          2.2.2.2
          3.3.3.3

          Etc. If you have a question let me know.

          Comment

          • Dirty F
            Too lazy to set a custom title
            • Jul 2001
            • 59204

            #6
            Originally posted by darnoth
            #!/usr/bin/perl

            use strict ;

            open (FILE, "NAMEOFFILE") ;
            my @buf = <FILE> ;
            close (FILE) ;

            foreach my $item (@buf) {
            chomp $item ;
            my ($one,$two,$three) = split (/\./, $item) ;
            for my $i (0 .. 255) {
            print "$one.$two.$three.$i\n" ;
            }
            }

            Change NAMEOFFILE to whatever the file is that has your IP's listed.
            IP's should be in the form of:
            1.1.1.1
            2.2.2.2
            3.3.3.3

            Etc. If you have a question let me know.
            Thanks a lot. Sicchild is making one for me though.

            Comment

            • Babaganoosh
              ♥♥♥ Likes Hugs ♥♥♥
              • Nov 2001
              • 15841

              #7
              Perl is sexy.
              I like pie.

              Comment

              • INDK
                Confirmed User
                • Jan 2004
                • 75

                #8
                Here's my Ruby version, just for the hell of it ;)

                Code:
                IO.foreach('ips.txt') do |line|
                   match = line.sub(/^(\d+\.\d+\.\d+)\.\d+$/, '\1').chomp
                   for i in 0..255
                      print match, ".#{i}\n"
                   end
                end

                Comment

                • Dynamix
                  G F Y not
                  • Jan 2004
                  • 2910

                  #9
                  You ever get that software written?

                  TGPFactory Full TGP Design & Installation Services
                  ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com
                  See who I am at AdultWhosWho.com!

                  Comment

                  • Dynamix
                    G F Y not
                    • Jan 2004
                    • 2910

                    #10
                    Got bored so I threw one together.

                    It loads a source file, removes any duplicates, verifies that each entry is only numbers and periods, then generates a new list based upon the range you supply.

                    Will require VB dependencies MSVBVM60.DLL and COMDLG32.OCX which most of you probably have already anyhow.

                    http://www.dynamixxx.com/complete/software/ipRange.exe


                    TGPFactory Full TGP Design & Installation Services
                    ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com
                    See who I am at AdultWhosWho.com!

                    Comment

                    • $5 submissions
                      I help you SUCCEED
                      • Nov 2003
                      • 32195

                      #11
                      Originally posted by Dynamix
                      Got bored so I threw one together.

                      It loads a source file, removes any duplicates, verifies that each entry is only numbers and periods, then generates a new list based upon the range you supply.

                      Will require VB dependencies MSVBVM60.DLL and COMDLG32.OCX which most of you probably have already anyhow.

                      http://www.dynamixxx.com/complete/software/ipRange.exe

                      Hmmm nice!

                      Comment

                      • Dirty F
                        Too lazy to set a custom title
                        • Jul 2001
                        • 59204

                        #12
                        Oh wow, thanks.

                        Comment

                        • Dragon Curve
                          Confirmed User
                          • Oct 2002
                          • 252

                          #13
                          Scrap that. Wasn't clear on what he wanted.
                          Last edited by Dragon Curve; 04-29-2005, 05:48 AM.

                          Comment

                          • Dalai lama
                            Strength and Honor
                            • Jul 2004
                            • 16540

                            #14
                            Originally posted by Dynamix
                            Got bored so I threw one together.

                            It loads a source file, removes any duplicates, verifies that each entry is only numbers and periods, then generates a new list based upon the range you supply.

                            Will require VB dependencies MSVBVM60.DLL and COMDLG32.OCX which most of you probably have already anyhow.

                            http://www.dynamixxx.com/complete/software/ipRange.exe

                            Thanks for that

                            A program you can trust.
                            Gallerybooster Run multiply TGPs of 1 script

                            Comment

                            Working...