Hi i'm using Cywin bash shell, I am trying to scan my entire hard drive for an executable that contains text references to an ocx called ezVidC60.ocx (it appears to be used by both malware and non malware programs, I need to work out which). In Windows the dll and ocx names appear in the .exe as a string of ASCII text. Using grep doesn't quite work as the file is binary. Therefore I'm using the strings utility to extract the text strings from the exe, and piping this to grep.

The following works when in one directory:
strings -f filename.exe | grep ocxname.ocx
Output is:
filename.exe: ocxname.ocx

How can I make something like this to scan the whole harddrive? I'm sure its simple, something like
<get full path name of all exe files> | strings -f ocx | grep ocx

If strings had a recursive option it would be easy. Any assistance is appreciated!

Mark

`find` command.

# find / -name '*.exe'  -exec strings -f {} \; | grep ocx

Great! Thanks for that, looking good.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.