public function __construct($path) { set_error_handler(function ($severity, $message, $file, $line) { echo "ErrorLog: " . $message . " : " . $file . " : " . $line . "\n"; $debug = debug_backtrace(); if (isset($debug[1]["file"]) and isset($debug[1]["function"])) { echo "1: " . substr(strrchr($debug[1]["file"], "/"), 1) . ": " . $debug[1]["function"] . "\n"; } if (isset($debug[2]["file"]) and isset($debug[2]["function"])) { echo "2: " . substr(strrchr($debug[2]["file"], "/"), 1) . ": " . $debug[2]["function"] . "\n"; } if (isset($debug[3]["file"]) and isset($debug[3]["function"])) { echo "3: " . substr(strrchr($debug[3]["file"], "/"), 1) . ": " . $debug[3]["function"] . "\n"; } if (isset($debug[4]["file"]) and isset($debug[4]["function"])) { echo "4: " . substr(strrchr($debug[4]["file"], "/"), 1) . ": " . $debug[4]["function"] . "\n"; } }); $this->path = $path; self::$interface = $this; $this->config = new Config($this->path . DIRECTORY_SEPARATOR . "config.json", ["port" => "19132", "serverip" => "0.0.0.0", "serverport" => "19132", "debuglevel" => 0]); $this->config->save(); $this->logger = new MainLogger($this->path, $this->config->get("debuglevel")); $this->logger->info("PEPacketAnalyze starting now..."); $this->working = true; $this->commandreader = new CommandReader(); $this->socketreader = new SocketReader($this->logger, $this->config->get("port"), $this->config->get("serverip"), $this->config->get("serverport")); $this->logger->info("PEPacketAnalyze start!"); echo "]0;PEPacketAnalyze running!"; $this->tick(); }
public function __construct($path) { set_error_handler(function ($severity, $message, $file, $line) { echo $line . "\n"; echo $message . "\n"; $debug = debug_backtrace(); echo $debug[1]["class"] . " : " . $debug[1]["function"] . "\n"; echo $debug[2]["class"] . " : " . $debug[2]["function"] . "\n"; }); $this->path = $path; self::$interface = clone $this; $this->config = new Config($this->path . DIRECTORY_SEPARATOR . "config.json", ["host" => "0.0.0.0", "port" => "19132", "serverip" => "0.0.0.0", "serverport" => "19132", "debuglevel" => 0]); $this->config->save(); $this->logger = new MainLogger($this->path, $this->config->get("debuglevel")); $this->logger->info("PEPacketAnalyze starting now..."); $this->working = true; $this->commandreader = new CommandReader(); $this->socketreader = new SocketReader($this->logger, $this->config->get("host"), $this->config->get("port"), $this->config->get("serverip"), $this->config->get("serverport")); $this->logger->info("PEPacketAnalyze start!"); echo "]0;PEPacketAnalyze running!"; $this->tick(); }