[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...

Please drop me email about bug(s) and/or suggestion(s): blog@yurichev.com. List of other blog posts. BTW, I'm teaching. Follow me in social networks: Twitter, Telegram, GitHub, Discord, Facebook.