取WEB版本的一段脚本

取WEB版本
  1. $fp =@fsockopen($domain$port$errno$errstr, 20);   
  2.      if(!$fp){   
  3.              return "UNKNOWN";   
  4.     exit;   
  5.     } else {   
  6.          $ok = false;   
  7.          @fputs($fp,"GET $geturl HTTP/1.0\nHost: $domain\n\n\r\n");   
  8.          while(!feof($fp)){   
  9.              $line = fgets($fp,128);   
  10.              if(! $ok && preg_match("/^[\r\n]+$/",$line)) {   
  11.               $ok = true; //正文开始   
  12.              }   
  13.              if(!$ok){   
  14.                  if(preg_match("/([^:]+?):(.+)/",$line,$r))   
  15.                  $info[$r[1]] = $r[2];//取WEB版本   
  16.                  }else{   
  17.          $body.=$line;//取得BODY文件   
  18.                  }   
  19.     }   
  20.          }   
  21.   
  22.   
  23.      fclose($fp);   

Tags: webserver , 版本 , 脚本 , php

php空字节的一个tips

晚上给SEbug装个论坛,整了半天源码总是直接显示出来了,找了半天发现有个文件里存在非法字符。

和 Helvin 测试了下,发现在php中插入0x00可以让php不解析,过滤不严的话,就可以直接让他显示源代码。非程序错误跳出,是解释器没有执行。可能在PHP看来只是一个正常的错误,他认为请求了错误内存地址。

未命名.jpg

大小: 3.64 K
尺寸: 230 x 102
浏览: 71 次
点击打开新窗口浏览全图

在网上找了一下php关于Null Byte Character的漏洞真不少。测试一下,发现GET是没有影响的,那就没价值了。php处理字串的代码好几M呢,懒得去看也不一定能看得明白。有兴趣的朋友可以跟一下。

Tags: tips , 空字节 , bug , 原创 , php

SaGunman

程序介绍

SaGunman是一个采用php和MySQL构建的聚合自动采集系统.作为Sablog-X同品牌产品,SaGunman在代码质量,运行效率,负载能力,安全等级,功能可操控性和权限严密性等方面都得以保障.

http://www.sagunman.com/

应用案例

http://www.lzbest.net

 http://www.4sec.org

Tags: sagunman , rss , php

超级诡异的MySQL server has gone away解决办法

mysql执行show status,通常更关注缓存效果、进程数等,往往忽略了两个值:

Variable_name Value
Aborted_clients 3792
Aborted_connects 376

通常只占query的0.0x%,所以并不为人所重视。而且在传统Web应用上,query错误对用户而言影响并不大,只是重新刷新一下页面就OK了。最近的基础改造中,把很多应用作为service运行,无法提示用户重新刷新,这种情况下,可能就会影响到服务的品质。

» 阅读全文

Tags: mysql , php

php效率优化

php效率优化

http://www.phpchina.com/bbs/thread-13409-1-1.html

Tags: 优化 , 效率 , php

PHP 5.x COM functions safe_mode and disable_function bypass

//php 5.x COM functions safe_mode and disable_function bypass   
  
//author: shinnai   
//mail: shinnai[at]autistici[dot]org   
//site: http://shinnai.altervista.org   
  
//dork: intitle:phpinfo intext:"php version" +windows (thanks to rgod)   
  
//Tested on xp Pro sp2 full patched, worked both from the cli and on apache   

» 阅读全文

Tags: 漏洞 , php

搞定了静态

弄了一晚上,终于把SEBUG完全转成了静态。

以后添加完成后就可以直接生成HTML了,不用再用伪静态了,呵呵。静态还是蛮好,就像轮回说的,就算数据库挂掉了,一样可以正常访问。

希望搜索引擎也会多多的光顾一些。也希望大家多多支持,谢谢CCTV,谢谢……

Tags: sebug , 技术 , php

PHP Security-Shell RFI Scanner

php Security-Shell RFI scanner

 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          * 
*   Test over by cnfjhh

» 阅读全文

Tags: scanner , 代码收藏 , php

56 , 2 / 7«12345»Last »