Ankündigung

Einklappen
Keine Ankündigung bisher.

PocketVisu für Aufruf externe URL gehacked

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

    PocketVisu für Aufruf externe URL gehacked

    Hatte mir einen iPod Touch zugelegt und mit der VISU gespielt. Echt super!

    Wollte dann aus der VISU eine andere URL in diesem Fall mein SquezzeCenter (iPeng http://penguinlovesmusic.de/?page_id=3) aufrufen.

    Habe dazu die ajax.js leicht gehacked (da geht bestimmt noch mehr )

    Ab Zeile 1030 wird der Klick auf eine Visu-Fläche abgewickelt.

    Dort frage ich die ID des Bildes ab (ist im Experten/Symbol-Bibliothek als Bild-ID zu finden). Wird "meine" spezielle ID gefunden, springe ich zu einer anderen URL. Fertig

    Ansonsten mach das was normal gemacht werden soll...

    Hier mal meine Modifikation der Funktion visuClick(_evvent)

    PHP-Code:

    // Klick auf Visu-Flaeche abfangen
    function visuClick(_event)
    {
      
    hidePointer();
      var 
    _item=aVisu[parseInt(this.name,10)];
      
    showPointerByClick(_item);
      
    mouseClickItem _item;
      switch (
    mouseClickItem.icoid){
        case 
    "meineBildID1":
            
    window.location.href="http://192.168.0.1:9000/iPeng/status.html?player=192.168.0.155";
        break;
        case 
    "meineBildID2":
            
    window.location.href="http://apple.de";
        break;
        default:
        
    doCmd(_item);
        break;

      }

    Die Änderung an den HS übertragen und schon "klappt es auch mit dem Nachbarn"


    P.S. Anwendung auf eigenes Risiko

    #2
    Ich habe deinen Mod mal angewendet und bin begeistert!



    Kann man noch ne Zeile einfügen für ein neues Browserfenster?

    "Wer immer tut, was er schon kann, bleibt immer das, was er schon ist." Henry Ford

    Kommentar


      #3
      Hallo Cindom,

      sollte funktionieren in dem man z.B. den Teil

      Code:
       
      case "meineBildID2":
          window.location.href="http://apple.de";
      break;
      folgendermassen abändert :

      Code:
      [COLOR=#007700][COLOR=black]case "meineBildID2":[/COLOR]
      [COLOR=black]window.open("http://apple.de");[/COLOR]
      [COLOR=black]break;[/COLOR]
      [/COLOR]
      Kann dies mangels Ipod aber nicht testen/verifizieren ...

      Gruß
      Peter

      Kommentar


        #4
        Ja der Aufruf als neues Browserfenster funktioniert beim iPhone !

        "Wer immer tut, was er schon kann, bleibt immer das, was er schon ist." Henry Ford

        Kommentar


          #5
          Zitat von AScherff Beitrag anzeigen
          Dort frage ich die ID des Bildes ab (ist im Experten/Symbol-Bibliothek als Bild-ID zu finden). Wird "meine" spezielle ID gefunden, springe ich zu einer anderen URL.
          By "ID des Bildes ", I guess you mean the ID number (i.e. I9480) not the ID name ?

          I've entered the ID, but it doesn't jump to the URL.

          PS: I'm editing C:\Program Files\GIRA\HS+FS\exp22\hsupload\hsav\js\ajax.js, hoping it's the right one.

          Kommentar


            #6
            Zitat von Warichet Beitrag anzeigen
            PS: I'm editing C:\Program Files\GIRA\HS+FS\exp22\hsupload\hsav\js\ajax.js, hoping it's the right one.
            See the related post https://knx-user-forum.de/showpost.p...1&postcount=25. And it's always a good idea to clean the browser cache after these changes, as sometimes the file otherwise doesn't get refreshed.

            Regards,
            Hartmut

            Kommentar


              #7
              Zitat von HartmutB Beitrag anzeigen
              And it's always a good idea to clean the browser cache after these changes,
              Yes indeed, forgot it

              So I first tried a classic Shift F5 (It might be that I've done a mistake here and hitted Ctrl F5 instead)
              Now, when I run the Ajax URL, I get the black page, but with no text on it , so impossible to login
              I thought I modified my browser setting (IE7) by accident, I tried on another PC, same thing.
              I double checked the browser setting, no clue.
              I downloaded the project again with the Experte, same thing.
              I run the local file C:\Program Files\GIRA\HS+FS\exp22\hsupload\hsav\start.htm, same thing

              It beats me. Any hint ?

              Kommentar


                #8
                Zitat von Warichet Beitrag anzeigen
                Any hint ?
                Yes. Misspelled ajax.js. It it's buggy (not {} in pairs closed, etc.) you won't get anything from your visu.

                So, I guess you are now using your modified ajax.js. Check it again or replace it once with your unmodified backup.

                What could be another reason, is an exiting cookie, that initiates a redirect to a changed / no longer existing visu page. Then the effect is the same.


                Regards,
                Hartmut

                Kommentar


                  #9
                  Zitat von HartmutB Beitrag anzeigen
                  or replace it once with your unmodified backup.
                  OK. It's one of the first things I did (sorry, forgot to mention)

                  Zitat von HartmutB Beitrag anzeigen
                  an existing cookie, that initiates a redirect to a changed / no longer existing visu page.
                  OK, good to know, but cookies are local to the PC, so trying on another PC would have done it.

                  Thank you for the tips.

                  This problems really beats me. It is as if the browser is corrupted, but all browser exihit the same behaviour, so I guess it's a server problem.
                  But how could I modify a server file with a bad keyboard manipulation. Unless the Shift F5 revealed a waiting problem.

                  Kommentar


                    #10
                    Zitat von AScherff Beitrag anzeigen
                    Habe dazu die ajax.js leicht gehacked (da geht bestimmt noch mehr )
                    Great hack, indeed
                    I noticed it requires a Static Symbol.
                    Would it be possible to use the same technic for text blocs ?
                    I understand icons are identified by a unique ID, maybe text bloc as well ?

                    Thank you.

                    Kommentar


                      #11
                      Zitat von Warichet Beitrag anzeigen
                      Would it be possible to use the same technic for text blocs ?
                      Answering my own question (kind of talking to myself )
                      I made a gif of the text bloc, hence getting a unique icon id.
                      But it's not really a nice idea as the project is getting bigger with many of those " text pictures".
                      Also, my idea was to call HS lists from within de Visu, this works fine now.
                      But those list don't provide a "back" button, and the browser "back" return to the login screen .... not really ergonomic.
                      Seems that I've reached the limit of the idea ... unless someone has a better idea

                      Kommentar


                        #12
                        I allready started modifiing it. checkout here https://knx-user-forum.de/showthread.php?t=3934. i will update that thread soon.
                        Nils

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

                        Kommentar


                          #13
                          Zitat von Warichet Beitrag anzeigen
                          Would it be possible to use the same technic for text blocs ?
                          What about overlaying the text with a simple transparent PNG-file ?
                          Create one master in 10x10points, import it as often you need, give them readable IDs when importing, simply size them as big as your text area is with the mouse ...

                          (ok, not a perfect solution, but should work)


                          Regards,
                          Hartmut

                          Kommentar


                            #14
                            Zitat von HartmutB Beitrag anzeigen
                            What about overlaying the text with a simple transparent PNG-file ?
                            Hé, hé, didn't think about it. Nice idea
                            But my fundamental question is: how to come back after having displayed a HS List ? any idea ?
                            Any means at the cookies level ?

                            Kommentar


                              #15
                              either you can use XXPOPUP or you can write in the aVisuItem.txt field.
                              think about aVisuItem.txt.indexOf("XXARCHIV;") == 0 you can use the static text field for the details. (aVisuItem.txt == "XXARCHIV;MYARCHIV)
                              then you can write the results to the aVisuItem.txt and aItems.push(aVisuItem); check near Line 1950
                              Nils

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

                              Kommentar

                              Lädt...
                              X