Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 216.73.216.44
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
werneckbh /
qr-code /
src /
QR_Code /
Util /
Delete
Unzip
Name
Size
Permission
Date
Action
AbstractGenerator.php
3.28
KB
-rw-r--r--
2018-02-04 09:00
Benchmark.php
1.44
KB
-rw-r--r--
2018-02-04 09:00
FrameFiller.php
2.53
KB
-rw-r--r--
2018-02-04 09:00
Logger.php
1009
B
-rw-r--r--
2018-02-04 09:00
Split.php
9.39
KB
-rw-r--r--
2018-02-04 09:00
Tools.php
2.96
KB
-rw-r--r--
2018-02-04 09:00
Save
Rename
<?php namespace QR_Code\Util; use QR_Code\Config\Specifications; use QR_Code\Encoder\Image; use QR_Code\Encoder\Mask; /** * Class Tools * * Based on PHP QR Code distributed under LGPL 3 * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm> * * QR Code Generator for PHP is distributed under MIT * Copyright (C) 2018 Bruno Vaula Werneck <brunovaulawerneck at gmail dot com> * * @package QR_Code\Util */ class Tools { /** * @var array */ protected static $frames = []; /** * Transform frame in binary * * @param array $frame * @return array */ public static function binarize (array $frame) : array { $len = count($frame); foreach ($frame as &$frameLine) { for ($i = 0; $i < $len; $i++) { $frameLine[$i] = (ord($frameLine[$i]) & 1) ? '1' : '0'; } } return $frame; } /** * Reset internal frames property */ public static function clearCache () : void { self::$frames = []; } /** * Clear Temporary QR Code Files in TEMP_DIR directory * * @return void */ public static function clearTemporaryQRCodes () : void { dropFilesBySubstring(TEMP_DIR, 'qr_code_'); } /** * Dump current mask contents * * @param array $frame */ public static function dumpMask (array $frame) : void { $width = count($frame); for ($y = 0; $y < $width; $y++) { for ($x = 0; $x < $width; $x++) { echo ord($frame[$y][$x]) . ','; } } } /** * Build application cache */ public static function buildCache () : void { Benchmark::mark('build_cache_start'); $mask = new Mask(); for ($a = 1; $a <= QRSPEC_VERSION_MAX; $a++) { $frame = Specifications::newFrame($a); if (QR_IMAGE) { $fileName = QR_CACHE_DIR . 'frame_' . $a . '.png'; Image::png(self::binarize($frame), $fileName, 1, 0); } $width = count($frame); $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); for ($maskNo = 0; $maskNo < 8; $maskNo++) $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); } Benchmark::mark('build_cache_end'); } /** * Save file * * @param $content * @param string $filename_path * @return bool */ public static function save ($content, string $filename_path) : bool { try { $handle = fopen($filename_path, "w"); fwrite($handle, $content); fclose($handle); return true; } catch (\Exception $e) { echo 'Exception writing file : ', $e->getMessage(), "\n"; } return false; } }