Nmap Development mailing list archives

Re: Error getting nmap to read hosts from file


From: Robin Wood <robin@digi.ninja>
Date: Tue, 8 Jun 2021 22:23:22 +0100

Not with nmap, but I've seen similar issues with other tools so recognised
that type of error.

Glad it is fixed.

Robin

On Tue, 8 Jun 2021 at 22:21, Kurt Buff <kurt.buff () gmail com> wrote:

Genius.

Notepad said it was UTF-16 LE. I changed it to ASCII and it's working.

This was an export from our SIEM as a CSV in UTF-8, from which I extracted
the hosts with PowerShell and lightly edited with Notepad++. I suppose
somewhere in there it got converted, probably by PowerShell.

Definitely something to keep in mind.

Thank you very much.

Kurt

On Tue, Jun 8, 2021 at 3:05 PM Robin Wood <robin@digi.ninja> wrote:

My money is on file encoding, can you check what encoding the file is
using?

Robin

On Tue, 8 Jun 2021 at 21:51, Kurt Buff <kurt.buff () gmail com> wrote:

All,

I'm getting an error trying to run a simple scan with Nmap, as shown.
Running in a CMD session on Win10 20H2. Scans with Zenmap work when not
using a file, as does Nmap. It's just when trying to use a file that I get
this very strange output. I've upgraded npcap from 1.10 to 1.31, and get
the same behavior out of both.

Am I doing something ignorant/stupid, or have I stumbled upon a bug?
Further information gladly provided.

nmap -iL c:\temp\Hosts.txt
Starting Nmap 7.91 ( https://nmap.org ) at 2021-06-08 14:19 Mountain
Daylight Time
Failed to resolve " ■1".
Failed to resolve "0".
Failed to resolve ".".
Failed to resolve "1".
Failed to resolve ".".
Failed to resolve "2".
Failed to resolve "0".
Failed to resolve ".".
Failed to resolve "2".
Failed to resolve "1".
Failed to resolve "0".
Failed to resolve ".".
Failed to resolve "1".
Failed to resolve ".".
Failed to resolve "2".
Failed to resolve "0".
Failed to resolve ".".
Failed to resolve "1".
Failed to resolve "1".
Failed to resolve "1".
^C

Hosts.txt looks like this:
10.1.20.2
10.1.20.11
10.1.20.114
10.1.20.129
10.1.20.132
10.1.20.139
10.1.20.140
10.1.25.121
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: