Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 22 Jun 2015 15:34:17 +0300
From: Shinnok <admin@...nnok.com>
To: john-dev@...ts.openwall.com
Subject: Re: [Johnny] Task 1.6.1 Multiple cracking session management


> On Jun 19, 2015, at 4:27 AM, Mathieu Laprise <mathlaprise@...il.com> wrote:
> 
> On Tue, Jun 16, 2015 at 10:39 AM, Shinnok <admin@...nnok.com <mailto:admin@...nnok.com>> wrote:
> Encapsulating those calls in a JohnSession has multiple reasons:
> 
> 1. We get rid of ugly getValue() / setValue() calls spread all over the UI code;
> 2. We start defining what an attack session is; (A name, a set of input files, JohnSession.mode(), JohnSession.isForkEnabled(), etc.. you get the idea)
> 3. We can pass a fully defined session around as a single variable;
> 4. We get to write more beautiful code, for e.g. by doing JohnSession.save() JohnSession.load() instead of iterating over lists and other data types and serializing/deserializing each and every option in the UI code.
> 
> I see you have quite some progress on PR #24. Before I can proceed to the review, can you please writeup a small summary here of what have you accomplished so far with it? It will make my job a bit easier.
> When I received your clarification about JohnSession wrapper, I was already pretty advanced in my current code and design. Since we planned a release with john-users next week, I finished it with the direct QSettings approach as it was already pretty advanced. I don't think I would have finished this week if I refactored the JohnSession thing which is longuer to implement. If you still want this approach, I propose to refactor it in another PR after release since I really think the new session feature is important for our release and we should not release johnny without it. In fact, I didn't have time yet to play with the windows installer and I didn't have enough time yet to test all  the use-cases that I wanted to test. I propose to review and merge it with this design and concentrate on finding issues like #31 and #32, play with the windows installer, finish qt 4.6.2 compatibility, make packages, tests on different platforms etc. for next week and tomorrow. 

Ok, don't worry about it for now, we can do it later.

> 
> As for the summary of multiple session management, all features that we talked about are there as of today. Each session is automatically saved by the date and time of the attack. The user can see them in the list and there is a tooltip showing the file name. The list can be cleared. At first, for session history, I saved one .johnny file per session like Aleksey did in 2012. I read all files(.johnny and .rec) in the johnny folder. But then, you told me that you would prefer storing sessions via QSettings. So, I reimplemented it with QSettings and groups. The group is "johnSessions" and each subgroup is the name of the session (ex : johnSession/08-06-15_21:03). After that, I implemented the saving of UI settings so you can access all the keys from that subgroups(ex:mode etc..). I adapted the method that read the UI to make the QStringList of john parameter to also save the UI to QSettings.After that, the method MainWindow::restoreSessionUI(const QString& sessionName) restore everything easily like that : 
> m_settings.beginGroup("johnSessions/" + sessionName);
> QString format = m_settings.value("formatJohn").toString();
> 
> I'll check again for small mistakes, as this task was pretty repetitive, friday morning but you can definitely proceed to review when you have time.

This sounds good, I'm reviewing the PR next.

Shinnok
[ CONTENT OF TYPE text/html SKIPPED ]

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ