10-26-2013, 12:36 PM | #1 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Exploit custom dialog function: searching for help/hints
I've noticed between lipc commands this interesting one:
com.lab126.pillow customDialog where Dialog is a writable string. I found then an html file that seems to be inherent to this command: Filepath: /usr/share/webkit-1.0/pillow/sample_custom_dialog.html And two javascript files too... First: /usr/share/webkit-1.0/pillow/javascript/sample_custom_dialog.js: And second: usr/share/webkit-1.0/pillow/strings/sample_custom_dialog_strings.js Can somebody help me to exploit this and understand how to invoke properly the lipc command? If possible... It would be cool to popup custom native dialogs in our programs Thank you! Last edited by Aeris; 10-27-2013 at 05:18 PM. |
10-27-2013, 01:41 AM | #2 |
Guru
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
It looks boolean...
|
10-27-2013, 01:44 AM | #3 |
Guru
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
com.lab126.pillow
w Str keyboardGetSurround w Str dismissChrome w Str keyboardCommit w Str disableEnablePillow w Str searchResults w Str customDialog w Str keyboardReplace w Str keyboardSetPreeditString w Str keyboardDelete rw Str logLevel w Str activityIndicator w Str debugInfo rw Str logMask w Str displayChrome w Str interrogatePillow w Str configureChrome w Str pillowAlert |
10-27-2013, 02:47 AM | #4 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Don't know... maybe it could receive some parameters through "interrogatePillow" etc... And also strings doesn't seem to mean always true or false value values
|
10-27-2013, 07:41 AM | #5 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Pure guess, but it works. I didn't look at its internals and don't know anything about possible additional parameters, except dialog's name.
Code:
lipc-set-prop com.lab126.pillow customDialog '{"name": "sample_custom_dialog"}' Code:
lipc-set-prop com.lab126.pillow interrogatePillow '{"pillowId": "sample_custom_dialog", "function": "nativeBridge.dismissMe()"}' I don't know how about PW, but KT's pillow looks for HTML files, dialogs included, also at /usr/local/tests/pillow (tested on 5.3.2.1). UPD: ha, I've just found my old notes about Pillow regarding customDialog property: Code:
/usr/local/tests/pillow (fallback of /usr/share/webkit-1.0/pillow) To load stock Pillow scripts from HTML placed in fallback location: <script src="///usr/share/webkit-1.0/pillow/javascripts/sample_custom_dialog.js"> To show example.html: lipc-set-prop com.lab126.pillow customDialog '{"name": "example"}' To show example/index.html lipc-set-prop com.lab126.pillow customDialog '{"name": "example/index"}' To set parameters: lipc-set-prop com.lab126.pillow customDialog '{"name": "sample_custom_dialog", "clientParams": {"dismiss": true}}' Last edited by eureka; 10-27-2013 at 08:11 AM. |
10-27-2013, 09:42 AM | #6 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
I knew I could count on you, Eureka! Thank you so much! Last command tested and work beautifully
Now I've just to play with it for a while to discover the best way to exploit it. The simplest one could be to use it in a unconventional manner, i.e. for blocking user input on eips full screen prints (just invoke lipc-set-prop com.lab126.pillow customDialog '{"name": "sample_custom_dialog", "clientParams": {"dismiss": true}}' before and after executing your eips script). For example in Midori splash animation... EDIT: It doesn't work well unless you manage to open a very little custom dialog, lets say 1x1 px... otherwise if the user clicks in the popup area it will appear cleaning the eipsed area Then I'll see how to use it in a proper manner, as custom dialogs displayer Last edited by Aeris; 10-27-2013 at 10:21 AM. |
10-27-2013, 09:51 AM | #7 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Work fine on PW. just to give feedback.
|
10-27-2013, 10:06 AM | #8 | |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
The simplest use could be maybe to inject javascript as Eureka did for the battery widget into sample_custom_dialog, overriding the original html test with the one we need. Maybe could be added some buttons too in this way...
Just creating a simple Yes/no statement window would be a nice point to start Quote:
Last edited by Aeris; 10-27-2013 at 10:11 AM. |
|
10-27-2013, 11:17 AM | #9 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Pay attention to examples, you did it wrong.
|
10-27-2013, 11:37 AM | #10 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Ok, I will! I wrote an html where not needed... but I've tried also without .html and still not detected
I'm watching a lot to your examples, this one and battery one... now I'm trying to find a way to set "display:visible" instead of "none" by javascript, to an element without id... I managed to achive this only by hand, editing the value in the original sample_custom_dialog file... results seem pretty promising: If well understood maybe this could be used to set up many bash scripts for KUAL Anyway, if custom dialogs aren't used from any system app, editing this file should be safe too I think Last edited by Aeris; 10-27-2013 at 11:44 AM. |
10-27-2013, 12:02 PM | #11 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
You shouldn't edit this concrete file or use interrogatePillow to get something useful to display with customDialog property.
Pillow concatenates /usr/share/webkit-1.0/pillow/ string with name string and then the result is concatenated again with .html string. Then Pillow tries to load file by resulting path. Do you understand how it works now? Does Code:
strings /usr/lib/libpillow.so | grep local |
10-27-2013, 12:05 PM | #12 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
[root@kindle root]# strings /usr/lib/libpillow.so | grep local
Quote:
|
|
10-27-2013, 12:08 PM | #13 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Yes, it does... but I tought it tried to search html in /usr/local/tests/pillow/ when it could not find them in /usr/share/webkit-1.0/pillow/
Code:
You shouldn't edit this concrete file or use interrogatePillow to get something useful to display with customDialog property. |
10-27-2013, 12:11 PM | #14 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
possibly stracing it's ACTUAL searched execution pathS would be illuminating?
Last edited by twobob; 10-27-2013 at 12:40 PM. |
10-27-2013, 12:20 PM | #15 | |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
Yes. On setting customDialog property, put anything you want into name key. What file Pillow will load then? |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Nesting Function arguments in custom columns | da_jane | Calibre | 1 | 11-21-2012 02:48 PM |
Can plugins have a custom UI dialog? | kiwidude | Plugins | 9 | 01-03-2011 07:15 PM |
Kindle Searching Function Question | keegon | Amazon Kindle | 4 | 01-09-2010 01:19 PM |
Will the web searching function always be available for free? | raztaztwo | Amazon Kindle | 5 | 12-17-2007 09:31 AM |
Serious exploit in Greasemonkey 0.4 | Alexander Turcic | Lounge | 2 | 07-19-2005 04:59 AM |