Track all Wi-Fi connected devices for real-time updates and better network security
Find a file
2024-11-17 14:33:33 -08:00
docs/assets/img Initial release 2024-11-17 14:33:33 -08:00
.gitignore Initial release 2024-11-17 14:33:33 -08:00
conf.yml Initial release 2024-11-17 14:33:33 -08:00
device_data.log Initial release 2024-11-17 14:33:33 -08:00
device_list.log Initial release 2024-11-17 14:33:33 -08:00
README.md Initial release 2024-11-17 14:33:33 -08:00
requirements.txt Initial release 2024-11-17 14:33:33 -08:00
wifeye.py Initial release 2024-11-17 14:33:33 -08:00

Wifeye

Track all Wi-Fi connected devices for real-time updates and better network security. This program works with routers that use 10.0.0.1 as the admin panel, like Xfinity routers.

Installation

virtualenv -p python .venv
source .venv/bin/activate
pip install -r requirements.txt

Usage

python wifeye.py

Configuration

Edit conf.yml:

ADMIN_USERNAME: admin
ADMIN_PASSWORD: Password
REFRESH_TIME: 10
  • ADMIN_USERNAME: Username for the router's admin panel
  • ADMIN_PASSWORD: Password for the router's admin panel
  • REFRESH_TIME: How often the data refreshes (in seconds)

Log Files

  1. device_data.log saves the status of all devices every time it refreshes. Each record has the time and details about each device.

Example:

{
  "timestamp": "2024-01-01 00:00:00",
  "data": [
    {
      "name": "phone",
      "online": true,
      "ip_type": "DHCP",
      "rssi": -40,
      "network": "Wi-Fi 5G",
      "frequency": 5000,
      "distance": 0.02,
      "device_info": {
        "ipv4_address": "10.0.0.2",
        "ipv6_address": "1111:000:ffff:0000:0000:000:0000:1111",
        "local_link_ipv6_address": "fe80::1111:0000:ffff:1111",
        "mac_address": "01:00:01:00:00:01"
      }
    },
    {
      "name": "laptop",
      "online": false,
      "ip_type": null,
      "rssi": null,
      "network": null,
      "frequency": null,
      "distance": null,
      "device_info": {
        ...
      }
    }
  ]
}
{
  "timestamp": "2024-01-01 00:01:00",
  "data": [
    {
      ...
Key Description
timestamp Date and time of the log (YYYY-MM-DD HH:mm:ss)
data Array of device objects
name Device name (e.g., "Phone")
online Connection status (true for online, false for offline)
ip_type Type of IP allocation (e.g., "DHCP" or "Reserved")
rssi Signal strength (dBm)
network Wi-Fi network name (e.g., "Wi-Fi 5G" or "Wi-Fi 2.4G")
frequency Wi-Fi frequency in MHz
distance Distance to the router in meters.
The distance is equal to ten raised to the power of the fraction where the numerator is 30 minus the received signal strength indicator (RSSI) minus twenty times the base ten logarithm of the frequency minus 32.44, and the denominator is 20.
device_info Detailed device information, including:
ipv4_address Assigned IPv4 address
ipv6_address Assigned IPv6 address
local_link_ipv6_address Local link IPv6 address
mac_address Device MAC address
  1. device_list.log keeps a list of all unique devices and tracks when they go online or offline, including the time of each change.

Example:

{
  "timestamp": "2024-01-01 00:00:00",
  "name": "phone",
  "online": true
}
{
  "timestamp": "2024-01-01 00:01:00",
  "name": "phone",
  "online": false
}