用vim打开编辑文集visshdeny.sh#!/bin/bash
awk‘{for(i=1;i<=NF;i++){if($i~/rhost/)printsubstr($i,7)}}‘/var/log/secure|sort|uniq-c>/root/black.txt
DEFINE="10"
cat/root/black.txt|whilereadLINE
do
NUM=`echo$LINE|awk‘{print$1}‘`
host=`echo$LINE|awk‘{print$2}..
分类:
其他好文 时间:
2016-05-31 14:18:23
阅读次数:
294
*******************************class animal(object): def __init__(self): self.is_handsome=True def eat(self): if self.is_handsome: print "eat...." els ...
分类:
其他好文 时间:
2016-05-31 12:28:57
阅读次数:
205
$str= file_get_contents("http://v.qq.com/");preg_match_all("/\<img\s+src=.*\s*\>/i", $str,$images);//抓取图片地址echo "<pre>"; print_r($images);echo "<pre>" ...
分类:
Web程序 时间:
2016-05-31 08:52:15
阅读次数:
185
今天来介绍一下Python解释器包含的一系列的内置函数,下面表格按字母顺序列出了内置函数: 下面就一一介绍一下内置函数的用法: 1、abs() 返回一个数值的绝对值,可以是整数或浮点数等。 1 2 3 4 5 6 print(abs(-18)) print(abs(0.15)) result: 18 ...
分类:
编程语言 时间:
2016-05-31 06:18:43
阅读次数:
213
本篇要点: 内置函数 装饰器 一、内置函数 # abs() :取绝对值 >>> res = abs(-10) >>> print(res) 10 # 0,None,"",{},[],() 布尔值都为空 # all(),any() 判断值的真假 # all() 所有为真才为真 p = all([0,1 ...
分类:
编程语言 时间:
2016-05-31 00:55:21
阅读次数:
290
一、print语句 1. 基本输出 2. print的逗号 3. 输出到文件 >> 为重定向 二、控制流语句(control flow) 1. 由条件和执行代码块组成 1.1 条件可以分为决策(if - 决策条件)、循环(for - 循环条件)和分支(swich - 分支条件,被if elif 代替 ...
分类:
编程语言 时间:
2016-05-30 23:28:07
阅读次数:
297
1、标记与注释两种方式 //单行注释 /*多行注释*/ 2、输出语句 echo输出:echo可以输出多个字符串,逗号隔开 print输出:print只能输出一个字符串,返回true或false print_r():可以把字符串和数字简单地打印出来,而数组则以括起来的键和值得列表形式显示,并以Arra ...
分类:
Web程序 时间:
2016-05-30 23:27:54
阅读次数:
227
输出语句echo "<br>hello world","hahaha";//输出多个字符串 echo '<br>hellow world'; print "world";//输出单个字符串 print_r();//数组信息 var_dump ();//变量和类型,比较全面,判断是否正确,测试用的 变 ...
分类:
Web程序 时间:
2016-05-30 23:23:57
阅读次数:
215
# 随机数 生成验证码import random# print random.random()# print random.randint(1, 5)# print random.randrange(1, 5)# temp = random.randint(65, 90)# print chr(te ...
分类:
编程语言 时间:
2016-05-30 17:16:51
阅读次数:
349
linux中的find命令及相关实例:find指令是个使用频率比较高的命令。常用于在系统特定目录下,查找具有某种特征的文件。一.find指令的一般格式:find[pathname]-options[-print/-ecex/-ok...]其中:pathname表示要查找的目录~表示home目录.表示当前目录/表示根目录[执行命令]#-o..
分类:
系统相关 时间:
2016-05-30 16:05:43
阅读次数:
244