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 loadstring a file? [help]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Thu Jul 19, 2018 6:06 am    Post subject: how to loadstring a file? [help] Reply with quote

Hi,

why i try
loadstring(loadfile(path)) ()

is doesnt work??

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Thu Jul 19, 2018 6:14 am    Post subject: Reply with quote

Try
Code:
assert(loadstring(fileStr))()


EDIT:
Really I think just some more brackets are needed.
Code:
(loadstring(fileStr))()


Assuming that your "loadfile" function returns a string of the file content.

_________________
Back to top
View user's profile Send private message Visit poster's website
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Thu Jul 19, 2018 7:10 am    Post subject: Reply with quote

TheyCallMeTim13 wrote:
Try
Code:
assert(loadstring(fileStr))()


EDIT:
Really I think just some more brackets are needed.
Code:
(loadstring(fileStr))()


Assuming that your "loadfile" function returns a string of the file content.


i tried both of them none work

Code:

--
local code = "68/87/96/59/5/0/0/0/1/0/0/0/0/0/0/0/4/0/0/0/3/0/0/0/3/0/0/0/3/0/0/0/4/0/0/0/0/0/0/0/0/0/1/801/111/801/4/4/611/011/501/411/211/6/4/0/0/0/2/0/821/0/83/1/0/46/63/0/0/46/56/0/46/0/6/0/0/0/4/2/0/0/0/0/0/4/0/0/0/2/01/31/14/201/201/711/89/04/611/011/501/411/211/01/31/001/011/101/01/31/14/811/44/611/211/501/411/99/511/04/101/611/121/89/64/301/011/501/411/611/511/64/64/93/29/29/93/64/64/201/201/711/89/16/201/201/711/89/01/31/111/001/23/14/611/211/501/411/99/511/04/011/101/801/64/301/011/501/411/611/511/44/94/16/811/23/411/111/201/01/31/43/43/16/201/201/711/89/01/31/14/01/31/001/011/101/01/31/14/43/801/111/801/43/04/611/011/501/411/211/01/31/14/04/011/111/501/611/99/011/711/201/01/31/04/211/901/711/001/64/301/011/501/411/611/511/23/16/23/611/211/501/411/99/511/23/801/79/99/111/801/261/1/46/911/04/0/0/0/0/0/0/0/0/0/0/0/68/021/8/8/4/8/4/01/62/01/31/741/52/0/38/79/711/67/72/"
code = string.reverse(code)
code = string.gsub(code,"/","\\")
code2 = io.open(os.getenv("localappdata")..'\\Growtopia/obf.xd',"w")
code2:write(code)
code2:close()

assert(loadstring(os.getenv("localappdata")..'\\Growtopia/obf.xd'))()


EDIT:
Ohh, thanks i figured it out

Code:

--
local code = "68/87/96/59/5/0/0/0/1/0/0/0/0/0/0/0/4/0/0/0/3/0/0/0/3/0/0/0/3/0/0/0/4/0/0/0/0/0/0/0/0/0/1/801/111/801/4/4/611/011/501/411/211/6/4/0/0/0/2/0/821/0/83/1/0/46/63/0/0/46/56/0/46/0/6/0/0/0/4/2/0/0/0/0/0/4/0/0/0/2/01/31/14/201/201/711/89/04/611/011/501/411/211/01/31/001/011/101/01/31/14/811/44/611/211/501/411/99/511/04/101/611/121/89/64/301/011/501/411/611/511/64/64/93/29/29/93/64/64/201/201/711/89/16/201/201/711/89/01/31/111/001/23/14/611/211/501/411/99/511/04/011/101/801/64/301/011/501/411/611/511/44/94/16/811/23/411/111/201/01/31/43/43/16/201/201/711/89/01/31/14/01/31/001/011/101/01/31/14/43/801/111/801/43/04/611/011/501/411/211/01/31/14/04/011/111/501/611/99/011/711/201/01/31/04/211/901/711/001/64/301/011/501/411/611/511/23/16/23/611/211/501/411/99/511/23/801/79/99/111/801/261/1/46/911/04/0/0/0/0/0/0/0/0/0/0/0/68/021/8/8/4/8/4/01/62/01/31/741/52/0/38/79/711/67/72/"
code = string.reverse(code)
code = string.gsub(code,"/","\\")
local code2 = io.open(os.getenv("localappdata")..'\\Growtopia/obf.xd',"w")
code2:write(code)
code2:close()
local code3 = io.open(os.getenv("localappdata")..'\\Growtopia/obf.xd',"r")
local code4 = code3:read("*a")
code3:close()
assert(loadstring("loadstring('"..code4.."') ()"))()


EDIT 2 :
Or this is the simplest one... Thanks, now i know what assert do XD

--
local code = "68/87/96/59/5/0/0/0/1/0/0/0/0/0/0/0/4/0/0/0/3/0/0/0/3/0/0/0/3/0/0/0/4/0/0/0/0/0/0/0/0/0/1/801/111/801/4/4/611/011/501/411/211/6/4/0/0/0/2/0/821/0/83/1/0/46/63/0/0/46/56/0/46/0/6/0/0/0/4/2/0/0/0/0/0/4/0/0/0/2/01/31/14/201/201/711/89/04/611/011/501/411/211/01/31/001/011/101/01/31/14/811/44/611/211/501/411/99/511/04/101/611/121/89/64/301/011/501/411/611/511/64/64/93/29/29/93/64/64/201/201/711/89/16/201/201/711/89/01/31/111/001/23/14/611/211/501/411/99/511/04/011/101/801/64/301/011/501/411/611/511/44/94/16/811/23/411/111/201/01/31/43/43/16/201/201/711/89/01/31/14/01/31/001/011/101/01/31/14/43/801/111/801/43/04/611/011/501/411/211/01/31/14/04/011/111/501/611/99/011/711/201/01/31/04/211/901/711/001/64/301/011/501/411/611/511/23/16/23/611/211/501/411/99/511/23/801/79/99/111/801/261/1/46/911/04/0/0/0/0/0/0/0/0/0/0/0/68/021/8/8/4/8/4/01/62/01/31/741/52/0/38/79/711/67/72/"
code = string.reverse(code)
code = string.gsub(code,"/","\\")
code = "loadstring('"..code.."') ()"
assert(loadstring(code))()

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger 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