|
Message-Id: <ED64963E-F94D-4FF7-A1D7-CB65A8BED9E9@shinnok.com> Date: Wed, 29 Apr 2015 12:12:21 +0300 From: Shinnok <admin@...nnok.com> To: john-dev@...ts.openwall.com Subject: Re: [Johnny] Task 1.4.2 fork and OpenMP > On Apr 28, 2015, at 11:40 PM, Mathieu Laprise <mathlaprise@...il.com> wrote: > > Here is my daily progress. I added --fork to Johnny and played with John and Johnny to understand sessions, .rec files and johnny code better. The bug that I'm working on at the moment is : when we start the first attack, it's working with fork but when we pause/resume attack, the first .rec file is okay but all others from the other processes are locked. I guess ALL .rec files from the fork are important, right ? > Output : > Crash recovery file is locked: /home/math07/.john/johnny/default.2.rec > Crash recovery file is locked: /home/math07/.john/johnny/default.3.rec > > My hypothesis is that it is caused by the way Johnny kills John at the moment : by terminating the process abruptly. Locks on files might not be released for that reason. However, perhaps my hypothesis is wrong, I'll have to verify it ... > void MainWindow::on_actionPause_Attack_triggered() > { > m_johnProcess.terminate(); > } > > My plan is to send "q" or CTLR-C to john process via stdin to makes it quit cleanly instead of kill process and john will probably release its locks. I already tried to use QProcess::write() on m_JohnProcess like the Qt doc says but it doesn't seem to work so I'll continue working on this. :) > I appreciate that you didn't wait for too long to get your hands dirty on the next task. Thanks! QProcess::terminate() kills the process using SIGTERM on *nix. Console(bash at least) kills processes with SIGINT upon Ctrl-c. Maybe that's worth investigating, see if JtR handles them differently. You can kill a process with QProcess::kill(), though not recommended unless it's the last resort. Besides those two options, explicitly signaling with POSIX kill() is not much of an option for portability reasons(we exclude native build on Windows at least). Maybe also verify which code paths does JtR take in regards to sending 'q' and SIGINT. Shinnok
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.