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 


How to use ffi in Cheat Engine LUA?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
loveCE
How do I cheat?
Reputation: 0

Joined: 17 Apr 2026
Posts: 2

PostPosted: Thu May 14, 2026 12:39 am    Post subject: How to use ffi in Cheat Engine LUA? Reply with quote

I wrote this the code like the follwings:
local ffi = require("ffi")
local bit = require("bit")

-- EDIT ME
local testWindows = false
local serverIp = "192.168.123.1" -- Change this to your server's IP address
local serverPort = 8124 -- Change this to your server's port
local dumpPort = 8126 -- Port to connect to for game dumping


but ffi can't find.
How to download ffi and execute?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

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

PostPosted: Thu May 14, 2026 2:17 am    Post subject: Reply with quote

better use executeCodeEx and maybe in combination of the c compiler that comes with CE
_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 39

Joined: 16 Feb 2017
Posts: 1577

PostPosted: Thu May 14, 2026 10:57 am    Post subject: Reply with quote

This code will give you your (PC's) IP address.

Code:
local output = runCommand("ipconfig")
print(output)

--------------------------------------

This code lists the areas, programs, and websites you're connected to or that your PC communicates with, based on your IP address.

Code:
shellExecute("cmd.exe", "/c netstat -n > net_sonuc.txt")

sleep(500)

local f = io.open("net_sonuc.txt", "r")
if f then
  local icerik = f:read("*all")
  f:close()
  print(icerik)

  -- clear txt
  -- os.remove("net_sonuc.txt")
else
  print("File not found!")
end


You can test what's left behind by closing and reopening the sites or programs.

----------------------------------------------

NOTE: (DISCLAIMER!)
These codes are shared for educational purposes and serve as practical examples of Lua scripting and Windows API integration.

By using or misusing this code, you acknowledge that neither Cheat Engine nor CEF (Cheat Engine Forum) shall be held liable. You assume all responsibility and proceed entirely at your own risk.

_________________
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 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