View previous topic :: View next topic |
Author |
Message |
dedlyblady Cheater Reputation: 0
Joined: 14 Sep 2017 Posts: 33
|
Posted: Wed Dec 27, 2017 12:11 am Post subject: |
|
|
FreeER wrote: | Huh, that makes a lot of sense Corroder lol
Not sure why I didn't think of using a basic website setup since it typically includes a database, perhaps because I don't know php very well to create a page to interact with it but I'm sure it's just a couple lines of code to essentially copy and paste to query with two or three GET parameters You'd likely need a website for people to join after all
Though I'd probably look into using POST rather than GET, at least for the password. Even when using HTTPS which hides everything past the main domain it's probably still more likely to be logged than than POST information and shouldn't be much more difficult to implement so might as well "do it right".
Should be a lot easier to google information for as well, surely tons of tutorials on php and databases for websites. |
Thank you for your reply again .. I have a web page I tried this script but I can not run it as it should have needed help and I can not upload the problem here because I can not put any links here
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Wed Dec 27, 2017 4:44 am Post subject: |
|
|
sample :
client side :
Code: | function btnLoginClick(sender)
MyTrainer.Hide()
local int=getInternet()
URL="http://cheatengine.org/loginexample.php?username="..MyTrainer.edtUsername.Text.."&password="..MyTrainer.edtPassword.Text.."&is64bit="..tostring(cheatEngineIs64Bit())
s=int.getURL(URL)
int.destroy()
load(s)()
end
function FormClose(sender)
closeCE();
return caHide --Possible options: caHide, caFree, caMinimize, caNone
end
MyTrainer.Show() |
server side :
Code: | <?php
include("config.php");
session_start();
//if($_SERVER["REQUEST_METHOD"] == "POST") {
// username and password sent from form
// $myusername = mysqli_real_escape_string($db,$_POST['username']);
// $mypassword = mysqli_real_escape_string($db,$_POST['password']);
$username=$_GET['username'];
$password=$_GET['password'];
$is64bit=$_GET['is64bit']=='true';
// $sql = "SELECT id FROM admin WHERE username = '$username' and passcode = '$password'";
$sql = "SELECT id FROM users WHERE username = '$username' and pass = '$password'";
$result = mysqli_query($db,$sql);
$row = mysqli_fetch_array($result,MYSQLI_ASSOC);
$active = $row['active'];
$count = mysqli_num_rows($result);
$expiredate = "SELECT expiredate FROM users WHERE username = '$username' and pass = '$password'";
// If result matched $myusername and $mypassword, table row must be 1 row
if($count == 1) {
//if (new DateTime() < new DateTime(sql2)) {
if ($is64bit)
{
include("examplescript.luac64");
}
else
{
include("examplescript.luac32");
}
}
//}
else
{
echo("showMessage('wrong')\n\r");
echo("closeCE()");
}
//}
?> |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
dedlyblady Cheater Reputation: 0
Joined: 14 Sep 2017 Posts: 33
|
Posted: Wed Dec 27, 2017 6:16 am Post subject: |
|
|
Corroder ... thnaks for replay .. so i can using programe Navicat With this Scrpit To add members through ... Or how this is run because it happened with mistakes when I used it and do not know the solution because I am a newbie in this area .. Can you do a small video installation? I will be very thankful to you ؟
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Wed Dec 27, 2017 8:11 am Post subject: |
|
|
What I've done just give a sample.
Some experts here should explain and giving help better.
I don't know about navicat at all, anyhow for your reference, here is a good site completely with good example and step by step tutorial about use login form using lua and mysql database / php.
Please take a look here :
http://www.computercraft.info/forums2/index.php?/topic/21229-how-to-create-a-mysql-database-login/
good luck
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
dedlyblady Cheater Reputation: 0
Joined: 14 Sep 2017 Posts: 33
|
Posted: Wed Dec 27, 2017 10:59 am Post subject: |
|
|
[quote="Corroder"]What I've done just give a sample.
Some experts here should explain and giving help better.
I don't know about navicat at all, anyhow for your reference, here is a good site completely with good example and step by step tutorial about use login form using lua and mysql database / php.
Thank you for help .. but unfortunately what I did not run because there is not enough experience in it .. I will wait maybe someone else can help me .. Thank you again for you
|
|
Back to top |
|
|
dedlyblady Cheater Reputation: 0
Joined: 14 Sep 2017 Posts: 33
|
Posted: Thu Dec 28, 2017 12:40 am Post subject: |
|
|
@Dark Byte i guess u can help me ?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Thu Dec 28, 2017 4:40 am Post subject: |
|
|
learn php and databases and sql
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
dedlyblady Cheater Reputation: 0
Joined: 14 Sep 2017 Posts: 33
|
Posted: Thu Dec 28, 2017 9:05 am Post subject: |
|
|
Dark Byte wrote: | learn php and databases and sql |
Is this all you have to Help Me ?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Thu Dec 28, 2017 12:42 pm Post subject: |
|
|
Pretty much yes: Learn how to setup a database with tables containing login information
Then learn how to use php, and how to connect it to your database
Then find out how to do sql queries to fetch data like the password that belongs to a specific username, and verify that what was given matches, and then deal with it accordingly
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Thu Dec 28, 2017 1:17 pm Post subject: |
|
|
dedlyblady wrote: | Is this all you have to Help Me ? | Do remember that there's only so much time and energy people are willing to give away for free to random strangers on the internet
|
|
Back to top |
|
|
dedlyblady Cheater Reputation: 0
Joined: 14 Sep 2017 Posts: 33
|
Posted: Fri Dec 29, 2017 9:07 am Post subject: |
|
|
Dark Byte wrote: | Pretty much yes: Learn how to setup a database with tables containing login information
Then learn how to use php, and how to connect it to your database
Then find out how to do sql queries to fetch data like the password that belongs to a specific username, and verify that what was given matches, and then deal with it accordingly |
You want me to learn all this just to be username and password for my trianer .. AnyWay thanks
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Fri Dec 29, 2017 11:13 am Post subject: |
|
|
dedlyblady wrote: | You want me to learn all this just to be username and password for my trianer .. AnyWay thanks | Not intending to speak for DB but. No, that's what you would need to learn to have a database of members that you could then access via a trainer in the way that you imagine it. None of us necessarily want you to learn anything, you came to us not the other way around.
You've already been given a simple script that allows you to have a single username and password, a bit of modification would allow multiple fairly easily, a bit more would allow the member list to change (eg. hosted as a simple key-value datafile on a website that'd be downloaded at launch), a bit more and you could have a sqlite database file that gets downloaded and all the power that comes with that. But if you want a "proper" database that you can interact with freely to have 100+ members all signing up whenever they wish and using the trainer without any issues, it's not a trivial task. There's a reason why it's not just a press of a button somewhere on a gui and thus why people get paid significant amounts of money to setup and then continue to maintain them so that they don't break.
|
|
Back to top |
|
|
dedlyblady Cheater Reputation: 0
Joined: 14 Sep 2017 Posts: 33
|
Posted: Fri Dec 29, 2017 12:45 pm Post subject: |
|
|
FreeER wrote: | dedlyblady wrote: | You want me to learn all this just to be username and password for my trianer .. AnyWay thanks | Not intending to speak for DB but. No, that's what you would need to learn to have a database of members that you could then access via a trainer in the way that you imagine it. None of us necessarily want you to learn anything, you came to us not the other way around.
You've already been given a simple script that allows you to have a single username and password, a bit of modification would allow multiple fairly easily, a bit more would allow the member list to change (eg. hosted as a simple key-value datafile on a website that'd be downloaded at launch), a bit more and you could have a sqlite database file that gets downloaded and all the power that comes with that. But if you want a "proper" database that you can interact with freely to have 100+ members all signing up whenever they wish and using the trainer without any issues, it's not a trivial task. There's a reason why it's not just a press of a button somewhere on a gui and thus why people get paid significant amounts of money to setup and then continue to maintain them so that they don't break. |
As usual, I like your reply. More importantly, you explain in a simple way. Even if you do not have enough information, it is not like the owner of the web. The conversation ended without any help or guidance. Generally, I looked for a solution to these problems. Unfortunately, I did not find enough help. Easy to help some of you as you said before .. but it is ok I will try and try I might find something useful .. Thank you very much again
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
Posted: Fri Dec 29, 2017 1:36 pm Post subject: |
|
|
@Corroder - Your above SQL/PHP code is exploitable and injectable. If you are using PHP to handle your server side, I'd recommend looking into its newer PDO stuff for database connections.
_________________
- Retired. |
|
Back to top |
|
|
|