RE: Searching binary files for patterns?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance





"Joseph N. Stackhouse" wrote:

So I have created my own application to search for Spyware/Viruses and so
far all of my search functions are done except one, searching a binary file
for a certain pattern or a pattern with a wildcard. I really need to
figure out the best way to do this.

I'm sure there are examples out there I'm just not wording my Google
searches correctly or something. Basically I just want to search a file for
a <binary pattern> or possibly <pattern1>*<pattern2>*<pattern3> where * is a
wildcard.

P.S. If you reply also reply via e-mail as I'm not always able to check the
groups. Thanks!

-Joe



I believe that the Regex class can be coerced to search using binary data,
though I have never had a need to try it.

Mike
.



Relevant Pages

  • Searching binary files for patterns?
    ... So I have created my own application to search for Spyware/Viruses and so far all of my search functions are done except one, searching a binary file for a certain pattern or a pattern with a wildcard. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Need WILDCARD search to find rows in a DataTable
    ... > The rowExpression documentation states ... > at the end of a pattern, or at the beginning of a pattern. ... > - even if I search row by row - how can I match a string on a wildcard? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Wildcard String Search
    ... I put the wildcard rules into the HelpString ... with regular expressions, since regular expressions are so finicky about the ... ugly and complicated regex pattern. ... Probably no more than one percent of professional programmers are competent ...
    (microsoft.public.dotnet.framework)
  • Re: regular expression support on OpenVMS (was Re: grep on openVMS?)
    ... > Or, if you prefer, PATTERN instead of WILDCARD. ... > there is currently in SEARCH no capability for matching file contents ... Weaver Consulting Services Inc. ...
    (comp.os.vms)
  • binary grep
    ... pattern in a binary file, then at least output file position (so that ... The pattern could be either fixed bytes or even regular expression, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)