Jun
24
昨天写了一篇linux下Apache严重漏洞攻击代码公开的文章。今天TTplay回复我,为什么当时查看httpd的时候,不使用watch命令。
关于watch命令,之前使用的都不多,今晚特别去了解一下linux下的watch命令。
Usage: watch [-dhntv] [--differences[=cumulative]] [--help] [--interval=] [--no-title] [--version]
-d, --differences[=cumulative] highlight changes between updates
(cumulative means highlighting is cumulative)
-h, --help print a summary of the options
-n, --interval= seconds to wait between updates
-v, --version print the version number
-t, --no-title turns off showing the header
watch -- 监测命令的运行结果
watch是一个非常实用的命令,基本所有的Linux发行版都带有这个小工具,如同名字一样,watch可以帮你监测一个命令的运行结果,省得你一遍遍的手动运行。
在Linux下,watch是周期性的执行下个程序,并全屏显示执行结果。
-d, --differences[=cumulative] 高亮显示变动
-n, --interval= 周期(秒)
如:watch -n 1 -d netstat -ant
其它操作:
切换终端: Ctrl+x
退出watch:Ctrl+g
watch -n 1 -d 'pstree|grep http' 每隔一秒高亮显示http链接数的变化情况。 后面接的命令若带有管道符,需要加''将命令区域归整。
在查看攻击时,经常使用的方式有如下:
实时查看模拟攻击客户机建立起来的连接数,使用
watch 'netstat -an | grep:21 | \ grep<模拟攻击客户机的IP>| wc -l'
查看模拟攻击客户机被 DROP 的数据包数。
watch 'iptables -L -n -v | \grep<模拟攻击客户机的IP>'
谢谢TTPLAY~
关于watch命令,之前使用的都不多,今晚特别去了解一下linux下的watch命令。
Usage: watch [-dhntv] [--differences[=cumulative]] [--help] [--interval=
-d, --differences[=cumulative] highlight changes between updates
(cumulative means highlighting is cumulative)
-h, --help print a summary of the options
-n, --interval=
-v, --version print the version number
-t, --no-title turns off showing the header
watch -- 监测命令的运行结果
watch是一个非常实用的命令,基本所有的Linux发行版都带有这个小工具,如同名字一样,watch可以帮你监测一个命令的运行结果,省得你一遍遍的手动运行。
在Linux下,watch是周期性的执行下个程序,并全屏显示执行结果。
-d, --differences[=cumulative] 高亮显示变动
-n, --interval= 周期(秒)
如:watch -n 1 -d netstat -ant
其它操作:
切换终端: Ctrl+x
退出watch:Ctrl+g
watch -n 1 -d 'pstree|grep http' 每隔一秒高亮显示http链接数的变化情况。 后面接的命令若带有管道符,需要加''将命令区域归整。
在查看攻击时,经常使用的方式有如下:
实时查看模拟攻击客户机建立起来的连接数,使用
watch 'netstat -an | grep:21 | \ grep<模拟攻击客户机的IP>| wc -l'
查看模拟攻击客户机被 DROP 的数据包数。
watch 'iptables -L -n -v | \grep<模拟攻击客户机的IP>'
谢谢TTPLAY~
Jun
24
Apache中的一个严重漏洞将使得拒绝服务攻击(DoS)变得异乎简单。
Apache 1.x,2.x,dhttpd,GoAhead WebServer和Squid确认都受到影响;IIS6.0,IIS7.0和lighttpd未被波及。Apache基金会目前还没有发布补丁。
ha.ckers公开的Slowloris代码允许对一台特定的服务器发动缓慢的拒绝访问攻击,而不是用堵塞整个网络,它能让一台机器攻陷了另一台机器的 web server,只需使用极少的带宽,对不相关的服务和端口的副效应降到最低。拒绝服务的理想攻击情况是除了webserver不可访问之外,其它服务都完整无缺。Slowloris便源自这个理念,相比大多数攻击方法它更隐蔽。Slowloris首先发送一个不完整的HTTP请求,打开连接,然后每隔一段 时间发送剩余的header,以保证通讯端不被关闭,于是webserver的一个线程便被占用了。由于webserver允许的线程数量是有限制的,因 此Slowloris会缓慢的消耗掉所有的通讯端口。Slowloris是一个Perl程序,需要Perl解释器才能运行。
Slowloris attack code super-link
点击上述链接,可测试.类似全链接攻击.
今天晚上测试了一下攻击代码.果然还是很有效.主要是通过将APAHE的链接数占满来达到攻击效果.
如下示:
攻击: ./slowloris.pl -dns test.test.com -port 80 -time 2000 -num 500 -tcpto 5
受攻击的机器上的情形如下示:
|-httpd-+-8*[cronolog]
| |-114*[httpd]
| `-4*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-120*[httpd]
| `-4*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-194*[httpd]
| `-6*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-225*[httpd]
| `-7*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-289*[httpd]
| `-7*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-321*[httpd]
| `-7*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-386*[httpd]
| `-6*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-418*[httpd]
| `-6*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-620*[httpd]
| `-4*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-607*[httpd]
| `-3*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-606*[httpd]
| `-3*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-604*[httpd]
| `-3*[httpd---sendmail]
bm
[root@test lib]# tail -f /home/www/apache_logs/www-error_log20090623|grep 192.168.0.2
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
Apache 1.x,2.x,dhttpd,GoAhead WebServer和Squid确认都受到影响;IIS6.0,IIS7.0和lighttpd未被波及。Apache基金会目前还没有发布补丁。
ha.ckers公开的Slowloris代码允许对一台特定的服务器发动缓慢的拒绝访问攻击,而不是用堵塞整个网络,它能让一台机器攻陷了另一台机器的 web server,只需使用极少的带宽,对不相关的服务和端口的副效应降到最低。拒绝服务的理想攻击情况是除了webserver不可访问之外,其它服务都完整无缺。Slowloris便源自这个理念,相比大多数攻击方法它更隐蔽。Slowloris首先发送一个不完整的HTTP请求,打开连接,然后每隔一段 时间发送剩余的header,以保证通讯端不被关闭,于是webserver的一个线程便被占用了。由于webserver允许的线程数量是有限制的,因 此Slowloris会缓慢的消耗掉所有的通讯端口。Slowloris是一个Perl程序,需要Perl解释器才能运行。
Slowloris attack code super-link
点击上述链接,可测试.类似全链接攻击.
今天晚上测试了一下攻击代码.果然还是很有效.主要是通过将APAHE的链接数占满来达到攻击效果.
如下示:
攻击: ./slowloris.pl -dns test.test.com -port 80 -time 2000 -num 500 -tcpto 5
受攻击的机器上的情形如下示:
|-httpd-+-8*[cronolog]
| |-114*[httpd]
| `-4*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-120*[httpd]
| `-4*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-194*[httpd]
| `-6*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-225*[httpd]
| `-7*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-289*[httpd]
| `-7*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-321*[httpd]
| `-7*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-386*[httpd]
| `-6*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-418*[httpd]
| `-6*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-620*[httpd]
| `-4*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-607*[httpd]
| `-3*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-606*[httpd]
| `-3*[httpd---sendmail]
[root@test ~]# pstree|grep http
|-httpd-+-8*[cronolog]
| |-604*[httpd]
| `-3*[httpd---sendmail]
bm
[root@test lib]# tail -f /home/www/apache_logs/www-error_log20090623|grep 192.168.0.2
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
[Tue Jun 23 22:38:58 2009] [error] [client 192.168.0.2] request failed: error reading the headers
Jun
18
这几天发现网站我的博客网站首页模版出了问题了。
不管使用哪一套模版都有人反馈说栏目错乱。
使用模认模版太丑。不使用模认模版,栏目页与文章列表页就分离。实在看不得。
看到这些页面都不想更新了~
今天确实没什么新鲜的东西可以更新的。着实郁闷。
将今天看到的关于设置gzip的脚本代码记录一下吧。
转自:http://www.yongfa365.com/item/IIS6-Enable-Web-GZIP.html
IIS6默认情况下没有开启GZIP功能,需要我们手动配置,但他又没提供图形化配置功能,所以呀,像我这样的技术人才,都没考虑过使用他,昨天突然看到这个想到,也许对我有用,但从网上找了找,都是一堆手工操作方法,非常麻烦呀,不过以前研究过IIS的配置文件:C:\WINDOWS\system32\inetsrv\MetaBase.xml,所以呀,我知道只要是IIS的功能就可以通过修改这个文件来完成,所以呢,就对这个文件下手吧,根据网上提供的修改的地方,在网上搜索了一圈,找到一个类似ClickOnce 的东西,呵呵,我找的就是这个,所有操作都一键到位,只要执行一段VBS或CMD就配置好了,呵呵。
使用Gzip压缩会增大服务器CPU的使用率但可以通过压缩而减少服务器向客户端发送的数据,若使用了Gzip压缩IIS在向客户端发送数据时会自动检测,如果客户端浏览器支持IE6.0,firefox Gzip,则使用Gzip压缩后再传送数据,如果不支持,则使用常规方式发送。
所以,总结下他的优缺点,优:压缩传输,速度一般提高2倍。缺:CPU占用会有所提高,不过通过我的一点分析,GZIP只是在访问一个页时才会进行压缩,下次如果网页没有变动是不会压缩的,除非是使用压缩动态文件,这得实时的去压缩。
REM Setup IIsCompressionScheme for deflate
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcCompressionDll "%windir%\system32\inetsrv\gzip.dll"
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcCreateFlags 0
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoDynamicCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoOnDemandCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoStaticCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDynamicCompressionLevel 9
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcFileExtensions "htm" "html" "txt" "js" "xml" "css"
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcOnDemandCompLevel 9
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcPriority 1
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx"
REM Setup IIsCompressionScheme for GZip
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcCompressionDll "%windir%\system32\inetsrv\gzip.dll"
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcCreateFlags 1
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoDynamicCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoOnDemandCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoStaticCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDynamicCompressionLevel 9
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "js" "xml" "css"
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcOnDemandCompLevel 9
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcPriority 1
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx"
REM Setup IIsCompressionSchemes parameters
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCacheControlHeader max-age=86400
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCompressionBufferSize 102400
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCompressionDirectory "%windir%\IIS Temporary Compressed Files"
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoDiskSpaceLimiting FALSE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoDynamicCompression TRUE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoOnDemandCompression TRUE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoStaticCompression TRUE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcExpiresHeader "Wed, 01 Jan 1997 12:00:00 GMT"
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcFilesDeletedPerDiskFree 256
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcIoBufferSize 102400
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMaxDiskSpaceUsage 0
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMaxQueueLength 1000
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMinFileSizeForComp 1
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcNoCompressionForHttp10 FALSE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcNoCompressionForProxies FALSE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcNoCompressionForRange FALSE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcSendCacheHeaders FALSE
iisreset
以上是方法adsutil.vbs不一定人人都能找到,所以提供完整下载地址:
IIS6-SET-GZIP.rar
不管使用哪一套模版都有人反馈说栏目错乱。
使用模认模版太丑。不使用模认模版,栏目页与文章列表页就分离。实在看不得。
看到这些页面都不想更新了~
今天确实没什么新鲜的东西可以更新的。着实郁闷。
将今天看到的关于设置gzip的脚本代码记录一下吧。
转自:http://www.yongfa365.com/item/IIS6-Enable-Web-GZIP.html
IIS6默认情况下没有开启GZIP功能,需要我们手动配置,但他又没提供图形化配置功能,所以呀,像我这样的技术人才,都没考虑过使用他,昨天突然看到这个想到,也许对我有用,但从网上找了找,都是一堆手工操作方法,非常麻烦呀,不过以前研究过IIS的配置文件:C:\WINDOWS\system32\inetsrv\MetaBase.xml,所以呀,我知道只要是IIS的功能就可以通过修改这个文件来完成,所以呢,就对这个文件下手吧,根据网上提供的修改的地方,在网上搜索了一圈,找到一个类似ClickOnce 的东西,呵呵,我找的就是这个,所有操作都一键到位,只要执行一段VBS或CMD就配置好了,呵呵。
使用Gzip压缩会增大服务器CPU的使用率但可以通过压缩而减少服务器向客户端发送的数据,若使用了Gzip压缩IIS在向客户端发送数据时会自动检测,如果客户端浏览器支持IE6.0,firefox Gzip,则使用Gzip压缩后再传送数据,如果不支持,则使用常规方式发送。
所以,总结下他的优缺点,优:压缩传输,速度一般提高2倍。缺:CPU占用会有所提高,不过通过我的一点分析,GZIP只是在访问一个页时才会进行压缩,下次如果网页没有变动是不会压缩的,除非是使用压缩动态文件,这得实时的去压缩。
REM Setup IIsCompressionScheme for deflate
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcCompressionDll "%windir%\system32\inetsrv\gzip.dll"
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcCreateFlags 0
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoDynamicCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoOnDemandCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoStaticCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDynamicCompressionLevel 9
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcFileExtensions "htm" "html" "txt" "js" "xml" "css"
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcOnDemandCompLevel 9
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcPriority 1
cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx"
REM Setup IIsCompressionScheme for GZip
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcCompressionDll "%windir%\system32\inetsrv\gzip.dll"
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcCreateFlags 1
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoDynamicCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoOnDemandCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoStaticCompression TRUE
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDynamicCompressionLevel 9
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "js" "xml" "css"
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcOnDemandCompLevel 9
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcPriority 1
cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx"
REM Setup IIsCompressionSchemes parameters
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCacheControlHeader max-age=86400
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCompressionBufferSize 102400
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCompressionDirectory "%windir%\IIS Temporary Compressed Files"
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoDiskSpaceLimiting FALSE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoDynamicCompression TRUE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoOnDemandCompression TRUE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoStaticCompression TRUE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcExpiresHeader "Wed, 01 Jan 1997 12:00:00 GMT"
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcFilesDeletedPerDiskFree 256
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcIoBufferSize 102400
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMaxDiskSpaceUsage 0
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMaxQueueLength 1000
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMinFileSizeForComp 1
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcNoCompressionForHttp10 FALSE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcNoCompressionForProxies FALSE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcNoCompressionForRange FALSE
cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcSendCacheHeaders FALSE
iisreset
以上是方法adsutil.vbs不一定人人都能找到,所以提供完整下载地址:
IIS6-SET-GZIP.rar
Jun
14
周六,一时不知道要做什么,就走到了SM的光合作用书店。
一不小心,不知不觉的就从下午4点多直看到晚上9点就站在书店时看完了王雪写的这本《我的IT五年》。
我看书向来都是翻的,只能记住大概的情况。对于具体的句子及人名,向来都是记不住的。
看完该书,很有感触。虽然她讲的是销售。但也是有很多经验是可以借鉴的。特别管理方面的经验。
同样是做IT的,只是书中的王雪是负责销售的,而我是技术的。该书文笔从我个人感觉并不是很优美,故事情节也几乎不是很突出,但让人感觉到一种真实的存在。
其个人的奋斗历程,也正如一个用心的人走的心路。
从该书中,我很是了解了一下销售人员的现状,与我从公司了解到的也是差不多。很多内容,我看过就忘了。但总有一些不知名的东西会影响到我的想法,特别是对部门管理的那些东西。
其实,做好工作不难的,就在于有没有心想做得更好~
文章介绍:
http://www.chinavalue.net/bookinfo/BookInfo.aspx?BookID=691089
本文是看完第二天写的,除了吸收的东西,大部分都忘了~所以有点不知所云了。
建议做IT,特别是做虚拟主机、域名、邮局、推广的销售及管理人员都能看看。确实可以了解到不少东西!
一不小心,不知不觉的就从下午4点多直看到晚上9点就站在书店时看完了王雪写的这本《我的IT五年》。
我看书向来都是翻的,只能记住大概的情况。对于具体的句子及人名,向来都是记不住的。
看完该书,很有感触。虽然她讲的是销售。但也是有很多经验是可以借鉴的。特别管理方面的经验。
同样是做IT的,只是书中的王雪是负责销售的,而我是技术的。该书文笔从我个人感觉并不是很优美,故事情节也几乎不是很突出,但让人感觉到一种真实的存在。
其个人的奋斗历程,也正如一个用心的人走的心路。
从该书中,我很是了解了一下销售人员的现状,与我从公司了解到的也是差不多。很多内容,我看过就忘了。但总有一些不知名的东西会影响到我的想法,特别是对部门管理的那些东西。
其实,做好工作不难的,就在于有没有心想做得更好~
文章介绍:
http://www.chinavalue.net/bookinfo/BookInfo.aspx?BookID=691089
本文是看完第二天写的,除了吸收的东西,大部分都忘了~所以有点不知所云了。
建议做IT,特别是做虚拟主机、域名、邮局、推广的销售及管理人员都能看看。确实可以了解到不少东西!
Jun
12
今天利用批处理实现对数据的备份。保留一周数据。
主要内容是:
每天用rsync拦过来的数据。按1~7的方式移到对应的文件夹中。
每天拉一份数据,删一份数据。形成循环。
利用date进行星期判断,以将数据移到对应目录中。
主要应对:文件为.zip的无法利用文件名进行分类的数据备份。
以前的思路都是针对文件,想从文件名处实现备份轮循。今天换了一个思路一下子解决了。
虽是小的批自理脚本。但还是有收获的。为了方便后续使用。特别做了下记录。
date参数说明: echo %date:~5,2% 表示取第5位后的两位。
echo %date:~11%表示取第11位到尾部的数据。
C:\Documents and Settings\silver>date /T
2009-06-12 星期五
C:\Documents and Settings\silver>echo %date:~11%
星期五
C:\Documents and Settings\silver>echo %date:~5,2%
06
cd /d c:\rsyncd
rsync -vau 128.10.0.248::backup E:\OADATA\
cd /d E:\OADATA
set Today=%date:~11%
echo %Today%
if "%date:~11%"=="星期一" (
mkdir 1
echo ---------------
move /y *.zip .\1\
del .\2\*.zip /s /q
echo 1 >>log.txt
%Today% >>log.txt
)
if "%date:~11%"=="星期二" (
mkdir 2
echo ---------------
move /y *.zip .\2\
del .\3\*.zip /s /q
echo 2 >>log.txt
%Today% >>log.txt
)
if "%date:~11%"=="星期三" (
mkdir 3
echo ---------------
move /y *.zip .\3\
del .\4\*.zip /s /q
echo 3 >>log.txt
echo %Today% >>log.txt
)
if "%date:~11%"=="星期四" (
mkdir 4
echo ---------------
move /y *.zip .\4\
del .\5\*.zip /s /q
echo 4 >>log.txt
echo %Today% >>log.txt
)
echo ???
if "%date:~11%"=="星期五" (
mkdir 5
move /y *.zip .\5\
del .\6\*.zip /s /q
echo 6 >>log.txt
echo %Today% >>log.txt
)
if "%date:~11%"=="星期六" (
mkdir 6
move /y *.zip .\bb\
del .\7\*.zip /s /q
echo 7 >>log.txt
echo %Today% >>log.txt
)
if "%date:~11%"=="星期日" (
mkdir 7
move /y *.zip .\7\
del .\1\*.zip /s /q
echo 7 >>log.txt
echo %Today% >>log.txt
)
cd /d c:\rsyncd
主要内容是:
每天用rsync拦过来的数据。按1~7的方式移到对应的文件夹中。
每天拉一份数据,删一份数据。形成循环。
利用date进行星期判断,以将数据移到对应目录中。
主要应对:文件为.zip的无法利用文件名进行分类的数据备份。
以前的思路都是针对文件,想从文件名处实现备份轮循。今天换了一个思路一下子解决了。
虽是小的批自理脚本。但还是有收获的。为了方便后续使用。特别做了下记录。
date参数说明: echo %date:~5,2% 表示取第5位后的两位。
echo %date:~11%表示取第11位到尾部的数据。
C:\Documents and Settings\silver>date /T
2009-06-12 星期五
C:\Documents and Settings\silver>echo %date:~11%
星期五
C:\Documents and Settings\silver>echo %date:~5,2%
06
cd /d c:\rsyncd
rsync -vau 128.10.0.248::backup E:\OADATA\
cd /d E:\OADATA
set Today=%date:~11%
echo %Today%
if "%date:~11%"=="星期一" (
mkdir 1
echo ---------------
move /y *.zip .\1\
del .\2\*.zip /s /q
echo 1 >>log.txt
%Today% >>log.txt
)
if "%date:~11%"=="星期二" (
mkdir 2
echo ---------------
move /y *.zip .\2\
del .\3\*.zip /s /q
echo 2 >>log.txt
%Today% >>log.txt
)
if "%date:~11%"=="星期三" (
mkdir 3
echo ---------------
move /y *.zip .\3\
del .\4\*.zip /s /q
echo 3 >>log.txt
echo %Today% >>log.txt
)
if "%date:~11%"=="星期四" (
mkdir 4
echo ---------------
move /y *.zip .\4\
del .\5\*.zip /s /q
echo 4 >>log.txt
echo %Today% >>log.txt
)
echo ???
if "%date:~11%"=="星期五" (
mkdir 5
move /y *.zip .\5\
del .\6\*.zip /s /q
echo 6 >>log.txt
echo %Today% >>log.txt
)
if "%date:~11%"=="星期六" (
mkdir 6
move /y *.zip .\bb\
del .\7\*.zip /s /q
echo 7 >>log.txt
echo %Today% >>log.txt
)
if "%date:~11%"=="星期日" (
mkdir 7
move /y *.zip .\7\
del .\1\*.zip /s /q
echo 7 >>log.txt
echo %Today% >>log.txt
)
cd /d c:\rsyncd







