Codefuser Posted October 30, 2016 Posted October 30, 2016 Any ideas on how I can patch an offset of an external file from AutoIt? I want to figure out to overwrite that offset with random data.
water Posted October 30, 2016 Posted October 30, 2016 FileSetPos? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Codefuser Posted October 30, 2016 Author Posted October 30, 2016 So something like $file = FileOpen("file.exe",1) FileSetPos($file, "0x45FFF", 0) But then how many characters are in an offset?
Developers Jos Posted October 30, 2016 Developers Posted October 30, 2016 What is the purpose of your script and please don't come back with an answer that you want to write binary data to an EXE, but rather explain what and why you want to do this? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Codefuser Posted October 30, 2016 Author Posted October 30, 2016 It is to patch a few bytes in UPX-ed executables to make it slightly harder to unpack.
Developers Jos Posted October 30, 2016 Developers Posted October 30, 2016 Good luck with that. Just read the file binary, change the position and write it back to the file. The helpfile is your friend. When you have issues making it work just post the code you have so we can see what is wrong. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now