Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In der FritzBox ist zu sehen, das sich angemeldet wurde.
- 09.02.19
- 20:43:20
- Anmeldung einer App des Benutzers admin von IP-Adresse 192.168.178.230. [2 Meldungen seit 09.02.19 20:22:23]
- Hier der Code:
- #include <Arduino.h>
- #include <ESP8266WiFi.h>
- #include <ESP8266WiFiMulti.h>
- #include <ESP8266HTTPClient.h>
- #include <tr064.h>
- const char* WIFI_SSID = "TKIN"; // <-- ändern
- const char* WIFI_PASSWORD = "GaaaanzGeheim"; // <-- ändern
- const char* USER = "admin";
- const char* PASSWORD = "GaaaanzGeheim"; // <-- ändern
- const char* FRITZBOX_IP = "192.168.178.1";
- const int FRITZBOX_PORT = 49000;
- TR064 tr064_connection(FRITZBOX_PORT, FRITZBOX_IP, USER, PASSWORD);
- const IPAddress STATIC_IP(192, 168, 178, 230);
- const IPAddress GATEWAY(192, 168, 178, 1);
- const IPAddress SUBNET(255, 255, 255, 0);
- const IPAddress DNS(GATEWAY);
- const char DEVICE_NAME[] = "ESPKlingel";
- ESP8266WiFiMulti WiFiMulti;
- void setup() {
- delay(5000);
- WiFiMulti.addAP(WIFI_SSID, WIFI_PASSWORD);
- Serial.begin(115200);
- delay(10);
- Serial.print("Connect Wifi ");
- while ((WiFiMulti.run() != WL_CONNECTED)) {
- delay(50);
- Serial.print(".");
- }
- Serial.println(WiFi.localIP());
- Serial.println("Vor tr064_connection.init() ****************************************************************************");
- tr064_connection.init();
- Serial.println("Nach tr064_connection.init() ****************************************************************************");
- delay(4000);
- Serial.println("Jetzt klingelts ****************************************************************************");
- // Die Telefonnummer **9 ist der Fritzbox-Rundruf.
- String call_params[][2] = { { "NewX_AVM-DE_PhoneNumber", "**9" } };
- String req[][2] = { { } };
- tr064_connection.action("urn:dslforum-org:service:X_VoIP:1",
- "X_AVM-DE_DialNumber", call_params, 1, req, 0);
- Serial.println("Ende Jetzt klingelts ****************************************************************************");
- // Warte vier Sekunden bis zum auflegen
- delay(4000);
- Serial.println("Auflegen ****************************************************************************");
- tr064_connection.action("urn:dslforum-org:service:X_VoIP:1",
- "X_AVM-DE_DialHangup");
- Serial.println("Ende Auflegen ****************************************************************************");
- //ESP.deepSleep(0);
- }
- void loop() {
- }
- ***********************************************************************************************************************
- Hier kommt das Logging:
- Connect Wifi [WIFI] delete old wifi config...
- [WIFI] start scan
- ...........................................[WIFI] scan done
- [WIFI] 4 networks found
- ---> 0: [7][34:31:C4:FD:10:49] TKIN (-53) *
- 1: [7][62:01:94:74:51:FF] ESP_7451FF (-59)
- ---> 2: [7][7C:FF:4D:99:52:E0] TKIN (-57) *
- 3: [11][7E:FF:4D:81:4C:82] Breuer Gast (-83) *
- [WIFI] Connecting BSSID: 34:31:C4:FD:10:49 SSID: TKIN Channal: 7 (-53)
- wifi evt: 1
- STA disconnect: 2
- wifi evt: 0
- wifi evt: 3
- [WIFI] Connecting done.
- [WIFI] SSID: TKIN
- [WIFI] IP: 192.168.178.230
- [WIFI] MAC: 34:31:C4:FD:10:49
- [WIFI] Channel: 7
- 192.168.178.230
- Vor tr064_connection.init() ****************************************************************************
- [HTTP] begin: 192.168.178.1:49000/tr64desc.xml
- [HTTP-Client][begin] host: 192.168.178.1 port: 49000 uri: /tr64desc.xml
- [hostByName] Host: 192.168.178.1 is a IP!
- [HTTP-Client] connected to 192.168.178.1:49000
- [HTTP-Client][handleHeaderResponse] RX: 'HTTP/1.1 200 OK'
- [HTTP-Client][handleHeaderResponse] RX: 'Cache-Control: max-age=120'
- [HTTP-Client][handleHeaderResponse] RX: 'Connection: close'
- [HTTP-Client][handleHeaderResponse] RX: 'Content-Length: 13001'
- [HTTP-Client][handleHeaderResponse] RX: 'Content-Type: text/xml'
- [HTTP-Client][handleHeaderResponse] RX: 'Date: Sat, 09 Feb 2019 19:43:14 GMT'
- [HTTP-Client][handleHeaderResponse] RX: 'ETag: "1D03715CE63917F6B"'
- [HTTP-Client][handleHeaderResponse] RX: 'Expires: Sat, 09 Feb 2019 19:45:14 GMT'
- [HTTP-Client][handleHeaderResponse] RX: 'Last-Modified: Thu, 01 Jan 1970 00:01:15 GMT'
- [HTTP-Client][handleHeaderResponse] RX: 'Mime-Version: 1.0'
- [HTTP-Client][handleHeaderResponse] RX: ''
- [HTTP-Client][handleHeaderResponse] code: 200
- [HTTP-Client][handleHeaderResponse] size: 13001
- [HTTP] GET...
- [HTTP] POST... code: 200
- [HTTP-Client][writeToStreamDataBlock] connection closed or file end (written: 13001).
- [HTTP-Client][end] tcp is closed
- <?xml version="1.0"?>
- <root xmlns="urn:dslforum-org:device-1-0"//fritz.box</presentationURL>
- </device>
- </root>
- [HTTP-Client][end] tcp is closed
- Service no 1: urn:dslforum-org:service:DeviceInfo:1 @ /upnp/control/deviceinfo
- Service no 2: urn:dslforum-org:service:DeviceConfig:1 @ /upnp/control/deviceconfig
- Service no 3: urn:dslforum-org:service:Layer3Forwarding:1 @ /upnp/control/layer3forwarding
- Service no 4: urn:dslforum-org:service:LANConfigSecurity:1 @ /upnp/control/lanconfigsecurity
- Service no 5: urn:dslforum-org:service:ManagementServer:1 @ /upnp/control/mgmsrv
- Service no 6: urn:dslforum-org:service:Time:1 @ /upnp/control/time
- Service no 7: urn:dslforum-org:service:UserInterface:1 @ /upnp/control/userif
- Service no 8: urn:dslforum-org:service:X_AVM-DE_Storage:1 @ /upnp/control/x_storage
- Service no 9: urn:dslforum-org:service:X_AVM-DE_WebDAVClient:1 @ /upnp/control/x_webdav
- Service no 10: urn:dslforum-org:service:X_AVM-DE_UPnP:1 @ /upnp/control/x_upnp
- Service no 11: urn:dslforum-org:service:X_AVM-DE_Speedtest:1 @ /upnp/control/x_speedtest
- Service no 12: urn:dslforum-org:service:X_AVM-DE_RemoteAccess:1 @ /upnp/control/x_remote
- Service no 13: urn:dslforum-org:service:X_AVM-DE_MyFritz:1 @ /upnp/control/x_myfritz
- Service no 14: urn:dslforum-org:service:X_VoIP:1 @ /upnp/control/x_voip
- Service no 15: urn:dslforum-org:service:X_AVM-DE_OnTel:1 @ /upnp/control/x_contact
- Service no 16: urn:dslforum-org:service:X_AVM-DE_Dect:1 @ /upnp/control/x_dect
- Service no 17: urn:dslforum-org:service:X_AVM-DE_TAM:1 @ /upnp/control/x_tam
- Service no 18: urn:dslforum-org:service:X_AVM-DE_AppSetup:1 @ /upnp/control/x_appsetup
- Service no 19: urn:dslforum-org:service:X_AVM-DE_Homeauto:1 @ /upnp/control/x_homeauto
- Service no 20: urn:dslforum-org:service:X_AVM-DE_Homeplug:1 @ /upnp/control/x_homeplug
- Service no 21: urn:dslforum-org:service:X_AVM-DE_Filelinks:1 @ /upnp/control/x_filelinks
- Service no 22: urn:dslforum-org:service:X_AVM-DE_Auth:1 @ /upnp/control/x_auth
- Service no 23: urn:dslforum-org:service:WLANConfiguration:1 @ /upnp/control/wlanconfig1
- Service no 24: urn:dslforum-org:service:WLANConfiguration:2 @ /upnp/control/wlanconfig2
- Service no 25: urn:dslforum-org:service:WLANConfiguration:3 @ /upnp/control/wlanconfig3
- Service no 26: urn:dslforum-org:service:Hosts:1 @ /upnp/control/hosts
- Service no 27: urn:dslforum-org:service:LANEthernetInterfaceConfig:1 @ /upnp/control/lanethernetifcfg
- Service no 28: urn:dslforum-org:service:LANHostConfigManagement:1 @ /upnp/control/lanhostconfigmgm
- Service no 29: urn:dslforum-org:service:WANCommonInterfaceConfig:1 @ /upnp/control/wancommonifconfig1
- Service no 30: urn:dslforum-org:service:WANDSLInterfaceConfig:1 @ /upnp/control/wandslifconfig1
- Service no 31: urn:dslforum-org:service:WANDSLLinkConfig:1 @ /upnp/control/wandsllinkconfig1
- Service no 32: urn:dslforum-org:service:WANEthernetLinkConfig:1 @ /upnp/control/wanethlinkconfig1
- Service no 33: urn:dslforum-org:service:WANPPPConnection:1 @ /upnp/control/wanpppconn1
- Service no 34: urn:dslforum-org:service:WANIPConnection:1 @ /upnp/control/wanipconnection1
- Geting the initial nonce and realm
- action_1
- [HTTP] begin: 192.168.178.1:49000/upnp/control/wlanconfig1
- [HTTP-Client][begin] host: 192.168.178.1 port: 49000 uri: /upnp/control/wlanconfig1
- <?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Header><h:InitChallenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1"><UserID>admin</UserID></h:InitChallenge ></s:Header><s:Body><u:GetGenericAssociatedDeviceInfo xmlns:u='urn:dslforum-org:service:WLANConfiguration:1'><NewAssociatedDeviceIndex>1</NewAssociatedDeviceIndex></u:GetGenericAssociatedDeviceInfo></s:Body></s:Envelope>
- [hostByName] Host: 192.168.178.1 is a IP!
- [HTTP-Client] connected to 192.168.178.1:49000
- [HTTP-Client][handleHeaderResponse] RX: 'HTTP/1.1 200 OK'
- [HTTP-Client][handleHeaderResponse] RX: 'DATE: Sat, 09 Feb 2019 19:43:16 GMT'
- [HTTP-Client][handleHeaderResponse] RX: 'SERVER: FRITZ!Box 7490 UPnP/1.0 AVM FRITZ!Box 7490 113.07.01'
- [HTTP-Client][handleHeaderResponse] RX: 'CONNECTION: close'
- [HTTP-Client][handleHeaderResponse] RX: 'CONTENT-LENGTH: 653'
- [HTTP-Client][handleHeaderResponse] RX: 'CONTENT-TYPE: text/xml; charset="utf-8"'
- [HTTP-Client][handleHeaderResponse] RX: 'EXT:'
- [HTTP-Client][handleHeaderResponse] RX: ''
- [HTTP-Client][handleHeaderResponse] code: 200
- [HTTP-Client][handleHeaderResponse] size: 653
- [HTTP] POST... SOAPACTION: urn:dslforum-org:service:WLANConfiguration:1#GetGenericAssociatedDeviceInfo
- [HTTP] POST... code: 200
- [HTTP-Client][writeToStreamDataBlock] connection closed or file end (written: 653).
- [HTTP-Client][end] tcp is closed
- <?xml version="1.0"?>
- <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <s:Header>
- <h:Challenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1">
- <Status>Unauthenticated</Status>
- <Nonce>C8F1BBEBED622CCB</Nonce>
- <Realm>F!Box SOAP-Auth</Realm>
- </h:Challenge>
- </s:Header>
- <s:Body>
- <s:Fault>
- <faultcode>s:Client</faultcode>
- <faultstring>UPnPError</faultstring>
- <detail>
- <UPnPError xmlns="urn:dslforum-org:control-1-0">
- <errorCode>503</errorCode>
- <errorDescription>Auth. failed</errorDescription>
- </UPnPError>
- </detail>
- </s:Fault>
- </s:Body>
- </s:Envelope>
- [HTTP-Client][end] tcp is closed
- Got the initial nonce: C8F1BBEBED622CCB and the realm: F!Box SOAP-Auth
- Your secret is is: admin:F!Box SOAP-Auth:GeheimesPW
- Your secret is hashed: 06c0d81e03ce3032c6513d593e8ba8aa
- Nach tr064_connection.init() ****************************************************************************
- Jetzt klingelts ****************************************************************************
- action_3
- action_1
- The auth token is 98470914b7be4fd5d83443e43581fc8a
- [HTTP] begin: 192.168.178.1:49000/upnp/control/x_voip
- [HTTP-Client][begin] host: 192.168.178.1 port: 49000 uri: /upnp/control/x_voip
- <?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Header><h:ClientAuth xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1"><Nonce>C8F1BBEBED622CCB</Nonce><Auth>98470914b7be4fd5d83443e43581fc8a</Auth><UserID>admin</UserID><Realm>F!Box SOAP-Auth</Realm></h:ClientAuth></s:Header><s:Body><u:X_AVM-DE_DialNumber xmlns:u='urn:dslforum-org:service:X_VoIP:1'><NewX_AVM-DE_PhoneNumber>**9</NewX_AVM-DE_PhoneNumber></u:X_AVM-DE_DialNumber></s:Body></s:Envelope>
- [hostByName] Host: 192.168.178.1 is a IP!
- [HTTP-Client] connected to 192.168.178.1:49000
- [HTTP-Client][handleHeaderResponse] RX: 'HTTP/1.1 200 OK'
- [HTTP-Client][handleHeaderResponse] RX: 'DATE: Sat, 09 Feb 2019 19:43:20 GMT'
- [HTTP-Client][handleHeaderResponse] RX: 'SERVER: FRITZ!Box 7490 UPnP/1.0 AVM FRITZ!Box 7490 113.07.01'
- [HTTP-Client][handleHeaderResponse] RX: 'CONNECTION: close'
- [HTTP-Client][handleHeaderResponse] RX: 'CONTENT-LENGTH: 519'
- [HTTP-Client][handleHeaderResponse] RX: 'CONTENT-TYPE: text/xml; charset="utf-8"'
- [HTTP-Client][handleHeaderResponse] RX: 'EXT:'
- [HTTP-Client][handleHeaderResponse] RX: ''
- [HTTP-Client][handleHeaderResponse] code: 200
- [HTTP-Client][handleHeaderResponse] size: 519
- [HTTP] POST... SOAPACTION: urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialNumber
- [HTTP] POST... code: 200
- [HTTP-Client][writeToStreamDataBlock] connection closed or file end (written: 519).
- [HTTP-Client][end] tcp is closed
- <?xml version="1.0"?>
- <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <s:Header>
- <h:NextChallenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1">
- <Status>Authenticated</Status>
- <Nonce>D87712443D169385</Nonce>
- <Realm>F!Box SOAP-Auth</Realm>
- </h:NextChallenge>
- </s:Header>
- <s:Body>
- <u:X_AVM-DE_DialNumberResponse xmlns:u="urn:dslforum-org:service:X_VoIP:1"></u:X_AVM-DE_DialNumberResponse>
- </s:Body>
- </s:Envelope>
- [HTTP-Client][end] tcp is closed
- Ende Jetzt klingelts ****************************************************************************
- Auflegen ****************************************************************************
- action_2
- action_1
- The auth token is 18d67f6f471c9b9c7d1fde701350b3ff
- [HTTP] begin: 192.168.178.1:49000/upnp/control/x_voip
- [HTTP-Client][begin] host: 192.168.178.1 port: 49000 uri: /upnp/control/x_voip
- <?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Header><h:ClientAuth xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1"><Nonce>D87712443D169385</Nonce><Auth>18d67f6f471c9b9c7d1fde701350b3ff</Auth><UserID>admin</UserID><Realm>F!Box SOAP-Auth</Realm></h:ClientAuth></s:Header><s:Body><u:X_AVM-DE_DialHangup xmlns:u='urn:dslforum-org:service:X_VoIP:1'></u:X_AVM-DE_DialHangup></s:Body></s:Envelope>
- [hostByName] Host: 192.168.178.1 is a IP!
- [HTTP-Client] connected to 192.168.178.1:49000
- [HTTP-Client][handleHeaderResponse] RX: 'HTTP/1.1 200 OK'
- [HTTP-Client][handleHeaderResponse] RX: 'DATE: Sat, 09 Feb 2019 19:43:25 GMT'
- [HTTP-Client][handleHeaderResponse] RX: 'SERVER: FRITZ!Box 7490 UPnP/1.0 AVM FRITZ!Box 7490 113.07.01'
- [HTTP-Client][handleHeaderResponse] RX: 'CONNECTION: close'
- [HTTP-Client][handleHeaderResponse] RX: 'CONTENT-LENGTH: 519'
- [HTTP-Client][handleHeaderResponse] RX: 'CONTENT-TYPE: text/xml; charset="utf-8"'
- [HTTP-Client][handleHeaderResponse] RX: 'EXT:'
- [HTTP-Client][handleHeaderResponse] RX: ''
- [HTTP-Client][handleHeaderResponse] code: 200
- [HTTP-Client][handleHeaderResponse] size: 519
- [HTTP] POST... SOAPACTION: urn:dslforum-org:service:X_VoIP:1#X_AVM-DE_DialHangup
- [HTTP] POST... code: 200
- [HTTP-Client][writeToStreamDataBlock] connection closed or file end (written: 519).
- [HTTP-Client][end] tcp is closed
- <?xml version="1.0"?>
- <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <s:Header>
- <h:NextChallenge xmlns:h="http://soap-authentication.org/digest/2001/10/" s:mustUnderstand="1">
- <Status>Authenticated</Status>
- <Nonce>1F43593E04AFD129</Nonce>
- <Realm>F!Box SOAP-Auth</Realm>
- </h:NextChallenge>
- </s:Header>
- <s:Body>
- <u:X_AVM-DE_DialHangupResponse xmlns:u="urn:dslforum-org:service:X_VoIP:1"></u:X_AVM-DE_DialHangupResponse>
- </s:Body>
- </s:Envelope>
- [HTTP-Client][end] tcp is closed
- Ende Auflegen ****************************************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement