find out a string from physical memory dump file(.raw file)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neethujoeph
    New Member
    • Feb 2014
    • 3

    find out a string from physical memory dump file(.raw file)

    I need to find a string(&login=) from physical memory dump file.And i have to print the word or string following it.Is there any C# code for this problem?
  • Luk3r
    Contributor
    • Jan 2014
    • 300

    #2
    Here's an example, as a button click event, that includes notations for what's going on. Hope it helps.

    Code:
            private void button1_Click(object sender, EventArgs e)
            {
                    //enter your own directory of your .raw file here
                    using (StreamReader sReader = new StreamReader(@"C:\directory\testing.raw"))
                    {
                        string line;
                        while ((line = sReader.ReadLine()) != null)
                        {
                            if (line.Contains("&login="))
                            {
                                //this is formatting the line that contains your string.
                                //first it will search for &login=, then move 7 characters
                                //over since &login= is 7 characters long, and assuming
                                //you want to exclude &login= from your ouput
                                line = line.Substring(line.IndexOf("&login=") + 7);
    
                                //here, your start index is 0 since we removed &login= by
                                //using the above statement.  line.IndexOf(" ") is searching
                                //for the next blank space after &login=
                                line = line.Substring(0, line.IndexOf(" "));
                                MessageBox.Show(line);
                            }
    
                        }
                    }
                }

    Comment

    • neethujoeph
      New Member
      • Feb 2014
      • 3

      #3
      Thank u sir.This code is very helpful.But sir what i can do in the case of large files?At first time i need to read only 32K of the large dump file and need to store it to a byte buffer after that i have to find out or search for the required strings from that buffer.This process repeats until the end of that dump file.At that time i need to consider the boundary strings(that may split and may include in the next coming chunk ) of the buffer to check whether it is the required string or not.Please help me to prepare a C# code for these much of things.

      Comment

      • Luk3r
        Contributor
        • Jan 2014
        • 300

        #4
        neethujoeph, since I've answered your original request and you're asking a new question, it's probably best that you open a new question thread and we can go from there.

        Comment

        Working...