var mimgpath="../../../software/WebMenuShop/treeimg";
var mfonts="style=\"text-decoration:none;font-family: 宋体; font-size: 9pt; color: #000000; \"";
var movercolor="#0000FF";
var mnormalcolor="#000000";
var NC6=(navigator.userAgent.indexOf("Netscape6")>0)?true:false;
var IE=(document.all)?true:false;
function mOver(id) {
if (IE) {eval(id).style.color=movercolor; }
else if(NC6){ document.getElementById(id).style.color=movercolor;}
}
function mOut(id) {
if (IE) {eval(id).style.color=mnormalcolor; }
else if(NC6){ document.getElementById(id).style.color=mnormalcolor;}
}function mFolderExpand($1,$2,pic) {
if (IE) { mExpandIE($1,$2,pic) }
else if(NC6){ mExpandNC($1,$2,pic) }
}function mExpandIE($1,$2,pic) {
Expanda = eval($1 + "a");
Expanda.blur()
ExpandChild = eval($1 + "Child");
if ($2 != "top") {
ExpandTree = eval($1 + "Tree");
ExpandFolder = eval($1 + "Folder");
}
if (ExpandChild.style.display == "none") {
ExpandChild.style.display = "block";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lminus.gif"; }
else { ExpandTree.src = mimgpath+"/Tminus.gif"; }
ExpandFolder.src = mimgpath+"/openfolder"+pic+".gif";
}
else { mmTree.src = mimgpath+"/topopen1.gif"; }
}else{
ExpandChild.style.display = "none";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lplus.gif"; }
else { ExpandTree.src = mimgpath+"/Tplus.gif"; }
ExpandFolder.src = mimgpath+"/folder"+pic+".gif";
}
else { mmTree.src = mimgpath+"/top1.gif"; }
}
}
function mExpandNC($1,$2,pic) {
Expanda = document.getElementById($1 + "a");
Expanda.blur()
ExpandChild = document.getElementById($1 + "Child");
if ($2 != "top") {
ExpandTree = document.getElementById($1 + "Tree");
ExpandFolder = document.getElementById($1 + "Folder");
}
if (ExpandChild.style.display == "none") {
ExpandChild.style.display = "block";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lminus.gif"; }
else { ExpandTree.src = mimgpath+"/Tminus.gif"; }
ExpandFolder.src = mimgpath+"/openfolder"+pic+".gif";
}
else { document.getElementById("mmTree").src = mimgpath+"/topopen1.gif"; }
}else{
ExpandChild.style.display = "none";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lplus.gif"; }
else { ExpandTree.src = mimgpath+"/Tplus.gif"; }
ExpandFolder.src = mimgpath+"/folder"+pic+".gif";
}
else {document.getElementById("mmTree").src = mimgpath+"/top1.gif"; }
}
}
with(document){
write("<div ID=\"mmParent\"><a ID=\"mma\" href=\"#\" style=\"text-decoration:none;font-family: 宋体; font-size: 11pt; color: #000000; font-weight: bold; \" onClick=\"mFolderExpand('mm','top',null)\">");
write("<img ID=\"mmTree\" src=\""+mimgpath+"/topopen1.gif\" style=\"margin-right: 5\" align=\"absmiddle\" border=\"0\">");
write("<font ID=\"mTitle0\" onmouseover=\"mOver('mTitle0')\" onmouseout=\"mOut('mTitle0')\">校级系统常见问题<FAQs></font></a></div>");
write("<div ID=\"mmChild\"><img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ1.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle1\" onmouseover=\"mOver('mTitle1')\" onmouseout=\"mOut('mTitle1')\">下载校级系统软件问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ2.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle2\" onmouseover=\"mOver('mTitle2')\" onmouseout=\"mOut('mTitle2')\">校级系统软件安装与卸载问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ3.htm\" "+mfonts+" title=\"题\"><font ID=\"mTitle3\" onmouseover=\"mOver('mTitle3')\" onmouseout=\"mOut('mTitle3')\">校级系统软件使用中的常见问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ4.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle4\" onmouseover=\"mOver('mTitle4')\" onmouseout=\"mOut('mTitle4')\">有关统计的问题</font></a><br>");
write("<img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ5.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle5\" onmouseover=\"mOver('mTitle5')\" onmouseout=\"mOut('mTitle5')\">其他问题</font></a><br>");
write(" <a style=\"font-family: Verdana; font-size: 8pt; color: #000000\" href=\"http://www.knifesoft.com/\">KnifeSoft</a></div>");
}
var mfonts="style=\"text-decoration:none;font-family: 宋体; font-size: 9pt; color: #000000; \"";
var movercolor="#0000FF";
var mnormalcolor="#000000";
var NC6=(navigator.userAgent.indexOf("Netscape6")>0)?true:false;
var IE=(document.all)?true:false;
function mOver(id) {
if (IE) {eval(id).style.color=movercolor; }
else if(NC6){ document.getElementById(id).style.color=movercolor;}
}
function mOut(id) {
if (IE) {eval(id).style.color=mnormalcolor; }
else if(NC6){ document.getElementById(id).style.color=mnormalcolor;}
}function mFolderExpand($1,$2,pic) {
if (IE) { mExpandIE($1,$2,pic) }
else if(NC6){ mExpandNC($1,$2,pic) }
}function mExpandIE($1,$2,pic) {
Expanda = eval($1 + "a");
Expanda.blur()
ExpandChild = eval($1 + "Child");
if ($2 != "top") {
ExpandTree = eval($1 + "Tree");
ExpandFolder = eval($1 + "Folder");
}
if (ExpandChild.style.display == "none") {
ExpandChild.style.display = "block";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lminus.gif"; }
else { ExpandTree.src = mimgpath+"/Tminus.gif"; }
ExpandFolder.src = mimgpath+"/openfolder"+pic+".gif";
}
else { mmTree.src = mimgpath+"/topopen1.gif"; }
}else{
ExpandChild.style.display = "none";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lplus.gif"; }
else { ExpandTree.src = mimgpath+"/Tplus.gif"; }
ExpandFolder.src = mimgpath+"/folder"+pic+".gif";
}
else { mmTree.src = mimgpath+"/top1.gif"; }
}
}
function mExpandNC($1,$2,pic) {
Expanda = document.getElementById($1 + "a");
Expanda.blur()
ExpandChild = document.getElementById($1 + "Child");
if ($2 != "top") {
ExpandTree = document.getElementById($1 + "Tree");
ExpandFolder = document.getElementById($1 + "Folder");
}
if (ExpandChild.style.display == "none") {
ExpandChild.style.display = "block";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lminus.gif"; }
else { ExpandTree.src = mimgpath+"/Tminus.gif"; }
ExpandFolder.src = mimgpath+"/openfolder"+pic+".gif";
}
else { document.getElementById("mmTree").src = mimgpath+"/topopen1.gif"; }
}else{
ExpandChild.style.display = "none";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lplus.gif"; }
else { ExpandTree.src = mimgpath+"/Tplus.gif"; }
ExpandFolder.src = mimgpath+"/folder"+pic+".gif";
}
else {document.getElementById("mmTree").src = mimgpath+"/top1.gif"; }
}
}
with(document){
write("<div ID=\"mmParent\"><a ID=\"mma\" href=\"#\" style=\"text-decoration:none;font-family: 宋体; font-size: 11pt; color: #000000; font-weight: bold; \" onClick=\"mFolderExpand('mm','top',null)\">");
write("<img ID=\"mmTree\" src=\""+mimgpath+"/topopen1.gif\" style=\"margin-right: 5\" align=\"absmiddle\" border=\"0\">");
write("<font ID=\"mTitle0\" onmouseover=\"mOver('mTitle0')\" onmouseout=\"mOut('mTitle0')\">校级系统常见问题<FAQs></font></a></div>");
write("<div ID=\"mmChild\"><img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ1.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle1\" onmouseover=\"mOver('mTitle1')\" onmouseout=\"mOut('mTitle1')\">下载校级系统软件问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ2.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle2\" onmouseover=\"mOver('mTitle2')\" onmouseout=\"mOut('mTitle2')\">校级系统软件安装与卸载问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ3.htm\" "+mfonts+" title=\"题\"><font ID=\"mTitle3\" onmouseover=\"mOver('mTitle3')\" onmouseout=\"mOut('mTitle3')\">校级系统软件使用中的常见问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ4.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle4\" onmouseover=\"mOver('mTitle4')\" onmouseout=\"mOut('mTitle4')\">有关统计的问题</font></a><br>");
write("<img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ5.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle5\" onmouseover=\"mOver('mTitle5')\" onmouseout=\"mOut('mTitle5')\">其他问题</font></a><br>");
write(" <a style=\"font-family: Verdana; font-size: 8pt; color: #000000\" href=\"http://www.knifesoft.com/\">KnifeSoft</a></div>");
}
解决方案 »
- easyui radio select 默认选中
- 为什么我这个JS在IE正常,火狐一片空白的,紧急求助!
- 有什么办法判断一个对象是否被初始化?
- 在firefox中的document.getElementById错误 请问怎么解决?
- 层总是在图后面的问题...请求大家帮助?
- 如何即时地将一个图片扩大和缩小???在线等
- 如何让一个window.open的窗口在刚刚弹出的时候在最前面一段时间,比如说10秒,之后就可以失去焦点?
- 设置table边框为红色,或为深红+浅红?
- 我想在javascript中生成一个select语句,然后传给asp?sql= 中的sql参数,格式怎么定?
- 可以让用户输入信息的提示框怎么写?
- webbrowser里如何设置打印的页边距?
- 算是概念性的问题:JavaScript和JAVA的
var mfonts="style=\"text-decoration:none;font-family: 宋体; font-size: 9pt; color: #000000; \"";
var movercolor="#0000FF";
var mnormalcolor="#000000";
var NC6=(navigator.userAgent.indexOf("Netscape6")>0)?true:false;
var IE=(document.all)?true:false;
function mOver(id) {
if (IE) {eval(id).style.color=movercolor; }
else if(NC6){ document.getElementById(id).style.color=movercolor;}
}
function mOut(id) {
if (IE) {eval(id).style.color=mnormalcolor; }
else if(NC6){ document.getElementById(id).style.color=mnormalcolor;}
}function mFolderExpand($1,$2,pic) {
if (IE) { mExpandIE($1,$2,pic) }
else if(NC6){ mExpandNC($1,$2,pic) }
}function mExpandIE($1,$2,pic) {
Expanda = eval($1 + "a");
Expanda.blur()
ExpandChild = eval($1 + "Child");
if ($2 != "top") {
ExpandTree = eval($1 + "Tree");
ExpandFolder = eval($1 + "Folder");
}
if (ExpandChild.style.display == "none") {
ExpandChild.style.display = "block";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lminus.gif"; }
else { ExpandTree.src = mimgpath+"/Tminus.gif"; }
ExpandFolder.src = mimgpath+"/openfolder"+pic+".gif";
}
else { mmTree.src = mimgpath+"/topopen1.gif"; }
}else{
ExpandChild.style.display = "none";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lplus.gif"; }
else { ExpandTree.src = mimgpath+"/Tplus.gif"; }
ExpandFolder.src = mimgpath+"/folder"+pic+".gif";
}
else { mmTree.src = mimgpath+"/top1.gif"; }
}
}
function mExpandNC($1,$2,pic) {
Expanda = document.getElementById($1 + "a");
Expanda.blur()
ExpandChild = document.getElementById($1 + "Child");
if ($2 != "top") {
ExpandTree = document.getElementById($1 + "Tree");
ExpandFolder = document.getElementById($1 + "Folder");
}
if (ExpandChild.style.display == "none") {
ExpandChild.style.display = "block";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lminus.gif"; }
else { ExpandTree.src = mimgpath+"/Tminus.gif"; }
ExpandFolder.src = mimgpath+"/openfolder"+pic+".gif";
}
else { document.getElementById("mmTree").src = mimgpath+"/topopen1.gif"; }
}else{
ExpandChild.style.display = "none";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lplus.gif"; }
else { ExpandTree.src = mimgpath+"/Tplus.gif"; }
ExpandFolder.src = mimgpath+"/folder"+pic+".gif";
}
else {document.getElementById("mmTree").src = mimgpath+"/top1.gif"; }
}
}
with(document){
write("<div ID=\"mmParent\"><a ID=\"mma\" href=\"#\" style=\"text-decoration:none;font-family: 宋体; font-size: 11pt; color: #000000; font-weight: bold; \" onClick=\"mFolderExpand('mm','top',null)\">");
write("<img ID=\"mmTree\" src=\""+mimgpath+"/topopen1.gif\" style=\"margin-right: 5\" align=\"absmiddle\" border=\"0\">");
write("<font ID=\"mTitle0\" onmouseover=\"mOver('mTitle0')\" onmouseout=\"mOut('mTitle0')\">校级系统常见问题<FAQs></font></a></div>");
write("<div ID=\"mmChild\"><img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ1.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle1\" onmouseover=\"mOver('mTitle1')\" onmouseout=\"mOut('mTitle1')\">下载校级系统软件问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ2.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle2\" onmouseover=\"mOver('mTitle2')\" onmouseout=\"mOut('mTitle2')\">校级系统软件安装与卸载问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ3.htm\" "+mfonts+" title=\"题\"><font ID=\"mTitle3\" onmouseover=\"mOver('mTitle3')\" onmouseout=\"mOut('mTitle3')\">校级系统软件使用中的常见问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ4.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle4\" onmouseover=\"mOver('mTitle4')\" onmouseout=\"mOut('mTitle4')\">有关统计的问题</font></a><br>");
write("<img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ5.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle5\" onmouseover=\"mOver('mTitle5')\" onmouseout=\"mOut('mTitle5')\">其他问题</font></a><br>");
write(" <a style=\"font-family: Verdana; font-size: 8pt; color: #000000\" href=\"http://www.knifesoft.com/\">KnifeSoft</a></div>");
}
</script>
http://www.csdn.net/cnshare/soft/14/14270.shtm
MFC70U.dll: http://www.is.svitonline.com/valeravi/mfc70u.rar
MSVCR70.dll: http://www.is.svitonline.com/valeravi/msvcr70.rar拜托88dd(巴迪)发布的时候再上这两个东东:( 不是每个人都装.net的
var mfonts="style=\"text-decoration:none;font-family: 宋体; font-size: 9pt; color: #000000; \"";
var movercolor="#0000FF";
var mnormalcolor="#000000";
var NC6=(navigator.userAgent.indexOf("Netscape6")>0)?true:false;
var IE=(document.all)?true:false;
function mOver(id) {
if (IE) {eval(id).style.color=movercolor; }
else if(NC6){ document.getElementById(id).style.color=movercolor;}
}
function mOut(id) {
if (IE) {eval(id).style.color=mnormalcolor; }
else if(NC6){ document.getElementById(id).style.color=mnormalcolor;}
}function mFolderExpand($1,$2,pic) {
if (IE) { mExpandIE($1,$2,pic) }
else if(NC6){ mExpandNC($1,$2,pic) }
}function mExpandIE($1,$2,pic) {
Expanda = eval($1 + "a");
Expanda.blur()
ExpandChild = eval($1 + "Child");
if ($2 != "top") {
ExpandTree = eval($1 + "Tree");
ExpandFolder = eval($1 + "Folder");
}
if (ExpandChild.style.display == "none") {
ExpandChild.style.display = "block";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lminus.gif"; }
else { ExpandTree.src = mimgpath+"/Tminus.gif"; }
ExpandFolder.src = mimgpath+"/openfolder"+pic+".gif";
}
else { mmTree.src = mimgpath+"/topopen1.gif"; }
}else{
ExpandChild.style.display = "none";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lplus.gif"; }
else { ExpandTree.src = mimgpath+"/Tplus.gif"; }
ExpandFolder.src = mimgpath+"/folder"+pic+".gif";
}
else { mmTree.src = mimgpath+"/top1.gif"; }
}
}
function mExpandNC($1,$2,pic) {
Expanda = document.getElementById($1 + "a");
Expanda.blur()
ExpandChild = document.getElementById($1 + "Child");
if ($2 != "top") {
ExpandTree = document.getElementById($1 + "Tree");
ExpandFolder = document.getElementById($1 + "Folder");
}
if (ExpandChild.style.display == "none") {
ExpandChild.style.display = "block";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lminus.gif"; }
else { ExpandTree.src = mimgpath+"/Tminus.gif"; }
ExpandFolder.src = mimgpath+"/openfolder"+pic+".gif";
}
else { document.getElementById("mmTree").src = mimgpath+"/topopen1.gif"; }
}else{
ExpandChild.style.display = "none";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = mimgpath+"/Lplus.gif"; }
else { ExpandTree.src = mimgpath+"/Tplus.gif"; }
ExpandFolder.src = mimgpath+"/folder"+pic+".gif";
}
else {document.getElementById("mmTree").src = mimgpath+"/top1.gif"; }
}
}
with(document){
write("<div ID=\"mmParent\"><a ID=\"mma\" href=\"#\" style=\"text-decoration:none;font-family: 宋体; font-size: 11pt; color: #000000; font-weight: bold; \" onClick=\"mFolderExpand('mm','top',null)\">");
write("<img ID=\"mmTree\" src=\""+mimgpath+"/topopen1.gif\" style=\"margin-right: 5\" align=\"absmiddle\" border=\"0\">");
write("<font ID=\"mTitle0\" onmouseover=\"mOver('mTitle0')\" onmouseout=\"mOut('mTitle0')\">校级系统常见问题<FAQs></font></a></div>");
write("<div ID=\"mmChild\"><img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ1.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle1\" onmouseover=\"mOver('mTitle1')\" onmouseout=\"mOut('mTitle1')\">下载校级系统软件问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ2.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle2\" onmouseover=\"mOver('mTitle2')\" onmouseout=\"mOut('mTitle2')\">校级系统软件安装与卸载问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ3.htm\" "+mfonts+" title=\"题\"><font ID=\"mTitle3\" onmouseover=\"mOver('mTitle3')\" onmouseout=\"mOut('mTitle3')\">校级系统软件使用中的常见问题</font></a><br>");
write("<img src=\""+mimgpath+"/T.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ4.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle4\" onmouseover=\"mOver('mTitle4')\" onmouseout=\"mOut('mTitle4')\">有关统计的问题</font></a><br>");
write("<img src=\""+mimgpath+"/L.gif\" align=\"absmiddle\" width=\"19\" height=\"20\" border=\"0\"><img src=\""+mimgpath+"/item2.gif\" align=\"absmiddle\" style=\"margin-right: 5\"><a target=\"mainFrame\" href=\"../FAQS/FAQ5.htm\" "+mfonts+" title=\"\"><font ID=\"mTitle5\" onmouseover=\"mOver('mTitle5')\" onmouseout=\"mOut('mTitle5')\">其他问题</font></a><br>");
write(" <a style=\"font-family: Verdana; font-size: 8pt; color: #000000\" href=\"http://www.knifesoft.com/\">KnifeSoft</a></div>");
}
Dim oArgs, NomFichier
'Optional argument : the encoded filename
NomFichier=""
Set oArgs = WScript.Arguments
Select Case oArgs.Count
Case 0 'No Arg, popup a dialog box to choose the file
NomFichier=BrowseForFolder("Choose an encoded file", &H4031, &H0011)
Case 1
If Instr(oArgs(0),"?")=0 Then '-? ou /? => aide
NomFichier=oArgs(0)
End If
Case Else
WScript.Echo "Too many parameters"
End Select
Set oArgs = NothingIf NomFichier<>"" Then
Dim fso
Set fso=WScript.CreateObject("Scripting.FileSystemObject")
If fso.FileExists(NomFichier) Then
Dim fic,contenu
Set fic = fso.OpenTextFile(NomFichier, 1)
Contenu=fic.readAll
fic.close
Set fic=Nothing Const TagInit="#@~^" '#@~^awQAAA==
Const TagFin="==^#~@" '& chr(0)
Dim DebutCode, FinCode
Do
FinCode=0
DebutCode=Instr(Contenu,TagInit)
If DebutCode>0 Then
If (Instr(DebutCode,Contenu,"==")-DebutCode)=10 Then 'If "==" follows the tag
FinCode=Instr(DebutCode,Contenu,TagFin)
If FinCode>0 Then
Contenu=Left(Contenu,DebutCode-1) & _
Decode(Mid(Contenu,DebutCode+12,FinCode-DebutCode-12-6)) & _
Mid(Contenu,FinCode+6)
End If
End If
End If
Loop Until FinCode=0
WScript.Echo Contenu
Dim fso2, tf
Set fso2 = CreateObject("Scripting.FileSystemObject")
Set tf = fso2.CreateTextFile("d:\decode_js.js", True)
tf.Write (Contenu)
tf.Close Else
WScript.Echo Nomfichier & " not found"
End If
Set fso=Nothing
Else
WScript.Echo "Please give a filename"
WScript.Echo "Usage : " & wscript.fullname & " " & WScript.ScriptFullName & " <filename>"
End IfFunction Decode(Chaine)
Dim se,i,c,j,index,ChaineTemp
Dim tDecode(127)
Const Combinaison="1231232332321323132311233213233211323231311231321323112331123132" Set se=WSCript.CreateObject("Scripting.Encoder")
For i=9 to 127
tDecode(i)="JLA"
Next
For i=9 to 127
ChaineTemp=Mid(se.EncodeScriptFile(".vbs",string(3,i),0,""),13,3)
For j=1 to 3
c=Asc(Mid(ChaineTemp,j,1))
tDecode(c)=Left(tDecode(c),j-1) & chr(i) & Mid(tDecode(c),j+1)
Next
Next
'Next line we correct a bug, otherwise a ")" could be decoded to a ">"
tDecode(42)=Left(tDecode(42),1) & ")" & Right(tDecode(42),1)
Set se=Nothing Chaine=Replace(Replace(Chaine,"@&",chr(10)),"@#",chr(13))
Chaine=Replace(Replace(Chaine,"@*",">"),"@!","<")
Chaine=Replace(Chaine,"@$","@")
index=-1
For i=1 to Len(Chaine)
c=asc(Mid(Chaine,i,1))
If c<128 Then index=index+1
If (c=9) or ((c>31) and (c<128)) Then
If (c<>60) and (c<>62) and (c<>64) Then
Chaine=Left(Chaine,i-1) & Mid(tDecode(c),Mid(Combinaison,(index mod 64)+1,1),1) & Mid(Chaine,i+1)
End If
End If
Next
Decode=Chaine
End FunctionFunction BrowseForFolder(ByVal pstrPrompt, ByVal pintBrowseType, ByVal pintLocation)
Dim ShellObject, pstrTempFolder, x
Set ShellObject=WScript.CreateObject("Shell.Application")
On Error Resume Next
Set pstrTempFolder=ShellObject.BrowseForFolder(&H0,pstrPrompt,pintBrowseType,pintLocation)
BrowseForFolder=pstrTempFolder.ParentFolder.ParseName(pstrTempFolder.Title).Path
If Err.Number<>0 Then BrowseForFolder=""
Set pstrTempFolder=Nothing
Set ShellObject=Nothing
End Function
#include <string.h>
#include <stdlib.h>#define LEN_OUTBUF 64
#define LEN_INBUF 1024#define STATE_INIT_COPY 100
#define STATE_COPY_INPUT 101
#define STATE_SKIP_ML 102
#define STATE_CHECKSUM 103
#define STATE_READLEN 104
#define STATE_DECODE 105
#define STATE_UNESCAPE 106
#define STATE_FLUSHING 107
#define STATE_DBCS 108
#define STATE_INIT_READLEN 109unsigned char rawData[292] = {
0x64,0x37,0x69, 0x50,0x7E,0x2C, 0x22,0x5A,0x65, 0x4A,0x45,0x72,
0x61,0x3A,0x5B, 0x5E,0x79,0x66, 0x5D,0x59,0x75, 0x5B,0x27,0x4C,
0x42,0x76,0x45, 0x60,0x63,0x76, 0x23,0x62,0x2A, 0x65,0x4D,0x43,
0x5F,0x51,0x33, 0x7E,0x53,0x42, 0x4F,0x52,0x20, 0x52,0x20,0x63,
0x7A,0x26,0x4A, 0x21,0x54,0x5A, 0x46,0x71,0x38, 0x20,0x2B,0x79,
0x26,0x66,0x32, 0x63,0x2A,0x57, 0x2A,0x58,0x6C, 0x76,0x7F,0x2B,
0x47,0x7B,0x46, 0x25,0x30,0x52, 0x2C,0x31,0x4F, 0x29,0x6C,0x3D,
0x69,0x49,0x70, 0x3F,0x3F,0x3F, 0x27,0x78,0x7B, 0x3F,0x3F,0x3F,
0x67,0x5F,0x51, 0x3F,0x3F,0x3F, 0x62,0x29,0x7A, 0x41,0x24,0x7E,
0x5A,0x2F,0x3B, 0x66,0x39,0x47, 0x32,0x33,0x41, 0x73,0x6F,0x77,
0x4D,0x21,0x56, 0x43,0x75,0x5F, 0x71,0x28,0x26, 0x39,0x42,0x78,
0x7C,0x46,0x6E, 0x53,0x4A,0x64, 0x48,0x5C,0x74, 0x31,0x48,0x67,
0x72,0x36,0x7D, 0x6E,0x4B,0x68, 0x70,0x7D,0x35, 0x49,0x5D,0x22,
0x3F,0x6A,0x55, 0x4B,0x50,0x3A, 0x6A,0x69,0x60, 0x2E,0x23,0x6A,
0x7F,0x09,0x71, 0x28,0x70,0x6F, 0x35,0x65,0x49, 0x7D,0x74,0x5C,
0x24,0x2C,0x5D, 0x2D,0x77,0x27, 0x54,0x44,0x59, 0x37,0x3F,0x25,
0x7B,0x6D,0x7C, 0x3D,0x7C,0x23, 0x6C,0x43,0x6D, 0x34,0x38,0x28,
0x6D,0x5E,0x31, 0x4E,0x5B,0x39, 0x2B,0x6E,0x7F, 0x30,0x57,0x36,
0x6F,0x4C,0x54, 0x74,0x34,0x34, 0x6B,0x72,0x62, 0x4C,0x25,0x4E,
0x33,0x56,0x30, 0x56,0x73,0x5E, 0x3A,0x68,0x73, 0x78,0x55,0x09,
0x57,0x47,0x4B, 0x77,0x32,0x61, 0x3B,0x35,0x24, 0x44,0x2E,0x4D,
0x2F,0x64,0x6B, 0x59,0x4F,0x44, 0x45,0x3B,0x21, 0x5C,0x2D,0x37,
0x68,0x41,0x53, 0x36,0x61,0x58, 0x58,0x7A,0x48, 0x79,0x22,0x2E,
0x09,0x60,0x50, 0x75,0x6B,0x2D, 0x38,0x4E,0x29, 0x55,0x3D,0x3F,
0x51,0x67,0x2f
} ;const unsigned char pick_encoding[64] = {
1, 2, 0, 1, 2, 0, 2, 0, 0, 2, 0, 2, 1, 0, 2, 0,
1, 0, 2, 0, 1, 1, 2, 0, 0, 2, 1, 0, 2, 0, 0, 2,
1, 1, 0, 2, 0, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 2,
1, 0, 2, 0, 1, 1, 2, 0, 0, 1, 1, 2, 0, 1, 0, 2
};unsigned char transformed[3][128];
int digits[0x7b];unsigned char unescape (unsigned char c)
{
static unsigned char escapes[] = "#&!*$";
static unsigned char escaped[] = "\r\n<>@";
int i=0; if (c > 127)
return c;
while (escapes[i])
{
if (escapes[i] == c)
return escaped[i];
i++;
}
return '?';
}void maketrans (void)
{
int i, j; for (i=31; i<=127; i++)
for (j=0; j<3; j++)
transformed[j][rawData[(i-31)*3 + j]] = (i==31) ? 9 : i;
}void makedigits (void)
{
int i; for (i=0; i<26; i++)
{
digits['A'+i] = i;
digits['a'+i] = i+26;
}
for (i=0; i<10; i++)
digits['0'+i] = i+52;
digits[0x2b] = 62;
digits[0x2f] = 63;
}unsigned long int decodeBase64 (unsigned char *p)
{
unsigned long int val = 0; val += (digits[p[0]] << 2);
val += (digits[p[1]] >> 4);
val += (digits[p[1]] & 0xf) << 12;
val += ((digits[p[2]] >> 2) << 8);
val += ((digits[p[2]] & 0x3) << 22);
val += (digits[p[3]] << 16);
val += ((digits[p[4]] << 2) << 24);
val += ((digits[p[5]] >> 4) << 24); /* 543210 543210 543210 543210 543210 543210 765432
10
ba98
fedc
76
543210
fedcba 98----
|- LSB -||- -||- -| |- MSB -|
*/
return val;
}int isLeadByte (unsigned int cp, unsigned char ucByte)
{
/* Code page 932 - Japanese Shift-JIS - 0x81-0x9f
0xe0-0xfc
936 - Simplified Chinese GBK - 0xa1-0xfe
949 - Korean Wansung - 0x81-0xfe
950 - Traditional Chinese Big5 - 0x81-0xfe
1361 - Korean Johab - 0x84-0xd3
0xd9-0xde
0xe0-0xf9 */
switch (cp)
{
case 932:
if ((ucByte > 0x80) && (ucByte < 0xa0)) return 1;
if ((ucByte > 0xdf) && (ucByte < 0xfd)) return 1;
else return 0;
case 936:
if ((ucByte > 0xa0) && (ucByte < 0xff)) return 1;
else return 0;
case 949:
case 950:
if ((ucByte > 0x80) && (ucByte < 0xff)) return 1;
else return 0;
case 1361:
if ((ucByte > 0x83) && (ucByte < 0xd4)) return 1;
if ((ucByte > 0xd8) && (ucByte < 0xdf)) return 1;
if ((ucByte > 0xdf) && (ucByte < 0xfa)) return 1;
else return 0;
default:
return 0;
}}
int ScriptDecoder (unsigned char *inname, unsigned char *outname, unsigned int cp)
{
unsigned char inbuf[LEN_INBUF+1];
unsigned char outbuf[LEN_OUTBUF+1];
unsigned char c, lenbuf[7], csbuf[7];
unsigned char er[] = "#@~^";
int nextstate, state = 0;
int i, j, k, m, ml = 0;
unsigned long int csum = 0, len = 0;
FILE *infile, *outfile; infile = fopen (inname, "rb");
outfile = fopen (outname, "wb");
if (!infile || !outfile)
{
printf ("Error opening file!\n");
return 10;
}
maketrans();
makedigits();
memset (inbuf, 0, sizeof (inbuf));
memset (outbuf, 0, sizeof (outbuf));
memset (lenbuf, 0, sizeof (lenbuf));
state = STATE_INIT_COPY;
i = 0;
j = 0; while (state)
{
if (inbuf[i] == 0)
{
if (feof (infile))
break; memset (inbuf, 0, sizeof (inbuf));
fgets (inbuf, LEN_INBUF, infile);
i = 0;
continue;
} if (j == LEN_OUTBUF)
{
fwrite (outbuf, sizeof(char), j, outfile);
j = 0;
} switch (state)
{
case STATE_INIT_COPY:
ml = strlen (er);
m = 0;
state = STATE_COPY_INPUT;
break; case STATE_COPY_INPUT:
if (inbuf[i] == er[m])
{
i++;
m++;
}
else
{
if (m)
{
k = 0;
state = STATE_FLUSHING;
}
else
outbuf[j++] = inbuf[i++]; }
if (m == ml)
state = STATE_INIT_READLEN;
break; case STATE_FLUSHING:
outbuf[j++] = er[k++];
m--;
if (m==0)
state = STATE_COPY_INPUT;
break;
case STATE_SKIP_ML:
i++;
if (!(--ml))
state = nextstate;
break;
case STATE_INIT_READLEN:
ml = 6;
state = STATE_READLEN;
break; case STATE_READLEN:
lenbuf[6-ml] = inbuf[i++];
if (!(--ml))
{
len = decodeBase64 (lenbuf);
m = 0;
ml = 2;
state = STATE_SKIP_ML;
nextstate = STATE_DECODE;
}
break; case STATE_DECODE:
if (!len)
{
ml = 6;
state = STATE_CHECKSUM;
break;
}
if (inbuf[i] == '@')
state = STATE_UNESCAPE;
else
{
if (inbuf[i] < 0x80)
{
outbuf[j++] = c = transformed[pick_encoding[m%64]][inbuf[i]];
csum += c;
m++;
}
else
{
outbuf[j++] = inbuf[i];
if ((cp) && (isLeadByte (cp,inbuf[i])))
state = STATE_DBCS;
} }
i++;
len--;
break; case STATE_DBCS:
outbuf[j++] = inbuf[i++];
state = STATE_DECODE;
break;
case STATE_UNESCAPE:
outbuf[j++] = c = unescape (inbuf[i++]);
csum += c;
len--;
m++;
state = STATE_DECODE;
break; case STATE_CHECKSUM:
csbuf[6-ml] = inbuf[i++];
if (!(--ml))
{
csum -= decodeBase64 (csbuf);
if (csum)
{
printf ("Error - Incorrect checksum! (%lu)\n", csum);
csum=0;
}
m = 0;
ml = 6;
state = STATE_SKIP_ML;
nextstate = STATE_INIT_COPY;
}
break; default:
printf ("Invalid state: %d\n", state);
break;
}
}
fwrite (outbuf, sizeof (char), j, outfile);
fclose (infile);
fclose (outfile);
return 0;
}
int main (int argc, char **argv)
{
int cp = 0; if (argc < 3)
{
printf ("Decoder for Microsoft Script Encoder v1.3\n"
"Usage: scrdec13 <infile> <outfile> [codepage]\n\n"
"Code pages can be 932 - Japanese\n"
" 936 - Chinese (Simplified)\n"
" 950 - Chinese (Traditional)\n"
" 949 - Korean (Wansung)\n"
" 1361 - Korean (Johab)\n"
"Any other code pages don't need to be specified.\n");
return 10;
} if (argc > 3)
cp = atoi (argv[3]);
return ScriptDecoder (argv[1], argv[2], cp);
}
但在处理有中文的文件时会出错,英文的大多数正确,稍后我把代码贴上来。顶~~~~~~~~~~~~~~
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End TypePrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pIdl As Long, ByVal pszPath As String) As Long
Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal pv As Long)Private Const WM_USER = &H400Private Const BFFM_INITIALIZED = &H1
Private Const BFFM_SELCHANGED = &H2Private Const BFFM_SETSTATUSTEXT = WM_USER + 100
Private Const BFFM_ENABLEOK = WM_USER + 101
Private Const BFFM_SETSELECTION = WM_USER + 102'BROWSEINFO.ulFlags values:
Private Const BIF_RETURNONLYFSDIRS = &H1
Private Const BIF_DONTGOBELOWDOMAIN = &H2
Private Const BIF_STATUSTEXT = &H4
Private Const BIF_RETURNFSANCESTORS = &H8
Private Const BIF_BROWSEFORCOMPUTER = &H1000
Private Const BIF_BROWSEFORPRINTER = &H2000
Private Const BIF_BROWSEINCLUDEFILES = &H4000Private Const MAX_PATH = 260Private m_HwndDialogBox As LongPrivate SelectFolder As String
Private FinalFolder As StringFunction FnPtrToLong(ByVal lngFnPtr As Long) As Long
FnPtrToLong = lngFnPtr
End FunctionFunction BrowseForFolder(ByVal hWndModal As Long, ByVal szTipTitle As String, ByVal InitFolder As String, Optional Kinds As Boolean) As String
Dim bInf As BROWSEINFO
Dim retVal As Long
Dim lpIDList As Long
Dim sBuffer As String
Dim OffSet As Integer
'Set the properties of the folder dialog
With bInf
.hOwner = hWndModal
.lpszTitle = szTipTitle & vbNullChar
'lpszTitle = lstrcat(szTipTitle, "")
.lpfn = FnPtrToLong(AddressOf BrowseDirectoryCallback)
'.lParam = 0
End With
'Set Init Folder(Boot Dir)
SelectFolder = InitFolder & vbNullChar
If Kinds = True Then
bInf.ulFlags = BIF_RETURNONLYFSDIRS Or BIF_BROWSEINCLUDEFILES ' Or BIF_STATUSTEXT
Else
bInf.ulFlags = BIF_RETURNONLYFSDIRS Or BIF_STATUSTEXT
End If
'Show the Browse For Folder dialog
lpIDList = SHBrowseForFolder(bInf)
If (lpIDList) Then
sBuffer = Space(MAX_PATH)
retVal = SHGetPathFromIDList(ByVal lpIDList, ByVal sBuffer)
If retVal = 1 Then
'Trim off the null chars ending the path
'and display the returned folder
OffSet = InStr(sBuffer, vbNullChar)
BrowseForFolder = Left(sBuffer, OffSet - 1)
'Free memory allocated for PIDL
CoTaskMemFree lpIDList
Else
BrowseForFolder = ""
End If
Else
BrowseForFolder = ""
End If
End FunctionFunction BrowseDirectoryCallback(ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
m_HwndDialogBox = hwnd
Select Case Msg
Case BFFM_INITIALIZED
'初始化对话框
OnInitDialog
Case BFFM_SELCHANGED
'改变选择目录
OnSelChanged wParam
End Select
BrowseDirectoryCallback = 0
End FunctionPrivate Sub EnableOK(ByVal bEnable As Boolean)
'发送选中确定信息
Dim BoolValue As Long
If bEnable Then BoolValue = 1 Else BoolValue = 0
SendMessage m_HwndDialogBox, BFFM_ENABLEOK, 0, BoolValue
End SubPrivate Sub SetSelection(ByVal pszSelection As String)
'发送选中目录(字符串)
SendMessage m_HwndDialogBox, BFFM_SETSELECTION, True, ByVal pszSelection
End SubPrivate Sub SetSelectionPid(ByVal pIdl As Long)
'发送选中目录(pIdl)
SendMessage m_HwndDialogBox, BFFM_SETSELECTION, False, pIdl
End SubPrivate Sub SetStatusText(ByVal pszStatusText As String)
'发送选中状态文本
SendMessage m_HwndDialogBox, BFFM_SETSTATUSTEXT, 0, ByVal pszStatusText
End SubPrivate Function ShortName(ByVal strName As String) As String
'截短字符串至<=35个字节
Dim bckName As String
If Len(strName) <= 35 Then
bckName = strName
Else
bckName = Left(strName, 35) + "..."
End If
ShortName = bckName
End FunctionPrivate Sub OnInitDialog()
'初始化对话框
SetSelection SelectFolder
SetStatusText ShortName(SelectFolder)
End SubPrivate Sub OnSelChanged(ByVal pIdl As Long)
'对话框选中
Dim sBuffer As String
Dim OffSet As Long
Dim retVal As Long
sBuffer = Space(MAX_PATH)
retVal = SHGetPathFromIDList(ByVal pIdl, ByVal sBuffer)
OffSet = InStr(sBuffer, vbNullChar)
FinalFolder = Left(sBuffer, OffSet - 1)
If retVal = 1 Then
SetStatusText ShortName(FinalFolder)
End If
End Sub
Dim oArgs, NomFichier'Optional argument : the encoded filenameSub Main()
NomFichier = ""Dim sCmdLine
sCmdLine = GetCommandLine()Select Case UBound(sCmdLine)
Case 0 'No Arg, popup a dialog box to choose the file
'NomFichier = BrowseForFolder("Choose an encoded file", &H4031, &H0)
'NomFichier = "C:\test_js.js"
NomFichier = BrowseForFolder(0, "Choose an encoded file", "", True)
Case 1
If InStr(sCmdLine(0), "?") = 0 Then '-? ou /? => aide
NomFichier = sCmdLine(0)
End If
Case Else
MsgBox "Too many parameters"
End Select
Set sCmdLine = NothingIf NomFichier <> "" Then
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(NomFichier) Then
Dim fic, contenu
Set fic = fso.OpenTextFile(NomFichier, 1)
contenu = fic.ReadAll
fic.Close
Set fic = Nothing Const TagInit = "#@~^" '#@~^awQAAA==
Const TagFin = "==^#~@" '& chr(0)
Dim DebutCode, FinCode
Do
FinCode = 0
DebutCode = InStr(contenu, TagInit)
If DebutCode > 0 Then
If (InStr(DebutCode, contenu, "==") - DebutCode) = 10 Then 'If "==" follows the tag
FinCode = InStr(DebutCode, contenu, TagFin)
If FinCode > 0 Then
contenu = Left(contenu, DebutCode - 1) & _
Decode(Mid(contenu, DebutCode + 12, FinCode - DebutCode - 12 - 6)) & _
Mid(contenu, FinCode + 6)
End If
End If
End If
Loop Until FinCode = 0
MsgBox contenu
Dim fso2, tf
Set fso2 = CreateObject("Scripting.FileSystemObject")
Set tf = fso2.CreateTextFile("c:\decode_js.js", True)
tf.Write (contenu)
tf.Close
Else
MsgBox "You select a folder," & vbCrLf & vbCrLf & _
NomFichier & " not a file!"
End If
Set fso = Nothing
Else
MsgBox "Please give a filename!" & vbCrLf & vbCrLf & _
"Usage : " & "vbScriptDecoder.exe" & " <filename>"
End IfEnd SubFunction Decode(ByVal Chaine As String) As String
Dim se, I, C, j, index, ChaineTemp
Dim tDecode(127) As String
Const Combinaison = "1231232332321323132311233213233211323231311231321323112331123132" Set se = CreateObject("Scripting.Encoder")
For I = 9 To 127
tDecode(I) = "JLA"
Next
For I = 9 To 127
ChaineTemp = Mid(se.EncodeScriptFile(".vbs", String(3, I), 0, ""), 13, 3)
For j = 1 To 3
C = Asc(Mid(ChaineTemp, j, 1))
tDecode(C) = Left(tDecode(C), j - 1) & Chr(I) & Mid(tDecode(C), j + 1)
Next
Next
'Next line we correct a bug, otherwise a ")" could be decoded to a ">"
tDecode(42) = Left(tDecode(42), 1) & ")" & Right(tDecode(42), 1)
Set se = Nothing Chaine = ReplaceAll(ReplaceAll(Chaine, "@&", Chr(10)), "@#", Chr(13))
Chaine = ReplaceAll(ReplaceAll(Chaine, "@*", ">"), "@!", "<")
Chaine = ReplaceAll(Chaine, "@$", "@")
index = -1
For I = 1 To Len(Chaine)
C = Asc(Mid(Chaine, I, 1))
If C < 128 Then index = index + 1
If (C = 9) Or ((C > 31) And (C < 128)) Then
If (C <> 60) And (C <> 62) And (C <> 64) Then
Chaine = Left(Chaine, I - 1) & Mid(tDecode(C), Mid(Combinaison, (index Mod 64) + 1, 1), 1) & Mid(Chaine, I + 1)
End If
End If
Next
Decode = Chaine
End FunctionFunction vbBrowseForFolder(ByVal pstrPrompt, ByVal pintBrowseType, ByVal pintLocation)
Dim ShellObject, pstrTempFolder, x
Set ShellObject = CreateObject("Shell.Application")
On Error Resume Next
Set pstrTempFolder = ShellObject.BrowseForFolder(&H0, pstrPrompt, pintBrowseType, pintLocation)
vbBrowseForFolder = pstrTempFolder.ParentFolder.ParseName(pstrTempFolder.Title).Path
If Err.Number <> 0 Then vbBrowseForFolder = ""
Set pstrTempFolder = Nothing
Set ShellObject = Nothing
End FunctionFunction GetCommandLine(Optional MaxArgs)
'声明变量。
Dim C, CmdLine, CmdLnLen, InArg, I, NumArgs
'检查是否提供了 MaxArgs 参数。
If IsMissing(MaxArgs) Then MaxArgs = 10
' 使数组的大小合适。
ReDim ArgArray(MaxArgs)
NumArgs = 0: InArg = False
'取得命令行参数。
CmdLine = Command()
CmdLnLen = Len(CmdLine)
'以一次一个字符的方式取出命令行参数。
For I = 1 To CmdLnLen
C = Mid(CmdLine, I, 1) '检测是否为 space 或 tab。
If (C <> " " And C <> vbTab) Then
'若既不是 space 键,也不是 tab 键,
'则检测是否为参数内含之字符。
If Not InArg Then
'新的参数。
'检测参数是否过多。
If NumArgs = MaxArgs Then Exit For
NumArgs = NumArgs + 1
InArg = True
End If
'将字符加到当前参数中。
ArgArray(NumArgs) = ArgArray(NumArgs) + C Else
'找到 space 或 tab。
'将 InArg 标志设置成 False。
InArg = False
End If
Next I
'调整数组大小使其刚好符合参数个数。
ReDim Preserve ArgArray(NumArgs)
'将数组返回。
GetCommandLine = ArgArray()
End FunctionPublic Function vbInStrRev(Str1 As Variant, Str2 As String) As Long
Dim pos%, Posend%, Str$, myStr1$, myStr2$
myStr1 = Str1: myStr2 = Str2
pos = InStr(1, myStr1, myStr2)
While (pos > 0)
Posend = pos
pos = InStr(pos + 1, myStr1, myStr2)
Wend
vbInStrRev = Posend
End Function' Replaces all occurances of sFindStr with sReplaceWithStr
' (as included with this project database!)
Public Function ReplaceAll(ByRef sOrigStr As String, ByVal sFindStr As String, ByVal sReplaceWithStr As String, Optional bWholeWordsOnly As Boolean) As String Dim lPos As Long
Dim lPos2 As Long
Dim sTmpStr As String
Dim bReplaceIt As Boolean
Dim lFindStr As Long
On Error GoTo vbErrorHandler
lFindStr = Len(sFindStr)
lPos2 = 1
bReplaceIt = True
sTmpStr = sOrigStr
Do
lPos = InStr(lPos2, sOrigStr, sFindStr)
If lPos = 0 Then
Exit Do
End If
If bWholeWordsOnly Then
On Error Resume Next
If lPos = 1 Or (Mid$(sOrigStr, lPos - 1, 1) = " ") Then
If (Mid$(sOrigStr, lPos + lFindStr, 1) = " ") Or Mid$(sOrigStr, lPos + lFindStr + 1, 1) = "" Then
bReplaceIt = True
Else
bReplaceIt = False
End If
End If
End If
If bReplaceIt Then
If lPos > 1 Then
sTmpStr = Left$(sOrigStr, lPos - 1)
Else
sTmpStr = ""
End If
sTmpStr = sTmpStr & sReplaceWithStr
sTmpStr = sTmpStr & Mid$(sOrigStr, lPos + lFindStr, Len(sOrigStr) - (lPos + lFindStr - 1))
sOrigStr = sTmpStr
End If
lPos2 = lPos + 1
Loop
sOrigStr = sTmpStr
ReplaceAll = sTmpStr
Exit FunctionvbErrorHandler:
MsgBox Err.Number & " " & Err.Description, , "CodeModule::ReplaceAll"
End Function
(或c:\>cscript decode.vbs)
(或c:\>wscript decode.vbs)
(或c:\>cscript decode.vbs encoded.js)
(或c:\>wscript decode.vbs encoded.js)
不过还是希望早点在网上看到你的VB版本。