473,466 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

3 New Member
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?
Feb 5 '14 #1

✓ answered by Luk3r

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

Expand|Select|Wrap|Line Numbers
  1.         private void button1_Click(object sender, EventArgs e)
  2.         {
  3.                 //enter your own directory of your .raw file here
  4.                 using (StreamReader sReader = new StreamReader(@"C:\directory\testing.raw"))
  5.                 {
  6.                     string line;
  7.                     while ((line = sReader.ReadLine()) != null)
  8.                     {
  9.                         if (line.Contains("&login="))
  10.                         {
  11.                             //this is formatting the line that contains your string.
  12.                             //first it will search for &login=, then move 7 characters
  13.                             //over since &login= is 7 characters long, and assuming
  14.                             //you want to exclude &login= from your ouput
  15.                             line = line.Substring(line.IndexOf("&login=") + 7);
  16.  
  17.                             //here, your start index is 0 since we removed &login= by
  18.                             //using the above statement.  line.IndexOf(" ") is searching
  19.                             //for the next blank space after &login=
  20.                             line = line.Substring(0, line.IndexOf(" "));
  21.                             MessageBox.Show(line);
  22.                         }
  23.  
  24.                     }
  25.                 }
  26.             }

3 2059
Luk3r
300 Contributor
Here's an example, as a button click event, that includes notations for what's going on. Hope it helps.

Expand|Select|Wrap|Line Numbers
  1.         private void button1_Click(object sender, EventArgs e)
  2.         {
  3.                 //enter your own directory of your .raw file here
  4.                 using (StreamReader sReader = new StreamReader(@"C:\directory\testing.raw"))
  5.                 {
  6.                     string line;
  7.                     while ((line = sReader.ReadLine()) != null)
  8.                     {
  9.                         if (line.Contains("&login="))
  10.                         {
  11.                             //this is formatting the line that contains your string.
  12.                             //first it will search for &login=, then move 7 characters
  13.                             //over since &login= is 7 characters long, and assuming
  14.                             //you want to exclude &login= from your ouput
  15.                             line = line.Substring(line.IndexOf("&login=") + 7);
  16.  
  17.                             //here, your start index is 0 since we removed &login= by
  18.                             //using the above statement.  line.IndexOf(" ") is searching
  19.                             //for the next blank space after &login=
  20.                             line = line.Substring(0, line.IndexOf(" "));
  21.                             MessageBox.Show(line);
  22.                         }
  23.  
  24.                     }
  25.                 }
  26.             }
Feb 5 '14 #2
neethujoeph
3 New Member
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.
Feb 6 '14 #3
Luk3r
300 Contributor
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.
Feb 6 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Yuriy | last post by:
Hi, Can anybody explain the following? Say I have the following source XML and XSLT (see below). No matter what this XSLT does. It is just a sample to show a problem. the idea is that XSLT...
9
by: Olumide | last post by:
Thats the question. I know about virtual memory, and the MMU. I just wonder if array members guaranteed to be contiguous in physical memory (and if so, why). Thanks, Olumide
3
by: Raghu | last post by:
How can I find the physical memory on a given box programmatically using C#? Is there a windows API method that I need to call? Thanks. Raghu/..
4
by: Sharon | last post by:
I have an application that fails to allocate all its memory on physical memory. I have a Windows XP with 2 GByte RAM. Can anybody tell me how to configure the allowed physical memory for each...
9
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug...
2
by: Robertico | last post by:
Is it possible to create a VB application that can make a physical memory (RAM) 'dump' to a file. Regards, Robertico
2
by: Groenie | last post by:
Hi I am getting a blue screen when booting the pc up with error: "Beginning dump of physical memory". When I reboot the error is goes away only to appear again next time when booting up. Can...
2
by: doudehou | last post by:
Hi guys, I want to get the physical memory status, say, the total amount of physical memory, the free memory, and so on, from the javascript, is it a mission impossible? Thank you very much...
3
by: john | last post by:
I would like to view physical memory that is mapped to a pci board. I am using a tool called WinIO to try to create a virtual address to that physical memory. It works for both read and write of...
1
by: =?Utf-8?B?d29vZiE=?= | last post by:
My laptop is generating a memory dump and crashing. With some investigation It led me to believe there was a memory problem (used memtest86+). Changed hard drive, swapped the two 512mb RAMS...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.