View previous topic :: View next topic |
Author |
Message |
a2z Advanced Cheater
Reputation: 0
Joined: 28 Nov 2022 Posts: 50
|
Posted: Sun Aug 20, 2023 4:57 am Post subject: Using Google Sheets for Trainer Validation |
|
|
Say I have this google sheets acting as a data base:
https://docs.google.com/spreadsheets/d/1OUBIrbv5ZCIyAA6o8x8re5ty79GhEdnsQgREcye5DdA/edit?usp=sharing
Now I need help with code in LUA so that if User Name and Password match then:
Code: | CETrainer.show()
else if no match then
CETrainer.hide() |
The username and password would be put in text box or CEedit in a form by the user.
I know there are many related issues regarding this but for now I just want to learn this basic step before going onto fixing related security issues.
In Summary:
1. User Input Username & Password and press login button
2. Username & Password provided by user is checked against my google sheet record online over the internet
3.If match found then
Code: | CETrainer.show()
else if no match then
CETrainer.hide() |
Please help with code. Thanks... |
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 27
Joined: 16 Feb 2017 Posts: 1124
|
Posted: Sun Aug 20, 2023 12:16 pm Post subject: |
|
|
Do not confuse the same subject further.
In the previous topic I gave you a code that provides the Trainer Version (Block option for all users.) and Username and ID number (User registration or blocking option).
Examine the code and see what the functions do.
This sample code satisfies all the options you want.
The code is sampled with UDF1. Replace UDF1 with CETrainer.
Code: |
local list = yourGoogleDocsList
local key = userID
local check = 0
Sl = createStringList()
Sl.Text = list
for i=0, Sl.count -1 do
if Sl[i]==key then check=1 end
end
Sl.Destroy()
if check==1 then
CETrainer.Show()
else
showMessage("You are not a registered user! Trainer is shutting down!")
-- closeCE() return cafree
end |
_________________
|
|
Back to top |
|
 |
a2z Advanced Cheater
Reputation: 0
Joined: 28 Nov 2022 Posts: 50
|
Posted: Mon Aug 21, 2023 3:40 am Post subject: |
|
|
Apologies. I was not wanting to confuse subject further.
You are using "Google Docs" to keep the user data for the trainer validation.
I wanted to find out if it was possible to use "Google Sheets" instead for the trainer validation. |
|
Back to top |
|
 |
atom0s Moderator
Reputation: 194
Joined: 25 Jan 2006 Posts: 8489 Location: 127.0.0.1
|
Posted: Mon Aug 21, 2023 4:25 pm Post subject: |
|
|
This is not an advisable means of protecting your trainer. Anyone can get the URL to your sheets and just get the full list of usernames and passwords. Storing passwords like this is incredibly irresponsible as well. _________________
- Retired. |
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 27
Joined: 16 Feb 2017 Posts: 1124
|
Posted: Tue Aug 22, 2023 1:38 am Post subject: |
|
|
I think @atom0s pointed to a different issue.
This topic is not about the Trainer lua script encryption (Protection), but may be the next step.
We are simply referring to the code that was created to collect users in a list (not necessarily real names) and restrict their use as needed.
This; It does not assume that every user is a Trainer thief. Of course, there might be a few thieves in between. Still, for the remaining users, it's a good list and reading, comparison example.
Encrypting the Trainer lua script, trying to protect it, although not enough as it should be, can be another issue or issue for the Trainer maker.
Topic now; Creating a list of users on the remote server, reading this list in the Trainer, comparing them and, if necessary, allowing or restricting use.
(I guess a few theft exceptions don't affect this rule.) _________________
|
|
Back to top |
|
 |
a2z Advanced Cheater
Reputation: 0
Joined: 28 Nov 2022 Posts: 50
|
Posted: Tue Aug 22, 2023 2:51 am Post subject: |
|
|
I think the debate here is different from what my question was originally.
I asked if "Google Sheets" could be used instead of "Google Docs" to keep the user registration. If so what part of code needs to change |
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 27
Joined: 16 Feb 2017 Posts: 1124
|
Posted: Tue Aug 22, 2023 4:34 am Post subject: |
|
|
When I'm at the PC for Google Sheets, I'll see what I can do and post the result.
In my case this marks 3 weeks later.
Alternatively, a suggestion for Google Docs;
Table variation example:
1) Username. 2) User ID. 3) Start date. 4) End date. 5) Trainer name.
Google Docs variation:
User name.
User ID.
Starting date.
End date.
Trainer name.
(One blank line and other user records below.)
The information for each user record in the code is accessed as follows:
Code: | local res = 0
UserName = ""
UserID = ""
StartingDate = ""
EndDate = ""
TrainerName = ""
sl = createStringList()
sl.Text = myList
local username=""
for i=1, sl.Count -1 do
check1 = sl[i]
if check1==userKey1 then res=1
UserName = sl[tonumber(i) - 1]
UserID = sl[i]
StartingDate = sl[tonumber(i) + 1]
EndDate = sl[tonumber(i) + 2]
TrainerName = sl[tonumber(i) + 3]
--username=sl[tonumber(i) - 1]
end
end
sl.Destroy() |
_________________
|
|
Back to top |
|
 |
a2z Advanced Cheater
Reputation: 0
Joined: 28 Nov 2022 Posts: 50
|
Posted: Wed Aug 23, 2023 10:57 am Post subject: |
|
|
Thank you for this and also looking forward in 3 weeks |
|
Back to top |
|
 |
a2z Advanced Cheater
Reputation: 0
Joined: 28 Nov 2022 Posts: 50
|
Posted: Mon Sep 18, 2023 3:13 am Post subject: |
|
|
Hi @AylinCE
Were you able to try "Google Sheets" as the database in place of "Google Docs" ? |
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 27
Joined: 16 Feb 2017 Posts: 1124
|
Posted: Mon Sep 18, 2023 2:01 pm Post subject: |
|
|
a2z wrote: | Hi @AylinCE
Were you able to try "Google Sheets" as the database in place of "Google Docs" ? |
I guess you don't follow the forum very well.
Post the topic you want in the relevant section.
Added some features.
All stages have been tested.
Try it and please write your suggestions under the relevant topic.
Trainer control+VIP registeration+Time limit+Google Spreadsheets
https://forum.cheatengine.org/viewtopic.php?t=621414 _________________
|
|
Back to top |
|
 |
|