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 


Password protection?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Fri Aug 17, 2012 12:17 pm    Post subject: Password protection? Reply with quote

Hey,
I was wondering if its possible to do password protection.
Like
lets say
its opening first
Code:
show_form(PASSWORD)

And then user needs to enter the password, if he wrote the right password then
Code:
else
show_form(UDF1)

I really don't know what to write to get this code,
I hope anyone could help me write it down, Thanks!


Alright so I've used VB few years ago, and I remember that I did the password protection,so I've googled up and found a video showing how to do it again.
The code is:
Code:
Private Sub Command1_click()
User = "user"
Pw = "pw"
If Text1.Text = User And Text2.Text = Pw Then
MsgBox "Successful Login"
Form2.show
Else
MsgBox "Wrong ID or Password, Try Again"
End If
End Sub

Commands are very simlar to LUA, but I just don't know how to translate it to LUA.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Fri Aug 17, 2012 7:23 pm    Post subject: Reply with quote

There is no inputQuery right now (perhaps next version) so for now you need to first show a password box, read out the input and check if it's correct, and if so, show

anyhow, do
Code:

form_showModal(formname)

to show the form and wait till the user closes it. (If set the "ModalResult" property of a button on that form to something else then mrNone, clicking that button will close the form)

Then read out the text, using control_getCaption(formname_editboxname) or getProperty(formname_editboxname, "Text")

and check if it's valid or not and continue from there (showing a form, or a message saying it's wrong)

_________________
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
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Aug 18, 2012 4:01 am    Post subject: Reply with quote

You can do this:
1) do not use hotkeys, only set them inside LUA script
2) place all form controls inside panel
3) set panel visibility to false
4) create label and edit controls (for password)
5) if password is correct,
- set panel visibility to true (label and edit visibility from step 4, set to false )
- create hotkeys
6) if password is incorrect - do nothing


most important part:
Code:

function passwordeditkeypress(sender, key)
  if key ~= '\r' then return key end
  if control_getCaption(editPassword) ~= 'secret' then return end

  createHotkey(cheat_1,VK_F1,VK_MENU)
  createHotkey(cheat_2,VK_F2,VK_MENU)

  control_setVisible(labelPassword, false)
  control_setVisible(editPassword, false)
  control_setVisible(CETrainer_CHEATPANEL, true)
end

control_setVisible(CETrainer_CHEATPANEL, false)

labelPassword = createLabel(CETrainer)
control_setPosition(labelPassword,5,5)
control_setCaption(labelPassword,'password:')

editPassword = createEdit(CETrainer)
setProperty(editPassword,'EchoMode','emPassword')
control_setPosition(editPassword,5,25)
setMethodProperty(editPassword,'OnKeyPress',passwordeditkeypress)



try cetrainer below.



passwordDemo.ct
 Description:
source

Download
 Filename:  passwordDemo.ct
 Filesize:  3.46 KB
 Downloaded:  1194 Time(s)


passwordDemo.cetrainer
 Description:
password: secret
then hit enter

Download
 Filename:  passwordDemo.cetrainer
 Filesize:  3.46 KB
 Downloaded:  1170 Time(s)


_________________
Back to top
View user's profile Send private message MSN Messenger
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Sat Aug 18, 2012 7:04 am    Post subject: Reply with quote

Yes!!
Thanks you SO MUCH, it worked!
I will donate as soon as I get my money.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Tue Dec 23, 2014 4:13 am    Post subject: Reply with quote

unless using some external module (some dll), ce lua source alone is not secure anyway Smile

It may be more viable to protect some content the script to be handle.

Suppose I want to protect aob string I input in DaSpamar's Easy trainer.

I would encrypt the aob by some algorithm with a key.
The key is generate by hashing the cheat maker's input of user_id and password.
Then the cheat user virtually must input the same user_id and password, to correctly de-crypt the aob.

The key point is, there are no need to store key , user_id and password in the source, even the script is not secure.
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Tue Dec 23, 2014 8:37 am    Post subject: Reply with quote

panraven wrote:
unless using some external module (some dll), ce lua source alone is not secure anyway Smile

It may be more viable to protect some content the script to be handle.

Suppose I want to protect aob string I input in DaSpamar's Easy trainer.

I would encrypt the aob by some algorithm with a key.
The key is generate by hashing the cheat maker's input of user_id and password.
Then the cheat user virtually must input the same user_id and password, to correctly de-crypt the aob.

The key point is, there are no need to store key , user_id and password in the source, even the script is not secure.


Pointless can be seen as plain in memory.
Server-side works the best.
I've taken cheat engine trainers few steps forward Wink.
(Pay attention that was before I knew lua scripting)

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8518
Location: 127.0.0.1

PostPosted: Tue Dec 23, 2014 3:47 pm    Post subject: Reply with quote

panraven wrote:
unless using some external module (some dll), ce lua source alone is not secure anyway Smile

It may be more viable to protect some content the script to be handle.

Suppose I want to protect aob string I input in DaSpamar's Easy trainer.

I would encrypt the aob by some algorithm with a key.
The key is generate by hashing the cheat maker's input of user_id and password.
Then the cheat user virtually must input the same user_id and password, to correctly de-crypt the aob.

The key point is, there are no need to store key , user_id and password in the source, even the script is not secure.


You are never going to create any method of security that can't be reversed / undone, especially with a language like Lua. No matter what you do, people can find your aob's and such. Not to mention, Cheat Engine is open source, they can change how Cheat Engine handles aob's and print them out to a file or something if they wanted and run your trainer through their own CE.

No matter what you come up with, there will be a way to undo it and see your code.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Dec 23, 2014 4:04 pm    Post subject: Reply with quote

Yeah...even if you managed to host your trainer on your own server and issue client copies to end-users with ID/Passwords, they can still scan for changes to see what your trainer is doing on their own systems.

There is little point in protecting a trainer unless you are hosting it and it is being used for online games.
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Tue Dec 23, 2014 4:12 pm    Post subject: Reply with quote

I agree you two.

Yet, increasing security level do have a effect on minimizing the intersection of set of people having the required hacking skill and set of people having the time,energy and interest to break a trainer, hopefully to an empty set Wink
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8518
Location: 127.0.0.1

PostPosted: Tue Dec 23, 2014 7:43 pm    Post subject: Reply with quote

panraven wrote:
I agree you two.

Yet, increasing security level do have a effect on minimizing the intersection of set of people having the required hacking skill and set of people having the time,energy and interest to break a trainer, hopefully to an empty set Wink


There are a lot of other ways people can monitor what your trainer is doing with little to no effort or skill.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Wed Dec 24, 2014 2:20 am    Post subject: Reply with quote

atom0s wrote:
panraven wrote:
I agree you two.

Yet, increasing security level do have a effect on minimizing the intersection of set of people having the required hacking skill and set of people having the time,energy and interest to break a trainer, hopefully to an empty set Wink


There are a lot of other ways people can monitor what your trainer is doing with little to no effort or skill.


again, I agree, if the knowledge is not count as skill.
but you can ask DaSpamar if the security effort on his current trainer is a paper tiger Smile


Anyway, it is going off-topic, sorry~
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Wed Dec 24, 2014 5:57 pm    Post subject: Reply with quote

@panraven you're mistaken this is not my trainer security, this was a question in my early days of lua scripting (2 and half years ago..).

I use db to fetch user data and show specific data for each user, if you want I can message you with my trainer d/l.

If someone wants to break my trainer, I have no problems with it, nothing will prevent it if he really seeks to.

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Thu Dec 25, 2014 6:08 am    Post subject: Reply with quote

DaSpamer wrote:
@panraven you're mistaken this is not my trainer security, this was a question in my early days of lua scripting (2 and half years ago..).

I use db to fetch user data and show specific data for each user, if you want I can message you with my trainer d/l.

If someone wants to break my trainer, I have no problems with it, nothing will prevent it if he really seeks to.


Ah, ok. Sorry~
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
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