Really easy Passwordsystem

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
3 posts Page 1 of 1
Contributors
User avatar
splitedchill
VIP - Donator
VIP - Donator
Posts: 8
Joined: Thu Apr 15, 2010 4:09 pm

Really easy Passwordsystem
splitedchill
Hello

In this Tutorial i show you how to make a simple Passwordsystem but the password isn't in the program it is in a PHPfile its better and secure.

Now we beginning with the PHP-File the name of my PHP-File is lizens.php

Here is the code for the PHP-File!
Code: Select all
<?php
$passwort = $_GET["passwort"];
if($passwort == "Here is your Password")
{
  echo "OK!";
}
else
{
  echo "Nein!";
}?>
This is very simple the PHP-File is looking if the password correct!


Now we come to the Code in Visualbasic in this code we send a Request to the PHP-File if the PHP-File says OK then you can Access in the Program if not the program close.

You need for this a button and a textbox the button code is this code here:

Here is the Visual Basic Code:
Code: Select all
Dim webreq As WebRequest = WebRequest.Create("YOUR Site.de/lizens.php?passwort=" & textbox1.text)
        Dim Res As Net.WebResponse = webreq.GetResponse
        Dim reader As StreamReader = New StreamReader(Res.GetResponseStream)
        Dim ok As String = reader.ReadToEnd
        
if ok = "OK!" then
form2.show()
form1.close()
else
msgbox("Password invalid")

This is very simple and not secure but its a basic Passwordsystem and no body can find the password with a reflector!

I hope you like this Tutorial and give me Feedback
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Really easy Passwordsystem
Axel
You should check the hash instead of the password because its possible to capture it(with a http sniffer like fiddler)
http://vagex.com/?ref=25000
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Really easy Passwordsystem
mandai
Or better yet you could use SSL.
3 posts Page 1 of 1
Return to “Tutorials”