×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Pune, india
    Posts
    186

    Question passwords visible for (2sec) and then converts to "*"

    hi

    i am having nokia 6600.
    when i enter PIN for my mobile while booting as usual it converts to "*" immediately.
    But when i enter password for my python application then it converts to "*" after a long time (2sec). within 2 sec anyone is able to read passsword.
    so what else can i do??
    i dont want that anyone can see my password.can any one suggest me how to solve the problem???

    thanks in advance

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: passwords visible for (2sec) and then converts to "*"

    I guess that's just how this query works in Python. I may be wrong but I think there isn't anything us users can do about it. The only way you can slightly increase the speed at which characters are converted to "*" is to type the password as quickly as you can, as it's only the last entered character that remains visible for a second.

  3. #3
    Wiki Moderators
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,779

    Talking Re: passwords visible for (2sec) and then converts to "*"

    Quote Originally Posted by sagars View Post
    hi

    i am having nokia 6600.
    when i enter PIN for my mobile while booting as usual it converts to "*" immediately.
    But when i enter password for my python application then it converts to "*" after a long time (2sec). within 2 sec anyone is able to read passsword.
    so what else can i do??
    i dont want that anyone can see my password.can any one suggest me how to solve the problem???

    thanks in advance
    Quote Originally Posted by bogdan.galiceanu View Post
    I guess that's just how this query works in Python. I may be wrong but I think there isn't anything us users can do about it. The only way you can slightly increase the speed at which characters are converted to "*" is to type the password as quickly as you can, as it's only the last entered character that remains visible for a second.
    Python for S60 is versatile that thought !

    Sagar, use this for a password input,

    Code:
    import appuifw
    password=appuifw.query(u'Enter Password', 'code')
    Edit: Reading your problem more carefully, Thats whats happens with some 3rd party applications and webpages too, I remember we had a presentation at Nokia house, where during the demo of the application (with TV out cable on the LCD) the person's password could be easily observed before it gets masked to "*" !

    For the time being be fast enough!

    Happy Pythoning,

    Best Regards,
    Croozeus
    Last edited by croozeus; 2008-06-21 at 15:43.
    Pankaj Nathani
    www.croozeus.com

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: passwords visible for (2sec) and then converts to "*"

    Workaround:
    don't use a standard textinput, "emulate" it, and fill the text field directly with asterisks rather than plain chars (or setup your favourite delay).
    But to do this, you'll have to implement your "9-keys" algorithm i.e. the algorithm which allows using just 9 keys to insert 26 characters (also known as "multitap algorithm").

    It shouldn't be difficult to implement:

    - Wait for key pressed. On timeout, print character corresponding to previously stored keycode and presses number.
    - Key pressed => store keycode and number of presses.
    - Same of before? yes=>cycle, no=>print (or store) previous

    cycle:
    each key cycles through a list of fixed chars2=a,b,c,2 3=d,e,f,3 ....)

    I wrote it in the past in OPL language for my BigKeys application (for UIQ phones which do not have multitap, like motorola a1000), maybe it can help?

    Code:
           REM **************  Character keys ***************
          scrivi%=FALSO%
          SpecialKeyPressed%=0
          IF tasto%=stored% REM Same key pressed: cycle through chars:
            scrivi%=FALSO%
            volte%(tasto%)=volte%(tasto%)+1
            IF volte%(tasto%)>LEN(SequenzaTasto$(tasto%))
              volte%(tasto%)=1
            ENDIF
            IF upper%=VERO%
              ToBeAdded$=UPPER$(MID$(SequenzaTasto$(tasto%),volte%(tasto%),1))
            ELSE
              ToBeAdded$=MID$(SequenzaTasto$(tasto%),volte%(tasto%),1)
            ENDIF   
                  UM$:(KTemp%,ToBeAdded$,CursPos%)
                  GOTO stampa::
          ELSE REM Different  key  pressed (tasto%<>stored%):
            IF stored%<>0 REM Is it first keypress pf whole message?
              REM if no,  prepare char to be printed.
              IF upper%=VERO%
                ToBeAdded$=UPPER$(MID$(SequenzaTasto$(stored%),volte%(stored%),1))
              ELSE
                ToBeAdded$=MID$(SequenzaTasto$(stored%),volte%(stored%),1)
              ENDIF
              UM$:(KDefintive&,ToBeAdded$,CursPos%)
              ins%=KPrima%
              REM prepare new char.
              IF upper%=VERO%
                ToBeAdded$=UPPER$(MID$(SequenzaTasto$(tasto%),volte%(tasto%),1))
              ELSE
                ToBeAdded$=MID$(SequenzaTasto$(tasto%),volte%(tasto%),1)
              ENDIF   
              IF CursPos%+1<=LEN(messaggio$)+1
                CursPos%=CursPos%+1
              ENDIF
              UM$:(KTemp%,ToBeAdded$,CursPos%)
              ResetKeys:
              stored%=tasto%
              GOTO stampa::
            ELSE  
            REM If it IS first keypress of the whole message:
              IF upper%=VERO%
                ToBeAdded$=UPPER$(MID$(SequenzaTasto$(tasto%),volte%(tasto%),1))
              ELSE
                ToBeAdded$=MID$(SequenzaTasto$(tasto%),volte%(tasto%),1)
              ENDIF   
              UM$:(KTemp%,ToBeAdded$,CursPos%)
              stored%=tasto%
              GOTO stampa::
            ENDIF
          ENDIF REM end of "if tasto%=stored%" (same key pressed or not)
        fondo%=FALSO%
        ENDIF : REM End of "tasto%>0 and tasto%<100"
        stampa::
          IF tasto%>0 and tasto%<200
            Mostra:(messaggio$,(TextBRy%-TextULy%-FontSize%-1)/(FontSize%),(TextBRx%-TextULx%)/(FontSize%-1),FontSize%)
          ENDIF
    sorry for mixing italian and english...

    scrivi = write
    tasto = key
    volte = times
    stampa = print
    Mostra = show
    prima = before
    dopo= after
    VERO = TRUE


    SequenzaTasto$(tasto%) = KeySequence$(key%) is a string containing all chars associated to that key.

    Character is written only if scrivi%=VERO% , and scrivi% is set to VERO% upon pressing cursor keys or upon timeout.
    Timeout is given by variabile timeout% continuously incremented in background: every time it raises over MaxTimeout%, scrivi% is set to VERO%.

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: passwords visible for (2sec) and then converts to "*"

    Oh wait, I just found an old post of mine in this same forum, reporting another source of mine: a multitap emulator written in Python! I completely forgot it...

    It's actually written in Jython (Python over java), but it's probably better tha converting from OPL...

    Code:
    # ******************************
    # Funzione di gestione dei tasti
    # Implementa l'algoritmo "multitap", ossia la classica tastiera a 12 tasti
    # dei cellulari che permette di inserire un carattere premendo piu' volte lo
    # stesso tasto.
    # ******************************
    	def tasto1(self,event):
    		global counter, scrivi, tasto, tastoPrecedente, avviaTimer#, self.chars # self.chars
    		temp = java.lang.String(event.getSource().getName()) # Memorizza nome tasto
    		temp2 = temp.substring(6,8) # Estrae ultimi due caratteri (=numero)
    		tastoPrecedente = tasto # Memorizza tasto precedente
    		tasto = java.lang.Integer.parseInt(temp2) # Converte in numero
    		print "HAI APPENA PREMUTO ",tasto
    		if tasto == 99: # stampa carattere di conferma (se non e' implementato il timeout)
    			if tastoPrecedente>=0:
    				print "FINALIZZO: tasto, prec,pres=",tasto,tastoPrecedente, self.pressioni
    				self.targetArea.insert(self.chars[tastoPrecedente][self.pressioni],self.targetArea.getCaretPosition())
    				self.targetArea.requestFocus()
    				# Azzera tutto:
    				self.pressioni = 0
    				tasto = -1
    				tastoPrecedente = -2
    				self.keyContentLabel.setText("")  # Cancella area di anteprima
    			if self.chars == self.chars_lower:
    				self.chars = self.chars_upper
    				self.caseLabel.setText("UPPER")
    			else:
    				self.chars = self.chars_lower
    				self.caseLabel.setText("lower")
    			tasto = tastoPrecedente
    		else:
    			print "t,tP,<>,press=",tasto, tastoPrecedente, tasto != tastoPrecedente, self.pressioni
    			print self.chars[tasto][self.pressioni] , tasto, self.pressioni
    			if tasto == tastoPrecedente and tasto >= 0: # Se e' lo stesso tasto, cambia carattere.
    				self.pressioni = self.pressioni + 1
    				if self.pressioni > len(self.chars[tasto])-1: # Cicla attraverso caratteri del tasto.
    					self.pressioni = 1
    				print "tasto ", tasto, " premuto ", self.pressioni, " volte."
    			if tasto != tastoPrecedente and tastoPrecedente != 99: # Se e' nuovo tasto, stampa carattere precedente.
    				if tastoPrecedente>=0:
    					print "prec,pres=",tastoPrecedente, self.pressioni
    					self.targetArea.insert(self.chars[tastoPrecedente][self.pressioni],self.targetArea.getCaretPosition())
    					self.targetArea.requestFocus()
    					self.keyContentLabel.setText("") # Cancella area di anteprima
    				self.pressioni = 1
    		if tasto != 99:
    			self.keyContentLabel.setText(self.chars[tasto]+ " (" + self.chars[tasto][self.pressioni]+ ")") # mostra caratteri associati a tasto
    		self.targetArea.requestFocus()
    		if tasto != 99:
    			thread.start_new_thread(self.myfunction,("Thread No:1",KTimeout)) # Avvia thread per timout tasto.
    		self.textLenLabel.setText(java.lang.Integer(len(self.messageTextArea.getText())).toString())

    Code:
    	def myfunction(self,string,sleeptime,*args): # Implementa timeout tasti tramite thread.
    		global counter, scrivi, tasto, tastoPrecedente, avviaTimer#, self.chars 
    		if tasto != 99:
    			finito = 0
    			# Ad ogni pressione di un tasto viene lanciato un nuovo thread-contatore, ma di contatore
    			# ne serve solo uno, quindi.... boh, cosi' funziona! ;-)
    			self.timerAvviato += 1
    			self.scritto = 0
    			print self.timerAvviato,self.pressioni
    			while finito == 0:   
    				time.sleep(sleeptime) #sleep for a specified amount of time.
    				finito = 1
    				if self.scritto == 0 and self.timerAvviato == self.pressioni:
    					self.targetArea.insert(self.chars[tasto][self.pressioni],self.targetArea.getCaretPosition())
    					self.targetArea.requestFocus()
    					self.scritto = 1
    	 				self.pressioni = 1
    	 				tasto = -1
    	 				tastoPrecedente = -2
    	 				self.keyContentLabel.setText("") # Cancella area di anteprima
    	 		self.timerAvviato -= 1
    		 	self.targetArea.requestFocus()
    			self.textLenLabel.setText(java.lang.Integer(len(self.messageTextArea.getText())).toString())
    tastoPrecedente = previousKey

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •