在要求输入邮箱的文本域,请填写真实的邮件地址。非真实邮件地址,将收不到回复信息。

TpLink路由器登录密码加密算法

JavaScript 清风 1853℃ 0评论

var TpLinkPassWordEnCode = {
    _strDe: "RDpbLfCPsJZ7fiv",
    _dic: "yLwVl0zKqws7LgKPRQ84Mdt708T1qQ3Ha7xv3H7NyU84p21BriUWBU43odz3iP4rBL3cD02KZciX" +
        "TysVXiV8ngg6vL48rPJyAUw0HurW20xqxv9aYb4M9wK1Ae0wlro510qXeU07kV57fQMc8L6aLgML" +
        "wygtc0F10a0Dg70TOoouyFhdysuRMO51yY5ZlOZZLEal1h0t9YQW0Ko7oBwmCAHoic4HYbUyVeU3" +
        "sfQ1xtXcPcf1aT303wAQhv66qzW",
    securityEncode: function (pwd) {
        var dictionary = this._dic;
        var output = "";
        var len, len1, len2, lenDict;
        var cl = 0xBB,
            cr = 0xBB;

        len1 = pwd.length;
        len2 = this._strDe.length;
        lenDict = dictionary.length;
        len = len1 > len2 ? len1 : len2;

        for (var index = 0; index < len; index++) { cl = 0xBB; cr = 0xBB; if (index >= len1) {
                cr = this._strDe.charCodeAt(index);
            } else if (index >= len2) {
                cl = pwd.charCodeAt(index);
            } else {
                cl = pwd.charCodeAt(index);
                cr = this._strDe.charCodeAt(index);
            }

            output += dictionary.charAt((cl ^ cr) % lenDict);
        }

        return output;
    }
};
console.log(TpLinkPassWordEnCode.securityEncode("admin"));



转载请注明:清风亦平凡 » TpLink路由器登录密码加密算法

喜欢 (5)or分享 (0)
支付宝扫码打赏 支付宝扫码打赏 微信打赏 微信打赏
头像
发表我的评论
取消评论

CAPTCHA Image
Reload Image
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址