09-17-2011, 12:03 AM
how to get percentage or calcul position from oclhashcat.restore file
how to get percentage
|
09-17-2011, 12:03 AM
how to get percentage or calcul position from oclhashcat.restore file
09-17-2011, 09:45 AM
here is the .restore struct
Code: typedef struct all you need is the pw_skip variable (and pw_min if you are not doing -m 1900).
10-04-2011, 10:25 PM
Hi, I folow your advice but to parse the file I have a problem,
how many bytes each field occupies the structure. Since I did this task and the results are as follows typedef struct { uint version_bin; 4 bytes char cwd[256]; 256 bytes uint argc; 4 bytes char argv[30][256]; 7680 bytes uint pw_min; 4 bytes uint64 pw_skip; 8 bytes pid_t pid; 4 bytes (int) char unused[228]; 228 bytes } restore_data_t; If you add up the bytes of each field that results in 8188 bytes, but the file in my oclhashcat-lite v0.06 “oclHashcat-lite.restore†has 8192 bytes, so i have 4 bytes of difference. I can not do anything until we find out why those 4 bytes of difference.
10-05-2011, 09:42 AM
its not really a problem since the pw_skip offset does not change.
10-05-2011, 04:37 PM
but how can i read the file? where I put the bytes in the difference, in the end?
10-07-2011, 06:09 AM
pls atom! i need more details about how to read from .restore file... thanks
10-07-2011, 09:36 AM
do i really explain you how to code?
10-07-2011, 05:30 PM
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
10-07-2011, 05:49 PM
this one should compile cleanly with gcc.
Code: $ cat print-restore.c
10-08-2011, 05:18 PM
Sir thank you very much for your cooperation I appreciate it a lot, the code let me know where are the errors in my.
Sir if you would kindly provide me some information about how to ask other status parameters like time running and time left, HW.Monitor, etc, and if there is any way to send pause or resume, that operations are essential for the shell that I building. Again thanks a lot for your help |
« Next Oldest | Next Newest »
|