vipe 发表于 2013-2-15 20:53:02

[转]禁止优酷搜狐奇艺等视频网站使用Flash P2P技术RTMFP协议使用UDP端口偷偷上传的方

本帖最后由 vipe 于 2013-2-15 20:57 编辑

这过年的,有时间看看网站,发现个很有意思的文章,转过来给大家分享


复制粘贴保存为BAT文件

@echo off
REM Changing working folder back to current directory
CD /D "%~dp0"
REM Folder changed
REM Check first if Windows XP
for /f "tokens=3*" %%i IN ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName ^| Find "ProductName"') DO set vers=%%i %%j
echo %vers% | find "XP" > nul
if %ERRORLEVEL% == 0 goto ver_xp


REM Ask for admin access
if exist "admincheckOK.txt" goto adminOK1
del /Q admincheckOK.vbs 2> nul
echo.Set objShell = CreateObject("Shell.Application") > admincheckOK.vbs
echo.Set FSO = CreateObject("Scripting.FileSystemObject") >> admincheckOK.vbs
echo.strPath = FSO.GetParentFolderName (WScript.ScriptFullName) >> admincheckOK.vbs
echo.If FSO.FileExists(%0) Then >> admincheckOK.vbs
echo. Dim oShell >> admincheckOK.vbs
echo. Set oShell = WScript.CreateObject ("WScript.Shell") >> admincheckOK.vbs
echo. oShell.run "cmd.exe /c echo admincheckOK > admincheckOK.txt" >> admincheckOK.vbs
echo. Set oShell = Nothing >> admincheckOK.vbs
echo. objShell.ShellExecute "cmd.exe", "/s /c " ^& """"%0"""" ^& " ", "", "runas", 1 >> admincheckOK.vbs
echo.Else >> admincheckOK.vbs
echo. MsgBox "Script file not found" >> admincheckOK.vbs
echo.End If >> admincheckOK.vbs
REM =========执行前的提示,非必需============
echo 视频网站去广告禁止Flash上传V1.8b1
echo =========================
echo 针对vista或者win7系统,任意键后将可能需要你点一次权限确认。
pause
REM =========提示结束============
cscript //B admincheckOK.vbs
goto theend
:adminOK1
del /Q admincheckOK.txt 2> nul
del /Q admincheckOK.vbs 2> nul
:ver_xp
REM Admin Access allowed
REM ============原来的bat文件内容开始==========


:start
@echo off
cls
echo.
echo.
echo       1,屏蔽视频网站广告并且禁止Flash P2P上传。【【推荐】】
echo.
echo       2,仅屏蔽Flash P2P上传。
echo.
echo       3,仅屏蔽视频网站广告。
echo.
echo       4,卸载本软件。
echo.   
echo ★★★屏蔽视频网站广告需要修改hosts文件,360等保护软件可能会报告,选择允许即可。
echo.
echo.
set /p input="请选择需要执行的选项。(1,2,3,4)"
if /i %input%==1 goto 1
if /i %input%==2 goto 2
if /i %input%==3 goto 1
if /i %input%==4 goto 4
goto start

:4
if exist "%systemroot%\System32\drivers\etc\hosts.first" goto uninstall
if exist "%systemroot%\System32\drivers\etc\hosts.tmp" goto uninstall
cls
echo.
echo.
echo 您还没安装过本软件呢,请先安装后再卸载。
pause
goto start

:uninstall
if exist "%systemroot%\System32\drivers\etc\hosts.first" copy /y "%systemroot%\System32\drivers\etc\hosts.first" "%systemroot%\System32\drivers\etc\hosts"
if not exist "%systemroot%\System32\drivers\etc\hosts.first" copy /y "%systemroot%\System32\drivers\etc\hosts.tmp" "%systemroot%\System32\drivers\etc\hosts"
del /q /f %systemroot%\System32\drivers\etc\hosts.first
del /q /f %systemroot%\System32\drivers\etc\hosts.tmp
cd /d "%appdata%\Macromedia\Flash Player\#SharedObjects\"
for /f %%1 in ('dir /b/ad') do cd "%%1"
attrib static.youku.com -s -a -r
del /q /f static.youku.com
del /q /f www.iqiyi.com
cd /d "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\WritableRoot\#SharedObjects\"
for /f %%1 in ('dir /b/ad') do cd "%%1"
del /q /f static.youku.com
del /q /f www.iqiyi.com
del /q /f "%windir%\system32\Macromed\Flash\mms.cfg"
del /q /f "%windir%\system32\Macromed\Flash\mms.tmp"
del /f /q "%windir%\syswow64\Macromed\Flash\mms.cfg"
del /f /q "%windir%\syswow64\Macromed\Flash\mms.tmp"
del /f /q "%windir%\system32\mms.cfg"
del /f /q "%windir%\system32\mms.tmp"
del /f /q "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System\mms.cfg"
del /f /q "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System\mms.tmp"
cls
echo.
set /p qiangzhi=卸载完毕。如果需要强制卸载(针对V1.8之前反复使用过本软件的用户可能会卸载不干净),将直接清空您的hosts文件。是否执行?(Y/N)
if /i %qiangzhi%==y goto uninstall2
exit

:uninstall2
echo. > "%systemroot%\System32\drivers\etc\hosts
cls
echo.
echo   强制卸载完毕,请重启电脑后测试。
pause
exit

:1
cd /d %systemroot%\System32\drivers\etc
if not exist hosts.first copy hosts hosts.first
copy hosts hosts.tmp /y
del hosts /q /f
findstr /v "taobao tanx mmstat player.ku6cdn.com css.ku6cdn.com" hosts.tmp>>hosts
findstr "填写今天的日期,如20121015,需每天自己改" "hosts"&&goto noaddhosts||goto addhosts

:addhosts
::以下是屏蔽视频网站广告
@echo.>>hosts
@echo.>>hosts
@echo #屏蔽视频网站代码开始---------------------------------->>hosts
@echo #优酷youku.com>>hosts
@echo #127.0.0.1 vhtml.atm.youku.com>>hosts
@echo #127.0.0.1 f.youku.com>>hosts
@echo #127.0.0.1 yk.pp.navi.youku.com>>hosts
@echo #127.0.0.1 res.mfs.ykimg.com>>hosts
@echo 127.0.0.1 stat.youku.com>>hosts
@echo 127.0.0.1 vid.atm.youku.com>>hosts
@echo 127.0.0.1 fvid.atm.youku.com>>hosts
@echo 127.0.0.1 html.atm.youku.com>>hosts
@echo 127.0.0.1 valb.atm.youku.com>>hosts
@echo 127.0.0.1 valc.atm.youku.com>>hosts
@echo 127.0.0.1 valf.atm.youku.com>>hosts
@echo 127.0.0.1 valo.atm.youku.com>>hosts
@echo 127.0.0.1 valp.atm.youku.com>>hosts
@echo 127.0.0.1 vid.atm.youku.com>>hosts
@echo 127.0.0.1 walp.atm.youku.com>>hosts
@echo 127.0.0.1 lstat.youku.com>>hosts
@echo 127.0.0.1 speed.lstat.youku.com>>hosts
@echo 127.0.0.1 static.lstat.youku.com>>hosts
@echo 127.0.0.1 urchin.lstat.youku.com>>hosts
@echo 127.0.0.1 static.atm.youku.com>>hosts
@echo 127.0.0.1 e.stat.ykimg.com>>hosts
@echo 127.0.0.1 secure-cn.imrworldwide.com>>hosts
@echo 127.0.0.1 v.admaster.com.cn>>hosts
@echo.>>hosts
@echo #土豆www.tudou.com>>hosts
@echo 127.0.0.1 adextensioncontrol.tudou.com>>hosts
@echo 127.0.0.1 adplay.tudou.com>>hosts
@echo 127.0.0.1 tdcm.tudou.com>>hosts
@echo 127.0.0.1 td.atm.youku.com>>hosts
@echo 127.0.0.1 iwstat.tudou.com>>hosts
@echo 127.0.0.1 nstat.tudou.com>>hosts
@echo 127.0.0.1 stat.tudou.com>>hosts
@echo 127.0.0.1 stats.tudou.com>>hosts
@echo 127.0.0.1 img4.tdimg.com>>hosts
@echo 127.0.0.1 ua5.tdimg.com>>hosts
@echo 127.0.0.1 ua4.tdimg.com>>hosts
@echo 127.0.0.1 td.atm.youku.com>>hosts
@echo 127.0.0.1 114.80.180.15>>hosts
@echo 127.0.0.1 h.irs01.com>>hosts
@echo 127.0.0.1 istat.tudou.com>>hosts
@echo 127.0.0.1 58.215.144.8>>hosts
@echo 127.0.0.1 t.stat.youku.com>>hosts
@echo 127.0.0.1 player.pb.ops.tudou.com>>hosts
@echo 127.0.0.1 ad.cn.doubleclick.net>>hosts
@echo.>>hosts
@echo #爱奇艺IQIYI.com>>hosts
@echo 127.0.0.1 focusbaiduafp.allyes.com>>hosts
@echo 127.0.0.1 123.125.118.74>>hosts
@echo 127.0.0.1 123.125.118.75>>hosts
@echo 127.0.0.1 123.125.118.66>>hosts
@echo 127.0.0.1 60.210.17.145>>hosts
@echo 127.0.0.1 60.210.17.158>>hosts
@echo 127.0.0.1 track.cupid.qiyi.com>>hosts
@echo 127.0.0.1 api.cupid.qiyi.com>>hosts
@echo 127.0.0.1 msg.video.qiyi.com>>hosts
@echo 127.0.0.1 show.cupid.qiyi.com>>hosts
@echo 127.0.0.1 policy.cupid.qiyi.com>>hosts
@echo 127.0.0.1 jsmsg.video.qiyi.com>>hosts
@echo.>>hosts
@echo #搜狐tv.sohu.com>>hosts
@echo 127.0.0.1 images.sohu.com>>hosts
@echo 127.0.0.1 atyt.tv.sohu.com>>hosts
@echo 127.0.0.1 click.hd.sohu.com>>hosts.cn
@echo 127.0.0.1 hot.vrs.sohu.com>>hosts
@echo 127.0.0.1 access.tv.sohu.com>>hosts
@echo 127.0.0.1 2014.img.pp.sohu.com>>hosts.cn
@echo 127.0.0.1 p.aty.sohu.com>>hosts
@echo 127.0.0.1 xls.go.sohu.com>>hosts
@echo.>>hosts
@echo #Letv乐视letv.com>>hosts
@echo 127.0.0.1 pro.letv.com>>hosts
@echo 127.0.0.1 dc.letv.com>>hosts
@echo 127.0.0.1 letv.allyes.com>>hosts
@echo.>>hosts
@echo #腾讯qq.com>>hosts
@echo 127.0.0.1 adslvfile.qq.com>>hosts
@echo.>>hosts
@echo #CNTV>>hosts
@echo 127.0.0.1 a.cctv.com>>hosts
@echo 127.0.0.1 a.cntv.cn>>hosts
@echo 127.0.0.1 ad.cctv.com>>hosts
@echo 127.0.0.1 d.cntv.cn>>hosts
@echo 127.0.0.1 adguanggao.eee114.com>>hosts
@echo 127.0.0.1 cctv.adsunion.com>>hosts
@echo.>>hosts
@echo #凤凰Ifeng.com>>hosts
@echo 127.0.0.1 bc.ifeng.com>>hosts
@echo 127.0.0.1 survey.news.ifeng.com>>hosts
@echo 127.0.0.1 comment.ifeng.com>>hosts
@echo 127.0.0.1 amch.questionmarket.com>>hosts
@echo.>>hosts
@echo #PPTV>>hosts
@echo 127.0.0.1 pp2.pptv.com>>hosts
@echo 127.0.0.1 comment.pptv.com>>hosts
@echo 127.0.0.1 jp.as.pptv.com>>hosts
@echo 127.0.0.1 ik.synacast.com>>hosts
@echo 127.0.0.1 de.as.pptv.com>>hosts
@echo 127.0.0.1 g.cn.miaozhen.com>>hosts
@echo 127.0.0.1 asimgs.pplive.cn>>hosts
@echo.>>hosts
@echo #迅雷看看kankan.com>>hosts
@echo 127.0.0.1 mcfg.sandai.net>>hosts
@echo 127.0.0.1 biz5.sandai.net>>hosts
@echo 127.0.0.1 server1.adpolestar.net>>hosts
@echo 127.0.0.1 advstat.xunlei.com>>hosts
@echo 127.0.0.1 mpv.sandai.net>>hosts
@echo 127.0.0.1 count.cpm.cm.sandai.net>>hosts
@echo 127.0.0.1 irs01.com>>hosts
@echo 127.0.0.1 sd.cn.miaozhen.com>>hosts
@echo 127.0.0.1 kkpgv2.xunlei.com>>hosts
@echo 127.0.0.1 rs.sinajs.cn>>hosts
@echo 127.0.0.1 lc.jiathis.com>>hosts
@echo 127.0.0.1 float.sandai.net>>hosts
@echo 127.0.0.1 act.xunlei.com>>hosts
@echo 127.0.0.1 widget.weibo.com>>hosts
@echo 127.0.0.1 v1.jiathis.com>>hosts
@echo #127.0.0.1 img.t.sinajs.cn>>hosts
@echo 127.0.0.1 tjs.sjs.sinajs.cn>>hosts
@echo 127.0.0.1 g.cn.miaozhen.com>>hosts
@echo 127.0.0.1 pv.cm.sandai.net>>hosts
@echo 127.0.0.1 static.irs09.com>>hosts
@echo 127.0.0.1 a.cn.miaozhen.com>>hosts
@echo #0.0.0.0 ********.biz5.sandai.net>>hosts
@echo #0.0.0.0 ********.logic.cpm.cm.sandai.net>>hosts
@echo #这里的********填写今天的日期,如20121015,需每天自己改>>hosts
@echo.>>hosts
@echo #我乐56.com>>hosts
@echo 127.0.0.1 acs.56.com>>hosts
@echo 127.0.0.1 acs.agent.56.com>>hosts
@echo 127.0.0.1 acs.agent.v-56.com>>hosts
@echo 127.0.0.1 bill.agent.56.com>>hosts
@echo 127.0.0.1 bill.agent.v-56.com>>hosts
@echo 127.0.0.1 stat.56.com>>hosts
@echo 127.0.0.1 stat2.corp.56.com>>hosts
@echo 127.0.0.1 union.56.com>>hosts
@echo 127.0.0.1 uvimage.56.com>>hosts
@echo 127.0.0.1 v16.56.com>>hosts
@echo.>>hosts
@echo #酷6ku6.com>>hosts
@echo 127.0.0.1 analytics.ku6.com>>hosts
@echo 127.0.0.1 st.vq.ku6.cn>>hosts
@echo 127.0.0.1 g.aa.sdo.com>>hosts
@echo 127.0.0.1 dwtracking.sdo.com>>hosts
@echo 127.0.0.1 g.aa.sdo.com>>hosts
@echo 127.0.0.1 stat.aa.sdo.com>>hosts
@echo 127.0.0.1 main.gslb.ku6.com>>hosts
@echo 127.0.0.1 124.95.147.246>>hosts
@echo 127.0.0.1 119.184.126.133>>hosts
@echo 127.0.0.1 pic.snyu.com>>hosts
@echo 127.0.0.1 ipic.staticsdo.com>>hosts
@echo 127.0.0.1 main.gslb.ku6.com>>hosts
@echo.>>hosts
@echo #电影网M1905.com>>hosts
@echo 127.0.0.1 afp.m1905.com>>hosts
@echo 127.0.0.1 vodlog.m1905.com>>hosts
@echo 127.0.0.1 trace.m1905.cn>>hosts
@echo 127.0.0.1 counter.m1905.com>>hosts
@echo 127.0.0.1 nuc.m1905.com>>hosts
@echo 127.0.0.1 playerlog.lxdns.com>>hosts
@echo 127.0.0.1 js.static.m1905.cn>>hosts
@echo 127.0.0.1 info.ppweb.com.cn>>hosts
@echo #127.0.0.1 p.tanx.com>>hosts
@echo 127.0.0.1 s.csbew.com>>hosts
@echo 127.0.0.1 static.acs86.com>>hosts
@echo 127.0.0.1 static.m1905.cn>>hosts
@echo 127.0.0.1 comments.m1905.com>>hosts
@echo 127.0.0.1 css.static.m1905.cn>>hosts
@echo.>>hosts
@echo #PPS.com>>hosts
@echo 127.0.0.1 stat.ppstream.com>>hosts
@echo 127.0.0.1 ugcad.pps.tv>>hosts
@echo.>>hosts
@echo #新浪sina.com>>hosts
@echo 127.0.0.1 dcads.sina.com.cn>>hosts
@echo.>>hosts
@echo #屏蔽视频网站代码结束---------------------------------->>hosts



:noaddhosts
findstr "images.sohu.com" "hosts"&&goto noaddnew||goto addnew


:noaddnew
cd /d "%appdata%\Macromedia\Flash Player\#SharedObjects\"
for /f %%1 in ('dir /b/ad') do cd "%%1"
rd static.youku.com /s /q
echo 请保存此文件屏蔽优酷广告>>static.youku.com
rd www.iqiyi.com /q /s
echo 请保存此文件屏蔽优酷广告>>www.iqiyi.com
cd /d "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\WritableRoot\#SharedObjects\"
for /f %%1 in ('dir /b/ad') do cd "%%1"
rd static.youku.com /s /q
echo 请保存此文件屏蔽优酷广告>>static.youku.com
rd www.iqiyi.com /q /s
echo 请保存此文件屏蔽优酷广告>>www.iqiyi.com
if /i %input%==1 goto 2
exit

:addnew
echo 127.0.0.1 images.sohu.com>>hosts
goto noaddhosts

:2
::以下是屏蔽Flash P2P上传

@cd \

@copy /y "%windir%\system32\Macromed\Flash\mms.cfg" "%windir%\system32\Macromed\Flash\mms.tmp"
@del /f /q "%windir%\system32\Macromed\Flash\mms.cfg"
@findstr /v "RTMFPP2PDisable" "%windir%\system32\Macromed\Flash\mms.tmp">>%windir%\system32\Macromed\Flash\mms.cfg
@echo RTMFPP2PDisable=1 >> %windir%\system32\Macromed\Flash\mms.cfg

@copy /y "%windir%\syswow64\Macromed\Flash\mms.cfg" "%windir%\syswow64\Macromed\Flash\mms.tmp"
@del /f /q "%windir%\syswow64\Macromed\Flash\mms.cfg"
@findstr /v "RTMFPP2PDisable" "%windir%\syswow64\Macromed\Flash\mms.tmp">>%windir%\syswow64\Macromed\Flash\mms.cfg
@echo RTMFPP2PDisable=1 >> %windir%\syswow64\Macromed\Flash\mms.cfg

@copy /y "%windir%\system32\mms.cfg" "%windir%\system32\mms.tmp"
@del /f /q "%windir%\system32\mms.cfg"
@findstr /v "RTMFPP2PDisable" "%windir%\system32\mms.tmp">>%windir%\syswow64\Macromed\Flash\mms.cfg
@echo RTMFPP2PDisable=1 >> %windir%\system32\mms.cfg

::chrome浏览器上传屏蔽
md "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System"
copy /y "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System\mms.cfg" "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System\mms.tmp"
del /f /q "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System\mms.cfg"
findstr /v "RTMFPP2PDisable" "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System\mms.tmp">>"%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System\mms.cfg"
echo RTMFPP2PDisable=1 >> "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System\mms.cfg"

cls
echo.
echo.
echo ★★★【请务必手动清空您使用的浏览器的缓存,不懂的同学推荐使用360电脑清理。】★★★
pause

REM ============内容结束======================
del /Q admincheckOK.vbs 2> nul
del /Q admincheckOK.txt 2> nul
:theend
页: [1]
查看完整版本: [转]禁止优酷搜狐奇艺等视频网站使用Flash P2P技术RTMFP协议使用UDP端口偷偷上传的方