CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Edit a .exe file

 



Jfiore
New User

Feb 16, 2011, 5:43 PM

Post #1 of 2 (378 views)
Edit a .exe file Can't Post

Hi. I need to open an executable file, search it and replace one command with another, then save the new executable while keeping the first one. Right now Im just trying to figure out how to successfully edit an executable file. Im kind of a newbie, so specifics will be appreciated. Thanks for your help!


(This post was edited by Jfiore on Feb 16, 2011, 5:49 PM)


BillKSmith
Veteran

Feb 16, 2011, 8:06 PM

Post #2 of 2 (374 views)
Re: [Jfiore] Edit a .exe file [In reply to] Can't Post

Making changes to an executable file that actually work is nearly impossible. Assuming that you know what you are doing, it is possible to make the edits with perl. Open the file as a binary file. This will keep perl from doing its usual magic with newlines. (Refer perldoc -f binmode)
Good Luck,
Bill

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives