Script Encoder :asp代码加密

来源:网络整理 责任编辑:栏目编辑 发表时间:2013-07-01 06:21 点击:
 Script Encoder Syntax

SCRENC [/s] [/f] [/xl] [/l defLanguage ] [/e defExtension] inputfile outputfile

Argument
Description

/s
Optional. Switch that specifies that the script encoder is to work silently; that is, produce no screen output. If omitted, the default is to provide verbose output.

/f
Optional. Specifies that the input file is to be overwritten by the output file. Note that this option destroys your original input source file. If omitted, the output file is not overwritten.

/xl
Optional. Specifies that the <@language> directive is not added at the top of .asp files. If omitted, the <@language> directive is added for all .asp files.

/l defLanguage
Optional. Specifies the default scripting language (JScript or VBScript) to use during encoding. Script blocks within the file being encoded that do not contain a language attribute are assumed to be of this specified language. If omitted, JScript is the default language for HTML pages and scriptlets, while VBScript is the default for ASP. For plain text files, the file extension (either .js or .vbs) determines the default scripting language.

/e defExtension
Optional. Associates the input file with a specific file type. Use this switch when the input file's extension doesn't make the file type obvious; that is, when the input file extension is not one of the recognized extensions, but the file content does fall into one of the recognized types. There is no default for this option. If a file with an unrecognized extension is encountered and this option is not specified, the script encoder fails for that unrecognized file. Recognized file extensions are .asa, .asp, .cdx, .htm, .html, .js, .sct, and .vbs.

inputfile
Required. The name of the input file to be encoded, including any necessary path information relative to the current directory.

outputfile
Required. The name of the output file to be produced, including any necessary path information relative to the current directory.

 --------------------------------------------------------------------------------

Figure 3 Encoding a Page

 

Public Sub EncodePage()
' Sample encoder
' Andrew Clinick Jan 1999
' Obviously this code could do with some error trapping etc
' but it should give you the basics to get started


Dim strHTML As String
' Get the Frontpage document
Dim mydoc As FPHTMLDocument
' Create a new instance of the scripting.encoder object
Dim myEncoder As New Scripting.Encoder
' Get the current active document
Set mydoc = ActiveDocument
' Get the HTML for the active document
strHTML = mydoc.DocumentHTML
' Call the encodescriptfile method with the HTML
strHTML = myEncoder.EncodeScriptFile(".htm", strHTML, 0, "")
' Set the documentHTML to be the return HTML with encoded script
mydoc.DocumentHTML = strHTML
' We're done!
End Sub

    发表评论
    请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
    用户名: 验证码:点击我更换图片
    最新评论 更多>>

    推荐热点

    • Gb2312转utf-8编码的方法(vbs+js)
    • 如何使用Ajax技术开发Web应用程序(1)
    • js跳转路径问题
    • JavaScript模仿桌面窗口
    • 用js检测两个线段是否相交
    • 我知道的JavaScript -- 设计模式(桥接)应用之 – 验证器
    • 运用JavaScript构建你的第一个Metro式应用程序(on Windows
    • 我是如何去了解jquery的(六),案例之幻灯片轮换
    • Jquery封装幻灯片效果
    网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
    Copyright © 2008-2015 计算机技术学习交流网. 版权所有

    豫ICP备11007008号-1