#!/bin/bashforipin`catiplist.txt`dopwd=`mkpasswd-l12-s0-C0`grep-q$ip/root/pwd.log&&passwd=$(grep$ip/root/pwd.log|cut-d:-f2)||passwd=123456expect-c"spawnsshroot@$ippasswdexpect{\"*yes/no*\"{send\"yes\r\";exp_continue}\"*password*\"{send\"$passwd\r\";..
分类:
其他好文 时间:
2014-09-11 19:33:52
阅读次数:
237
http://blog.csdn.net/buutterfly/article/details/6615162http://www.2cto.com/os/201307/224496.htmlhttp://wenda.so.com/q/1365651781067621http://www.cnblo...
分类:
系统相关 时间:
2014-09-11 19:13:22
阅读次数:
193
yumgrouplist|grep-ivirt如果是中文版的话,yumgroupinstall"虚拟主机"(grouplist查看)kvm存储在/etc/libvirt/qemu/kvm.xml/var/lib/libvirt/p_w_picpathsqemu-imgcreate-fqcow2-bkvm.imgkvm.ovl
分类:
其他好文 时间:
2014-09-11 15:29:33
阅读次数:
197
脚本目的:自动捕捉锁定恶意链接的ip,将其加入到hosts.deny思路:运用命令lastb找出近期拒绝的访问,过滤出其ip位,用输出重定向加入到/hosts.deny设置自动运行。编写过程发现问题:1.使用lastb时会发现lastb的输出会有首行和空白为将其滤除,所以选择用grep命令只将带有IP段..
分类:
其他好文 时间:
2014-09-10 19:46:01
阅读次数:
279
#!/bin/bash #pingall cat /etc/hosts | grep -v ‘^$‘ | grep -v ‘^#‘ | while read IP DOMAINS do for DOMAIN in $DOMAINS do ping -c1 $DOMAIN > /dev/null 2>&1 #echo $DOMAIN "("$IP")" "["$?"]" printf "%-5...
分类:
其他好文 时间:
2014-09-10 17:57:41
阅读次数:
171
$ openssl versionOpenSSL 1.0.1e-fips 11 Feb 2013$ yum list |grep opensslopenssl.x86_64 1.0.1e-16.el6_5.4 @upda...
分类:
其他好文 时间:
2014-09-10 17:25:10
阅读次数:
222
1.基本正则表达式支持的元字符元字符描述用法举例.匹配任意一个字符。a.,x.y,x..,.ab.[]匹配指定范围内的任意字符。[abc],[0-9],[a-z],[A-Z],[[:alpha:]],[[digit:]],
[[:alnum:]],[[space:]],[[:upper:]],[[:lower:]],[[:punct:]][^]匹配指定范围以外的任意字符,即‘[]’的取..
分类:
其他好文 时间:
2014-09-10 12:42:51
阅读次数:
140
grep用法
1 基本用法
语法:grep [OPTIONS] regex file
其中regex就是正则表达式 file 就是要指定查找匹配的文本文件名,可以指定多个
eg:
$:ls /usr/bin > dirlist-usr-bin.txt
$:ls /sbin > dirlist-sbin.txt
$:ls /usr/sbin > dirlist-usr-sbi...
分类:
其他好文 时间:
2014-09-10 12:36:30
阅读次数:
195
1、ssh应用服务器 applprod用户密码:***管理脚本在$ADMIN_SCRIPTS_HOME路径下adstrtal.sh启动所有服务,命令行为adstrtal.sh apps/apps_password日志中status为0代表正常2、查看进程是否存在:ps-ef|grep vnc3、v....
分类:
其他好文 时间:
2014-09-10 12:25:20
阅读次数:
313
对于新手学习,mount 命令,一定会有很多疑问。其实我想疑问来源更多的是对linux系统本身特殊性了解问题。 linux是基于文件系统,所有的设备都会对应于:/dev/下面的设备。如:[chengmo@centos5 dev]$ ls | grep -E "^(sd|hd)"hdcsdasda1s...
分类:
系统相关 时间:
2014-09-10 12:09:50
阅读次数:
335