/** * @param string $message * @param string $type */ public static function write($message, $type = 'logs') { if (\null === static::$logger) { if (!config('log.enabled') || !($handler = config('log.path'))) { return; } file_put_contents(rtrim($handler, '/') . '/' . $type . '.txt', date('d M Y (h:m:i)') . ' - ' . $message . "\n", FILE_APPEND | LOCK_EX); return; } static::$logger->write($message, $type); }
function banner(\LogInterface &$log) { $log->setX11Info(FALSE); $banner = " _ _ _ "; $log->log($banner, 0, "red"); $banner = " _ (_) | | | |"; $log->log($banner, 0, "red"); $banner = " _| |_ __ _ _ __| |___ __ _| |"; $log->log($banner, 0, "red"); $banner = "|_ _| / _` | |/ _` / __|/ _` | |"; $log->log($banner, 0, "red"); $banner = " |_| | (_| | | (_| \\__ \\ (_| | |"; $log->log($banner, 0, "red"); $banner = " \\__,_|_|\\__,_|___/\\__, |_|"; $log->log($banner, 0, "red"); $banner = " | | "; $log->log($banner, 0, "red"); $banner = " |_| "; $log->log($banner, 0, "red"); $banner = "\n\tSQL INJECTION DETECTION TOOL\n"; $log->log($banner, 0, "white"); $banner = "\t\tBy Federico Stange <*****@*****.**>\n\n\n"; $log->log($banner, 0, "white"); $log->setX11Info(TRUE); }
public function setLog(\LogInterface &$log) { $this->log = $log; $log->setPrepend("[Google]"); }