I've got a few peculiar issues with trying to search for a string inside of a
.db file. The way I tried was by using grep, which does apparently find the string(s), although this is the output:
$ grep "ext" *.db Binary file enormous.db matches
There are a couple problems with this:
- I need to return the actual matching string.
- I only want to return a particular string out of the matching ones
- The filename changes, so it's only the extensions match
- The are more than one valid extension (ext, bin, fck)
The thing that differentiates the string I'm looking for apart from the others is that it always contains some random character followed by a hexadecimal 02, then the filename.
In the above horrid mess of gunk is TheFile.ext, which I'm hoping to grab (hex is shown below). Maybe grep isn't the right tool for this particular task? I'm not sure, but open to ideas - thanks.