angryip / ipscan

Angry IP Scanner - fast and friendly network scanner
angryip.org
GNU General Public License v2.0
4.16k stars 718 forks source link

Bug: MDNS resolve: offset is wrong numQueries == 0 #402

Closed vanvught closed 1 year ago

vanvught commented 1 year ago

There is an offset issue when there are no Questions returned.

https://github.com/angryip/ipscan/blob/d9681b3a1e36a7d1a8faade17ebd5659a969c7ad/src/net/azib/ipscan/util/MDNSResolver.java#L73

When numQueries == 0 , then theoffset = 2 + 2 + 2 + 4 + 2; => 12 + 12 => 24

Schermafbeelding 2023-05-07 om 15 05 33

Schermafbeelding 2023-05-07 om 15 16 26

Good result:

@nuc-i7:~$ avahi-resolve-address 192.168.2.147
192.168.2.147   allwinner_2B0913.local
@nuc-i7:~$ 
vanvught commented 1 year ago

As legacy here is used. This is not a bug.