[Utility][Python] megagrep

The utility I use often. It just finds a text file which has all the strings specified. Suitable if you want to find a source file that has calls to several functions.

A real example. During reverse engineering, I've found that a function may call these Windows API functions: BCryptCloseAlgorithmProvider, BCryptCreateHash, BCryptImportKeyPair, BCryptOpenAlgorithmProvider, BCryptVerifySignature, NCryptOpenStorageProvider, NCryptExportKey.

When googling, I've found this collection of source codes from Microsoft.

Now using my utility I found the single C++ file that has all these calls:

Yes, it's possible to connect find and grep utilities with each other, but that is bulky.


The source code, Python 3.

First I named it "multigrep", but then I realized there are already utilities with such a name...


Further work: regexp support (to match its "grep" part of name better), search on word boundary, inversion...


List of my other blog posts. My company.

Yes, I know about these lousy Disqus ads. Please use adblocker. I would consider to subscribe to 'pro' version of Disqus if the signal/noise ratio in comments would be good enough.