Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broadcast-dhcp-discover threw an error #1909

Open
Spongman opened this issue Feb 6, 2020 · 2 comments
Open

broadcast-dhcp-discover threw an error #1909

Spongman opened this issue Feb 6, 2020 · 2 comments
Labels
NSE

Comments

@Spongman
Copy link

@Spongman Spongman commented Feb 6, 2020

$ sudo nmap -v -d --script broadcast-dhcp-discover

Starting Nmap 7.40 ( https://nmap.org ) at 2020-02-06 12:25 PST
PORTS: Using top 1000 ports found open (TCP:1000, UDP:0, SCTP:0)
--------------- Timing report ---------------
  hostgroups: min 1, max 100000
  rtt-timeouts: init 1000, min 100, max 10000
  max-scan-delay: TCP 1000, UDP 1000, SCTP 1000
  parallelism: min 0, max 0
  max-retries: 10, host-timeout: 0
  min-rate: 0, max-rate: 0
---------------------------------------------
NSE: Using Lua 5.3.
NSE: Arguments from CLI:
NSE: Loaded 1 scripts for scanning.
NSE: Script Pre-scanning.
NSE: Starting runlevel 1 (of 1) scan.
Initiating NSE at 12:25
NSE: Starting broadcast-dhcp-discover.
NSE: broadcast-dhcp-discover threw an error!
/usr/bin/../share/nmap/nselib/stdnse.lua:87: bad argument #2 to 'format' (number expected, got nil)
stack traceback:
        [C]: in function 'string.format'
        /usr/bin/../share/nmap/nselib/stdnse.lua:87: in function 'stdnse.debug'
        (...tail calls...)
        /usr/bin/../share/nmap/nselib/dhcp.lua:525: in function 'dhcp.dhcp_parse'
        /usr/bin/../share/nmap/scripts/broadcast-dhcp-discover.nse:132: in function </usr/bin/../share/nmap/scripts/broadcast-dhcp-discover.nse:113>

NSE: Finished broadcast-dhcp-discover.
Completed NSE at 12:25, 4.24s elapsed
NSE: Script Post-scanning.
NSE: Starting runlevel 1 (of 1) scan.
Initiating NSE at 12:25
Completed NSE at 12:25, 0.00s elapsed
Read from /usr/bin/../share/nmap: nmap-services.
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 5.99 seconds
           Raw packets sent: 0 (0B) | Rcvd: 0 (0B)

@Spongman

This comment has been minimized.

Copy link
Author

@Spongman Spongman commented Feb 6, 2020

here's the fix: dhcp.lua, line 647

    -- Check for termination condition
    if(option == 0xFF or option == nil) then
      break;
    end
@nnposter

This comment has been minimized.

Copy link

@nnposter nnposter commented Feb 9, 2020

Nmap 7.40 is over 3 years old. Can you reproduce the issue with 7.80?

@nnposter nnposter added the NSE label Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.