Xref: utzoo comp.lang.fortran:2384 comp.sys.ibm.pc:33676 Path: utzoo!attcan!uunet!ginosko!rex!uflorida!mailrus!jarvis.csri.toronto.edu!ephemeral.ai.toronto.edu!bradb From: bradb@ai.toronto.edu (Brad Brown) Newsgroups: comp.lang.fortran,comp.sys.ibm.pc Subject: Re: modifying executables Keywords: exe Message-ID: <89Aug24.160348edt.10873@ephemeral.ai.toronto.edu> Date: 24 Aug 89 20:04:40 GMT References: <1984@leah.Albany.Edu> Organization: Department of Computer Science, University of Toronto Lines: 34 ppd491@leah.Albany.Edu (Peter P. Donohue @ nowheresville) writes: > Where my brother works, they have some software that has an error in >it that they would like to fix (nor do I know what fortran compiler they >used). The program was written in Fortran but they don't have the >source code. Is there a way to modify the executable? > The change fix should be relatively easy, just switching a number >around. The program does something with wind direction, which the >machine reads as being off by 180 degrees. It would be an easy fix if >they had the source, but they don't. > DOS has a utility called EXE2BIN.EXE, and from Turbo Pascal I have a >utility called BINOBJ.EXE. Would these be of any help in modifying the >program? If the binary or objective files were modified, how would you >get back to executable? > Thanks for any help or ideas. exe2bin and binobj are not used for modifying executables, and would not be of any help. You need a program like Norton Utilities that will let you modify binary files. HOWEVER, the problem will be finding the code to modify. Changing a binary file is unbelievably tricky, and trying to change part of the program (as opposed to the data) is even harder. You would have to find a way to change some of the instructions in the program so that it read 180 degrees around, but the program would have to stay EXACTLY the same length and still do the same thing. It will be hard enough locating the part of the program that actually does the reading. It may be much more productive to find a work-around, like running the data through another program AFTER to change it, or something like that. (-: Brad Brown :-) bradb@ai.utoronto.ca