Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I got a file, that I want to patch. I know the hex code I want to patch, but not the offset. How can I do that? Now I am looking for terminal software, that allows me to get the offset of the string, so I can pipe it to xxd.
Usually to patch binaries you can just match a longer set of hex chars to make it more unique, try 'grep -c <pattern>' with longer patterns until you only get one match then feed it into sed for the search and replace.
Sorry, in answer to your actual question try diff and patch, I can't say I've tried but they're probably a good bet.
Thanks for the ideas. One problem is that I also have to patch single bytes, which can only be done by offset or I would patch any matching byte of the whole file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.