(Hidden) Password XBMC keyboard dialog???
#1
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
Reply
#2
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.
Reply
#3
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.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
committed to svn... please let me know if it works correctly.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
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.
Reply
#6
really? i thought it just hid the text on screen with *'s...
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
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
Reply
#8
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.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#9
kraqh3d Wrote: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.

Im not so familiar with SVN, do you add it to the XBMC SVN?::-s
Reply
#10
you'll have to wait for the next t3ch release then.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#11
Big Grin
kraqh3d Wrote:you'll have to wait for the next t3ch release then.
Hi, I have grabbed the SVN. Just obtaining the apropriate programs needed to compile at the moment.

Cheers for the help.
Reply
#12
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
Reply
#13
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.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#14
Code:
import xbmc
def getKeyboard( default = "", heading = "" ):
  keyboard = xbmc.Keyboard( default, heading )
  try:
    keyboard.setHiddenInput( True )
    keyboard.doModal()
    if ( keyboard.isConfirmed() ):
      return keyboard.getText(), True
  except:
    pass
  return default, False

mastpassw, succeeded = getKeyboard( "", "Please Enter Password" )
print mastpassw, succeeded

That works on the xbox, for some reason it errors on the PC after you cancel or accept the keyboard.

Edit: It actually works and prints the result, but XBMC_PC.exe errors with the following. Also it doesn't matter if the setHiddenInput() is used. Must be something with this specific code, because other scripts work fine with the keyboard.

Quote:
09:52:53 M:126373888 INFO: test
09:52:53 M:126373888 INFO:
09:52:53 M:126373888 INFO: True
09:52:53 M:126373888 INFO:
09:52:53 M:126373888 INFO: Scriptresult: Succes
09:52:53 M:126373888 INFO: Python script stopped
09:52:53 M:126382080 FATAL: EXCEPTION_ACCESS_VIOLATION (0xc0000005)
at 0x006af0e3
Reply
#15
So to confirm, it works on the Xbox, but not on the PC?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
(Hidden) Password XBMC keyboard dialog???0