Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 29 Apr 2015 20:04:13 -0400
From: Mathieu Laprise <mathlaprise@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: [Johnny] Task 1.4.2 fork and OpenMP

Hey guys,
I sent SIGTERM, SIGINT or SIGKILL with 2 different ways : with Johnny and
by sending signals with the "top" linux command. It seems to me that John
only kills its children when ascii code 3 ( CTRL-c) or 'q'. is pushed on
the keyboard, not with signals. I looked at the code in "signal.c" of JtR
and it seems to be consistent with my tests. So I thought of 3 ways to
solve this:

a) I could modify John (signal.c) to forward the sigterm signal to
children. Cons: 1)is it a bug or the wished behaviour that sigterm on john
main process doesn't kill the children on any sigterm/sigint ? 2) it'll
only work for user with the latest version of john, which might be a big
con.

b) I could only modify Johnny. We have access to the main process id in
Johnny but not the children, so we could get them with a command like "ps h
--ppid XXX -o pid", where XXX egals the pid of the main john. After that,
i'll kill(xxx,SIGTERM); Cons : It doesn't have to work on windows because
JtR doesnt support fork on windows but I'm not sure it's gonna work on all
flavor of linux, it might only works on Unix based. There might be another
command that works for all linux.
http://superuser.com/questions/286219/unix-list-children-processes-for-a-given-pid

*@...ksey*
c) Investigate further about why m_johnProcess.write("q");write("q)  or
m_johnProcess.write("q\r\n"); etc. doesn't work. @Aleksey, I have seen in
johnny code that you have already used the write method in Johnny but it's
commented // TODO: However it does not work as of we do not have terminal.
. So I guess that you had problem in the past with the write method, do you
remember if it worked ?
// void MainWindow::on_pushButton_JohnStatus_clicked()
// {
//     // When we want to get John status we send enter to John. Then
//     // John write something to its stdout. We do not need to read its
//     // output here because when output is ready to be read a signal is
//     // fired and we read John output with status as any other John's
//     // output.
//     // TODO: However it does not work as of we do not have terminal.
//     // TODO: Why do we write to John even when it is not running?
//     m_johnProcess.write("a\r\n");
// }


I'm currently trying to set up JtR in a IDE and debug mode to put
breakpoints to see if it receives something from Johnny's
QProcess::write(). I saw some infos about this for Netbeans on the wiki.

d) Still thinking ??

Content of type "text/html" skipped

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.