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 Lua to download and write to an .exe file on disk

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Mon Dec 19, 2016 10:45 am    Post subject: How to use Lua to download and write to an .exe file on disk Reply with quote

I've done a Trainer, which checks if the update.
I know how to download a file using Lua, but how to pass this file (.exe) to the hard disk?
I tried but some things, but the file was invalid.

_________________
...
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Dec 19, 2016 6:47 pm    Post subject: Reply with quote

You best not be downloading viruses. Smile The "b" is for binary.
Code:
local output = io.open("trainer.exe", "wb")
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Tue Dec 20, 2016 7:49 am    Post subject: Reply with quote

Does it work for any kind of .exe?
Being a cheat engine trainer or not.
I do not like messing with viruses, I'm not interested in it, I think it's stupid.

_________________
...
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue Dec 20, 2016 5:50 pm    Post subject: Reply with quote

Works for everything.
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Wed Dec 21, 2016 3:39 am    Post subject: Reply with quote

You know of some sites for me to host .exe files, and get a direct link link. For free?
If you know, I sent a PM.

_________________
...
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Thu Dec 22, 2016 12:48 pm    Post subject: Reply with quote

I really liked Zippyshare, and it allows to upload executable files.
But you could also try simply renaming the extension from .exe to .rar for example, could bypass some sites filter method, but I recommend just hosting it yourself, incase of removal your program will go off or won't be able to update..

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Mon Dec 26, 2016 5:45 pm    Post subject: Reply with quote

Use dropbox from google I have used it many times with cheat engine.

If for some reason it doesnt allow exe uploads(idk) you can rename the file extension and read the file with lua and write to the disk with some trickery.

_________________
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