nmmapper / python3-nmap

A python 3 library which helps in using nmap port scanner. This is done by converting each nmap command into a callable python3 method or function. System administrators can now automatic nmap scans using python
https://www.nmmapper.com/sys/networkmapper/nmap/online-port-scanning/
GNU General Public License v3.0
277 stars 73 forks source link

how can i pass multiple args #18

Closed tbaror closed 3 years ago

tbaror commented 4 years ago

Hi, I am trying to run multiple args but seems not gettings all args ,shown below nmap.nmap_version_detection("192.168.1.10",args="-O -p- --script=freevulnsearch.nse")

Please advice Thanks

nmmapper commented 4 years ago

Then there is a bug there, the main bug could be that we don't parse the results of all arguments. We only parse and return nmap_version_detection, but not --script. We need to fix that.

starnightcyber commented 3 years ago

Same question! I think you'd better define a kind of 'normal' function to accept args like scan() in python-nmap. Using quit a few args is very common when using nmap.

import nmap
nm = nmap.PortScanner()
nm.scan(ip, '80, 445', '-v -n -sS -T4 -Pn')
nmmapper commented 3 years ago

That's a great Idea, you can open a pull request

starnightcyber commented 3 years ago

I need to figure out how you did in python-nmap first. It will take some time.