Crates.io | fritzbox_logs |
lib.rs | fritzbox_logs |
version | 0.2.0 |
source | src |
created_at | 2017-11-24 23:10:40.267861 |
updated_at | 2017-11-25 15:17:36.281123 |
description | A fritz-box logs parsing library |
homepage | |
repository | https://github.com/mexus/fritzbox-logs |
max_upload_size | |
id | 40428 |
size | 25,280 |
A library that aims to parse logs from a Fritz!Box routers.
This crate as a library is basically a function that loads a text log into memory in a structured manner.
To load the current logs from your fritz!box router you can use a simple python module like fritzconnection. Here's a one-liner for it (on linux):
% python -c "from fritzconnection import FritzConnection; \
from getpass import getpass; \
conn = FritzConnection(password=getpass()); \
logs = conn.call_action('DeviceInfo:1', 'GetDeviceLog'); \
print(logs['NewDeviceLog'])" > logs.txt
It will ask you for your password (i.e. the one you enter to access the router via web browser) and save all available logs to the 'logs.txt' file.
Well, I used to have some serious issues with my ISP and I needed to run some logs analysis. First of all, I've discovered that this router doesn't have a persistent storage for its logs (sick). I never expected anything like that, seriously. Second of all, I had to do the analysis by hand (like how often a recconection happen). So I realized that I have to make my own way out of the XVIII century and created this simple tool. (Un)fortunately I didn't have to examine the logs since I've started to work on the tool so it's development is not running as fast anymore and I haven't implemented any real analysis so far, but I totally realize it is only a matter of time when I need it again, so I'll be working on the crate until it provides some basic statistics functions at the very least.