Ankündigung

Einklappen
Keine Ankündigung bisher.

dyndns-Webabfrage - ich brauche Hilfe

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    dyndns-Webabfrage - ich brauche Hilfe

    Ich brauche mal Hilfe von den Webabfragen-Profis:

    Vorwort:
    Ich möchte im HS einen dyndns-Updater realisieren, weil in einem projekt die Router das zwar können sollten, es aber nicht tun.

    Dyndns bietet eine API an, die genau beschreibt, wie ein GET-Request aussehen soll. Es gibt auch eine Möglichkeit bei dyndns, die aktuelle IP zu bestimmen: checkip

    Funktion:
    Ich prüfe zyklisch mit einer Webabfrage über Checkip, ob sich die IP geandert hat. WICHTIG: Das darf höchstens alle 10 Minuten erfolgen, sonst wird man geblockt. Habe ich eine neue IP erhalten, soll die mit einer zweiten WA bei dyndns aktualisiert werden.

    Ich kann das problemlos im Browser direkt erledigen. Einfach ein Anfrage in der Form senden:

    http://members.dyndns.org/nic/update...G&backmx=NOCHG

    Dann Benutzer und Passwort eingeben, fertig. (test, test)

    Das soll der HS erledigen, und da scheitere ich bisher.

    10.12.2008 12:20:56 (IP: members.dyndns.org) (Port: 80)
    (Send: 193) 0x47 0x45 0x54 0x20 0x2f 0x6e 0x69 0x63 0x2f 0x75 0x70 0x64 0x61 0x74 0x65 0x3f 0x68 0x6f 0x73 0x74 0x6e 0x61 0x6d 0x65 0x3d 0x74 0x65 0x73 0x74 0x2e 0x6d 0x65 0x72 0x73 0x65 0x69 0x6e 0x65 0x2e 0x6e 0x75 0x26 0x6d 0x79 0x69 0x70 0x3d 0x38 0x34 0x2e 0x31 0x34 0x39 0x2e 0x34 0x34 0x2e 0x32 0x33 0x35 0x26 0x77 0x69 0x6c 0x64 0x63 0x61 0x72 0x64 0x3d 0x4e 0x4f 0x43 0x48 0x47 0x26 0x6d 0x78 0x3d 0x4e 0x4f 0x43 0x48 0x47 0x26 0x62 0x61 0x63 0x6b 0x6d 0x78 0x3d 0x4e 0x4f 0x43 0x48 0x47 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x30 0xd 0xa 0x55 0x73 0x65 0x72 0x20 0x41 0x67 0x65 0x6e 0x74 0x3a 0x20 0x46 0x69 0x64 0x64 0x6c 0x65 0x72 0xd 0xa 0x48 0x6f 0x73 0x74 0x3a 0x20 0x6d 0x65 0x6d 0x62 0x65 0x72 0x73 0x2e 0x64 0x79 0x6e 0x64 0x6e 0x73 0x2e 0x6f 0x72 0x67 0xd 0xa 0x20 0x41 0x75 0x74 0x68 0x6f 0x72 0x69 0x7a 0x61 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x42 0x61 0x73 0x69 0x63 0x20 0x64 0x47 0x56 0x7a 0x64 0x44 0x70 0x30 0x5a 0x58 0x4e 0x30 0xd 0xa 0xd 0xa
    GET /nic/update?hostname=test.dyndns.org&myip=84.149.44.235 &wildcard=NOCHG&mx=NOCHG&backmx=NOCHG HTTP/1.0 User Agent: Fiddler Host: members.dyndns.org Authorization: Basic dGVzdDp0ZXN0
    (Recv: 250) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x34 0x30 0x31 0x20 0x41 0x75 0x74 0x68 0x6f 0x72 0x69 0x7a 0x61 0x74 0x69 0x6f 0x6e 0x20 0x52 0x65 0x71 0x75 0x69 0x72 0x65 0x64 0xd 0xa 0x44 0x61 0x74 0x65 0x3a 0x20 0x57 0x65 0x64 0x2c 0x20 0x31 0x30 0x20 0x44 0x65 0x63 0x20 0x32 0x30 0x30 0x38 0x20 0x31 0x31 0x3a 0x32 0x30 0x3a 0x35 0x32 0x20 0x47 0x4d 0x54 0xd 0xa 0x53 0x65 0x72 0x76 0x65 0x72 0x3a 0x20 0x41 0x70 0x61 0x63 0x68 0x65 0xd 0xa 0x58 0x2d 0x55 0x70 0x64 0x61 0x74 0x65 0x43 0x6f 0x64 0x65 0x3a 0x20 0x41 0xd 0xa 0x57 0x57 0x57 0x2d 0x41 0x75 0x74 0x68 0x65 0x6e 0x74 0x69 0x63 0x61 0x74 0x65 0x3a 0x20 0x42 0x61 0x73 0x69 0x63 0x20 0x72 0x65 0x61 0x6c 0x6d 0x3d 0x22 0x44 0x79 0x6e 0x44 0x4e 0x53 0x20 0x41 0x50 0x49 0x20 0x41 0x63 0x63 0x65 0x73 0x73 0x22 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x4c 0x65 0x6e 0x67 0x74 0x68 0x3a 0x20 0x37 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x63 0x6c 0x6f 0x73 0x65 0xd 0xa 0x43 0x6f 0x6e 0x74
    HTTP/1.1 401 Authorization Required Date: Wed, 10 Dec 2008 11:20:52 GMT Server: Apache X-UpdateCode: A WWW-Authenticate: Basic realm="DynDNS API Access" Content-Length: 7 Connection: close Cont
    (Gesamt: 1) (Work: 1) (Typ: Liste) (OK: 1)

    Kann mir da mal einer behilflich sein?
    Gruß Matthias
    EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
    - PN nur für PERSÖNLICHES!

    #2
    Hi,

    wie machst du denn die abfrage im HS?

    mit der Authentication in URL
    oder Raw HTTP GET Request?
    Nils

    aktuelle Bausteine:
    BusAufsicht - ServiceCheck - Pushover - HS-Insight

    Kommentar


      #3
      Raw:

      Siehe Screenshot
      Angehängte Dateien
      Gruß Matthias
      EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
      - PN nur für PERSÖNLICHES!

      Kommentar


        #4
        Fehlt da der Strich im "User-Agent"
        Nils

        aktuelle Bausteine:
        BusAufsicht - ServiceCheck - Pushover - HS-Insight

        Kommentar


          #5
          Fehlte, tatsächlich. hat aber leider nichts geändert. Er vermisst nwv. die Authorization.
          Gruß Matthias
          EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
          - PN nur für PERSÖNLICHES!

          Kommentar


            #6
            Habs mal auf die schnelle statisch nachgestellt bei mir gehts.

            10.12.2008 13:50:57 (IP: members.dyndns.org) (Port: 80)
            (Send: 205) 0x47 0x45 0x54 0x20 0x2f 0x6e 0x69 0x63 0x2f 0x75 0x70 0x64 0x61 0x74 0x65 0x3f 0x68 0x6f 0x73 0x74 0x6e 0x61 0x6d 0x65 0x3d 0x74 0x65 0x73 0x74 0x2e 0x64 0x79 0x6e 0x64 0x6e 0x73 0x2e 0x6f 0x72 0x67 0x26 0x6d 0x79 0x69 0x70 0x3d 0x38 0x34 0x2e 0x31 0x34 0x39 0x2e 0x33 0x33 0x2e 0x32 0x32 0x26 0x77 0x69 0x6c 0x64 0x63 0x61 0x72 0x64 0x3d 0x4e 0x4f 0x43 0x48 0x26 0x6d 0x78 0x3d 0x4e 0x4f 0x43 0x48 0x26 0x62 0x61 0x63 0x6b 0x6d 0x78 0x3d 0x4e 0x4f 0x43 0x48 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x30 0xd 0xa 0x48 0x6f 0x73 0x74 0x3a 0x20 0x6d 0x65 0x6d 0x62 0x65 0x72 0x73 0x2e 0x64 0x79 0x6e 0x64 0x6e 0x73 0x2e 0x6f 0x72 0x67 0xd 0xa 0x41 0x75 0x74 0x68 0x6f 0x72 0x69 0x7a 0x61 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x42 0x61 0x73 0x69 0x63 0x20 0x64 0x47 0x56 0x7a 0x64 0x44 0x70 0x30 0x5a 0x58 0x4e 0x30 0xd 0xa 0x55 0x73 0x65 0x72 0x2d 0x41 0x67 0x65 0x6e 0x74 0x3a 0x20 0x44 0x61 0x63 0x6f 0x6d 0x20 0x2d 0x20 0x48 0x6f 0x6d 0x65 0x73 0x65 0x72 0x76 0x65 0x72 0x20 0x2d 0x20 0x76 0x32 0x2e
            GET /nic/update?hostname=test.dyndns.org&myip=84.149.33.22& wildcard=NOCH&mx=NOCH&backmx=NOCH HTTP/1.0 Host: members.dyndns.org Authorization: Basic dGVzdDp0ZXN0 User-Agent: Dacom - Homeserver - v2.
            (Recv: 134) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x32 0x30 0x30 0x20 0x4f 0x4b 0xd 0xa 0x44 0x61 0x74 0x65 0x3a 0x20 0x57 0x65 0x64 0x2c 0x20 0x31 0x30 0x20 0x44 0x65 0x63 0x20 0x32 0x30 0x30 0x38 0x20 0x31 0x32 0x3a 0x35 0x31 0x3a 0x30 0x30 0x20 0x47 0x4d 0x54 0xd 0xa 0x53 0x65 0x72 0x76 0x65 0x72 0x3a 0x20 0x41 0x70 0x61 0x63 0x68 0x65 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x54 0x79 0x70 0x65 0x3a 0x20 0x74 0x65 0x78 0x74 0x2f 0x70 0x6c 0x61 0x69 0x6e 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x63 0x6c 0x6f 0x73 0x65 0xd 0xa 0xd 0xa 0x67 0x6f 0x6f 0x64 0x20 0x38 0x34 0x2e 0x31 0x34 0x39 0x2e 0x33 0x33 0x2e 0x32 0x32
            HTTP/1.1 200 OK Date: Wed, 10 Dec 2008 12:51:00 GMT Server: Apache Content-Type: text/plain Connection: close good 84.149.33.22
            Angehängte Dateien
            Nils

            aktuelle Bausteine:
            BusAufsicht - ServiceCheck - Pushover - HS-Insight

            Kommentar


              #7
              Nicht zu fassen. Wo ist der Unterschied?
              Gruß Matthias
              EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
              - PN nur für PERSÖNLICHES!

              Kommentar


                #8
                änder doch mal die reihenfolge in

                URL,Host,Auth,UserAgent
                Nils

                aktuelle Bausteine:
                BusAufsicht - ServiceCheck - Pushover - HS-Insight

                Kommentar


                  #9
                  Ändert nichts. ich baue jetzt 1:1 deine Abfrage nach...

                  hast du mit Absicht NOCH anstelle von NOCHG?
                  Gruß Matthias
                  EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
                  - PN nur für PERSÖNLICHES!

                  Kommentar


                    #10
                    hast du mit Absicht NOCH anstelle von NOCHG?
                    nee war nur ein vertipper
                    Nils

                    aktuelle Bausteine:
                    BusAufsicht - ServiceCheck - Pushover - HS-Insight

                    Kommentar


                      #11
                      So, deine Abfrage läuft jetzt auch - ufff.

                      Ich befürchte, ich habe den Fehler gefunden: Vor dem Wort Authorization hatte ich ein Leerzeichen. Muss ich mal verifizieren..
                      Gruß Matthias
                      EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
                      - PN nur für PERSÖNLICHES!

                      Kommentar


                        #12
                        Das war offensichtlich der Fehler!

                        Herzlichen dank für deine Mithilfe, ohne den Nachweis, dass es funktionieren kann, hätte ich wahrscheinlich kapituliert.

                        Hinweis: man braucht übrigens die eigene IP nicht angeben, dyndns übernimmt in dem Fall die IP des Absenders.

                        Ich stelle die Abfrage heute abend in den Download-Bereich als globale Bibliothek.
                        Gruß Matthias
                        EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
                        - PN nur für PERSÖNLICHES!

                        Kommentar


                          #13
                          beachtest du die return codes???

                          http://www.dyndns.com/developers/specs/return.html

                          insbesondere dnserr und 911?
                          Nils

                          aktuelle Bausteine:
                          BusAufsicht - ServiceCheck - Pushover - HS-Insight

                          Kommentar


                            #14
                            Ja, ich bastle gerade an einem Logikbaustein, der das verarbeitet.
                            Gruß Matthias
                            EIB übersetzt meine Frau mit "Ehepaar Ist Beschäftigt"
                            - PN nur für PERSÖNLICHES!

                            Kommentar


                              #15
                              wow, liest du meine Gedanken ??

                              Antwort in gleicher Minute.
                              Nils

                              aktuelle Bausteine:
                              BusAufsicht - ServiceCheck - Pushover - HS-Insight

                              Kommentar

                              Lädt...
                              X