how to get percentage
#11
for that you need to learn how to make pipe between cat and your shell.
#12
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
#13
(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
#14
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???
#15
by default the .restore file is updated only once all 60 seconds. you can increase update timer by using the --restore-timer parameter.
#16
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=oclh...store-file

thread closed.