how can i choose a particular process to run in perl
Is there a command or function that i can create to choose to run anyone of these nmap scans that i desire instead of how my code runs now, which is the first ip address scanning and the rest follow?
Here is my code:
(`nmap -v -r 99.xxx.xxx -p 1-200`);
(`nmap -v -r 98.xxx.xxx -p 1-200`);
(`nmap -v -r 96.x开发者_开发技巧xx.xxx -p 1-200`);
You need to use @ARGV
:
system("nmap -v -r $ARGV[0] -p 1-200");
And call your script with the address in the CLI argument, such as perl foo.pl 99.1.1.1
精彩评论