Do exist any easy way to turn off crypting in RMX OS? Becouse i've done small registration script in php but that crypting ;|
Instead of turning off just crypt the passwords like RMX - OS does... there must be the code somewhere in there
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
<?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>";
}
}
?>
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
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.
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.
Something like that?
$mdp = $_POST['password'];
$salt = 'XS';
$mdp = crypt($mdp, $salt);
$mdp = substr($mdp,2);
Are you trying to make a game that many will not want to play due to the security being taken away?
It's something wrong with my last script?
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.
Ok, but now when I try to log in to account that I created on the web I've got disconnect
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.
And now i don't know what i should do :/
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
I have no idea what should i do :|
(http://imageshack.com/a/img674/8997/BvcL1I.jpg)
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.
How can i do this?
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.
I think i will go and learn more about PHP and MySQL. Maybe then i will find solution.
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.)
I know how to add data to "users" but I have problems with "user_data" now.
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.