AleksaMCode / Preferred-Network-List-Sniffer

A reconnaissance tool for capturing and displaying SSIDs from device's Preferred Network List.
MIT License
139 stars 7 forks source link

[BUG] Non-ASCII SSIDs invokes unhandled `UnicodeDecodeError` #4

Closed AleksaMCode closed 8 months ago

AleksaMCode commented 8 months ago

Is there an existing issue for this?

System information

  1. Kali Linux
  2. 2023.3
  3. Raspberry Pi 4

Actual Behavior

If during the sniffing, the captured SSID has non-ASCII characters or to be more specific, if the characters are not UTF-8, the UnicodeDecodeError will be raised. The Error is not handled, which causes the thread to terminate.

Expected Behavior

Ignore those SSIDs and continue sniffing.

Steps To Reproduce

  1. Start the Redis server
  2. Start the Web server
  3. Start the React server
  4. Start the sniffer
  5. Wait for the SSID with Non-ASCII characters to be captured.

Anything else?

Here is a screenshot of the error. Screenshot_2023-12-15_22-46-25

AleksaMCode commented 8 months ago

Due to the recent merge (#3), the sniffing will now continue, or it will be restarted after the capture of aforementioned SSID. However, the Error is not handled inside the sniffing Thread, which will cause it to abruptly terminate. I'll add the handle in the parsing function parse_ip_packet() which will just ignore those SSIDs.