您的位置:首页 > 运维架构 > 网站架构

[已解决]如何使用批处理添加受限制网站

2012-05-11 11:43 375 查看
我是在家酒店当网管,有些员工老是在上班时间看电影,比如土豆,优酷之类的视频网站..

自己也在网上搜索过类似的批处理,但是没有达到预期的效果...

在这里我想求个批处理,主要是能达到禁止指定的一些网站,让其无法登陆..

本帖最后由 ask0199 于 2011-12-8 15:11 编辑

自己已经找到了...

代码如下:

@echo off

attrib -s -r -h C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 qq.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.qq.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.youku.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.tudou.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.xunlei.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.56.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 220.179.115.42>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.iqiyi.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 tv.sohu.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.pptv.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.letv.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 v.ifeng.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.cntv.cn>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.imgo.tv>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.jstv.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.umiwi.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.smgbb.cn>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.umiwi.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 video.sina.com.cn>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.m1905.com>>C:\WINDOWS\system32\drivers\etc\hosts

echo 192.168.22.23 www.ku6.com>>C:\WINDOWS\system32\drivers\etc\hosts

attrib +s +r C:\WINDOWS\system32\drivers\etc\hosts

echo OK

pause>nul

@echo off

attrib -s -r -h C:\WINDOWS\system32\drivers\etc\hosts

(echo 192.168.22.23 qq.com

echo 192.168.22.23 www.qq.com

echo 192.168.22.23 www.youku.com

echo 192.168.22.23 www.tudou.com

echo 192.168.22.23 www.xunlei.com

echo 192.168.22.23 www.56.com

echo 192.168.22.23 220.179.115.42

echo 192.168.22.23 www.iqiyi.com

echo 192.168.22.23 tv.sohu.com

echo 192.168.22.23 www.pptv.com

echo 192.168.22.23 www.letv.com

echo 192.168.22.23 v.ifeng.com

echo 192.168.22.23 www.cntv.cn

echo 192.168.22.23 www.imgo.tv

echo 192.168.22.23 www.jstv.com

echo 192.168.22.23 www.umiwi.com

echo 192.168.22.23 www.smgbb.cn

echo 192.168.22.23 www.umiwi.com

echo 192.168.22.23 video.sina.com.cn

echo 192.168.22.23 www.m1905.com

echo 192.168.22.23 www.ku6.com)>>C:\WINDOWS\system32\drivers\etc\hosts

attrib +s +r C:\WINDOWS\system32\drivers\etc\hosts

echo OK

pause>nul
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐