Monday, July 23, 2018

Random ip address generator perl

Here's a simple perl script for generation of  random addresses that could come in handy. I'm working on a anomymizer tool and figure I would use some of  the perl scripting skills







Here's a final  built perl script that  generates  random networks values

#!/usr/bin/perl

#  kfelix    1plus1rq2.com  kfelix socpuppets.com
#
# for testing  purpose 
#-------------------------------
#print rand(), "\n";
#print rand(10), "\n";
#
# ------------------------------

$minimum = 1 ;
$maximum = 254 ;

$minimum0 = 0 ;

$ran_numA = int( $minimum  + rand( $maximum - $minimum ));
$ran_numB = int( $minimum0  + rand( $maximum - $minimum ));
$ran_numC = int( $minimum0  + rand( $maximum - $minimum ));
$ran_numD = int( $minimum0  + rand( $maximum - $minimum ));

#print $minimum 
print $ran_numA,".", $ran_numB,".", $ran_numC, ".",$ran_numD,  "\n"  ;





With  GDPR compliancy issues with privacy  and other agencies like mil/gov, the need to  random or purge data files of  sensitive information can come in handy.








NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o
        /  \
  

No comments:

Post a Comment