- 论坛徽章:
- 0
|
本帖最后由 FaintKnowledge 于 2011-12-13 17:53 编辑
- 111.10.32.51 - - [12/Feb/2011:08:00:08 +0800] "toupdate=true&pid=updated&uid=1&mid=8fd30ab0f0d6a56207757d47811e2e26&ver=7.6.0.2001&sysver=5.1.2600.256.1.2&pa=x86&type=tray&rt=3 HTTP/1.1" 200 -
- 111.12.32.2 - - [12/Feb/2011:13:00:31 +0800] "/v3/LeakRestore.cab?src=leakfixer&t=316046&mid=f HTTP/1.1" 200 403
- 125.9.100.5 - - [12/Feb/2011:11:14:32 +0800] scripts/htmlscript?../../../../../../../../../etc/passwd HTTP/1.1" 404 216
- 125.39.100.5 - - [12/Feb/2011:11:14:51 +0800] a1disp3.cgi?/../../../../../../etc/passwd HTTP/1.1" 404 209
- 125.39.10.105 - - [12/Feb/2011:11:14:51 +0800] stats/a1disp3.cgi?/../../../../../../etc/passwd HTTP/1.1" 404 217
- 12.39.100.105 - - [12/Feb/2011:11:14:31 +0800] ator/index.php&mid=8e92d8764329b853dd677188ac939eb1& HTTP/1.1" 404 221
- 125.39.10.105 - - [12/Feb/2011:11:14:31 +0800 dministrator/index.php HTTP/1.1" 404 229
- 125.39.100.10 - - [12/Feb/2011:11:10:13 +0800] "ss_site_scripting.nasl</script>.mscgi HTTP/1.1" 404 258
- 110.125.236.11 - - [12/Feb/2011:05:02:19 +0800] "pdate=true&pid=softmgr&uid=1&mid=d821fa029268f75baf867e973551cc83&ver=7.6.0.2001&sysver=5.1.2600.256.1.3&pa=x86&type=tray&rt=0 HTTP/1.1" 200 1580
- 110.15.236.118 - - [12/Feb/2011:05:02:39 +0800] up_lib.cab?autoupdate=true&pid=softmgr&uid=1&mid=d821fa029268f75baf867e973551cc83&ver=7.6.0.2001&sysver=5.1.2600.256.1.3&pa=x86&type=tray&rt=0" 200 25383
- 110.125.236.12 - - [12/Feb/2011:01:00:02 +0800] "up_app.cab?autoupdate=true&pid=softmgr&uid=1&mid=8e92d8764329b853dd677188ac939eb1&ver=7.6.0.2001&
复制代码 上面是数据的一部分,
统计要求
1. 解析日志文件中每一行,从每一行中取出mid字段与version字段的值。!##
2. 针对每一个ver,统计mid数。(针对每个ver求实用这个ver的mid的个数)
3. 不针对ver,统计总mid数。(去除重复的mid的行,统计mid的个数,mid在每行的位置是不同的)
尽量使用一条语句实现,不允许出现管道 | .
说明:
1 有的行都有mid和ver
2 有的只有mid没有ver
3 ver有三种:sysver server ver |
|