Jump to content

[C#] Reading large files, and replacing offsets.


E3pO

Recommended Posts

Hello, Today i need some help on replacing all the offsets in a file that link to 0x00864C7C.

 

For instance, if i load up a file in a program it will have "jonny.cool, jonny.bob, jonny.hagw". If i look in hex, i only see one jonny. It is located at 0x00864C7C. I need to do a recursive change on a large file "Sometimes over 100mb's.

 

So instead of jonny.cool, jonny.bob, and jonny.hagw, It will produce, 1.cool, 2.bob, 3.hagw in the order that the name was replaced.

 

What would be the best way of going about this?

Link to comment
Share on other sites

Am i missing something because i do not see an edit button!!!!!!!

 

Revision 2...

 

Hello, Today i need some help on replacing all the pointers in a file that link to 0x00864C7C with numbers, such as "1, 2, 3".

 

For instance, if i load up a file in a program it will have "jonny.cool, jonny.bob, jonny.hagw". If i look in hex, i only see one jonny. It is located at 0x00864C7C. So, what i need to do is a foreach pointer that is 0x00864C7C change to a number. The number will be the pointer number, for instance the first pointer the program finds will be number 1, the second pointer it finds will be number 2. Another thing is some of the files i'm working with can be over 200mb's, so i need a good way to load them and do this.

 

Example:

 

Input: jonny.cool, jonny.bob, and jonny.hagw

Output: 1.cool, 2.bob, 3.hagw

 

What would be the best way of going about this,

 

Thank you,

Will

Link to comment
Share on other sites

  • 5 weeks later...

Well, if that's the pointer address within the program executing, it seems to me as though you'd need access to the source code in order to change the execution.  And if you have access to the source code, why would you need to modify the value at that memory location?

 

It seems to me that if you were to just add an int that kept track of iterations, every time your program noticed that the filename contained "johnny", it'd just remove "johnny" and rename the file as:

 

int_value & "." & rest_of_filename

 

The size of a file shouldn't have an impact as to the time it takes to rename it, as it's just a modification to the directory index.

-----------------------------------

Now, if you just wanted to rename your files outside of the program, why not use an already developed tool such as the ReNamer (http://www.den4b.com/projects.php).  After some brief Googling, I managed to find several good reviews about it and that link to download it.

 

Am I at all close to what you're asking about?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.