This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # run as root | |
| apt-get update && apt-get install -y wget unzip | |
| BUILD_DEPS='build-essential zlib1g-dev libjpeg-dev make' | |
| apt-get install -y $BUILD_DEPS --no-install-recommends \ | |
| && wget -q https://github.com/qpdf/qpdf/archive/release-qpdf-8.4.2.zip \ | |
| && unzip -q release-qpdf-8.4.2.zip && rm release-qpdf-8.4.2.zip \ | |
| && cd qpdf-release-qpdf-8.4.2 && ./configure && make && make install && ldconfig \ | |
| && cd .. && rm -rf qpdf-release-qpdf-8.4.2 | |
| # optional remove build deps | |
| apt-get purge -y --auto-remove $BUILD_DEPS && apt-get clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| let express = require('express'), | |
| logger = require('morgan'), | |
| proxy = require('express-http-proxy'); | |
| let php = process.argv.length > 2 ? process.argv[2] : '127.0.0.1:8080'; | |
| let staticResult = express.static(process.cwd()); | |
| let proxyResult = proxy(php); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // by SiMM | |
| $headers = apache_request_headers(); // получаем все заголовки клиента | |
| if (!isset($headers['Authorization'])) { // если заголовка авторизации нет | |
| header('HTTP/1.0 401 Unauthorized'); // требуем от клиента авторизации | |
| header('WWW-Authenticate: NTLM'); // тип требуемой авторизации - NTLM | |
| exit; // завершаем выполнение скрипта | |
| } | |
| // заголовок авторизации от клиента пришёл | |
| if (substr($headers['Authorization'],0,5) == 'NTLM ') { // проверяем, что это NTLM-аутентификация | |
| $chain = base64_decode(substr($headers['Authorization'],5)); // получаем декодированное значение |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function get_client_ip() { | |
| $ipaddress = ''; | |
| if (getenv('HTTP_CLIENT_IP')) | |
| $ipaddress = getenv('HTTP_CLIENT_IP'); | |
| else if(getenv('HTTP_X_FORWARDED_FOR')) | |
| $ipaddress = getenv('HTTP_X_FORWARDED_FOR'); | |
| else if(getenv('HTTP_X_FORWARDED')) | |
| $ipaddress = getenv('HTTP_X_FORWARDED'); | |
| else if(getenv('HTTP_FORWARDED_FOR')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| ini_set( 'display_errors', 1 ); | |
| error_reporting( E_ALL ); | |
| $from = "[email protected]"; | |
| $to = "[email protected]"; | |
| $subject = "PHP Mail Test script"; | |
| $message = "This is a test to check the PHP Mail functionality"; | |
| $headers = "From:" . $from; |