Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


{TUTORIAL}HOW TO ADD A LOGIN SCRIPT ON VB6
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Pepsiguy
I post too much
Reputation: 0

Joined: 16 Aug 2007
Posts: 2016

PostPosted: Fri Nov 02, 2007 8:08 pm    Post subject: {TUTORIAL}HOW TO ADD A LOGIN SCRIPT ON VB6 Reply with quote

People Have Been Wondering how do u add a login script? heres a tutorial Cool

Hello, and welcome to my simple login form tutorial. This is situated on the fact that you are using Visual Basic 6.0

1. Starting off you are going to need to open up Visual Basic 6.0 Development window, and create a standard .exe file

2. Now you need to drag onto the form the correct command property.

These are as follows:

2 Command Buttons
2 Text Boxes
2 Labels

Set the following properties for the different controls.

Command Button 1
Name: cmdLogin
Caption: Login

Command Button 2
Name: cmdClose
Caption: Close Program

Text Box 1
Name: txtUsername
Text: Leave this empty

Text Box 2
Name: txtPassword
Text: Leave this empty
PasswordChar: * (Reccommended so that the text appears as stars, added security.)

Label 1
Caption: Username:

Label 2
Caption: Password

Now that you have the correct controls on the screen then we can get down to the coding!

In order to access the code of the program, right click anywhere on the form and click on view code.

Code:


'Global Variables
Dim Username As String                       'Username Variable
Dim Password As String                       'Password Variable
 
Private Sub cmdLogin_Click()
 
Username = "TestUser1"              'What the Username Variable is
Password = "TestUser1"              'What the Password Variable is
 
'If Statement Starting Here
'It States that if the username is = to text box and password is = password text box, then it should login, else display error message!
If Username = txtUsername And Password = txtPassword Then
 
           frmLoginSuccess.Show    'Shows the Login Success Form
           frmLoginScreen.Hide       'Hides the Login Screen
 
Else
 
'A Message box that displays you have entered the wrong username and password
           
MsgBox ("You have entered the wrong username and password")
 
End If
 
End Sub
 
Private Sub cmdClose_Click()
 
Unload Me      'Closes the program
 
End Sub


This is a basic piece of code that checks that what is etnered in the username box, and what is entered in the password box, is equal to what the username and password variables have been set at.

3. Now you need to name the forms. Click the form and go to the name property, and call the form frmLoginScreen.

4. Now create a new form. The way to do this is to right click in the project explorer area, and click on new, then select form. Now call this form frmLoginSuccess.

5. Now run the program and see if it works. In theory, when you have entered the correct username and password, it should hide the Login Form and show the Login Success form.

Well that is it!

Test It, and if there are any problems, then simply post here or PM me.


+REP PLEASE

_________________


Last edited by Pepsiguy on Fri Nov 02, 2007 8:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Fri Nov 02, 2007 8:40 pm    Post subject: Reply with quote

make some place where people have to sign up and when they login, compare it to that info.
Back to top
View user's profile Send private message
Pepsiguy
I post too much
Reputation: 0

Joined: 16 Aug 2007
Posts: 2016

PostPosted: Fri Nov 02, 2007 8:43 pm    Post subject: Reply with quote

i just changed it to a tutorial i made
_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Nov 02, 2007 8:45 pm    Post subject: Reply with quote

Firstly, wrong section.

Secondly, this is the worst way to use passwords as everything you do that is like that will be saved in the exe as a string reference. Making it about 3 clicks of your mouse to find the password to log into the exe.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Pepsiguy
I post too much
Reputation: 0

Joined: 16 Aug 2007
Posts: 2016

PostPosted: Fri Nov 02, 2007 8:48 pm    Post subject: Reply with quote

then find me a better tutorial
_________________
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Fri Nov 02, 2007 8:55 pm    Post subject: Reply with quote

The last thing you want to do is hardcode some kind of login.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Nov 02, 2007 9:20 pm    Post subject: Reply with quote

pepsiguy_2 wrote:
then find me a better tutorial


There is nothing to find, this is just common sense. I take it you have never debugged your own applications or bothered to understand how things get stored when they are compiled. Using you source code:



As you can see in the list of references, the username and password are there in plain sight. And if thats not convincing enough:



Theres the function that compares your values:
Code:
If Username = txtUsername And Password = txtPassword Then


In the bottom right corner is the stack pushed to compare.
Text2 is the current value inside the password box.
TestUser1 is the default password to compare to.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Pepsiguy
I post too much
Reputation: 0

Joined: 16 Aug 2007
Posts: 2016

PostPosted: Sat Nov 03, 2007 11:39 am    Post subject: Reply with quote

than find me one where i can set users and passes and better tutorial i took this tutorial and changed it a lil bit
_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Nov 03, 2007 2:16 pm    Post subject: Reply with quote

pepsiguy_2 wrote:
than find me one where i can set users and passes and better tutorial i took this tutorial and changed it a lil bit


Use your imagination. You wont create anything that wont be hackable, I guarantee you that. Use encryption, crude names for functions, etc. Don't use the basic crap like:

If blah = blah then

It's just too easy to detect, think outside the box.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Pepsiguy
I post too much
Reputation: 0

Joined: 16 Aug 2007
Posts: 2016

PostPosted: Sat Nov 03, 2007 7:26 pm    Post subject: Reply with quote

well


A. i dont know how to debug
B. um im not that smart i took the codes from a tutorial
C. i relly dont know crap

_________________
Back to top
View user's profile Send private message
_Teizhcial_
Master Cheater
Reputation: 0

Joined: 10 Aug 2007
Posts: 276

PostPosted: Sat Nov 03, 2007 7:30 pm    Post subject: Reply with quote

pepsiguy_2 wrote:
well


A. i dont know how to debug
B. um im not that smart i took the codes from a tutorial
C. i relly dont know crap


He just admitted he leeched Laughing

and has + Rep at the bottom like he deserves it

_________________


Last edited by _Teizhcial_ on Sat Nov 03, 2007 7:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
Pepsiguy
I post too much
Reputation: 0

Joined: 16 Aug 2007
Posts: 2016

PostPosted: Sat Nov 03, 2007 7:30 pm    Post subject: Reply with quote

well i had help from a tutorial and made this one my own Rolling Eyes
_________________
Back to top
View user's profile Send private message
Gothicvampire17
Advanced Cheater
Reputation: 0

Joined: 05 Oct 2007
Posts: 84

PostPosted: Sat Nov 03, 2007 7:33 pm    Post subject: Reply with quote

helped me thanks
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Pepsiguy
I post too much
Reputation: 0

Joined: 16 Aug 2007
Posts: 2016

PostPosted: Mon Nov 05, 2007 11:44 am    Post subject: Reply with quote

THANKS +REP
_________________
Back to top
View user's profile Send private message
j0ngj0ng
Advanced Cheater
Reputation: 0

Joined: 28 Oct 2007
Posts: 83
Location: Soul Society. training to be a captain.

PostPosted: Tue Nov 06, 2007 8:24 pm    Post subject: Reply with quote

what is this for? i dont get it?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites