radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.75k stars 3.01k forks source link

Add search-and-replace in rafind2 #22299

Open trufae opened 1 year ago

trufae commented 1 year ago

Right now its only possible to do this from r2, will be good to have an option in rafind2 to do the same with a rafind2 oneliner.

iamkkushal commented 1 year ago

Hi @trufae, Can you give me some more idea on this. I will try to solve this if possible.

TIA, Kushal

trufae commented 1 year ago

Hey @iamkkushal sorry for the late reply. rafind2 is not linking to RCore, so i can think of two solutions:

1) construct an r2 oneliner that does the search+replace like r2 -c 'w hello @@/ world' file 2) implement the thing using the r_io api, which is prefered but more tedious but its not difficult.

The most difficult part of this requires deciding which getopt flags to use to handle this operation. The new flags should do this:

trufae commented 1 year ago

feel free to join the discord, telegram chats if you have more questions or wanna some guide

Monis-Ahmed-Rizvi commented 1 month ago

I’d like to take on this issue if no one else is working on it as part of my hacktober fest contribution .

trufae commented 1 month ago

All yours!