/
usr
/
local
/
bin
/
/usr/local/bin
mkdir
upload
Name
Size
Mode
Actions
config_data
7138
0555
edit
dl
rm
crc32
1043
0555
edit
dl
rm
crontab
3320736
0755
edit
dl
rm
drush
6138646
0755
edit
dl
rm
drush.phar
6138646
0755
edit
dl
rm
ea-php72
5815400
0755
edit
dl
rm
ea-php73
5647288
0755
edit
dl
rm
ea-php74
6383296
0755
edit
dl
rm
ea-php80
7986080
0755
edit
dl
rm
ea-php81
8098952
0755
edit
dl
rm
ea_convert_php_ini
40811
0755
edit
dl
rm
ea_current_to_profile
11519
0755
edit
dl
rm
ea_install_profile
7274
0755
edit
dl
rm
ea_sync_user_phpini_settings
6888
0755
edit
dl
rm
htmltree
1173
0555
edit
dl
rm
instmodsh
4194
0555
edit
dl
rm
ipcount
3724
0555
edit
dl
rm
iptab
982
0555
edit
dl
rm
json_pp
3828
0555
edit
dl
rm
json_xs
7013
0555
edit
dl
rm
lsphp
937
0755
edit
dl
rm
lwp-download
8635
0555
edit
dl
rm
lwp-dump
2797
0555
edit
dl
rm
lwp-mirror
2478
0555
edit
dl
rm
lwp-request
15059
0555
edit
dl
rm
mech-dump
4623
0555
edit
dl
rm
passwd
3768664
0755
edit
dl
rm
pear
935
0755
edit
dl
rm
php
933
0755
edit
dl
rm
php-config
6384
0755
edit
dl
rm
prove
13457
0555
edit
dl
rm
ptar
3456
0555
edit
dl
rm
ptardiff
2535
0555
edit
dl
rm
ptargrep
4299
0555
edit
dl
rm
shasum
9287
0555
edit
dl
rm
tpage
8923
0555
edit
dl
rm
ttree
39234
0555
edit
dl
rm
wp
6928461
0755
edit
dl
rm
wp-cli.phar
6928461
0755
edit
dl
rm
zipdetails
48366
0555
edit
dl
rm
Edit:
/usr/local/bin/ipcount
(3724B)
#!/usr/bin/perl -w eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}' if 0; # not running under some shell # Copyright (c) 2000 RIPE NCC # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permission notice appear in # supporting documentation, and that the name of the author not be # used in advertising or publicity pertaining to distribution of the # software without specific, written prior permission. # # THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING # ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL # AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #------------------------------------------------------------------------------ # Module Header # Filename : ipcount.pl # Purpose : IP addresses calculator # Author : Manuel Valente <manuel.valente@gmail.com> # Date : 20000329 # Description : # Language Version : Perl 5 # OSs Tested : BSDI 3.1 # Command Line : # Input Files : # Output Files : # External Programs : Net::IP.pm # Problems : # To Do : # Comments : # $Id: ipcount,v 1.3 2002/10/15 09:18:14 manuel Exp $ #------------------------------------------------------------------------------ use strict; use Math::BigInt; use Net::IP qw(:PROC); use Getopt::Std; my %opts; getopts ('rd:',\%opts); scalar (@ARGV) < 1 and usage(); my $arg = join '',@ARGV; $arg =~ s/\s+//g; my $ip = new Net::IP($arg) or die ("Cannot create IP object $arg: ".Error()); my @list = $ip->find_prefixes() or die ($ip->error()); # Cut down the supplied range in smaller prefixes if ($opts{d}) { if (scalar(@list) > 1) { $ip->set ($list[0]) or die (Error()); warn ("\nWarning: The supplied Range does not fit in one single prefix.\n"); warn ("I will use the first prefix only (".$ip->print.")\n\n"); } my $size = new Math::BigInt (2); $size = $size->bpow (ip_iplengths($ip->version) - $opts{d}) - 1; my $current = new Net::IP($ip->ip); my $last = new Net::IP($ip->last_ip); my $new_ip = new Net::IP(0); my $count; while ($current->bincomp ('lt', $last)) { $new_ip->set($current->last_ip.'+'.$size) or die (Error()); print $new_ip->print,"\n"; if ($opts{r}) { print $new_ip->reverse_ip,"\n"; } $current->set($new_ip->last_ip .'+ 1') or die (Error()); $count++; } printf ("\nFound %s /%ss in %s\n\n",$count, $opts{d}, $ip->print); exit; } my ($addr,@pr,$tot); foreach (@list) { $addr = new Net::IP ($_) or die ("Cannot create IP object $_: ".Error()); printf ("%18s %15s - %-15s [%s]\n",$addr->print(),$addr->ip(),$addr->last_ip(), $addr->size()); if ($opts{r}) { print $addr->reverse_ip,"\n"; } $tot += $addr->size(); push (@pr,'/'.$addr->prefixlen()); }; if (scalar(@list) > 1) { print "\n"; printf ("%18s %15s - %-15s [%s]\n",$ip->ip().(join ',',@pr),$ip->ip(),$ip->last_ip(),$tot); }; # Print usage and die sub usage { print " Usage: ipcount [-r] [-d <prefix>] address -r: Print Reverse Ranges -d <prefix>: Cut down the original prefix in several prefixes The address range can be one of: ipcount IP + size ipcount IP1 - IP2 ipcount IP/len "; exit (1); };
Save
cmd:
run