21y4d / nmapAutomator

A script that you can run in the background!
MIT License
2.67k stars 790 forks source link

Support specifying more than one target at the same time #44

Closed caribpa closed 3 years ago

caribpa commented 3 years ago

Due to the fact that the purpose of this tool is automation, it would be a good idea to allow specifying more than one target.

To achieve this, I think that the way the script is called should be modified to the following:

# The -H/--host flag is dropped as flags usually enable optional functionality
$ ./nmapAutomator.sh --type All 10.1.1.1

# So that the following is possible:
$ ./nmapAutomator.sh --type All 10.1.1.1 10.1.1.123

# As well as:
$ ./nmapAutomator.sh --type All 10.1.1.1 academy.htb

nmap recognizes more than one target (and subnets), so extending these capabilities to the base functionality of the script are a good idea.

21y4d commented 3 years ago

Yeah i'm planning to add this along with the --remote feature, as in remote scanning you'd first need to find live hosts. I don't want to break legacy support, so i don't want to change the way the script is called.

Instead, i'm planning to add a type called network or something similar, and the script will add /24 for the network nmap scan.

caribpa commented 3 years ago

I understand that, I think that simply changing the order of the flags can work for implementing what I'm suggesting without breaking legacy compatibility, so:

$ ./nmapAutomator.sh --type All --host 10.1.1.1

# Instead of
$ ./nmapAutomator.sh --host 10.1.1.1 --type All

And, to top that, the --host flag could be made optional (so compatibility with the older script is there).

21y4d commented 3 years ago

I've added this as an upcoming feature, so that we can start working on it. I'm closing the issue to keep the repo clean.