Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


namespace VDV\log\model; use PDO; class Logger { private $db, $db_type; public function __construct() { global $db, $db_type, $Host, $Portnumber, $DbName, $Username, $Password; $this->db =& $db; $this->db_type =& $db_type; } public function logAction($log_id, $station_id, $user_id, $message) { $query = "INSERT INTO Log_Messages (log_time, log_id, station_id, user_id, log_info) VALUES (NOW(), :log_id, :station_id, :user_id, :message);"; $parameters = array("query" => $query, "db" => $this->db, "db_type" => $this->db_type); $stmt = vdv_prepare_query($parameters); $stmt->execute([":log_id" => $log_id, ":station_id" => $station_id, ":user_id" => $user_id, ":message" => $message]); } public function saveToAlarmLog($alarm, $currentAlarmValue, $alarmLimitType, $alarmTimestamp) { if ($alarm["multiCondition"] == 1) { $variableId = $alarm["conditions"][0]["variable_id"]; $limitValue = 0; } else { $variableId = $alarm["variable_id"]; $limitValue = $alarm["limit_value"]; } $query = "
         INSERT INTO Alarm_Log (variable_id, time_stamp, alarm_limit_type, confirmed_str, limit_value, alarm_value, user_id)\xd\xa                      VALUES( :variable_id, :time_stamp, :alarm_limit_type, :confirmed_str, :limit_value, :alarm_value, :user_id);"; $param = array("query" => $query, "db" => $this->db, "db_type" => $this->db_type); $stmt = vdv_prepare_query($param); $stmt->execute([":variable_id" => $variableId, ":time_stamp" => $alarmTimestamp, ":alarm_limit_type" => $alarmLimitType, ":confirmed_str" => '', ":limit_value" => $limitValue, ":alarm_value" => $currentAlarmValue, ":user_id" => 0]); $newLogId = $this->db->lastInsertId(); $this->saveAlarmLogCustomDetails($newLogId, $alarm, $alarm["limit_value"]); } public function saveAlarmLogCustomDetails($newLogId, $alarm, $alarmLimit) { if ($alarm["multiCondition"] == 1) { $latest = 1; $limitType = 0; $process = 0; $periodHours = 0; $absoluteValue = 0; $alarmLimit = 0; } else { $latest = $alarm["latest"]; $limitType = $alarm["limit_type"]; $process = $alarm["process"]; $periodHours = $alarm["period_hours"]; $absoluteValue = $alarm["absolute_value"]; } $query = "
        INSERT INTO Alarm_Log_Custom_Details (log_id, latest, limit_value, limit_type, process, period_hours, absolute_value, alarm_id, alarm_name)
                     VALUES (:log_id, :latest, :limit_value, :limit_type, :process, :period_hours, :absolute_value, :alarm_id, :alarm_name);"; $param = array("query" => $query, "db" => $this->db, "db_type" => $this->db_type); $stmt = vdv_prepare_query($param); $stmt->execute([":log_id" => $newLogId, ":latest" => $latest, ":limit_value" => $alarmLimit, ":limit_type" => $limitType, ":process" => $process, ":period_hours" => $periodHours, ":absolute_value" => $absoluteValue, ":alarm_id" => $alarm["alarm_id"], ":alarm_name" => $alarm["name"]]); } }



© 2023 Quttera Ltd. All rights reserved.