Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


i need help about Script Login
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
dedlyblady
Cheater
Reputation: 0

Joined: 14 Sep 2017
Posts: 33

PostPosted: Wed Dec 27, 2017 12:11 am    Post subject: Reply with quote

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 Smile You'd likely need a website for people to join after all Very Happy

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
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Wed Dec 27, 2017 4:44 am    Post subject: Reply with quote

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
View user's profile Send private message
dedlyblady
Cheater
Reputation: 0

Joined: 14 Sep 2017
Posts: 33

PostPosted: Wed Dec 27, 2017 6:16 am    Post subject: Reply with quote

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 ؟ Embarassed
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Wed Dec 27, 2017 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message
dedlyblady
Cheater
Reputation: 0

Joined: 14 Sep 2017
Posts: 33

PostPosted: Wed Dec 27, 2017 10:59 am    Post subject: Reply with quote

[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
View user's profile Send private message
dedlyblady
Cheater
Reputation: 0

Joined: 14 Sep 2017
Posts: 33

PostPosted: Thu Dec 28, 2017 12:40 am    Post subject: Reply with quote

@Dark Byte i guess u can help me ? Crying or Very sad
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Dec 28, 2017 4:40 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
dedlyblady
Cheater
Reputation: 0

Joined: 14 Sep 2017
Posts: 33

PostPosted: Thu Dec 28, 2017 9:05 am    Post subject: Reply with quote

Dark Byte wrote:
learn php and databases and sql


Is this all you have to Help Me ? Crying or Very sad
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Dec 28, 2017 12:42 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Thu Dec 28, 2017 12:55 pm    Post subject: Reply with quote

search "sql sever setup"
1st result
https://www.tutorialspoint.com/ms_sql_server/ms_sql_server_installation.htm

search "database tutorial"
1st result
https://www.tutorialspoint.com/database_tutorials.htm

search "web database tutorial"
1st result
https://www.w3schools.com/php/php_mysql_intro.asp

search "php database tutorial"
2st result
https://www.tutorialspoint.com/php/php_and_mysql.htm

search "lamp server setup"
1st result
http://howtoubuntu.org/how-to-install-lamp-on-ubuntu

The code is every where, just start at your skill level.

_________________
Back to top
View user's profile Send private message Visit poster's website
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Thu Dec 28, 2017 1:17 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
dedlyblady
Cheater
Reputation: 0

Joined: 14 Sep 2017
Posts: 33

PostPosted: Fri Dec 29, 2017 9:07 am    Post subject: Reply with quote

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 Rolling Eyes .. AnyWay thanks
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Fri Dec 29, 2017 11:13 am    Post subject: Reply with quote

dedlyblady wrote:
You want me to learn all this just to be username and password for my trianer Rolling Eyes .. 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
View user's profile Send private message
dedlyblady
Cheater
Reputation: 0

Joined: 14 Sep 2017
Posts: 33

PostPosted: Fri Dec 29, 2017 12:45 pm    Post subject: Reply with quote

FreeER wrote:
dedlyblady wrote:
You want me to learn all this just to be username and password for my trianer Rolling Eyes .. 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 Wink
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Fri Dec 29, 2017 1:36 pm    Post subject: Reply with quote

@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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites