Posts: 1,046
Threads: 250
Joined: Nov 2014
Reputation:
0
Got few questions, if anyone knows C#...
Posts: 801
Threads: 30
Joined: Mar 2013
Reputation:
0
PM me, I'll try help where I can
Posts: 38
Threads: 2
Joined: May 2011
Reputation:
0
Yup, i can help if u want ,just pm
Posts: 255
Threads: 2
Joined: Aug 2010
Why pm, just post here, more people could help
Posts: 1,046
Threads: 250
Joined: Nov 2014
Reputation:
0
Well, I want to make a launcher where people will use the same account as in game to log in.
The problem is that I hash and salt the password in game, to use it to log in on the launcher do I have to remove the encryption or something like that?
Posts: 579
Threads: 5
Joined: Oct 2015
No, you can also use the hashing methods you use in PAWN (for example SHA_256) in C# too
For example:
Player enters usename in the launcher ->
The launcher retrieves the hashed password and salt.
The launcher asks for password.
Player enters his password ->
The launcher hashes the password with the salt retrieved earlier from the DB.
Compares it with the hashed password which was retrieved from the DB.
If matches, continue logging in and retrieving data and stuff, if not, display the login window again or something.
Sorry if I wasn't clear.
Posts: 255
Threads: 2
Joined: Aug 2010
You will need something like an api on your website, because you cant just hardcode your db login info into your app. Hackers could reverse engineer it to get your db login and do shit.
For example, create a php script check.php, that will accept 2 post params - login and hash. When player enters his login, hash the password with the same hash as you use in pawn, and send a post request to your website/check.php
This script can reply with an error message like wrong password, or send all account details that you need if it was right, etc. Just parse the data and display them in your launcher.
This is the proper and secure way to do it
Posts: 1,266
Threads: 6
Joined: Oct 2014
Quote:
Originally Posted by AndreiWow
I understand the login part now, but it is first time when I hear about reverse-engineering and I didn't really understand how to make it with php, do any of you know any good tutorial for this?
I want the same login on the launcher because there will be the UCP too.
|
use samp sockets plugin to connect your application with the server.
https://sampforum.blast.hk/showthread.php?tid=333934
I've posted an app video which was using the same method and logins to server by user name and pass but sadly I don't know for what samp beta testers got it removed. if you want I can show you its source / video on private pm.