Posts: 2,322
Joined: Sep 2006
Reputation:
309
Hi,
I am looking for a way to hide passwords when being entered into my XBMC script using the XBMC built in keyboard function.(XBMCMail (SSS)).
Basically, I want it to be like when you enter in a master password in XBMC. It hides the password when being entered so no one else can see what it is as you are entering it.
Any way of doing this??
Cheers,
Stanley87
Posts: 928
Joined: Feb 2004
Reputation:
0
Asteron
"Skilled" Python Coder
Posts: 928
Looking at the api it does not look possible currently. Someone would need to add it to the api. Really since the virtual keyboard is on the screen its not all that secure anyway but it should be in there.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
yeah, that should be added. the keyboard, itself, supports it but its not extended out to the python api yet. just quickly looking at the code, it should be simple to add a "setHiddenInput()" command to the python keyboard object.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
committed to svn... please let me know if it works correctly.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
i'm a bit worried you might get the md5 hash back. i'm not sure how general i did it when i tweaked the profile stuff.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
really? i thought it just hid the text on screen with *'s...
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
nope, it hashes as well. i know, i was lazy. but come to think of it, it's probably in one of them static functions, not triggered by only setting the bool
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
thanks... i was concerned so i just checked it out... the md5 hashing is only done when using the static password specific functions to get input. python does not use them. it has its own low level text entry similar to the basic static function. that bool, by itself, only hides the text on screen in the edit bar of the keyboard dialog.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
you'll have to wait for the next t3ch release then.
Posts: 2,322
Joined: Sep 2006
Reputation:
309
Hi,
Can't get the hiddeninput function in my script going, i used the following code:
def getpassinput(self):
mastpassw = ""
keyboard = xbmc.Keyboard(mastpassw, "Please Enter Password")
keyboard.setHiddenInput(True)
keyboard.doModal()
mastpassw = keyboard.getText()
I also tried the "setHiddenInput" with "()" instead of true and no go, also tried moving the line above and below the do.Modal and still no luck.
Is this the right way of doing it?
Cheers
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
2007-01-13, 15:58
(This post was last modified: 2007-01-13, 16:18 by kraqh3d.)
try using "1"... there isnt really a bool datatype... its faked with an unsigned char... but False should be interprettted as zero, and True as one so I dont think thats the problem.
** edit **
also, the way its coded, if you just do "kb.setHiddenInput()" with no argument in the parens, it should default to hidden.
let me know, if its still not working. and please email me a short test script.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
So to confirm, it works on the Xbox, but not on the PC?