订阅本站

Css 防iframe挂马.

StarSky 发表于 2007-12-25 分类 CSS, 未归档 | 发表评论

原页面中无iframe的,可以这样来.

iframe{v:expression(this.src=”about:blank”,this.outerHTML=”);}

这是将所有的iframe重定向了.
或者

fuckiframe{
width:1px;
overflow:hidden;
text-overflow:clip;
white-space: nowrap;
clear: none;
float: none;
line-height: 0px;
display: inline;
}

然后在网页的最后一行加上一个标签

<fuckiframe>

样也同样能使加在网页最后一行的iframe失效.

当然这些仅是权yi之计.治标不治本.只是为网页加一层防护罢了.程序安全,还是最重要的.

Rewrite规则:
[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# WordPress rewrite rules#

RewriteRule /tag/(.*)/ /index\.php\?tag=$1
RewriteRule /(about-me|about-copyright|guest-book)/ /index\.php\?pagename=$1
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&feed=$2
RewriteRule /author/?(.*) /index\.php\?author_name=$1
RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2
RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2
RewriteRule /page/(.*)/ /index\.php\?paged=$1

RewriteRule /photo/?([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?$ /wp-content/plugins/fgallery/fim_photos\.php\?$1=$2&$3=$4 [QSA,L,I]
RewriteRule /photo/?(.*) /wp-content/plugins/fgallery/fim_photos\.php\?$1=$2&$3=$4 [QSA,L,I]

# /%year%%monthnum%%day%/%postname%/

RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /category/?(.*)/ /index\.php\?category_name=$1

RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&page=$5
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3

RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index\.php\?year=$1&monthn&day=$3&name=$4&feed=$5
RewriteRule /([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/trackback/?$ /wp-trackback\.php\?year=$1&monthnum=$2&day=$3&name=$4&tb=1

# /post/%post_id%.html

RewriteRule /([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
# RewriteRule /post/([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
RewriteRule /post/([0-9]+).html /index\.php\?p=$1 [I]

RewriteRule /post/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /post/category/?(.*)/ /index\.php\?category_name=$1

RewriteRule /post/date/([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&page=$5
RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3

使用方法(将Wordpres安装在根目录)

去discuz.net的论坛下载Rewrite的压缩包,然后按照安装方法在IIS里面配置好Rewrite,用上面的规则覆盖httpd.ini中原来的内容,再到wordpress的后台,将选项的永久链接部分,使用自定义,然后在框框里面填写上面粗体部分的内容(两种选一种,其中# /post/%post_id%.html还不太完善),即可。

IIS主机的Rewrite设置方法

StarSky 发表于 2007-12-18 分类 未归档, 网站Web | 发表评论

1、在此下载rewrite模块:http://www.supesite.com/tools/iisrewrite.zip
将iisrewrite.zip中的文件解压到服务器的一个目录中。
打开IIS管理器 -> 选择网站属性 -> ISAPI筛选器 -> 在名称中输入rewrite ->可执行文件选择刚才解压后的文件Rewrite.dll -> 点确定-> 再点确定 -> 关闭属性对话框再次查看网站属性 -> 到ISAPI筛选器如果看到状态为向上的绿色箭头,就说明Rewrite模块安装成功了。
然后,修改Rewrite规则到刚才解压的目录下,找到httpd.ini文件。

材料准备:
1、熟米饭(1碗为例)
若干,蒸米饭的时候注意控制时间,太久了米饭就很硬,不适合作紫菜包饭了。有条件的还可以准备些煮熟的糯米和小米,三种米掺在一起做会比较正宗的说。
2、紫菜(1片)
那种薄的,一片一片的,不是平时做汤的那种啊。当然是韩国运来的味道最正宗了~
3、鸡蛋(2个)
摊成蛋皮,切长条。
4、胡萝卜、黄瓜各1长条。
5、辅料
肉松、蟹肉柳、火腿、香肠任选一样或几样,你也可以放自己稀饭的其它好吃滴。除了肉松,其它能切的要切成条啊。
6、佐料:白糖、白醋、盐少许,喜欢丰富的可加沙拉酱番茄酱什么的。

2799201120061011131948_640.jpg

开工:
1、在热米饭放进中放进白糖、白醋、盐、沙拉酱番茄酱之类适量,然后搅拌均匀,放在一边晾着。懒人可跳过此步。
2、蛋打散后,入平底锅中煎成蛋皮后,切成长方型,再切作长条。懒人和不爱好鸡蛋者也可跳过这一步。
3、把紫菜用微波炉烘半分钟。懒人和无设备者还是可跳过这一步。
ps:烘过的紫菜包晾凉的米饭,直接就包的米饭只要晾一会儿,不太烫就行。
4、铺开紫菜,把米饭倒在上面,用勺子弄扁,贴在紫菜上面,然后铺上一条一条的喜欢吃的蔬菜和肉类,再把紫菜卷起来。一定要卷紧(最好有寿司竹帘)。
5、打开时用刀切成1.5cm的小片。有条件就放上鱼子酱,推荐配合绿芥末和日本酱油吃。