Skip to main content

Crate fritz_core

Crate fritz_core 

Source
Expand description

FRITZ!Box specific logic on top of the vendor-neutral tr064 crate: session login, access policy, redaction and fixture anonymization.

Unofficial, not affiliated with FRITZ! GmbH.

Modulesยง

anonymize
Turning raw captures into fixtures that can be published.
cache
A cache of the service descriptions (SCPDs) of devices, so that a run only fetches the device description.
callmonitor
The call monitor of the device: a TCP stream on port 1012 with a line per event of a call, like 23.11.26 18:02:11;RING;0;030987;030123;SIP0;. It needs no login. Nothing is sent to it.
capabilities
What a device offers and what its user may do there.
capture
What fritz capture reads from a device, and what it leaves alone.
config
The configuration file: named profiles with the address of a device, the user, the trusted certificate and optionally a command that prints the password. Passwords never go here, see secrets.
connection
Where and how to connect: the device address, the user and the trusted certificate, from a profile and the overrides of the command line or the environment.
diagnose
Diagnoses a host end to end: whether the device knows it and sees it connected, its address, its link and the mesh node it is attached to, whether its name resolves to that address on this machine, and whether its TCP ports answer. router checks the device itself.
dirs
Where fritz keeps its files. On Linux and macOS these are the XDG base directories, like on most command line tools: ~/.config/fritz and ~/.local/state/fritz, or below $XDG_CONFIG_HOME and $XDG_STATE_HOME. On Windows they are the usual ones below %APPDATA% and %LOCALAPPDATA%.
discover
Finds FRITZ! routers and repeaters on the local network: at the addresses of the configured host and the default gateway, through an SSDP search, and at well-known default addresses.
dns
Why a name does or does not resolve: the view of the router (its local domain, the DNS servers it hands out and its host table), the answers of the DNS server of the router and of the resolver of this machine, the resolver configuration of this machine, and a verdict that names the likely cause.
doctor
The checks of the setup: their results, and the rules that need no device, like which rights the commands need.
dsl
The DSL line in detail: its values, its error counters and the result of the last line diagnosis, through actions that only read. Starting a diagnosis is a write and not done here.
exposure
What of the home network can be reached from the internet or managed from outside: remote access, MyFRITZ, dynamic DNS, port forwardings, an exposed host, UPnP, FTP from the internet, shared links, VPN, provider management (TR-069) and USP controllers.
fault
The faults of a FRITZ!Box that are about the user, not the action: a missing right, and the second factor some actions need.
firmware
The firmware of a device: the installed version, the update the device offers, automatic updates and the last update, read with the getters of DeviceInfo and UserInterface only.
generic
Generic access to the services of a device: describing their actions and calling those that only read. Every call is checked against the policy before anything is sent, and its answer is redacted.
host
One host, found by its MAC or IP address or by its name, with all the device knows about it: the entry of the host, the host list and the mesh.
identity
Which device is which: an identity that stays the same across addresses and firmware updates, and the lists of devices that may and may never be changed.
interfaces
The counters of the LAN interfaces and the wireless networks, and the LAN ports of the web interface, through actions and requests that only read.
lists
The list documents of a device, fetched at the paths actions like X_AVM-DE_GetHostListPath return: the hosts as XML and the mesh as JSON.
personal
The personal lists of a device: the calls, the phonebooks and the event log. They name people, numbers and devices, so they are only read on request.
policy
Which actions fritz may call.
ports
The port forwardings of a device and whether hosts may open ports themselves through UPnP.
powerline
The powerline adapters a device knows, read with the getters of X_AVM-DE_Homeplug only.
read
Reading a device: calls of actions that only read, through generic::call, with the service descriptions read once.
redact
Hiding secrets in the values a device returns, before they are shown or stored.
secrets
Passwords: from the environment, from a command like the one of a password manager, or from the keychain of the operating system (macOS Keychain, Windows Credential Manager, Secret Service on Linux). Never from files or the command line.
session
The session of the web interface, which the Smart Home REST API needs: a login with login_sid.lua and a session ID that stays in memory.
settings
Settings of the device, read through the REST API of the web interface with a Session: /api/v0/generic/<module> answers with the settings of a module, like ipv6 or dnscfg, as JSON.
smarthome
Smart Home devices, read through the REST API of the web interface (FRITZ!OS 8.20 and later) with a Session.
status
The state of a device, read through actions that only read: an overview, the hosts, the mesh and the internet connection. The wireless networks are in crate::wlan.
system
The load of the device: CPU load, CPU temperature and memory, read from the page ecoStat of the web interface, which shows the energy monitor and the system load, with a Session.
telephony
The telephony of a device: its numbers and internet telephony accounts, call deflections, answering machines and DECT handsets. Not the calls and the phonebook, which are personal.
traffic
The traffic of the internet connection: the current rates, how much of the line they use, the split by priority and multicast, and the byte and packet counters, read with the getters of WANCommonInterfaceConfig only.
users
The users of a device and how its login is protected, read with the getters of LANConfigSecurity and X_AVM-DE_Auth only.
wlan
The wireless networks of a device: their state, whether they are the guest network, and, when asked for, their clients and details, and what a device needs to join one.