hashcat Forum
how to get percentage - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Deprecated; Ancient Versions (https://hashcat.net/forum/forum-46.html)
+--- Forum: Very old oclHashcat-lite Support (https://hashcat.net/forum/forum-22.html)
+--- Thread: how to get percentage (/thread-493.html)

Pages: 1 2


RE: how to get percentage - KT819GM - 10-08-2011

for that you need to learn how to make pipe between cat and your shell.


RE: how to get percentage - tonygr82 - 10-08-2011

ok, and how to do pipe? a tried with C# and that:

OCLProcess = new Process();
OCLProcess.StartInfo.FileName = cmdexePath;
OCLProcess.StartInfo.Arguments = cmdArguments;
OCLProcess.StartInfo.UseShellExecute = false;
OCLProcess.StartInfo.RedirectStandardOutput = true;
OCLProcess.StartInfo.RedirectStandardInput = true;
OCLProcess.OutputDataReceived += OutputHandler;
OCLProcess.Start();
OCLProcess.BeginOutputReadLine();

and without redirect standard in and output and the result are the same, no way to cumunicate with the cat, the application start to work but no create .restore file and i don't capable to send an "s" or any other command to do something


RE: how to get percentage - koursan - 10-09-2011

(10-08-2011, 06:40 PM)tonygr82 Wrote: ok, and how to do pipe? a tried with C# and that:

OCLProcess = new Process();
OCLProcess.StartInfo.FileName = cmdexePath;
OCLProcess.StartInfo.Arguments = cmdArguments;
OCLProcess.StartInfo.UseShellExecute = false;
OCLProcess.StartInfo.RedirectStandardOutput = true;
OCLProcess.StartInfo.RedirectStandardInput = true;
OCLProcess.OutputDataReceived += OutputHandler;
OCLProcess.Start();
OCLProcess.BeginOutputReadLine();

and without redirect standard in and output and the result are the same, no way to cumunicate with the cat, the application start to work but no create .restore file and i don't capable to send an "s" or any other command to do something

Use PostMessage
Example:
PostMessage(HWND_BROADCAST,WM_CHAR,Ord('s'),0);
For more help visit microsoft MSDN


RE: how to get percentage - tonygr82 - 10-14-2011

hi, i have problems with reading from the file ".restore", sometimes the read are correct but sometimes are corrupt, possibly the file it's open by cat but my code do this:

public static OclRestoreData Deserialize(string fileName)
{
File.Copy(fileName, fileName + "Cp", true);
OclRestoreData rData = new OclRestoreData();

FileInfo dataFile = new FileInfo(fileName + "Cp");
FileStream stream = null;

try
{
stream = dataFile.Open(FileMode.Open, FileAccess.ReadWrite, FileShare.None);
}
catch (IOException)
{
//the file is unavailable because it is:
//still being written to
//or being processed by another thread
//or does not exist (has already been processed)
rData = null;
return rData;
}
finally
{
if (stream != null)
{
stream.Close();
//file is not locked
byte[] bytes = File.ReadAllBytes(fileName + "Cp");
int cursor = 0;

// Reading version_bin
rData.version_bin = BitConverter.ToUInt32(bytes, cursor);
cursor += 4;
and the rest of the reading... any idea???



RE: how to get percentage - atom - 10-14-2011

by default the .restore file is updated only once all 60 seconds. you can increase update timer by using the --restore-timer parameter.


RE: how to get percentage - atom - 10-24-2011

i've added this conversation and the datatype struct to wiki for those who want to do the same, check it out here: http://hashcat.net/wiki/doku.php?id=oclhashcat_lite#parsing_the_restore-file

thread closed.