Allows FritzBox device detection, monitoring, configuring and packet capturing.
Available as a standalone Windows application (UI) and as a NuGet package (API).
For a list of implemented services check the Service implementation status
A Windows .NET WPF application for x64 and ARM64.
A NuGet package to manage FritzBox devices using pure WCF calls.
using System.Net;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using RS.Fritz.Manager.API;
// Register the Fritz services in the dependency container using AddFritzApi()
using IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices((_, services) => services.AddFritzApi())
.Build();
using IServiceScope serviceScope = host.Services.CreateScope();
// Search for routers and take the first one
IDeviceSearchService deviceSearchService = serviceScope.ServiceProvider.GetRequiredService<IDeviceSearchService>();
InternetGatewayDevice device = (await deviceSearchService.GetDevicesAsync()).First();
// Show the device model from UPnP data
Console.WriteLine($"Device model: {device.UPnPDescription.Device.ModelDescription}");
// Initialize the device for TR-064, retrieves the security port and the users
await device.InitializeAsync();
// Provide the password for the last logged on user
string lastUsedUserName = device.Users.Single(q => q.LastUser).Name;
Console.WriteLine($"Enter password for {lastUsedUserName}:");
device.NetworkCredential = new NetworkCredential(lastUsedUserName, Console.ReadLine());
// TR-064 example; show the device uptime from the TR-064 DeviceInfo service
DeviceInfoGetInfoResponse deviceInfo = await device.DeviceInfoGetInfoAsync();
Console.WriteLine($"Device uptime: {TimeSpan.FromSeconds(deviceInfo.Uptime)}");
// Special services
// Retrieving the device users manually
IUsersService usersService = serviceScope.ServiceProvider.GetRequiredService<IUsersService>();
IEnumerable<User> users = await usersService.GetUsersAsync(device);
users.ToList().ForEach(q => Console.WriteLine($"User: {q.Name}"));
// Retrieving a list of device hosts in the network
IDeviceHostsService deviceHostsService = serviceScope.ServiceProvider.GetRequiredService<IDeviceHostsService>();
DeviceHostInfo deviceHostInfo = await deviceHostsService.GetDeviceHostsAsync(device);
deviceHostInfo.DeviceHosts.ToList().ForEach(q => Console.WriteLine($"Device host: {q.HostName}"));
// Retrieving a list of mesh hosts in the network
IDeviceMeshService deviceMeshService = serviceScope.ServiceProvider.GetRequiredService<IDeviceMeshService>();
DeviceMeshInfo deviceMeshInfo = await deviceMeshService.GetDeviceMeshAsync(device);
deviceMeshInfo.DeviceMesh.Nodes.ToList().ForEach(q => Console.WriteLine($"Mesh host: {q.DeviceName}"));
// Retrieving a list of WLAN devices in the network
IWlanDeviceService wlanDeviceService = serviceScope.ServiceProvider.GetRequiredService<IWlanDeviceService>();
WlanDeviceInfo wlanDeviceInfo = await wlanDeviceService.GetWlanDevicesAsync(device);
wlanDeviceInfo.WlanDeviceList.Items.ToList().ForEach(q => Console.WriteLine($"WLAN device: {q.AssociatedDeviceIpAddress}"));
// Retrieve a new session for use in the WebUI
IWebUiService webUiService = serviceScope.ServiceProvider.GetRequiredService<IWebUiService>();
WebUiSessionInfo webUiSessionInfo = await webUiService.LogonAsync(device);
Console.WriteLine($"Session: {webUiSessionInfo.Sid}");
// Capture live network traffic from router to file
ICaptureControlService captureControlService = serviceScope.ServiceProvider.GetRequiredService<ICaptureControlService>();
IEnumerable<CaptureInterfaceGroup>? interfaceGroups = await captureControlService.GetInterfacesAsync(device);
CaptureInterface captureInterface = interfaceGroups.First().CaptureInterfaces.First();
var fileInfo = new FileInfo(FormattableString.Invariant($"c:\\temp\\{captureInterface.Name}_{DateTime.Now.ToString("s").Replace(":", string.Empty)}.eth"));
Task.Run(() => StopCaptureAsync(device, captureInterface, TimeSpan.FromSeconds(10), captureControlService));
await captureControlService.StartCaptureAsync(device, fileInfo, captureInterface);
Console.WriteLine($"Network trace written to file: {fileInfo}");
await host.RunAsync();
static async Task StopCaptureAsync(InternetGatewayDevice device, CaptureInterface captureInterface, TimeSpan timeSpan, ICaptureControlService captureControlService)
{
await Task.Delay(timeSpan);
await captureControlService.StopCaptureAsync(device, captureInterface);
}
- πΆ urn:dslforum-org:service:WANIPConnection
- β GetInfo
- β GetConnectionTypeInfo
- β SetConnectionType
- β GetStatusInfo
- β GetNATRSIPStatus
- β SetConnectionTrigger
- β ForceTermination
- β RequestConnection
- β X_GetDNSServers
- β GetPortMappingNumberOfEntries
- β GetGenericPortMappingEntry
- β GetSpecificPortMappingEntry
- β AddPortMapping
- β DeletePortMapping
- β GetExternalIPAddress
- β SetRouteProtocolRx
- β SetIdleDisconnectTime
- πΆ urn:dslforum-org:service:WANPPPConnection
- β GetInfo
- β GetConnectionTypeInfo
- β SetConnectionType
- β GetStatusInfo
- β GetLinkLayerMaxBitRates
- β GetUserName
- β SetUserName
- β SetPassword
- β GetNATRSIPStatus
- β SetConnectionTrigger
- β ForceTermination
- β RequestConnection
- β X_GetDNSServers
- β GetPortMappingNumberOfEntries
- β GetGenericPortMappingEntry
- β GetSpecificPortMappingEntry
- β AddPortMapping
- β DeletePortMapping
- β GetExternalIPAddress
- β SetRouteProtocolRx
- β SetIdleDisconnectTime
- β X_AVM-DE_GetAutoDisconnectTimeSpan
- β X_AVM-DE_SetAutoDisconnectTimeSpan
- β
urn:dslforum-org:service:WANCommonInterfaceConfig
- β GetCommonLinkProperties
- β GetTotalBytesSent
- β GetTotalBytesReceived
- β GetTotalPacketsSent
- β GetTotalPacketsReceived
- β X_AVM-DE_SetWANAccessType
- β X_AVM-DE_GetOnlineMonitor
- β
urn:dslforum-org:service:WANEthernetLinkConfig
- β GetEthernetLinkStatus
- β
urn:dslforum-org:service:WANDSLInterfaceConfig
- β GetInfo
- β GetStatisticsTotal
- β X_AVM-DE_GetDSLDiagnoseInfo
- β X_AVM-DE_GetDSLInfo
- πΆ urn:dslforum-org:service:WANDSLLinkConfig
- β GetInfo
- β SetEnable
- β SetDSLLinkType
- β GetDSLLinkInfo
- β SetDestinationAddress
- β GetDestinationAddress
- β SetATMEncapsulation
- β GetATMEncapsulation
- β GetAutoConfig
- β GetStatistics
- β urn:dslforum-org:service:X_AVM-DE_WANMobileConnection
- πΆ urn:dslforum-org:service:X_AVM-DE_Speedtest
- β GetInfo
- β SetConfig
- β GetStatistics
- β ResetStatistics
- β urn:dslforum-org:service:X_AVM-DE_RemoteAccess
- β urn:dslforum-org:service:X_AVM-DE_MyFritz
- β urn:dslforum-org:service:X_AVM-DE_HostFilter
- πΆ urn:dslforum-org:service:Layer3Forwarding
- β SetDefaultConnectionService
- β GetDefaultConnectionService
- β GetForwardNumberOfEntries
- β AddForwardingEntry
- β DeleteForwardingEntry
- β GetSpecificForwardingEntry
- β GetGenericForwardingEntry
- β SetForwardingEntryEnable
- β urn:dslforum-org:service:X_AVM-DE_OnTel
- β urn:dslforum-org:service:X_AVM-DE_TAM
- β urn:dslforum-org:service:X_VoIP
- πΆ urn:dslforum-org:service:Hosts
- β GetHostNumberOfEntries
- β GetSpecificHostEntry
- β GetGenericHostEntry
- β X_AVM-DE_GetInfo
- β X_AVM-DE_GetChangeCounter
- β X_AVM-DE_GetAutoWakeOnLANByMACAddress
- β X_AVM-DE_SetAutoWakeOnLANByMACAddress
- β X_AVM-DE_SetHostNameByMACAddress
- β X_AVM-DE_WakeOnLANByMACAddress
- β X_AVM-DE_GetSpecificHostEntryByIp
- β X_AVM-DE_HostsCheckUpdate
- β X_AVM-DE_HostDoUpdate
- β X_AVM-DE_SetPrioritizationByIP
- β X_AVM-DE_GetHostListPath
- β X_AVM-DE_GetMeshListPath
- β X_AVM-DE_GetFriendlyName
- β X_AVM-DE_SetFriendlyName
- β X_AVM-DE_SetFriendlyNameByIP
- β X_AVM-DE_SetFriendlyNameByMAC
- πΆ urn:dslforum-org:service:WLANConfiguration
- β SetEnable
- β GetInfo
- β SetConfig
- β SetSecurityKeys
- β GetSecurityKeys
- β SetBasBeaconSecurityProperties
- β GetBasBeaconSecurityProperties
- β GetBSSID
- β GetSSID
- β SetSSID
- β GetBeaconType
- β SetBeaconType
- β GetChannelInfo
- β SetChannel
- β GetBeaconAdvertisement
- β SetBeaconAdvertisement
- β GetTotalAssociations
- β GetGenericAssociatedDeviceInfo
- β GetSpecificAssociatedDeviceInfo
- β X_AVM-DE_GetSpecificAssociatedDeviceInfoByIp
- β X_AVM-DE_GetWLANDeviceListPath
- β X_AVM-DE_SetStickSurfEnable
- β X_AVM-DE_GetIPTVOptimized
- β X_AVM-DE_SetIPTVOptimized
- β GetStatistics
- β GetPacketStatistics
- β X_AVM-DE_GetNightControl
- β X_SetHighFrequencyBand
- β X_AVM-DE_GetWLANHybridMode
- β X_AVM-DE_SetWLANHybridMode
- β X_AVM-DE_GetWLANExtInfo
- β X_AVM-DE_SetWLANGlobalEnable
- β X_AVM-DE_GetWPSInfo
- β X_AVM-DE_SetWPSConfig
- β X_AVM-DE_SetWPSEnable
- β X_AVM-DE_GetWLANConnectionInfo
- πΆ urn:dslforum-org:service:LANHostConfigManagement
- β GetInfo
- β SetDHCPServerEnable
- β SetSubnetMask
- β GetSubnetMask
- β SetIPRouter
- β GetIPRoutersList
- β SetIPInterface
- β GetAddressRange
- β SetAddressRange
- β GetIPInterfaceNumberOfEntries
- β GetDNSServers
- πΆ urn:dslforum-org:service:LANEthernetInterfaceConfig
- β SetEnable
- β GetInfo
- β GetStatistics
- β urn:dslforum-org:service:X_AVM-DE_Dect
- β urn:dslforum-org:service:X_AVM-DE_Media
- β urn:dslforum-org:service:X_AVM-DE_Homeauto
- β urn:dslforum-org:service:X_AVM-DE_Homeplug
- β urn:dslforum-org:service:X_AVM-DE_Storage
- β urn:dslforum-org:service:X_AVM-DE_UPnP
- β urn:dslforum-org:service:X_AVM-DE_WebDAVClient
- β urn:dslforum-org:service:X_AVM-DE_Filelinks
- β
urn:dslforum-org:service:DeviceInfo
- β GetInfo
- β SetProvisioningCode
- β GetDeviceLog
- β GetSecurityPort
- πΆ urn:dslforum-org:service:DeviceConfig
- β GetPersistentData
- β SetPersistentData
- β ConfigurationStarted
- β ConfigurationFinished
- β FactoryReset
- β Reboot
- β X_GenerateUUID
- β X_AVM-DE_GetConfigFile
- β X_AVM-DE_SetConfigFile
- β X_AVM-DE_CreateUrlSID
- β X_AVM-DE_GetSupportDataInfo
- β X_AVM-DE_SendSupportData
- β X_AVM-DE_GetSupportDataEnable
- β X_AVM-DE_SetSupportDataEnable
- β
urn:dslforum-org:service:LANConfigSecurity
- β GetInfo
- β X_AVM-DE_GetAnonymousLogin
- β X_AVM-DE_GetCurrentUser
- β SetConfigPassword
- β X_AVM-DE_GetUserList
- β urn:dslforum-org:service:X_AVM-DE_AppSetup
- β
urn:dslforum-org:service:ManagementServer
- β GetInfo
- β SetManagementServerURL
- β SetManagementServerUsername
- β SetManagementServerPassword
- β SetPeriodicInform
- β SetConnectionRequestAuthentication
- β SetUpgradeManagement
- β X_SetTR069Enable
- β X_AVM-DE_GetTR069FirmwareDownloadEnabled
- β X_AVM-DE_SetTR069FirmwareDownloadEnabled
- β urn:dslforum-org:service:X_AVM-DE_USPController
- β urn:dslforum-org:service:X_AVM-DE_Auth
- β
urn:dslforum-org:service:Time
- β GetInfo
- β SetNTPServers
- β
urn:dslforum-org:service:UserInterface
- β GetInfo
- β X_AVM-DE_CheckUpdate
- β X_AVM-DE_DoPrepareCGI
- β X_AVM-DE_DoUpdate
- β X_AVM-DE_DoManualUpdate
- β X_AVM-DE_GetInternationalConfig
- β X_AVM-DE_SetInternationalConfig
- β X_AVM-DE_GetInfo
- β X_AVM-DE_SetConfig