perl生成随机密码

perl生成随机密码

  1. [root@Nagios a]# perl -le 'print map{(a..z,A..Z,0..9)[rand 64]}0..pop' 8
  2. jm6sKgVlW

perl获取google pagerank

  1. [root@Nagios s]# more pagerank.pl
  2. #!/usr/bin/perl -w
  3. use strict;
  4. use WWW::Google::PageRank;
  5. my $u = $ARGV[0];
  6. my $p = WWW::Google::PageRank->new;
  7. if(!$ARGV[0]){
  8.     print "undefined!\n./$0 baiqiuyi.com\n";
  9. }else{
  10.     print "Google PR is ",scalar($p->get('http://'.$u)), "\n";
  11. }
  12. [root@Nagios s]# perl pagerank.pl
  13. undefined!
  14. ./pagerank.pl baiqiuyi.com
  15. [root@Nagios s]# perl pagerank.pl baiqiuyi.com
  16. Google PR is 2

因为前阵子其中一台linux服务器上的wordpress的站点全被挂了马,清理了一次没仔细查,这次全面检查了一下果然发现了个后门,但是来不及了 PR已经被降为2。
期间一次被Google列入会损害客户电脑的黑名单,导致PR由3变为了2我估计!
Google更新pageran后 我的博客pagerank=2
2009年4月3日 pagerank更新了

Nginx upstream sent too big header while reading response header from upstream

upstream sent too big header while reading response header from upstream
在http字段里添加

  1. http {
  2.     ...
  3.     proxy_buffers 8 16k;
  4.     proxy_buffer_size 32k;
  5.     }

如果是fastcgi的话

  1. http {
  2.     ...
  3.     fastcgi_buffers 8 16k;
  4.     fastcgi_buffer_size 32k;
  5. }

NagiosQL Write test on settings directory (config/): failed

安装NagiosQL的时候,检查config/文件夹 始终提示:Write test on settings directory (config/): failed
即使777的权限也行不通,很显然问题不在chmod上

  1. Checking System Permissions
  2. warningSettings file does not exist (config/settings.php): will be created
  3. invalidWrite test on settings directory (config/): failed
  4. validRead test on one class file (functions/nag_class.php): OK
  5. validRead test on home page file (admin.php): OK
  6. validRead test on one template file (templates/index.tpl.htm): OK
  7. validRead test on one admin template file (templates/admin/admin_master.tpl.htm): OK
  8. validRead test on one file template (templates/files/contacts.tpl.dat): OK
  9. validRead test on one image file (images/pixel.gif): OK

解决办法:

  1. echo 0 >/selinux/enforce
  2. sed -i 's/SELINUX=enforcing/SELINUX=disable/' /etc/selinux/config
1 1