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

Replaced function packlen with packsize in knx-gateway-discover script #2727



Copy link

@f0rw4rd f0rw4rd commented Oct 23, 2023

This a patch for a bug in the knx-gateway-discover script and it fails because the function packlen does not exists in Line 96.

Nmap version used:

Nmap version 7.94 ( )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.4.6 openssl-3.1.2 libssh2-1.11.0 libz-1.3 libpcre-8.45 libpcap-1.10.4 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select

The fix was tested against a KNX setup:

NSE: Starting knx-gateway-discover.
NSE: Finished knx-gateway-discover.
Completed NSE at 07:13, 3.20s elapsed
Pre-scan script results:
| knx-gateway-discover: 
|     Header: 
|       Header length: 6
|       Protocol version: 16
|       Service type: SEARCH_RESPONSE (0x0202)
|       Total length: 78
|     Body: 
|       HPAI: 
|         Protocol code: 01
|         IP address:
|         Port: 3671
|       DIB_DEV_INFO: 
|         Description type: Device Information
|         KNX medium: KNX TP1
|         Device status: 00
|         KNX address: 15.15.15
|         Project installation identifier: 0000
|         Decive serial: 00010052178f
|         Multicast address:
|         Device MAC address: 00:0e:8c:00:b9:d7
|         Device friendly name: IP-Schnittstelle Secure 
|         KNXnet/IP Core version 2
|         KNXnet/IP Device Management version 2
|         KNXnet/IP Tunnelling version 2
|_        KNXnet/IP Remote Configuration and Diagnosis version 1
NSE: Script Post-scanning.
NSE: Starting runlevel 1 (of 1) scan.
Initiating NSE at 07:13
Completed NSE at 07:13, 0.00s elapsed

The script fails because the function packlen does not exist.
Copy link

Jimmei22 commented Oct 23, 2023 via email

Copy link

Committed as r38737. Thank you for contributing to Nmap!

@nmap-bot nmap-bot closed this in 6814bc4 Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants