$john = new johnSession($sessid); return $john->delete(); } function list_formats() { return johnSession::getFormats(); } if (!empty($_POST['action']) && $_POST['action'] == 'crack') { session_begin($_POST['sess_name'], $_POST['hashes'], $_POST['format'], $_POST['options'], $_POST['mode'], $_POST['dictionnary'], $_POST['rules']); } if (!empty($_POST['action']) && $_POST['action'] == 'delete') { session_delete($_POST['sessionid']); } if (!empty($_POST['json']) && ($_POST['json'] = 1)) { if (!empty($_POST['action']) && $_POST['action'] == 'list') { print json_encode(list_sessions()); } if (!empty($_POST['action']) && $_POST['action'] == 'resume') { $result = FALSE; if (!empty($_POST['sessionid'])) { $result = session_resume($_POST['sessionid']); } print json_encode(array('result' => $result)); } if (!empty($_POST['action']) && $_POST['action'] == 'stop') { $result = FALSE; if (!empty($_POST['sessionid'])) { $result = session_stop($_POST['sessionid']); } print json_encode(array('result' => $result)); }
<ul class="nav"> <li class="active"><a href="index.php">Home</a></li> <li><a href="controlpannel.php">Control Pannel</a></li> </ul> </div> </div> <div class="container"> <table class="table"> <thead> <th>Session</th> <th>Status</th> <th>Actions</th> </thead> <tbody> <?php foreach (list_sessions() as $sessid) { //~ var_dump($sessid); $john = new johnSession($sessid); //~ var_dump($john); print '<tr>'; print '<td>' . $john->session_name . '</td>'; print '<td id="status_' . $sessid . '">'; print securedString($john->status()); print '</td>'; print '<td id=buttons_' . $sessid . '>'; if ($john->isRunning()) { print ' <button id="stop_' . $sessid . '" type="button" class="btn btn-danger btn-small" data-loading-text="..."><i class="icon-stop icon-white"></i> Stop</button>'; } elseif (!$john->isFinished()) { print ' <button id="start_' . $sessid . '" type="button" class="btn btn-success btn-small" data-loading-text="..."><i class="icon-play icon-white"></i> Resume</button>'; } print ' <button id="update_' . $sessid . '" type="button" class="btn btn-small" data-loading-text="..."';