- Joined
- Mar 26, 2012
- Messages
- 1,465
- Reaction score
- 131
Code:
ofd.ShowDialog();
BinaryReader br = new BinaryReader(File.Open(ofd.FileName, FileMode.Open, FileAccess.ReadWrite));
//FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None
string passwordValues = null;
for (int i = 0x00000034; i <= 0x000000054; i++)
{
br.BaseStream.Position = i;
passwordValues += br.ReadByte().ToString("X2");
//Beginning hex 0x00000034 Ending hex 0x000000054
}
MessageBox.Show(passwordValues);
br.Close();
if (passwordValues.StartsWith("00"))
{
MessageBox.Show("This account is blocked still.");
passwordValues = passwordValues.Remove(0, 2);
}
else
{
//Console.WriteLine("This account is not blocked.");
//MessageBox.Show(passwordValues);
MessageBox.Show("This account is not blocked.");
}
All I simply want to do is to strip the first 00 from the beginning of the binary and relocate it to the end of the binary and write it back to the file. This should not be too hard to figure out but, I am having difficulty with it. This is being done in C#. Any help would be appreciated. Thank you.