Chaos Project

RPG Maker => General Discussion => Topic started by: RazorBlack on October 18, 2014, 02:18:54 pm

Title: RMX OS Password crypting
Post by: RazorBlack on October 18, 2014, 02:18:54 pm
Do exist any easy way to turn off crypting in RMX OS? Becouse i've done small registration script in php but that crypting ;|
Title: Re: RMX OS Password crypting
Post by: Soulshaker3 on October 18, 2014, 02:32:46 pm
Instead of turning off just crypt the passwords like RMX - OS does... there must be the code somewhere in there
Title: Re: RMX OS Password crypting
Post by: RazorBlack on October 18, 2014, 03:54:12 pm
Even if i find it for sure i won't be able to do anything with this. Can someone be very nice to me and say me what i need to insert in my code

Spoiler: ShowHide
<?php

if($_GET['sk']=='adduser')
{
echo "<div style='border:1px solid silver;background:#FFFFCC;'>";
echo "<div style='margin-left:10px;margin-right:10px;margin-top:2px:margin-bottom:5px'>";
echo "<div style='border:1px solid silver;background:#CCCCCC;'>";
echo "<div style='margin-left:10px;margin-right:10px;margin-top:2px:margin-bottom:5px'>";
echo "<b>Registration</b>";
echo "</div>";
echo "</div>";
echo "<div style='margin-top:5px;'></div>";


if(!isset($_GET['a']))
{
echo "<form action='rej.php?sk=adduser&a=insert' method='POST' />";
echo "<table>";
echo "<tr>";
echo "<td>";
echo "Username";
echo "</td>";
echo "<td>";
echo "<input type='text' name='username' id='username' >";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "Password";
echo "</td>";
echo "<td>";
echo "<input type='password' id='password' name='password' />";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='2'>";
echo "<input type='submit' value='Register'>";
echo "</td>";
echo "</tr>";
echo "</table>";

echo "</form>";

}
else if($_GET['a']=='insert')
{
$username = $_POST['username'];
$password = $_POST['password'];




@mysql_query("insert into users set username='$username', password='$password'") or die ("Error<a href='rej.php?sk=adduser'><button>Back</button></a>");
echo "Succesfull!";
echo "<a href='index.php'><button>Continue</button></a>";
}
}

?>
Title: Re: RMX OS Password crypting
Post by: Soulshaker3 on October 18, 2014, 04:46:00 pm
Why are you using "echo" on every html tag why don't you just open <html> and <body> in the whole document? Also never worked with RMX-OS but the encryptation must be there somehwere, wait for the awnser of a more informed person of RMX-OS
Title: Re: RMX OS Password crypting
Post by: Blizzard on October 18, 2014, 10:39:20 pm
Uhm, you seriously shouldn't disable this encryption. It literally prevents 99.9% of all noob hackers to get your users' passwords. Every freaking idiot with any network listening tool will be able to hack the accounts of any of your users if you disable this.
Title: Re: RMX OS Password crypting
Post by: G_G on October 19, 2014, 03:12:44 am
I believe you just need to use the PHP "crypt()" method. It will crypt the passwords like Ruby does. Don't forget to remove the salt.
Title: Re: RMX OS Password crypting
Post by: RazorBlack on October 19, 2014, 05:14:27 am
Something like that?
$mdp = $_POST['password'];
$salt = 'XS';
$mdp = crypt($mdp, $salt);
$mdp = substr($mdp,2);
Title: Re: RMX OS Password crypting
Post by: ForeverZer0 on October 19, 2014, 05:55:40 am
Are you trying to make a game that many will not want to play due to the security being taken away?
Title: Re: RMX OS Password crypting
Post by: RazorBlack on October 19, 2014, 06:10:58 am
It's something wrong with my last script?
Title: Re: RMX OS Password crypting
Post by: G_G on October 19, 2014, 11:10:38 am
Quote from: RazorBlack on October 19, 2014, 05:14:27 am
Something like that?
$mdp = $_POST['password'];
$salt = 'XS';
$mdp = crypt($mdp, $salt);
$mdp = substr($mdp,2);



Yes, if I remember right, that's what I used when I created my web registration system.

And what ForeverZer0 meant is that you'd be stupid to take out the security in your game. He's basically going off of what you requested in the first post.
Title: Re: RMX OS Password crypting
Post by: RazorBlack on October 19, 2014, 01:23:16 pm
Ok, but now when I try to log in to account that I created on the web I've got disconnect
Title: Re: RMX OS Password crypting
Post by: G_G on October 19, 2014, 01:58:29 pm
I ran into that same issue. You need to have PHP create some addition data in the database. I think it's under the table "player data". You have to put an entry in with the user id and a timestamp of any kind. I can't really remember, it's been ages since I've worked with RMX-OS.
Title: Re: RMX OS Password crypting
Post by: RazorBlack on October 19, 2014, 05:19:25 pm
And now i don't know what i should do :/
Title: Re: RMX OS Password crypting
Post by: Soulshaker3 on October 19, 2014, 06:22:18 pm
I would help you if I had worked with RMX-OS before but study that table "player_data" and see what it does, you might find the awnser if you look closely
Title: Re: RMX OS Password crypting
Post by: RazorBlack on October 20, 2014, 12:52:53 pm
I have no idea what should i do :|
Spoiler: ShowHide
(http://imageshack.com/a/img674/8997/BvcL1I.jpg)
Title: Re: RMX OS Password crypting
Post by: G_G on October 20, 2014, 01:33:24 pm
In your PHP script, when you go to put the new player in the users table, you also need to add an entry to the "user_data" table.
Title: Re: RMX OS Password crypting
Post by: RazorBlack on October 20, 2014, 03:50:28 pm
How can i do this?
Title: Re: RMX OS Password crypting
Post by: G_G on October 20, 2014, 04:49:05 pm
The same way you add new users into the "users" table. It doesn't sound like you're very familiar with PHP and MySQL which means it's going to make this difficult for you. When you add new data to the "users" tab, it'll return the user id that was injected since "user_id" is an auto increment if I recall correctly. You use that user id and insert a new row into "user_data". If you don't understand how to do this, then I think you need to look into PHP and MySQL a bit more before attempting to finish your web registration page.
Title: Re: RMX OS Password crypting
Post by: RazorBlack on October 21, 2014, 01:07:12 am
I think i will go and learn more about PHP and MySQL. Maybe then i will find solution.
Title: Re: RMX OS Password crypting
Post by: Blizzard on October 21, 2014, 01:21:44 am
Yes, you will have to learn some SQL. But all in all it's pretty simple. All you have to do is call crypt on the password and then call an SQL INSERT on that. (AYou might wanna check first if the username doesn't already exist though.)
Title: Re: RMX OS Password crypting
Post by: RazorBlack on October 21, 2014, 08:10:39 am
I know how to add data to "users" but I have problems with "user_data" now.
Title: Re: RMX OS Password crypting
Post by: Blizzard on October 21, 2014, 09:58:04 am
If you want, you can check the server code of RMX-OS. There you will see what default data is inserted when somebody is registered.