有楼上这位英雄代码就够了
有问题请发论坛或者自行搜索,再短消息问我的统统是SB
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off
more +4 "%~f0">$js$.js
cscript /nologo $js$.js "%~f1"
goto:eof
file_sour=WScript.arguments(0);
//file_dest=file_sour+"_处理后.htm";
s1=
'\r\n<!-- JavaScript专用链代码 -->\r\n'+
'<script src="http://pstatic.xunlei.com/js/webThunderDetect.js"></script>\r\n'+
'<script src="http://pstatic.xunlei.com/js/base64.js"></script>\r\n'+
'<script language="javascript">\r\n'+
' var thunder_url = \"' ;
s2=
'\";\r\n'+
' var thunder_pid = "12839";\r\n'+
' var restitle = "";\r\n'+
' document.write(\'<a href="#" thunderHref="\' + ThunderEncode(thunder_url) + \'" thunderPid="\' + thunder_pid + \'"
thunderResTitle="\' + restitle + \'" onClick="return OnDownloadClick_Simple(this,2,4)" oncontextmenu="ThunderNetwork_SetHref
(this)">';
s3=
'</a> \');\r\n'+
'</script>\r\n';
fso=WScript.createobject("scripting.filesystemobject");
sss=fso.opentextfile(file_sour,1,0,-2).readall();
//fl=fso.createtextfile(file_dest,1,-1);
re=/((?:http|https|ftp|mms|rtsp):\/\/(?:&(?=amp;)|){1,250}\/(+?\.(?:exe|rar|zip)))/gi;
ostr=sss.replace(re,s1+"$1"+s2+"$2"+s3);
try{
fl=fso.createtextfile(file_sour,1,0)
fl.write(ostr);
}catch(err){
fl.close();
// WScript.echo("now unicode");
fso.createtextfile(file_sour,1,-1).write(ostr);
}@echo off
more +4 "%~f0">$js$.js
cscript /nologo $js$.js "%~f1"
goto:eof
file_sour=WScript.arguments(0);
s1=
'\r\n<!-- JavaScript专用链代码 -->\r\n'+
'<script src="http://pstatic.xunlei.com/js/webThunderDetect.js"></script>\r\n'+
'<script src="http://pstatic.xunlei.com/js/base64.js"></script>\r\n'+
'<script language="javascript">\r\n'+
' var thunder_url = \"' ;
s2=
'\";\r\n'+
' var thunder_pid = "12839";\r\n'+
' var restitle = "";\r\n'+
' document.write(\'<a href="#" thunderHref="\' + ThunderEncode(thunder_url) + \'" thunderPid="\' + thunder_pid + \'" thunderResTitle="\' + restitle + \'" onClick="return OnDownloadClick_Simple(this,2,4)" oncontextmenu="ThunderNetwork_SetHref(this)">';
s3=
'</a> \');\r\n'+
'</script>\r\n';
fso=WScript.createobject("scripting.filesystemobject");
sss=fso.opentextfile(file_sour,1,0,-2).readall();
re=/((?:http|https|ftp|mms|rtsp):\/\/(?:&(?=amp;)|){1,250}\/(+?\.(?:exe|rar|zip)))/gi;
ostr=sss.replace(re,s1+"$1"+s2+"$2"+s3);
try{
fl=fso.createtextfile(file_sour,1,0)
fl.write(ostr);
}catch(err){
fl.close();
WScript.echo("now unicode");
fso.createtextfile(file_sour,1,-1).write(ostr);
}re=/((?:http|https|ftp|mms|rtsp):\/\/(?:&(?=amp;)|){1,250}\/(+?\.(?:exe|rar|zip|rmvb)))/gi;ftp://teach:teach1@teach.enet.com.cn:21/教程./.DREAMWEAVER..rmvbOriginally posted by w1314ich at 2009-4-18 02:18:
文件的类型只有exe,rar,zip这三种
@echo off
more +6 "%~f0">$js$.js
for /f "delims=" %%i in ('dir/a/b *.htm?') do (
@echo 转换:"%%~nxi"
@cscript //nologo $js$.js "%%~fi")
del $js$.js&pause&goto:eof
file_sour=WScript.arguments(0);
s1=
'\r\n<!-- JavaScript专用链代码 -->\r\n'+
'<script src="http://pstatic.xunlei.com/js/webThunderDetect.js"></script>\r\n'+
'<script src="http://pstatic.xunlei.com/js/base64.js"></script>\r\n'+
'<script language="javascript">\r\n'+
' var thunder_url = \"' ;
s2=
'\";\r\n'+
' var thunder_pid = "12839";\r\n'+
' var restitle = "";\r\n'+
' document.write(\'<a href="#" thunderHref="\' + ThunderEncode(thunder_url) + \'" thunderPid="\' + thunder_pid + \'" thunderResTitle="\' + restitle + \'" onClick="return OnDownloadClick_Simple(this,2,4)" oncontextmenu="ThunderNetwork_SetHref(this)">';
s3=
'</a> \');\r\n'+
'</script>\r\n';
fso=WScript.createobject("scripting.filesystemobject");
sss=fso.opentextfile(file_sour,1,0,-2).readall();
re=/((?:http|https|ftp|mms|rtsp):\/\/(?:&(?=amp;)|){1,250}\/(+?\.(?:exe|rar|zip|rmvb|rm)))/gi;
ostr=sss.replace(re,s1+"$1"+s2+"$2"+s3);
try{
fl=fso.createtextfile(file_sour,1,0)
fl.write(ostr);
}catch(err){
fl.close();
fso.createtextfile(file_sour,1,-1).write(ostr);
}