how to get percentage
#8
sir, i send to you my code, tha was made with your instrucction and not work. this is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace OCLFileReader
{
public class OCLRestoreData
{
public uint version_bin;
public byte[] cwd = new byte[256];
public uint argc;
public byte[,] argv = new byte[30, 256];
public uint pw_min;
public ulong pw_skip;
public int pid;

public byte[] unused = new byte[232];

public static OCLRestoreData Deserialize(string fileName)
{
OCLRestoreData rData = new OCLRestoreData();
byte[] bytes = File.ReadAllBytes(fileName);
int cursor = 0;

// Reading version_bin
rData.version_bin = (uint)bytes[cursor++] << 24 | (uint)bytes[cursor++] << 16 | (uint)bytes[cursor++] << 8 | (uint)bytes[cursor++];

// Reading cwd
for (int i = 0; i < 256; i++)
rData.cwd[i] = bytes[cursor++];

// Reading argc
rData.argc = (uint)bytes[cursor++] << 24 | (uint)bytes[cursor++] << 16 | (uint)bytes[cursor++] << 8 | (uint)bytes[cursor++];

// Reading argv
for (int i = 0; i < 30; i++)
for (int j = 0; j < 256; j++)
rData.argv[i, j] = bytes[cursor++];

// Reading pw_min
rData.pw_min = (uint)bytes[cursor++] << 24 | (uint)bytes[cursor++] << 16 | (uint)bytes[cursor++] << 8 | (uint)bytes[cursor++];

// Reading pw_skip
rData.pw_skip = (uint)bytes[cursor++] << 56 | (uint)bytes[cursor++] << 48 | (uint)bytes[cursor++] << 40 | (uint)bytes[cursor++] << 32 |
(uint)bytes[cursor++] << 24 | (uint)bytes[cursor++] << 16 | (uint)bytes[cursor++] << 8 | (uint)bytes[cursor++];

// Reading pw_min
rData.pid = bytes[cursor++] << 24 | bytes[cursor++] << 16 | bytes[cursor++] << 8 | bytes[cursor++];

// Reading unused
for (int i = 0; i < 232; i++)
rData.unused[i] = bytes[cursor++];

return rData;
}
}

class Program
{
static void Main(string[] args)
{
string fileName = @"d:\SL3-xgold\tools\oclHashcat-lite-0.06\oclHashcat-lite.restore";

OCLRestoreData rData = OCLRestoreData.Deserialize(fileName);

Console.WriteLine("version_bin: " + rData.version_bin);
Console.WriteLine("argc: " + rData.argc);
Console.WriteLine("pw_min: " + rData.pw_min);
Console.WriteLine("pw_skip: " + rData.pw_skip);
Console.WriteLine("pid: " + rData.pid);

string r = Console.ReadLine();
}
}
}


the scanned data are not correct


Messages In This Thread
how to get percentage - by koursan - 09-17-2011, 12:03 AM
RE: how to get percentage - by atom - 09-17-2011, 09:45 AM
RE: how to get percentage - by tonygr82 - 10-04-2011, 10:25 PM
RE: how to get percentage - by atom - 10-05-2011, 09:42 AM
RE: how to get percentage - by tonygr82 - 10-05-2011, 04:37 PM
RE: how to get percentage - by tonygr82 - 10-07-2011, 06:09 AM
RE: how to get percentage - by atom - 10-07-2011, 09:36 AM
RE: how to get percentage - by tonygr82 - 10-07-2011, 05:30 PM
RE: how to get percentage - by atom - 10-07-2011, 05:49 PM
RE: how to get percentage - by tonygr82 - 10-08-2011, 05:18 PM
RE: how to get percentage - by KT819GM - 10-08-2011, 06:08 PM
RE: how to get percentage - by tonygr82 - 10-08-2011, 06:40 PM
RE: how to get percentage - by koursan - 10-09-2011, 10:41 AM
RE: how to get percentage - by tonygr82 - 10-14-2011, 07:57 AM
RE: how to get percentage - by atom - 10-14-2011, 09:38 AM
RE: how to get percentage - by atom - 10-24-2011, 12:37 PM