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] ASGI server incorrect handle of Redis connection #12

Closed AleksaMCode closed 8 months ago

AleksaMCode commented 8 months ago

Is there an existing issue for this?

Description

When the server is started, it doesn't create a connection to the Redis server by default. The connection to Redis is created when a subscriber connects, but not when a publisher connects.

System information

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

Actual Behavior

Expected Behavior

Connection to Redis server needs to be created when the ASGI server is first started.

Steps To Reproduce

  1. Start the Redis server
  2. Start the ASGI server
  3. Start the Sniffer

Anything else?

Here is a screenshot of the error. Screenshot_2023-12-18_03-52-13

The connection object is None due to the fact the Redis connection was never created.

AleksaMCode commented 8 months ago

Also, due to this bug there is another problem.

Description

When the server is started, it doesn't create a connection to the Redis server by default. The connection to Redis is created when a subscriber connects, but not when a publisher connects. This means, that if the web application is started after running ASGI server without running Redis server, it will display a toast notification that it has connected to the server, after which the ASGI server will fail to handle Exceptions.

Actual Behavior

Expected Behavior

Steps To Reproduce

  1. Start the Redis server
  2. Start the React server

Anything else?

Here is a screenshot of the error. Screenshot_2023-12-18_03-48-24 Screenshot_2023-12-18_03-47-39