It's Mods

Full Version: Making a login form
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey all OMA s,

I was making today simple login form, thought I'd share it with you.
Keep in mind that it shouldn't be hard to crack, so don't use it if you want good protection.

Usages
  • trolling brother / sister
  • trolling IT teacher
  • general protection of your applications from unwanted viewers
  • OMA

So, let's get things started.
First start with making some nice GUI, like this :
[Image: QeLlJn9sbr.png]

If you want to, make textlabel under Login! button to show if login failed or not.

Set the property of password textboxUseSystemPasswordChar to true
[Image: lKcgacFfNb.png]
This will prevent anyone from seeing your password.

Now, let's write some code. We want it to work like this :
[Image: 6VJsQM8X1l.png]
Let's get started double clicking the 'Login!' button and adding the code checking if username / password is valid. TextBox1 is login and TextBox2 is password.
C++ Code
  1. if(this->TextBox1->Text == "Orange" && this->TextBox2->Text == "orange")
  2. {
  3.  
  4. MessageBox::Show("Login succesfull!");
  5. //do stuff
  6. }


Next thing we might like to add is what the program should do, if username / password does not match the set ones. I will use the code from above.

C++ Code
  1. if(this->TextBox1->Text == "Orange" && this->TextBox2->Text == "orange")
  2. {
  3.  
  4. MessageBox::Show("Login succesfull!");
  5. //do stuff
  6. }
  7. else
  8. {
  9. MessageBox::Show("Invalid login or password! Please try again!");
  10. }



If you have a basic knowledge in any programming language, you should be able to understand what the code does. If not, explanation is here.\

C++ Code
  1. if(this->TextBox1->Text == "Orange" && this->TextBox2->Text == "orange")

This line check if text in textbox1 is equal to "Orange" and the text in textbox2 is equal to "orange" which is my password. The && makes that 'Login succesfull' will pop up only if both arguments are valid.

If something does not match our pw / login, user will get a nice 'Invalid login' box.

That's it, hope you enjoyed the tutorial. If something's not clear, feel free to ask in the thread.

Don't forget to press that [Image: postbit_reputation.gif] button for more releases or tutorials! Rolleyes
This is so secure. Thanks, I will use it I think.


brb porting entire ItsMods db into the login.php.
(01-31-2012 21:56)SuperNovaAO Wrote: [ -> ]This is so secure. Thanks, I will use it I think.


brb porting entire ItsMods db into the login.php.

Quote:Keep in mind that it shouldn't be hard to crack, so don't use it if you want good protection.

blind or what..
Where did I say 'It's a commercial system, with uncrackable encryption algorithm, I've written it for a bank' ?
(01-31-2012 21:56)SuperNovaAO Wrote: [ -> ]This is so secure. Thanks, I will use it I think.


brb porting entire ItsMods db into the login.php.

My sarcasminator has exploded!
HELP!
(01-31-2012 22:02)jariz Wrote: [ -> ]@SuperNovaAO

[Image: 6cum0.jpg]

Did you repair my sarcasminator?

Oh no wait, that's not mine... mine is version 2.3...
Derailed because an admin acted like a douchebag, gg
the admin = a douchebag


inb4 ban
(01-31-2012 21:58)OrangePL Wrote: [ -> ]
(01-31-2012 21:56)SuperNovaAO Wrote: [ -> ]This is so secure. Thanks, I will use it I think.


brb porting entire ItsMods db into the login.php.

Quote:Keep in mind that it shouldn't be hard to crack, so don't use it if you want good protection.

blind or what..
Where did I say 'It's a commercial system, with uncrackable encryption algorithm, I've written it for a bank' ?

Code:
I only read stuff in code tags.

Now back to topic.
and how is possible to take a login && password from a db? Lets say, a html, that contains Usernames: and Password:
Pages: 1 2
Reference URL's