Oct 14, 2017 03:14 PM
(This post was last modified: Oct 14, 2017 03:20 PM by CacheIsAFag.)
What you will need:
A basic understand of PHP and VB.net.
A webhost / vps to host the PHP scripts on
An mysql database
Start:
Setting Up The Database:
First things first you will need to create a new database. After creating the database insert a new table called "users" with 2 columns name these 2 columns "username" and "password"
The PHP scripts:
You will need to create 2 new files, config.php and login.php
Config.php
PHP Code
<?php $connection = mysqli_connect('localhost', 'username', 'password'); if (!$connection){ die("Database Connection Failed" . mysqli_error($connection)); } $select_db = mysqli_select_db($connection, 'database name'); if (!$select_db){ die("Database Selection Failed" . mysqli_error($connection)); } ?>
Login.php (hf was blocking me from putting the code into PHP tags so i had to upload to pastebin)
Visual Basic:
Create 2 new text boxes. Set the text to "username" and "password" (this is just a place holder)
Create 1 button, Set the text to "Login"
Double click on your form to view the code.
Import the following "imports System.Net"
Type this under your class start:
"Dim WebClient As New System.Net.WebClient"
Now go back to your design tab and double click on the login button. This will bring you back to the code view but you will notice a new event listener (if that's the name)
Inside this listener type
Dim result As String = WebClient.DownloadString("URLofWebpage/login.php?username=" + TextBox1.Text + "&password=" + TextBox2.Text)
Under that create a new if statement as follows:
PHP Code
<?php If result.Contains("Login.Success") Then 'code here for successful log in, Such as a boolean being set to true or a form being shown' Else ' Some generic error, Probably in your PHP code If result.Contains("Login.Failed") Then 'code here for un-successful log in' End If End If
To create a new user, Goto your users table in phpmyadmin and click insert. Type the username and password of your choice.
You now have a fully working, Semi-secure login system. As far as i know there are no SQLI vulnerabilities in the PHP code.
If you use this for the program you're selling...
It's a nice tutorial but terrible way of doing stuff..
The bad thing is people advised you on how to do it properly and you didn't
(Oct 14, 2017 04:05 PM)warpje Wrote: If you use this for the program you're selling...
It's a nice tutorial but terrible way of doing stuff..
The bad thing is people advised you on how to do it properly and you didn't
I don't use this method for my program, This is a "Simple" tutorial.
Then why don't you update the tutorial to something more secure and how it should be done?
This is not secure at all.
(Oct 14, 2017 06:16 PM)VmX5 Wrote: Damn your posts have been straight savage recently.
Don't understand why these people who claim to be good at programming are wasting their time posting a thread that's supposed to be to help beginners, Yes i agree this is not secure completely secure. So what? it's a "Simple" login system for a reason.
Oct 14, 2017 10:53 PM
(This post was last modified: Oct 14, 2017 10:55 PM by Barret.)
(Oct 14, 2017 07:50 PM)CacheIsAFag Wrote: Don't understand why these people who claim to be good at programming are wasting their time posting a thread that's supposed to be to help beginners, Yes i agree this is not secure completely secure. So what? it's a "Simple" login system for a reason.
Don't put effort into it lad, these ppl act like they are better but in fact are pretty much the same or even lower, like ninja that thinks it funny to make racial jokes ,because obviously that makes you better, you can see they will shoot you down on every moment they get. So just release things on github and announce it on a discord you like to hang out. thats what i do as well.
(Oct 14, 2017 06:16 PM)VmX5 Wrote: Damn your posts have been straight savage recently.
You disappoint me the most. i really thought you are above this childish behavior , apparently you are not.
Oct 15, 2017 02:21 AM
(This post was last modified: Oct 15, 2017 02:21 AM by CacheIsAFag.)
(Oct 14, 2017 10:53 PM)Barret Wrote: Don't put effort into it lad, these ppl act like they are better but in fact are pretty much the same or even lower, like ninja that thinks it funny to make racial jokes ,because obviously that makes you better, you can see they will shoot you down on every moment they get. So just release things on github and announce it on a discord you like to hang out. thats what i do as well.
You disappoint me the most. i really thought you are above this childish behavior , apparently you are not.
I'm just going to setup a SVN with some friends so we can share projects ect.
Oct 15, 2017 03:53 AM
(This post was last modified: Oct 15, 2017 03:53 AM by +Haze.)
(Oct 14, 2017 06:16 PM)Ninja Wrote: Agreed. This is about as secure as a black person's future.
This is why I just don't like you
i wont continue reading it after seeing this:
PHP Code
<?php $username = htmlspecialchars(mysqli_real_escape_string($connection, $_GET['username'])); $password = htmlspecialchars(mysqli_real_escape_string($connection, $_GET['password']));
DO NOT DEAL WITH THIS MEMBER
Oct 15, 2017 08:28 AM
(This post was last modified: Oct 15, 2017 08:33 AM by Ninja.)
(Oct 14, 2017 10:53 PM)Barret Wrote: like ninja that thinks it funny to make racial jokes ,because obviously that makes you better
i dont see the correlation between racist jokes and being good at programming.
(Oct 15, 2017 03:53 AM)+Haze Wrote: This is why I just don't like you
I only said that to trigger you. just FYI.
(Oct 14, 2017 10:53 PM)Barret Wrote: Don't put effort into it lad, these ppl act like they are better but in fact are pretty much the same or even lower, like ninja that thinks it funny to make racial jokes ,because obviously that makes you better, you can see they will shoot you down on every moment they get. So just release things on github and announce it on a discord you like to hang out. thats what i do as well.
The joke was directed at Haze, not OP.
I only shoot down absolute idiots. When someone posts a help thread without searching for a solution himself then I will be rude at him.
(Oct 14, 2017 10:53 PM)Barret Wrote: Don't put effort into it lad, these ppl act like they are better but in fact are pretty much the same or even lower, like ninja that thinks it funny to make racial jokes ,because obviously that makes you better, you can see they will shoot you down on every moment they get. So just release things on github and announce it on a discord you like to hang out. thats what i do as well.
I actually help quite a lot of people here. Just the ones that deserve it. There are a TON of people asking help but just wanting copy pastable code and I shoot those down, yes. Or people that think they know a lot while they actually don't and they teach people the wrong things.
And how exactly am I 'lower'?
Also, I haven't seen many posts of you helping other members in this section. 🤭 I am confident that if we count actually helpful posts on a monthly basis that I am WAY above you.
op i know all of them since the day they join hf they may forgot but i clearly rememebr their start.
Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
DO NOT DEAL WITH THIS MEMBER
This must be the most insecure login system I've ever witnessed
remove 1 row in dnSpy or spoof the response to "Login Success" would bypass this shit completely,
I would advice everyone who even has a thought on using this to stay away, even the PHP is horrid.
We need people making examples but we do not need aids like this for sure. Keep practicing
> mysqli_connect
> 2017
> ???
DO NOT DEAL WITH THIS MEMBER
Oct 15, 2017 02:30 PM
(This post was last modified: Oct 15, 2017 02:32 PM by Ninja.)
(Oct 15, 2017 02:24 PM)Barret Wrote: Het is jammer dat ik niet weet waar je woont had je namelijk echt op gezocht want die bijdehante smoel van jou irriteert me mateloos.
omdat ik gelijk heb? En nu ga je dreigen omdat je verder geen argumenten hebt?
fijn
(Oct 14, 2017 10:53 PM)Barret Wrote: Don't put effort into it lad, these ppl act like they are better but in fact are pretty much the same or even lower, like ninja that thinks it funny to make racial jokes ,because obviously that makes you better, you can see they will shoot you down on every moment they get. So just release things on github and announce it on a discord you like to hang out. thats what i do as well.
May I point you to this post of yours:
https://hackforums.net/showthread.php?ti...id56064391
|