#21
|
|||
|
|||
![]()
Hallo,
leider komme ich auch nicht so recht mit der Anleitung zu recht. Habe eine Homebox 2 6441 mit der Fimware 1.01.30w Hatte vorher für den alten Router eine *.bat Datei. Ich habe das Ganze mit dem reconnect Assistenten versucht, da mir der Rest eher wie bömische Dörfer vorkommt, was leider nicht geklappt hat. Wenn ich es denn richtig verstanden habe, wird bei dem Shellskript von Teorax das Passwort erst in md5 und das Ergebnis in sha512 umgewandelt und im Skript "PASSWORD_HASH" durch das Ergebnis ersetzt. Das macht man alles im Texteditor und Speicher es dann einfach als *.sh Datei ab? Und wie sag ich dann JD, dass es beim reconnect darauf zugreifen soll? Denn bei Auswahl der *.sh Datei über Drittanwender-Reconnect kommt die Meldung mit welchem Programm die Datei ausgeführt werden soll. Wie ihr seht bin ich da eher der Typ ratlos und überfordert. Hilfe wäre klasse EDIT: Habe die Methode von rbybbl jetzt in verwendung und es klappt klasse :-) Danke an der Stelle Last edited by Haustür; 25.10.2017 at 05:30. Reason: Frage erledigt |
#22
|
|||
|
|||
![]()
Wird bei euch auch für jeden reconnet die*.exe neu geladen, so dass man dann irgend wann die Taskleist mit x-mal *.exe voll hat?
Bei mir führt das auch immer wieder zu dem Problem, dass der reconnet dann irgendwann nicht mehr geht und eine token Fehlermeldung auftritt. Last edited by Haustür; 29.10.2017 at 18:20. Reason: Leider findet die Telefonverbindung an der Box nach dem reconnet sich nicht mehr, bedeutet, dass das Telefon tot ist und nur |
#23
|
|||
|
|||
![]()
Leider findet die Telefonverbindung an der Box nach dem reconnet sich nicht mehr, bedeutet, dass das Telefon tot ist und nur durch Stromlosschaltung wieder eien Telefonverbindung herstellbar ist.
|
#24
|
|||
|
|||
![]()
Hier findest du meine verbesserte Version von rbybbls Skript:
Here's my improved version of rbybbl's script:
Code:
#!/bin/bash # O2 Homebox 6441 reconnect script for Linux and macOS ### Anleitung - Instructions ### # Speicher als Textdatei ab, z.B.: # Home->Documents->JDownloader->reconnect-6441.sh # Ausführbar in Terminal machen: # cd ~/Documents/JDownloader # chmod 755 reconnect-6441.sh # Test mit: # ./reconnect-6441.sh 'routerpasswort' # JDownloader: # Einstellungen->Reconnect->Reconnect Methode: Drittanwender-Reconnect # "Auswählen" Button anclicken, reconnect-6441.sh finden und auswählen. # Router admin Passwort in die Parameter box einstellen. # "Test" Button anclicken. # Save as text file, for example: # Home->Documents->JDownloader: reconnect-6441.sh # Make executable in Terminal: # cd ~/Documents/JDownloader # chmod 755 reconnect-6441.sh # Test with: # ./reconnect-6441.sh 'routerpassword' # JDownloader: # Settings->Reconnect->Reconnect Method: External Tool Reconnect # Click "Select" button, navigate to reconnect-6441.sh and select. # Enter the router admin password in the Parameter box. # Click the "Test" button. ### History ### # original author: rbybbl 2016-06-01 # https://board.jdownloader.org/showpost.php?p=372164&postcount=6 # # modified by sumyungguy 2017-12-02: # made macOS compatible # working shell commands to generate hash, for Linux and macOS # no user configuration of script necessary: # use "o2.box" as router address # calculate password hash from argument # change for firmware 1.01.30, thanks to Teorax # added instructions # prints status information during reconnect print_status () { # report current connection status and IP address echo "status:" ROUTER_STATUS=$(curl -s "$ROUTER_HOST/cgi/cgi_diagnostic.js?_tn=$ROUTER_TOKEN" | grep -o -e '"WANConnectStatus0.*"' -e '"WAN_IP4_Addr0.*"') echo "$ROUTER_STATUS" } if [ "$#" -gt 1 ]; then echo "Reconnect O2 Homebox - usage: reconnect-6441.sh 'routerpass'" exit fi ROUTER_HOST="o2.box" CLEARPASS="$1" if [ -n "$CLEARPASS" ]; then UNAMESTR=$(uname) if [ "$UNAMESTR" = "Darwin" ]; then ROUTER_PASS=$(printf "$CLEARPASS" | md5 | tr -d '\n' | shasum -a 512 | tr -d ' -') else ROUTER_PASS=$(printf "$CLEARPASS" | md5sum | tr -d '\n -' | shasum -a 512 | tr -d ' -') fi echo "Router Pass Hash: \n$ROUTER_PASS" echo "einloggen - logging in" if [ $(curl -s -d "pws=$ROUTER_PASS" "$ROUTER_HOST/login.cgi" | wc -c) -eq 0 ]; then echo "login gescheitert: falsches Passwort oder mit Webbrowser noch eingeloggt?" echo "login failed: wrong password or logged in with web browser?" exit 1 fi else echo "Warnung: kein Passwort - warning: no password" fi # get the token from index page and save as var ROUTER_TOKEN=$(curl -s "$ROUTER_HOST/" | perl -nle 'print $& if m{data:image/gif;base64,[A-Za-z0-9+/]+///[A-Za-z0-9+/]{31}\K([^"]+)}' | base64 --decode) echo "router token: $ROUTER_TOKEN" print_status # send disconnect post request echo "WAN stop" curl -s -d "action=wan_stop&httoken=$ROUTER_TOKEN" "$ROUTER_HOST/apply_abstract.cgi" > /dev/null sleep 6 print_status # send connect post request echo "WAN start" curl -s -d "action=wan_start&httoken=$ROUTER_TOKEN" "$ROUTER_HOST/apply_abstract.cgi" > /dev/null sleep 6 print_status # wait for connected state while true do if echo "$ROUTER_STATUS" | grep -Eqi '"WANConnectStatus0", "[0-9]+", "Connected"'; then break fi sleep 6 print_status done if [ -n "$CLEARPASS" ]; then # send logout request echo "logout" sleep 2 curl -s -d "" "$ROUTER_HOST/logout.cgi" > /dev/null fi Last edited by sumyungguy; 04.12.2017 at 03:33. |
#25
|
||||
|
||||
![]()
@sumyungguy: Thanks for the script. It should be possible to use Liveheader script to do the same and not require any batch/curl.
I can see login request, parsing of token and then send requests. You should be able to transform this into a Liveheader script easily
__________________
JD-Dev & Server-Admin |
#26
|
|||
|
|||
![]()
@Jiaz I was going by what the original author rbybbl said:
Quote:
I don't know how rbybbl figured it all out. Basically I just adapted his script to work on macOS (which doesn't support grep -P and some other things), and while I was at it I automated the password hash calculation. But otherwise I don't understand very well how it's all working. If there's something obvious I'm missing, please let me know, thanks. |
#27
|
|||
|
|||
![]()
Thanks to rbybbl and others before, I wrapped the knowledge into a Perl script (reconnect_6441.pl).
On most systems Perl is either readily available or it can be easily installed.
https: //pastebin.com/0ctzg1FY Last edited by raztoki; 09.04.2018 at 02:33. |
#28
|
|||
|
|||
![]()
Bis vor kurzem hat bei mir das UPNP universal plug and play fritzbox funktioniert, ohne den Router so zu trennen, dass die Telefonverbindung annricht.
Jetzt habe ich die Firmware Version 1.00(AAJG.0)D14b und eine neue Homebox 2 6641 mit isdn-Anschluß und 3 Lan-Buchsen erhalten womit das leider so nicht mehr geht. Per Liveheader wurde eine Möglichkeit gefunden, wobei wohl die Box vom Strom getrennt wird und neu startet., dauert recht lange mit 3,5 Min. und die Telefonverbindung trennt sich natürlich auch. Gibt es da eine für einen Laien gut verständliche Alternative? Gruß Leider funktioniert keine der hier geposteten Möglichkeiten mit der Fimwareversion. Mit AutoIT bricht es mit einer Fehlermeldung ab. Das Shellscript und das Perlscript können leider auch keinen reconnect erzeugen, wobei ich mir da nicht ganz sicher bin ob ich das mal richtig gemacht habe da ich kein passwort an der Box verwende (hab auch mal die Eintragung mit dem Passwort aus den Scripts gelöscht, hatte aber auch keinen Erfolg). Last edited by Haustür; 23.06.2018 at 20:17. |
#29
|
|||
|
|||
![]()
For some reason my shell script (above) stopped working today, I don't know what changed, but there seems to be a problem getting the status, though the other parts work.
But rather than spending time to debug it, I tried the perl script from IamALoony, which works well - thanks for that! I couldn't get it to work as an External Batch command on my Mac, so instead I made it executable with: chmod u+x reconnect_6441.pl Then I used External Tool Reconnect, and put the full path to the script (including the script name), eg. /Users/sumyungguy/Documents/scripts/reconnect_6441.pl Then put the password hash, calculated as described, in the Parameter box. Btw., you can also calculate the password hash with this command on the Mac: printf 'yourrouterADMINpassword' | md5 | tr -d '\n' | shasum -a 512 | tr -d ' -' Or on Linux: printf 'yourrouterADMINpassword' | md5sum | tr -d '\n -' | shasum -a 512 | tr -d ' -' |
![]() |
Thread Tools | |
Display Modes | |
|
|