Want Perl equivalent of linux strings command to extract strings from binary file
I'm looking for a Perl function that does the same thing as the Linux strings command.
The strings command will output a list of strings contained in any file, including a binary file that has strings embedded with in.
Regular expressions don't seem to work very well (or at all) with searching for strings in binary files.
I've searched here already but not found answers.
I want a Perl equivalent as I want to make my Perl code platform independent. If I call strings from Perl then I have made my code dependent on the strings command being available from the underlying operating system.
So include a copy of strings!
Its already on *nix systems - including OS X - and there are win32 versions available precompiled.
I downloaded unzipped and placed this in the same folder as the Perl script.
It works straight out of the box (on Windows XP at least) but be aware that first time it is run it will ask for a license agreement, thereafter you wont be asked.
Just for info, I can then regex match the string I am looking for from this - and extract it out using the following code
You don't need to DL from microsoft for strings... strings is part of binutils, and there is a GPL win32 version from http://www.mingw.org/wiki/MinGW
|All times are GMT +2. The time now is 23:40.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.