• 1077阅读
  • 1回复

POST实战演练 第4课:HTTPS-登录5173 [复制链接]

上一主题 下一主题
离线啊冲
 

只看楼主 倒序阅读 使用道具 楼主  发表于: 2016-08-30
.版本 2
.支持库 script

.程序集 窗口程序集1

.子程序 __启动窗口_创建完毕



.子程序 _按钮1_被单击

编辑框1.内容 = 到文本 (网页_访问 (“https://security.5173.com/Security/ClientBroker/PassportUserLogin”))  ' ' 访问网页获取 seed值 和 validationToken值

.子程序 _按钮2_被单击

编辑框3.内容 = md5加密 (编辑框2.内容)  ' 加密自己的密码

.子程序 md5加密, 文本型
.参数 key, 文本型

脚本组件1.执行 (#md)
返回 (脚本组件1.运行 (“hex_md5”, key))  ' ‘js加密脚本

.子程序 _按钮3_被单击

编辑框4.内容 = 取文本中间 (编辑框3.内容, 9, 16)  ' 取8至16位字符 相当于      substr(8, 16)

.子程序 _按钮4_被单击

编辑框7.内容 = md5加密 (编辑框6.内容 + 编辑框5.内容)  ' hex_md5(hex_md5(p).substr(8, 16) + seed);


.子程序 _按钮5_被单击
.局部变量 post, 文本型

post = “userName=” + 编辑框8.内容 + “&password=” + 编辑框9.内容 + “&passpod=&category=&__validationToken__=” + 编辑框10.内容 + “&__validationDna__=”
编辑框11.内容 = E_URL解码_UTF8 (到文本 (E_HTTPS_读文件 (“https://passport.5173.com”, post)))

.子程序 __启动窗口_将被销毁

网页_访问 (“http://passport.5173.com/Sso/Logout?returnUrl=http%3A//www.5173.com/”)
善者 慈悲心常在 无怨无恨 以苦为乐
默认压缩密码www.hifyl.com
文件分享密码问题:http://www.hifyl.com/read-htm-tid-4444.html
离线啊冲

只看该作者 沙发  发表于: 2016-08-30


(function($) {
    var errors = "";
    var notAvailable = '-100/';
    $.fost = $.extend($.fost, {});
    $.fost.security = $.extend($.fost.security, {});
    $.fost.security.updateBroker = function() {
    };
    $.fost.security.showBroker = function(options) {
        if(errors) {
            if(errors.indexOf(notAvailable) != 0) {
                if($.fost.alert) {
                    $.fost.alert(errors);
                } else {
                    alert(errors);
                }
            } else {
                var onsuccess = options;
                if(typeof(options) != 'function' && options) {
                    onsuccess = options.success;
                }
                if(onsuccess) {
                    onsuccess();
                }
            }
        }
    };

    $(function() {
        var containerId = '';
        if(!containerId) {
            containerId = 'securityContainer';
        }
        $.fost.security.containerClientId = containerId;
        $.fost.security.valueClientId = '__validationValue__';
        $.fost.security.tokenClientId = '__validationToken__';
        $('#' + containerId).append('');

    String.prototype.format = function() {
        var args = arguments;
        return this.replace(/{(\d+)}/g,                
            function(m,i){
                return args;
            });
    };
    
    $.fost.security.showBroker = function(options) {
        options = $.extend({ containerId: containerId }, options);
        $.fost.security.FostTpm.showBroker(options);
    };

    $.fost.ieHelper = {
        saveUserData: function(containerId, saveName, attributeName, attributeValue, millisec) {
            try {
                var oTimeNow = new Date();
                oTimeNow.setTime(oTimeNow.getTime() + millisec);
                var sExpirationDate = oTimeNow.toUTCString();
                var container = document.getElementById(containerId);
                container.expires = sExpirationDate;
                container.setAttribute(attributeName, attributeValue);
                container.save(saveName);
            } catch(e) { return false; }
            return true;
        },
        getAndRemoveUserData: function(containerId, saveName, attributeName) {
            try {
                var container = document.getElementById(containerId);
                container.load(saveName);
                var attributeValue = container.getAttribute(attributeName);
                container.setAttribute(attributeName, "");
                container.removeAttribute(attributeName);
                container.save(saveName);
                return attributeValue;
            } catch(e) { }
        }
    };

    $.fost.security.FostTpm = $.extend($.fost.security.FostTpm, {
        initilized: false,
        ready: false,
        installed: false,
        installedVersion: null,
        usingTpm: true,
        activeTpm: null,

        version: "1.0.15.0",
        codebase: "https://security.5173.com/Contents/Tpm/5173Tpm.cab#version=1,0,15,0",
        installFile: 'https://security.5173.com/Contents/Tpm/5173Tpm.msi',
        installFile64: 'https://security.5173.com/Contents/Tpm/5173Tpm.msi',
    
        error: false,
        width: 150,
        height: 25,
        secureTipId: "__secureTips__",
        secureControlId: "__secureEdit__",
        passwordRequired: true,
        passwordControlId: "password",
        safeSwitchControlId: "loginSwitcher",
        installByUser: false,//鏄?惁鏄?敤鎴锋墜鍔ㄨ?姹傚畨瑁?
        installRequired: true,//鏄?惁闇
善者 慈悲心常在 无怨无恨 以苦为乐
默认压缩密码www.hifyl.com
文件分享密码问题:http://www.hifyl.com/read-htm-tid-4444.html
快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个