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 


With CE Lua, System Target Inquiry

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sun Jan 19, 2020 2:07 am    Post subject: With CE Lua, System Target Inquiry Reply with quote

You can probably find the results of this encoding manually.
But the subject we are dealing with; To do this with CE Lua.

You cannot select the browser where the user opened the game.
And some codes may be different in 32 and 64 bit browsers. (or 32/64Bit Game.exe)
In fact, it can be different on 32 and 64 bit Windows (Linux) systems.


Let's find our 32 and 64 bit codes about the game,
By testing process, Let us use the appropriate code.

Before; Windows / Linux, 32/64 bit:

Code:
local arch
if (os.getenv"os" or ""):match"^Windows" then
   print"Your system is Windows"
   arch = os.getenv"PROCESSOR_ARCHITECTURE"
else
   print"Your system is Linux"
   arch = io.popen"uname -m":read"*a"
end
if (arch or ""):match"64" then
   print"Your system is 64-bit"
else
   print"Your system is 32-bit"
end


now the browser (or Game.exe); 32/64 bit:

Code:
local brw = "chrome.exe"
openProcess(brw)
if targetIs64Bit() then
print(brw.." - 64 bit")
else
print(brw.." - 32 bit")
end


Let's use this in Trainer:

Code:
function Hack1()
if targetIs64Bit() then
codescan1 = 'FE ?? ?? ?? ?? 02 ?? ?? ?? 20 ?? ?? ?? E8 03 00 00'

Aobswap(codescan1,('FE ?? ?? ?? ?? 02 ?? ?? ?? 20 ?? ?? ?? 88 13 00 00'))
else
codescan2 = 'AC 03 00 00 ?? ?? ?? ?? E8 03 00 00'

Aobswap(codescan2,('AC 03 00 00 ?? ?? ?? ?? 88 13 00 00'))
end
end


----- + let's get a bonus; How is the system information received? -----
(Thanks for editing, @atom0S)


Code:
local Text = ([[strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")

Dim result
For Each objCS In colCSes
  result = "Computer Name: " & objCS.Name & vbCrLf
  result = result & "System Type: " & objCS.SystemType & vbCrLf
  result = result & "Number Of Processors: " & objCS.NumberOfProcessors & vbCrLf
Next
result = result & vbCrLf

Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor")
For Each objProcessor in colProcessors
  result = result & "Manufacturer: " & objProcessor.Manufacturer & vbCrLf
  result = result & "Name: " & objProcessor.Name & vbCrLf
  result = result & "Description: " & objProcessor.Description & vbCrLf
  result = result & "Processor ID: " & objProcessor.ProcessorID & vbCrLf
  result = result & "Address Width: " & objProcessor.AddressWidth & vbCrLf
  result = result & "Data Width: " & objProcessor.DataWidth & vbCrLf
  result = result & "Family: " & objProcessor.Family & vbCrLf
  result = result & "Maximum Clock Speed: " & objProcessor.MaxClockSpeed & vbCrLf
Next

WScript.Echo result]])

local path = TrainerOrigin or getMainForm()

local index = 1
if path then -- Save the .CT on the desktop to avoid getting the "path" error. Then continue with the registered CT.
local settingsFile = io.open(path.."Script.vbs", "w")
    if (settingsFile ~= nil) then
      settingsFile:write(Text)
      settingsFile:close()
shellExecute("Script.vbs")
    end
  end


and Download Tool Cetrainer: https://www.dosyaupload.com/foML

Enjoy it!

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials 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 cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites