GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How easy (or hard) would this be to code? (https://gfy.com/showthread.php?t=458651)

Dirty F 04-21-2005 08:05 PM

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 04-21-2005 08:10 PM

icq me

8char

Babaganoosh 04-21-2005 08:13 PM

Don't pay for that. It's a 2 minute job for any competent programmer.

Dirty F 04-21-2005 08:14 PM

Done, thanks

darnoth 04-21-2005 08:17 PM

Quote:

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.

Dirty F 04-21-2005 08:19 PM

Quote:

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.

Babaganoosh 04-21-2005 08:21 PM

Perl is sexy.

INDK 04-28-2005 01:28 AM

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


Dynamix 04-28-2005 02:01 AM

You ever get that software written?

Dynamix 04-28-2005 02:32 AM

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

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

$5 submissions 04-29-2005 03:47 AM

Quote:

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

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

Hmmm nice!

Dirty F 04-29-2005 04:11 AM

Oh wow, thanks.

Dragon Curve 04-29-2005 06:46 AM

Scrap that. Wasn't clear on what he wanted.

Dalai lama 04-29-2005 06:48 AM

Quote:

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

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

Thanks for that


All times are GMT -7. The time now is 02:14 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123