`
aerchi
  • 浏览: 427465 次
  • 性别: Icon_minigender_1
  • 来自: 昆明
文章分类
社区版块
存档分类
最新评论

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

 
阅读更多

我是在家酒店当网管,有些员工老是在上班时间看电影,比如土豆,优酷之类的视频网站..
自己也在网上搜索过类似的批处理,但是没有达到预期的效果...

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




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

自己已经找到了...
代码如下:
  1. @echo off
  2. attrib -s -r -h C:\WINDOWS\system32\drivers\etc\hosts
  3. echo 192.168.22.23 qq.com>>C:\WINDOWS\system32\drivers\etc\hosts
  4. echo 192.168.22.23 www.qq.com>>C:\WINDOWS\system32\drivers\etc\hosts
  5. echo 192.168.22.23 www.youku.com>>C:\WINDOWS\system32\drivers\etc\hosts
  6. echo 192.168.22.23 www.tudou.com>>C:\WINDOWS\system32\drivers\etc\hosts
  7. echo 192.168.22.23 www.xunlei.com>>C:\WINDOWS\system32\drivers\etc\hosts
  8. echo 192.168.22.23 www.56.com>>C:\WINDOWS\system32\drivers\etc\hosts
  9. echo 192.168.22.23 220.179.115.42>>C:\WINDOWS\system32\drivers\etc\hosts
  10. echo 192.168.22.23 www.iqiyi.com>>C:\WINDOWS\system32\drivers\etc\hosts
  11. echo 192.168.22.23 tv.sohu.com>>C:\WINDOWS\system32\drivers\etc\hosts
  12. echo 192.168.22.23 www.pptv.com>>C:\WINDOWS\system32\drivers\etc\hosts
  13. echo 192.168.22.23 www.letv.com>>C:\WINDOWS\system32\drivers\etc\hosts
  14. echo 192.168.22.23 v.ifeng.com>>C:\WINDOWS\system32\drivers\etc\hosts
  15. echo 192.168.22.23 www.cntv.cn>>C:\WINDOWS\system32\drivers\etc\hosts
  16. echo 192.168.22.23 www.imgo.tv>>C:\WINDOWS\system32\drivers\etc\hosts
  17. echo 192.168.22.23 www.jstv.com>>C:\WINDOWS\system32\drivers\etc\hosts
  18. echo 192.168.22.23 www.umiwi.com>>C:\WINDOWS\system32\drivers\etc\hosts
  19. echo 192.168.22.23 www.smgbb.cn>>C:\WINDOWS\system32\drivers\etc\hosts
  20. echo 192.168.22.23 www.umiwi.com>>C:\WINDOWS\system32\drivers\etc\hosts
  21. echo 192.168.22.23 video.sina.com.cn>>C:\WINDOWS\system32\drivers\etc\hosts
  22. echo 192.168.22.23 www.m1905.com>>C:\WINDOWS\system32\drivers\etc\hosts
  23. echo 192.168.22.23 www.ku6.com>>C:\WINDOWS\system32\drivers\etc\hosts
  24. attrib +s +r C:\WINDOWS\system32\drivers\etc\hosts
  25. echo OK
  26. pause>nul


  1. @echo off
  2. attrib -s -r -h C:\WINDOWS\system32\drivers\etc\hosts
  3. (echo 192.168.22.23 qq.com
  4. echo 192.168.22.23 www.qq.com
  5. echo 192.168.22.23 www.youku.com
  6. echo 192.168.22.23 www.tudou.com
  7. echo 192.168.22.23 www.xunlei.com
  8. echo 192.168.22.23 www.56.com
  9. echo 192.168.22.23 220.179.115.42
  10. echo 192.168.22.23 www.iqiyi.com
  11. echo 192.168.22.23 tv.sohu.com
  12. echo 192.168.22.23 www.pptv.com
  13. echo 192.168.22.23 www.letv.com
  14. echo 192.168.22.23 v.ifeng.com
  15. echo 192.168.22.23 www.cntv.cn
  16. echo 192.168.22.23 www.imgo.tv
  17. echo 192.168.22.23 www.jstv.com
  18. echo 192.168.22.23 www.umiwi.com
  19. echo 192.168.22.23 www.smgbb.cn
  20. echo 192.168.22.23 www.umiwi.com
  21. echo 192.168.22.23 video.sina.com.cn
  22. echo 192.168.22.23 www.m1905.com
  23. echo 192.168.22.23 www.ku6.com)>>C:\WINDOWS\system32\drivers\etc\hosts
  24. attrib +s +r C:\WINDOWS\system32\drivers\etc\hosts
  25. echo OK
  26. pause>nul









分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics