views:

41

answers:

1

How can we read executable files in memory and then manipulate them , does NSFileHandle can works with executable files and how so ?! Thank you.

A: 

Sure, NSFileHandle can manipulate anything you can read and write with a file descriptor. It just gives you raw access to the data in the file though, so to work with executables you would need to implement things like a Mach-O parser if you want to actually do anything that requires you to do anything that requires semantic understanding of the file,

On the other hand, if you just want to do something like checksum the file you don't need much more infrastructure than NSFileHandle.

Louis Gerbarg