Server IP : 104.244.120.118  /  Your IP : 216.73.216.198
Web Server : Apache
System : Linux ded5817.inmotionhosting.com 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 14:34:46 UTC 2026 x86_64
User : persoanlinjuryla ( 1006)
PHP Version : 8.5.13
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0555) :  /../../opt/dedrads/python/../python/../python/../python/../python/../../../../bin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //../../opt/dedrads/python/../python/../python/../python/../python/../../../../bin/iptab
#!/usr/bin/perl

use Net::IP;
use strict;

print "+----------------------------------------------+
| addrs   bits   pref   class  mask            |
+----------------------------------------------+
";

my ($ip,$size,$class,$bits,$len);

my $ip = new Net::IP('0');

for my $len (reverse (0..32))
{

	$ip->set("0.0.0.0/$len");

	$size = $ip->size();
	
	if ($size >=1048576) # 1024*1024
	{
		$size /= 1048576;
		$size .= 'M';
	}
	elsif ($size >= 1024)
	{
		$size /= 1024;
		$size .= 'K';
	};		
	
	$len = $ip->prefixlen();
	$bits = 32 - $len;
	
	if ($bits >= 24)
	{
		$class = 2**($bits-24);
		$class.= 'A';
	}
	elsif ($bits >= 16)
	{
		$class = 2**($bits-16);
		$class.= 'B';
	}	
	elsif ($bits >= 8)
	{
		$class = 2**($bits-8);
		$class.= 'C';
	}	

	printf ("| %5s %6s %6s %7s  %-15s |\n",
		$size,$bits,'/'.$len,$class,$ip->mask());
	

};

print "+----------------------------------------------+\n";