Thread: Searching for strings in a large group of characters and numbers

  1. #1
    Registered User levitylek's Avatar
    Join Date
    Sep 2010

    Searching for strings in a large group of characters and numbers

    I've been tasked with creating a program that reads in 2 virus signatures as strings, i.e.
    '2A40 020E 0788 0002 33C9 8BD1 419C' and '10BC B801 33C9 8BD1 ABCD'
    Then given a text file such as:
    I have to scan through that and find if there are any exact matches to those virus signatures or if there's a number/letter that is replaced with another, or if any of the characters in the found virus signature has swapped.

    2A40 020E 0878 0002 33C9 8BD1 419C
    where the bolded 8 & 7 have swapped
    2A40 020E 0788 0002 33C9 88D1 419C
    where the bolded 8 replaced a B

    I know how to read everything in and what not but I have no clue how to even go about scanning through the text for those exact or close to exact strings. Can anyone please shed a little light on this mystery?

  2. #2
    Join Date
    Aug 2010
    Ontario Canada
    Ok, nice project... Get started on it, write as much as you can. Then if you get stuck (really stuck, not lazy stuck) post your code, explain the problems and maybe we'll help you out.

    click here---> Announcements - General Programming Boards

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Best way to read characters, strings and numbers
    By VelvetMirror in forum C Programming
    Replies: 3
    Last Post: 05-16-2010, 07:16 PM
  2. help searching words in large files
    By nick2 in forum C Programming
    Replies: 5
    Last Post: 05-30-2009, 02:51 AM
  3. Searching a VERY large text file
    By Tankndozer in forum C Programming
    Replies: 4
    Last Post: 07-29-2004, 02:45 AM
  4. Need a way to divide a group of numbers
    By adrianxw in forum A Brief History of
    Replies: 5
    Last Post: 09-11-2003, 12:44 PM
  5. a way to group characters?
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 09-02-2001, 07:34 AM