Aktuelles
Digital Eliteboard - Das Digitale Technik Forum

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

Wie Dyndns überwachen, Fritzbox hinter Fritzbox

    Nobody is reading this thread right now.
Code:
############################### config Ende ###############################################################
#############################################################################################################

# Simple URL encoding
function proc_url_encode() {
    out=${1//%/%25}; out=${out//\{/%7B}; out=${out//\}/%7D}; out=${out//|/%7C};
    out=${out//\\/%5C}; out=${out//^/%5E}; out=${out//~/%7E}; out=${out//[/%5B};
    out=${out//]/%5D}; out=${out//\`/%60}; out=${out//#/%23}; out=${out//>/%3E};
    out=${out//\$/%24}; out=${out//&/%26}; out=${out//+/%2B}; out=${out//,/%2C};
    out=${out//\//%2F}; out=${out//:/%3A}; out=${out//;/%3B}; out=${out//=/%3B};
    out=${out//\?/%3F}; out=${out// /%20}; out=${out//</%3C};
    echo $out
}

USERNAME=`proc_url_encode "${USERNAME}"`
PASSW=`proc_url_encode "${PASSW}"`

ist das richtig so?

muss da was rein bei username und pass?
 
zu 1: ja

zu 2: nein



einfach mal ausprobieren


/edit: ups, könnte sein das oben ein paar sonderzeichen fehlen wie zum beispiel das AT zeichen @
den html-escape-code kann man zb hier nachgucken: oder
dann einfach innerhalb der function noch ein " out=${out//\@/%40}; " vor das echo $out hinzufügen

${out//\@/%40} bewirkt, dass in der variablen $out die zeichen @ mit %40 ersetzt werden, das ist zb hier auch noch mal erklärt:
 
Zuletzt bearbeitet von einem Moderator:
was hat hier jetzt nicht funktioniert??

Code:
+ USERNAME=xxx@live.de
+ PASSW=xxxx
+ DYNADDI=xxx.no-ip.org
+ LOGPFAD=/var/tmp/ftp/flash/DynUpdateCheck.log
+ MAXLOGSIZE=100
+ DYNDIENST=no-ip
+ EMAIL=yes
+ FROMMAIL=server
+ TOMAIL=xxxx
+ MAILSRV=smtp.live.com
+ PWMAIL=xxxx
+ function proc_url_encode
/var/tmp/flash/DynUpdateCheck.sh: line 1: function: not found
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ out=
+ echo

+ proc_url_encode xxx@live.de
/var/tmp/flash/DynUpdateCheck.sh: line 1: proc_url_encode: not found
+ USERNAME=
+ proc_url_encode xxxx
/var/tmp/flash/DynUpdateCheck.sh: line 1: proc_url_encode: not found
+ PASSW=
+ date +%Y-%m-%d %H:%M:%S
+ DATUM=2012-03-24 18:50:28
+ wget -q -O - http://www.whatismyip.org
+ HOSTIP=8x.1xx.1x5.6
+ [ -z 8x.174.xx.6 ]
+ sleep 1
+ [ no-ip = dyndns ]
+ [ no-ip = dnsomatic ]
+ [ no-ip = no-ip ]
+ URL=http://:@dynupdate.no-ip.com/nic/update?hostname=xxx.no-ip.org&myip =8x.1x4.1x.6
+ [ ! -z 8x.1x4.1x5.6 ]
+ ping -c 1 xxx.no-ip.org
+ sed -n 1p
+ sed -e s/(//g -e s/)//g
+ cut -d   -f3
+ cut -d : -f1
+ DYNIP=8x.1x4.19x.6
+ [ -z 8x.17x.1x5.6 ]
+ [ 8x.1x4.1x5.6 = 87.174.195.6 ]
+ [ -f /var/tmp/ftp/flash/DynUpdateCheck.log ]
/var/tmp/flash/DynUpdateCheck.sh: line 1: can't create /var/tmp/ftp/flash/DynUpdateCheck.log: nonexistent directory
+ echo 2012-03-24 18:50:28 - DYN-IP ist:8x.1x4.195.x  die Host-IP ist:8x.1x4.1x5    .6 alles OK!
 
Zuletzt bearbeitet:
ändern mal "function proc_url_encode() {" in: function proc_url_encode () {
also ein leerzeichen vor die () einfügen


wenn das aber auch nicht gehen sollte probiers mit der eher unschönen art anstelle des function codes (also das von oben wieder rauslöschen):
Code:
out=${USERNAME//%/%25}; out=${out//\{/%7B}; out=${out//\}/%7D}; out=${out//|/%7C};
out=${out//\\/%5C}; out=${out//^/%5E}; out=${out//~/%7E}; out=${out//[/%5B};
out=${out//]/%5D}; out=${out//\`/%60}; out=${out//#/%23}; out=${out//>/%3E};
out=${out//\$/%24}; out=${out//&/%26}; out=${out//+/%2B}; out=${out//,/%2C};
out=${out//\//%2F}; out=${out//:/%3A}; out=${out//;/%3B}; out=${out//=/%3B};
out=${out//\?/%3F}; out=${out// /%20}; out=${out//</%3C};
out=${out//\!/%21}; out=${out//\"/%22}; out=${out//\@/%40}; out=${out//\'/%27};
out=${out//\(/%28}; out=${out//\)/%29}; out=${out//\*/%2A}; out=${out//\-/%2D};
out=${out//\_/%5F}; out=${out//\./%2E}; out=${out//\€/%80};
USERNAME=$out

out=${PASSW//%/%25}; out=${out//\{/%7B}; out=${out//\}/%7D}; out=${out//|/%7C};
out=${out//\\/%5C}; out=${out//^/%5E}; out=${out//~/%7E}; out=${out//[/%5B};
out=${out//]/%5D}; out=${out//\`/%60}; out=${out//#/%23}; out=${out//>/%3E};
out=${out//\$/%24}; out=${out//&/%26}; out=${out//+/%2B}; out=${out//,/%2C};
out=${out//\//%2F}; out=${out//:/%3A}; out=${out//;/%3B}; out=${out//=/%3B};
out=${out//\?/%3F}; out=${out// /%20}; out=${out//</%3C};
out=${out//\!/%21}; out=${out//\"/%22}; out=${out//\@/%40}; out=${out//\'/%27};
out=${out//\(/%28}; out=${out//\)/%29}; out=${out//\*/%2A}; out=${out//\-/%2D};
out=${out//\_/%5F}; out=${out//\./%2E}; out=${out//\€/%80};
PASSW=$out

auf folgenden seiten steht auch noch ein bischen was zur programmierung:
Link veralten (gelöscht)





ansonsten frag im forum, da hab ich das auch her
 
ich muss dich noch mal nerven sorry : )
ich hab ein noch besseres script gefunden undzwar sieht es bei mir so aus wenn ich es ausführe..

Code:
root@fritz:/var/mod/root# sh -x /var/tmp/flash/dnsupdater.sh
+ USERNAME=xxxxx
+ PASSWORD=xxxx
+ DDNSHOST=xxxx.no-ip.org
+ EVERY=300
+ LOG=1
+ CHECKIPURL=http://checkip.dyndns.org/
+ CHECKIPURL2=http://www.myip.ch/
+ linkname=/var/tmp/flash/dnsupdater.sh
+ basename /var/tmp/flash/dnsupdater.sh
+ srcn=dnsupdater.sh
+ srcv=1.07
+ srccfg=config.dnsupdater.sh
+ LOGFILE=/tmp/log.dnsupdater.sh
+ CHKFILE=/tmp/.dnsupdater.sh
+ PiDFILE=/tmp/.pid.dnsupdater.sh
+ C=\033[
+ Ca=\033[0;33m
+ Cb=\033[1;33m
+ Cn=\033[0m
+ ROT=\033[1;31m
+ GRUEN=\033[1;32m
+ BOLD=\033[1;37m
+ Bo=\033[1m
+ Bc=\033[21m
+ Ro=\033[3m
+ Rc=\033[23m
+ Uo=\033[4m
+ Uc=\033[24m
+ Blo=\033[5m
+ Blc=\033[25m
+ Io=\033[7m
+ Ic=\033[27m
+ URL=
+ proc_url_encode xxxxx
+ out=xxxx
+ out=xxxx
+ out=xxxx
+ out=xxxx
+ out=xxxx
+ out=xxxx
+ out=xxxx
+ out=xxxx
+ out=xxxxx
+ out=xxxx
+ out=xxxxx
+ out=xxxxx
+ out=xxxx
+ out=xxxxx
+ out=xxxx
+ out=xxxxx
+ out=xxx
+ out=
+ out=
+ out=
+ out=
+ ou
+ echo 
+ URL=
+ update_interval
+ PiDs=29871
+ echo 29871
+ echo Running Script in Background with PID(s): 29871
Running Script in Background with PID(s): 29871
+ true
+ [ ! -f /tmp/.pid.dnsupdater.sh ]
+ get_IPs
+ ping -c 1 sxxx.no-ip.org
+ sed -n 1p
+ sed -e s/(//g -e s/)//g
+ awk { print $3 }
+ HOSTIP=8x.xx4.xx4.82:
+ wget -q -O /tmp/.dnsupdater.sh_current_ip http://checkip.dyndns.org/
+ cat /tmp/.dnsupdater.sh_current_ip
+ cut -d   -f 6
+ cut -d < -f 1
+ CURRENTIP=87.1xx.1x4.x2
+ [ -z 87.1x4.xx4.82 -o 87.1xxx.1xx4.82 =  * -o 87.1x4.1xx.x2 = *1.0 * ]
+ [ 87.1xx.1xx.x2: != 87.1xx.1xx.x2 ]
+ do_update
+ wget -q -O /tmp/.dnsupdater.sh_answer
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
+ abuse_check
+ cat /tmp/.dnsupdater.sh_answer
cat: can't open '/tmp/.dnsupdater.sh_answer': No such file or directory
+ answer=
+ MSG=
+ [  = abuse ]
+ [  = nohost ]
+ [  = badauth ]
+ [ ! -z  ]
+ LOG_update
+ [ 1 = 1 ]
+ date +%d.%m.%Y %H:%M:%S
+ _DT=25.03.2012 15:26:35
+ [ -z  ]
+ cat /tmp/.dnsupdater.sh_answer
cat: can't open '/tmp/.dnsupdater.sh_answer': No such file or directory
+ answer=
+ echo 25.03.2012 15:26:35: HOSTIP: 87.1xx.1x4.x2: - CURRENTIP: 87.1xx.1x4.x2 -   answer:
+ sleep 300
 
und womit willst du nun nerven? :)
das ist der vorgänger vom DDNSupdater.sh aber bei dir noch fehlerhaft eingestellt (keine URL) davon gibts mehrere scriptversionen die hier auch schon von RoterBaron gepostet wurden aber nicht mit den Fritzboxen funktionieren wollte
 
geil es hat jetzt geklappt
mit hansis script


eine letzte frage
ich muss noch bei crontab das hier eintragen oder? damit es alle 20 minuten ausgeführt wird
*/20 * * * * sh /var/tmp/flash/DynUpdateCheck.sh

crond kann nicht gestartet werden cant open /var/media/ftp/tools/watchdog/remove-cronjob-oscam.sh
 
Zuletzt bearbeitet:
Kann es sein, dass es jetzt auch Probleme mit der Abfrage bei gibt?
Ich habe jetzt wieder auf umgestellt, und seitdem läuft´s wieder...

Gibt es noch andere Webseiten, die die direkte IP Adresse ausgeben?
 
Hallo zusammen
hab da mal ne Verständnisfrage
Weswegen fritz hinter fritz? Ok einer macht cs der andere inet. Ist das sicherer als alles in einem z.B 7390? Oder ist just fun Basteln?
 
Fritz hinter fritz warum: ganz einfach: die CS Box wird von Routerarbeiten entlastet. Routerarbeiten: downloads, uploads, Telefon Spielen.... Das kann schon sehr beträchlich sein und zu freezeeern im CS Betrieb führen, voer allen Dingen, wenn es um einen Mehr Personen Haushalt handelt.
Bei Fritz hinter fritz brauchts sich der Server nur um CS zu kümmern. Und das läuft absolut sauber -ohne freezer, bei richtig eingestellten configs.
Also keine Spielerei.


Mlgpiloten
 
sprite2cola schrieb:
Kann es sein, dass es jetzt auch Probleme mit der Abfrage bei gibt?
Ja so ist es.
Whatismyip.org funzt so nicht mehr.

Ich habe die Abfrage bei "whatismyip.org" geändert - sollte jetzt wieder funzen.
Weiterhin habe ich 2 weitere Abfragen hinzugefügt.


Kann ein Mod den Script bitte hier mal austauschen, weil ich keine Berechtigung habe.



Gruß Superhansi
 
Zuletzt bearbeitet von einem Moderator:
Perfekt, bei hat es nicht hingehauen, die Verwaltung der Anhänge bereiten mir arge Probleme! :-(
 
Zurück
Oben