Current location: Hot Scripts Forums » Programming Languages » Visual Basic » Password not going through


Password not going through

Reply
  #1 (permalink)  
Old 11-30-04, 04:23 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
Password not going through

I have this:

Code:
'the code to read the file contents
pass = tsStream.ReadAll
'now decode the contents
pass = DeCode(pass)
In a module I have:
Code:
Public pass As String
The decode function can be downloaded at:
http://www.planet-source-code.com/vb...47632&lngWId=1

The word 'admin' is encrypted in the file and I read it and decode it. If I use:
Code:
MsgBox DeCode(pass)
it will popup 'admin' but if I apply it to a password script:
Code:
ps = InputBox("Please enter password:")
If (ps = pass) Then
    Timer1.Enabled = False
    End
Else
    MsgBox "Incorrect Password!", vbExclamation, "Password"
End If
End Sub
it just gives incorrect password :|
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
  #2 (permalink)  
Old 12-02-04, 07:37 AM
chirag's Avatar
chirag chirag is offline
Newbie Coder
 
Join Date: May 2004
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb

Hi,

try!!!
If (trim(ps) = trim(pass))


also if you don't want to keep password case sensitive...
try!!
If (ucase(trim(ps)) = ucase(trim(pass)))
Reply With Quote
  #3 (permalink)  
Old 12-02-04, 09:53 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
i solved it!

'the code to read the file contents
pass = tsStream.ReadAll

should be:

'the code to read the file contents
pass = tsStream.ReadLine

__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for a shoping cart has a sign up form with username and password they choose. kicon Script Requests 1 11-03-04 11:15 AM
Need To Password Protect a Page For Multi-Users cebuy PHP 8 09-09-04 07:57 AM
password validation <?Wille?> PHP 3 08-18-04 03:04 PM
password textbox mpriest HTML/XHTML/XML 14 07-07-04 09:56 AM
Quick Question for you php guru's Tokahashi PHP 3 04-09-04 12:00 PM


All times are GMT -5. The time now is 09:55 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.