jfscan icon indicating copy to clipboard operation
jfscan copied to clipboard

The flag `--nmap-options='-sV'` crashes the tool.

Open its0x08 opened this issue 1 year ago • 4 comments

The tool crashes when --nmap-options flag is used. I'm using Python 3.10 and latest nmap, masscan from github.

/scripts/jfscan# jfscan --top-ports 1000 --nmap --nmap-options='-sV' 123.123.123.0/24
usage: jfscan [-h] [--targets TARGETS] (-p PORTS | --top-ports TOP_PORTS | --yummy-ports) [--resolvers RESOLVERS] [--enable-ipv6] [--scope SCOPE] [-r MAX_RATE] [--wait WAIT] [--disable-auto-rate] [-i INTERFACE]
              [--source-ip SOURCE_IP] [--router-ip ROUTER_IP] [--router-mac ROUTER_MAC] [--router-mac-ipv6 ROUTER_MAC_IPV6] [-oi] [-od] [-o OUTPUT] [-q | -v] [--nmap] [--nmap-options NMAP_OPTIONS]
              [--nmap-threads NMAP_THREADS] [--nmap-output NMAP_OUTPUT] [--version]
              [target]
jfscan: error: incorrect nmap options: 
Segmentation fault

/scripts/jfscan# 

its0x08 avatar Jul 29 '22 19:07 its0x08

Does, for example, command nmap --noninteractive 127.0.0.1 -p 55432 work?

nullt3r avatar Jul 29 '22 19:07 nullt3r

I guess it does.

# nmap --noninteractive 127.0.0.1 -p 55432 
Starting Nmap 7.92SVN ( https://nmap.org ) at 2022-07-30 00:35 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00013s latency).

PORT      STATE  SERVICE
55432/tcp closed unknown

Nmap done: 1 IP address (1 host up) scanned in 0.15 seconds
# 

its0x08 avatar Jul 29 '22 22:07 its0x08

I am unable to reproduce this behaviour, could you try running a (pdb) debugger on the jfscan?

nullt3r avatar Jul 31 '22 11:07 nullt3r

Probably it is an untested version of nmap or masscan that causes the Segmentation fault.

its0x08 avatar Jul 31 '22 14:07 its0x08