lopes / netbox-scanner

A scanner util for NetBox
MIT License
165 stars 40 forks source link

error when executing nmap-scan.sh #34

Open andrewm659 opened 3 years ago

andrewm659 commented 3 years ago

I am trying to run this as the netbox user. Should I be doing this with root or another user w/ sudo privileges? I am running this on AlmaLinux 8.4.

[ameyer@dcim001 samples]$ sudo su - netbox
Last login: Thu Oct 21 11:28:28 CDT 2021 on pts/0
[netbox@dcim001 ~]$ cd netbox-scanner-2/samples/
[netbox@dcim001 samples]$ sh nmap-scan.sh
nmap-scan.sh: line 19: NETWORKS: command not found
Traceback (most recent call last):
  File "../netbox-scanner.py", line 80, in <module>
    cmd_nmap(scanner)
  File "../netbox-scanner.py", line 55, in cmd_nmap
    h.run()
  File "/opt/netbox-3.0.7/netbox-scanner-2/nbs/nmap.py", line 13, in run
    for f in os.listdir(self.path):
FileNotFoundError: [Errno 2] No such file or directory: 'samples/nmap'
tar: *.xml: Cannot stat: No such file or directory
tar (child): Cannot connect to nmap-21.10.21T11: resolve failed
tar: Child returned status 128
tar: Error is not recoverable: exiting now
[netbox@dcim001 samples]$
snok87 commented 2 years ago

You need to launch it from previous folder.