开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 1076|回复: 9
打印 上一主题 下一主题
收起左侧

[求助] flash逆向,有没有大佬指点下

[复制链接]

结帖率:100% (40/40)
跳转到指定楼层
楼主
发表于 2023-10-12 18:53:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式   重庆市重庆市
关于flash逆向  已经找到发包位置 以及 数据 内容的组成
这段就是 把内容 写入到 socket 并发送  ,整个过程并不复杂
               _loc2_ = new ByteArray();
               _loc2_.writeInt(param1.dest);
               _loc2_.writeInt(param1.cmd);
               if(param1.value != null)
               {
                  _loc6_ = JSON.stringify(param1.value);
                  _loc2_.writeUTFBytes(_loc6_);
               }
               _loc3_ = HashAlgorithms.fnvHash(_loc2_);
               (_loc4_ = new ByteArray()).writeInt(param1.sn);
               _loc4_.writeDouble(param1.sendSysTime);
               _loc4_.writeInt(RequestType.JSON);
               _loc4_.writeByte(0);
               _loc4_.writeInt(_loc3_);
               _loc4_.writeBytes(_loc2_);
               _loc5_ = _loc4_.length;
               this._socket.writeInt(this.PACKAGE_HEAD);
               this._socket.writeInt(_loc5_);
               this._socket.writeBytes(_loc4_,0,_loc5_);
               this._socket.flush();


主要是这个 fnvHash-1a 我写到易中算出来对不上 _loc3_ = HashAlgorithms.fnvHash(_loc2_);

我先是修改.swf 并拦截替换原.swf,用 flash.external.ExternalInterface 调用js ,js代码就是 console.log(params);  输出到控制台 来进行调试







_loc2_ = {0,0,0,4,0,0,0,1}
经过对比 flash调用 js 输出的 跟抓包 是能对得上的

发现这个算出来 对不上,第一位 flash 输出 84696351  ,我将fnvHash算法改写到易中 第一位 输出 84696352

我又安装了flash cs6 将 fnvHash 复制到里面运行出来的结果也是跟易一样的



有没有大佬指点下 是哪里的问题


fnvHash函数 原本内容
      public static function fnvHash(param1:ByteArray) : int
      {
         var _loc2_:int = 16777619;
         var _loc3_:* = int(2166136261);
         param1.position = 0;
         var _loc4_:int = 0;
         while(_loc4_ < param1.length)
         {
            _loc3_ = (_loc3_ ^ param1.readByte()) * _loc2_;
            _loc4_++;
         }
         _loc3_ += _loc3_ << 13;
         _loc3_ ^= _loc3_ >> 7;
         _loc3_ += _loc3_ << 3;
         _loc3_ ^= _loc3_ >> 17;
         return _loc3_ + (_loc3_ << 5);
      }



  
子程序名返回值类型公开备 注
fnvHash1整数型 fnvHash
参数名类 型参考可空数组备 注
bin字节集
变量名类 型静态数组备 注
_loc2_整数型 
_loc3_整数型 
_loc4_整数型 
' public static function fnvHash(param1:ByteArray) : int
' {
' var _loc2_:int = 16777619;
' var _loc3_:* = int(2166136261);
' param1.position = 0;
' var _loc4_:int = 0;
' while(_loc4_ < param1.length)
' {
' _loc3_ = (_loc3_ ^ param1.readByte()) * _loc2_;
' _loc4_++;
' }
' _loc3_ += _loc3_ << 13;
' _loc3_ ^= _loc3_ >> 7;
' _loc3_ += _loc3_ << 3;
' _loc3_ ^= _loc3_ >> 17;
' return _loc3_ + (_loc3_ << 5);
' }
_loc2_ = 16777619
_loc3_ = 2166136261
' 调试输出 (bin)
' while(_loc4_ < param1.length)
' {
' _loc3_ = (_loc3_ ^ param1.readByte()) * _loc2_;
' _loc4_++;
' }
判断循环首 (_loc4_ < 取字节集长度 (bin))
_loc4_ = _loc4_ + 1
' 调试输出 (_loc4_, 取字节集中间 (bin, _loc4_, 1), 取字节集数据 (取字节集中间 (bin, _loc4_, 1), #整数型, ))
_loc3_ = 位异或 (_loc3_, 取字节集数据 (取字节集中间 (bin, _loc4_, 1), #整数型, )) × _loc2_
调试输出 (_loc3_)
编辑框1.加入文本 (到文本 (_loc3_)#换行符 )
' _loc3_ = _loc3_ × _loc2_
' _loc3_ = 位异或 (_loc3_, 取字节集数据 (取字节集中间 (bin, _loc4_, 1), #整数型, ))
判断循环尾 ()
' _loc3_ += _loc3_ << 13;
' _loc3_ ^= _loc3_ >> 7;
' _loc3_ += _loc3_ << 3;
' _loc3_ ^= _loc3_ >> 17;
' return _loc3_ + (_loc3_ << 5);
_loc3_ = _loc3_ + 左移 (_loc3_, 13)
调试输出 (_loc3_)
编辑框1.加入文本 (到文本 (_loc3_)#换行符 )
_loc3_ = 位异或 (_loc3_, 右移 (_loc3_, 7))
调试输出 (_loc3_)
编辑框1.加入文本 (到文本 (_loc3_)#换行符 )
_loc3_ = _loc3_ + 左移 (_loc3_, 3)
调试输出 (_loc3_)
编辑框1.加入文本 (到文本 (_loc3_)#换行符 )
_loc3_ = 位异或 (_loc3_, 右移 (_loc3_, 17))
调试输出 (_loc3_)
编辑框1.加入文本 (到文本 (_loc3_)#换行符 )
_loc3_ = _loc3_ + 左移 (_loc3_, 5)
调试输出 (_loc3_)
编辑框1.加入文本 (到文本 (_loc3_)#换行符 )
返回 (_loc3_)


i支持库列表   支持库注释   
spec特殊功能支持库



33.png (105.95 KB, 下载次数: 0)

33.png

55.jpg (116.36 KB, 下载次数: 2)

55.jpg

评分

参与人数 1好评 +1 精币 +1 收起 理由
3awen + 1 + 1 谢谢你,我用V8能用,可以把你不用V8放在这里吗

查看全部评分

结帖率:78% (18/23)
沙发
发表于 2023-10-12 22:18:41 | 只看该作者   浙江省嘉兴市
哦,既然不复杂,但愿你能自己搞定
回复 支持 反对

使用道具 举报

结帖率:100% (40/40)

签到天数: 14 天

板凳
 楼主| 发表于 2023-10-12 22:41:40 | 只看该作者   重庆市重庆市
走一回 发表于 2023-10-12 22:18
哦,既然不复杂,但愿你能自己搞定

是还有什么东西没找到吗
回复 支持 反对

使用道具 举报

结帖率:100% (40/40)

签到天数: 14 天

地板
 楼主| 发表于 2023-10-13 02:08:16 | 只看该作者   重庆市重庆市
走一回 发表于 2023-10-12 22:18
哦,既然不复杂,但愿你能自己搞定

我在flash cs6 中 将 var _loc3_:* = int(2166136261);  改成 var _loc3_:int = int(2166136261); 算出来结果是对得上的,就是调用了fnvHash

第一位 也就是  (2166136261 ^ 0) * 16777619 AS3 中输出 84696351,易语言中 调试输出 (到整数 (位异或 (2166136261, 0) × 16777619)) 输出  84696352
这个是什么情况,就是这个对不上
回复 支持 反对

使用道具 举报

结帖率:100% (40/40)

签到天数: 14 天

地下
 楼主| 发表于 2023-10-20 13:26:23 | 只看该作者   重庆市重庆市
已解决

易语言长整数会把最低位的一个字节四舍五入

回复 支持 反对

使用道具 举报

结帖率:50% (7/14)

签到天数: 3 天

6
发表于 2023-10-26 21:26:56 | 只看该作者   河南省商丘市
遇到了和楼主一样的情况,楼主是把所有乘法,都换成了大数乘法解决的吗?
回复 支持 反对

使用道具 举报

结帖率:100% (40/40)

签到天数: 14 天

7
 楼主| 发表于 2023-10-26 21:46:08 | 只看该作者   重庆市重庆市
剑轶 发表于 2023-10-26 21:26
遇到了和楼主一样的情况,楼主是把所有乘法,都换成了大数乘法解决的吗? ...

对                                      
回复 支持 反对

使用道具 举报

结帖率:50% (7/14)

签到天数: 3 天

8
发表于 2023-10-26 22:39:52 | 只看该作者   河南省商丘市

好的,明天我试试,跟你遇到的情况一模一样
回复 支持 反对

使用道具 举报

结帖率:97% (160/165)

签到天数: 3 天

9
发表于 2024-3-25 18:12:29 | 只看该作者   江苏省南通市
谢谢你,我用V8能用,可以把你不用V8放在这里吗
回复 支持 反对

使用道具 举报

结帖率:100% (40/40)

签到天数: 14 天

10
 楼主| 发表于 2024-3-25 18:19:44 | 只看该作者   重庆市重庆市
3awen 发表于 2024-3-25 18:12
谢谢你,我用V8能用,可以把你不用V8放在这里吗

自行添加精易模块
11.e (1011.1 KB, 下载次数: 1)


[JavaScript] 纯文本查看 复制代码
var window={},arc4={};
Array.isArray=function(obj){
//Array.isArray 是后面添加的方法,系统引擎不支持 添加一个isArray方法
return Object.prototype.toString.call(obj) === '[object Array]';
}
!function(e) {
    if ("object" == typeof exports && "undefined" != typeof module)
        module.exports = e();
    else if ("function" == typeof define && define.amd)
        define([], e);
    else {
        var f;
        "undefined" != typeof window ? f = window : "undefined" != typeof global ? f = global : "undefined" != typeof self && (f = self),
        f.arc4 = e();
                arc4=e();//再定义  arc4() 即可用系统引擎调用
    }
}(function() {
    return function e(t, n, r) {
        function s(o, u) {
            if (!n[o]) {
                if (!t[o]) {
                    var a = "function" == typeof require && require;
                    if (!u && a)
                        return a(o, !0);
                    if (i)
                        return i(o, !0);
                    var f = new Error("Cannot find module '" + o + "'");
                    throw f.code = "MODULE_NOT_FOUND",
                    f
                }
                var l = n[o] = {
                    exports: {}
                };
                t[o][0].call(l.exports, function(e) {
                    var n = t[o][1][e];
                    return s(n ? n : e)
                }, l, l.exports, e, t, n, r)
            }
            return n[o].exports
        }
        for (var i = "function" == typeof require && require, o = 0; o < r.length; o++)
            s(r[o]);
        return s
    }({
        1: [function(require, module) {
            (function(Buffer) {
                "use strict";
                function gKsa(key) {
                    for (var j = 0, s = box.slice(), len = key.length, i = 0; 256 > i; i++)
                        j = (j + s + key[i % len]) % 256,
                        s[j] = [s, s = s[j]][0];
                    return s
                }
                function body(inp, gksa, container, length, skip) {
                    var i = 0
                      , j = 0
                      , out = container
                      , ksa = gksa.slice();
                    if (void 0 != skip && skip > 0)
                        for (var y = 0; skip > y; y++)
                            i = (i + 1) % 256,
                            j = (j + ksa) % 256,
                            ksa[j] = [ksa, ksa = ksa[j]][0];
                    for (var y = 0; length > y; y++)
                        i = (i + 1) % 256,
                        j = (j + ksa) % 256,
                        ksa[j] = [ksa, ksa = ksa[j]][0],
                        out[y] = inp[y] ^ ksa[(ksa + ksa[j]) % 256];
                    return out
                }
                function ARC4(key) {
                    this.key = null,
                    this.ksa = null,
                    this.change(key)
                }
                var box = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255];
                module.exports = function(password) {
                    return new ARC4(password)
                }
                ,
                ARC4.prototype.change = function(key) {
                    if (Array.isArray(key))
                        this.key = key;
                    else {
                        if ("string" != typeof key && !Buffer.isBuffer(key))
                            throw new Error("Invalid data");
                        this.key = new Array(key.length);
                        for (var keys = new Buffer(key,"binary"), i = 0, ii = keys.length; ii > i; i++)
                            this.key = keys
                    }
                    this.ksa = gKsa(this.key)
                }
                ,
                ARC4.prototype.codeString = function(str) {
                    console.info('arc4 > "codeString" method is deprecated');
                    for (var i = 0, j = 0, out = "", ksa = this.ksa.slice(), y = 0, l = str.length; l > y; y++)
                        i = (i + 1) % 256,
                        j = (j + ksa) % 256,
                        ksa[j] = [ksa, ksa = ksa[j]][0],
                        out += String.fromCharCode(str.charCodeAt(y) ^ ksa[(ksa + ksa[j]) % 256]);
                    return out
                }
                ,
                ARC4.prototype.encodeString = function(str, input_encoding, output_encoding, skip) {
                    var out = new Buffer(str,input_encoding || "utf8")
                      , l = out.length;
                    return new Buffer(body(out, this.ksa, new Buffer(l), l, skip)).toString(output_encoding || "hex")
                }
                ,
                ARC4.prototype.decodeString = function(str, input_encoding, output_encoding, skip) {
                    var out = new Buffer(str,input_encoding || "hex")
                      , l = out.length;
                    return new Buffer(body(out, this.ksa, new Buffer(l), l, skip)).toString(output_encoding || "utf8")
                }
                ,
                ARC4.prototype.codeArray = ARC4.prototype.encodeArray = ARC4.prototype.decodeArray = function(arr, skip) {
                    var l = arr.length;
                    return body(arr, this.ksa, new Array(l), l, skip)
                }
                ,
                ARC4.prototype.codeBuffer = ARC4.prototype.encodeBuffer = ARC4.prototype.decodeBuffer = function(buff, skip) {
                    var l = buff.length;
                    return body(buff, this.ksa, new Buffer(l), l, skip)
                }
                ,
                ARC4.prototype.encode = function(boh, input_encoding, output_encoding) {
                    if ("string" == typeof boh)
                        return this.encodeString(boh, input_encoding, output_encoding);
                    if (Array.isArray(boh))
                        return this.encodeArray(boh);
                    if (Buffer.isBuffer(boh))
                        return this.encodeBuffer(boh);
                    throw new Error("Invalid data")
                }
                ,
                ARC4.prototype.decode = function(boh, input_encoding, output_encoding) {
                    if ("string" == typeof boh)
                        return this.decodeString(boh, input_encoding, output_encoding);
                    if (Array.isArray(boh))
                        return this.decodeArray(boh);
                    if (Buffer.isBuffer(boh))
                        return this.decodeBuffer(boh);
                    throw new Error("Invalid data")
                }
                ,
                ARC4.prototype.code = function(boh) {
                    if ("string" == typeof boh)
                        return this.codeString(boh);
                    if (Array.isArray(boh))
                        return this.codeArray(boh);
                    if (Buffer.isBuffer(boh))
                        return this.codeBuffer(boh);
                    throw new Error("Invalid data")
                }
            }
            ).call(this, require("buffer").Buffer)
        }
        , {
            buffer: 2
        }],
        2: [function(require, module, exports) {
            function Buffer(subject, encoding, noZero) {
                if (!(this instanceof Buffer))
                    return new Buffer(subject,encoding,noZero);
                var length, type = typeof subject;
                if ("number" === type)
                    length = subject > 0 ? subject >>> 0 : 0;
                else if ("string" === type)
                    length = Buffer.byteLength(subject, encoding);
                else {
                    if ("object" !== type || null === subject)
                        throw new TypeError("must start with number, buffer, array or string");
                    "Buffer" === subject.type && isArray(subject.data) && (subject = subject.data),
                    length = +subject.length > 0 ? Math.floor(+subject.length) : 0
                }
                if (length > kMaxLength)
                    throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + kMaxLength.toString(16) + " bytes");
                var buf;
                Buffer.TYPED_ARRAY_SUPPORT ? buf = Buffer._augment(new Uint8Array(length)) : (buf = this,
                buf.length = length,
                buf._isBuffer = !0);
                var i;
                if (Buffer.TYPED_ARRAY_SUPPORT && "number" == typeof subject.byteLength)
                    buf._set(subject);
                else if (isArrayish(subject))
                    if (Buffer.isBuffer(subject))
                        for (i = 0; length > i; i++)
                            buf = subject.readUInt8(i);
                    else
                        for (i = 0; length > i; i++)
                            buf = (subject % 256 + 256) % 256;
                else if ("string" === type)
                    buf.write(subject, 0, encoding);
                else if ("number" === type && !Buffer.TYPED_ARRAY_SUPPORT && !noZero)
                    for (i = 0; length > i; i++)
                        buf = 0;
                return length > 0 && length <= Buffer.poolSize && (buf.parent = rootParent),
                buf
            }
            function SlowBuffer(subject, encoding, noZero) {
                if (!(this instanceof SlowBuffer))
                    return new SlowBuffer(subject,encoding,noZero);
                var buf = new Buffer(subject,encoding,noZero);
                return delete buf.parent,
                buf
            }
            function hexWrite(buf, string, offset, length) {
                offset = Number(offset) || 0;
                var remaining = buf.length - offset;
                length ? (length = Number(length),
                length > remaining && (length = remaining)) : length = remaining;
                var strLen = string.length;
                if (strLen % 2 !== 0)
                    throw new Error("Invalid hex string");
                length > strLen / 2 && (length = strLen / 2);
                for (var i = 0; length > i; i++) {
                    var byte = parseInt(string.substr(2 * i, 2), 16);
                    if (isNaN(byte))
                        throw new Error("Invalid hex string");
                    buf[offset + i] = byte
                }
                return i
            }
            function utf8Write(buf, string, offset, length) {
                var charsWritten = blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
                return charsWritten
            }
            function asciiWrite(buf, string, offset, length) {
                var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length);
                return charsWritten
            }
            function binaryWrite(buf, string, offset, length) {
                return asciiWrite(buf, string, offset, length)
            }
            function base64Write(buf, string, offset, length) {
                var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length);
                return charsWritten
            }
            function utf16leWrite(buf, string, offset, length) {
                var charsWritten = blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length, 2);
                return charsWritten
            }
            function base64Slice(buf, start, end) {
                return base64.fromByteArray(0 === start && end === buf.length ? buf : buf.slice(start, end))
            }
            function utf8Slice(buf, start, end) {
                var res = ""
                  , tmp = "";
                end = Math.min(buf.length, end);
                for (var i = start; end > i; i++)
                    buf <= 127 ? (res += decodeUtf8Char(tmp) + String.fromCharCode(buf),
                    tmp = "") : tmp += "%" + buf.toString(16);
                return res + decodeUtf8Char(tmp)
            }
            function asciiSlice(buf, start, end) {
                var ret = "";
                end = Math.min(buf.length, end);
                for (var i = start; end > i; i++)
                    ret += String.fromCharCode(127 & buf);
                return ret
            }
            function binarySlice(buf, start, end) {
                var ret = "";
                end = Math.min(buf.length, end);
                for (var i = start; end > i; i++)
                    ret += String.fromCharCode(buf);
                return ret
            }
            function hexSlice(buf, start, end) {
                var len = buf.length;
                (!start || 0 > start) && (start = 0),
                (!end || 0 > end || end > len) && (end = len);
                for (var out = "", i = start; end > i; i++)
                    out += toHex(buf);
                return out
            }
            function utf16leSlice(buf, start, end) {
                for (var bytes = buf.slice(start, end), res = "", i = 0; i < bytes.length; i += 2)
                    res += String.fromCharCode(bytes + 256 * bytes[i + 1]);
                return res
            }
            function checkOffset(offset, ext, length) {
                if (offset % 1 !== 0 || 0 > offset)
                    throw new RangeError("offset is not uint");
                if (offset + ext > length)
                    throw new RangeError("Trying to access beyond buffer length")
            }
            function checkInt(buf, value, offset, ext, max, min) {
                if (!Buffer.isBuffer(buf))
                    throw new TypeError("buffer must be a Buffer instance");
                if (value > max || min > value)
                    throw new RangeError("value is out of bounds");
                if (offset + ext > buf.length)
                    throw new RangeError("index out of range")
            }
            function objectWriteUInt16(buf, value, offset, littleEndian) {
                0 > value && (value = 65535 + value + 1);
                for (var i = 0, j = Math.min(buf.length - offset, 2); j > i; i++)
                    buf[offset + i] = (value & 255 << 8 * (littleEndian ? i : 1 - i)) >>> 8 * (littleEndian ? i : 1 - i)
            }
            function objectWriteUInt32(buf, value, offset, littleEndian) {
                0 > value && (value = 4294967295 + value + 1);
                for (var i = 0, j = Math.min(buf.length - offset, 4); j > i; i++)
                    buf[offset + i] = value >>> 8 * (littleEndian ? i : 3 - i) & 255
            }
            function checkIEEE754(buf, value, offset, ext, max, min) {
                if (value > max || min > value)
                    throw new RangeError("value is out of bounds");
                if (offset + ext > buf.length)
                    throw new RangeError("index out of range");
                if (0 > offset)
                    throw new RangeError("index out of range")
            }
            function writeFloat(buf, value, offset, littleEndian, noAssert) {
                return noAssert || checkIEEE754(buf, value, offset, 4, 3.4028234663852886e38, -3.4028234663852886e38),
                ieee754.write(buf, value, offset, littleEndian, 23, 4),
                offset + 4
            }
            function writeDouble(buf, value, offset, littleEndian, noAssert) {
                return noAssert || checkIEEE754(buf, value, offset, 8, 1.7976931348623157e308, -1.7976931348623157e308),
                ieee754.write(buf, value, offset, littleEndian, 52, 8),
                offset + 8
            }
            function base64clean(str) {
                if (str = stringtrim(str).replace(INVALID_BASE64_RE, ""),
                str.length < 2)
                    return "";
                for (; str.length % 4 !== 0; )
                    str += "=";
                return str
            }
            function stringtrim(str) {
                return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "")
            }
            function isArrayish(subject) {
                return isArray(subject) || Buffer.isBuffer(subject) || subject && "object" == typeof subject && "number" == typeof subject.length
            }
            function toHex(n) {
                return 16 > n ? "0" + n.toString(16) : n.toString(16)
            }
            function utf8ToBytes(string, units) {
                var codePoint, length = string.length, leadSurrogate = null;
                units = units || 1 / 0;
                for (var bytes = [], i = 0; length > i; i++) {
                    if (codePoint = string.charCodeAt(i),
                    codePoint > 55295 && 57344 > codePoint) {
                        if (!leadSurrogate) {
                            if (codePoint > 56319) {
                                (units -= 3) > -1 && bytes.push(239, 191, 189);
                                continue
                            }
                            if (i + 1 === length) {
                                (units -= 3) > -1 && bytes.push(239, 191, 189);
                                continue
                            }
                            leadSurrogate = codePoint;
                            continue
                        }
                        if (56320 > codePoint) {
                            (units -= 3) > -1 && bytes.push(239, 191, 189),
                            leadSurrogate = codePoint;
                            continue
                        }
                        codePoint = leadSurrogate - 55296 << 10 | codePoint - 56320 | 65536,
                        leadSurrogate = null
                    } else
                        leadSurrogate && ((units -= 3) > -1 && bytes.push(239, 191, 189),
                        leadSurrogate = null);
                    if (128 > codePoint) {
                        if ((units -= 1) < 0)
                            break;
                        bytes.push(codePoint)
                    } else if (2048 > codePoint) {
                        if ((units -= 2) < 0)
                            break;
                        bytes.push(codePoint >> 6 | 192, 63 & codePoint | 128)
                    } else if (65536 > codePoint) {
                        if ((units -= 3) < 0)
                            break;
                        bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, 63 & codePoint | 128)
                    } else {
                        if (!(2097152 > codePoint))
                            throw new Error("Invalid code point");
                        if ((units -= 4) < 0)
                            break;
                        bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, 63 & codePoint | 128)
                    }
                }
                return bytes
            }
            function asciiToBytes(str) {
                for (var byteArray = [], i = 0; i < str.length; i++)
                    byteArray.push(255 & str.charCodeAt(i));
                return byteArray
            }
            function utf16leToBytes(str, units) {
                for (var c, hi, lo, byteArray = [], i = 0; i < str.length && !((units -= 2) < 0); i++)
                    c = str.charCodeAt(i),
                    hi = c >> 8,
                    lo = c % 256,
                    byteArray.push(lo),
                    byteArray.push(hi);
                return byteArray
            }
            function base64ToBytes(str) {
                return base64.toByteArray(base64clean(str))
            }
            function blitBuffer(src, dst, offset, length, unitSize) {
                unitSize && (length -= length % unitSize);
                for (var i = 0; length > i && !(i + offset >= dst.length || i >= src.length); i++)
                    dst[i + offset] = src;
                return i
            }
            function decodeUtf8Char(str) {
                try {
                    return decodeURIComponent(str)
                } catch (err) {
                    return String.fromCharCode(65533)
                }
            }
            var base64 = require("base64-js")
              , ieee754 = require("ieee754")
              , isArray = require("is-array");
            exports.Buffer = Buffer,
            exports.SlowBuffer = SlowBuffer,
            exports.INSPECT_MAX_BYTES = 50,
            Buffer.poolSize = 8192;
            var kMaxLength = 1073741823
              , rootParent = {};
            Buffer.TYPED_ARRAY_SUPPORT = function() {
                try {
                    var buf = new ArrayBuffer(0)
                      , arr = new Uint8Array(buf);
                    return arr.foo = function() {
                        return 42
                    }
                    ,
                    42 === arr.foo() && "function" == typeof arr.subarray && 0 === new Uint8Array(1).subarray(1, 1).byteLength
                } catch (e) {
                    return !1
                }
            }(),
            Buffer.isBuffer = function(b) {
                return !(null == b || !b._isBuffer)
            }
            ,
            Buffer.compare = function(a, b) {
                if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b))
                    throw new TypeError("Arguments must be Buffers");
                for (var x = a.length, y = b.length, i = 0, len = Math.min(x, y); len > i && a === b; i++)
                    ;
                return i !== len && (x = a,
                y = b),
                y > x ? -1 : x > y ? 1 : 0
            }
            ,
            Buffer.isEncoding = function(encoding) {
                switch (String(encoding).toLowerCase()) {
                case "hex":
                case "utf8":
                case "utf-8":
                case "ascii":
                case "binary":
                case "base64":
                case "raw":
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                    return !0;
                default:
                    return !1
                }
            }
            ,
            Buffer.concat = function(list, totalLength) {
                if (!isArray(list))
                    throw new TypeError("Usage: Buffer.concat(list[, length])");
                if (0 === list.length)
                    return new Buffer(0);
                if (1 === list.length)
                    return list[0];
                var i;
                if (void 0 === totalLength)
                    for (totalLength = 0,
                    i = 0; i < list.length; i++)
                        totalLength += list.length;
                var buf = new Buffer(totalLength)
                  , pos = 0;
                for (i = 0; i < list.length; i++) {
                    var item = list;
                    item.copy(buf, pos),
                    pos += item.length
                }
                return buf
            }
            ,
            Buffer.byteLength = function(str, encoding) {
                var ret;
                switch (str += "",
                encoding || "utf8") {
                case "ascii":
                case "binary":
                case "raw":
                    ret = str.length;
                    break;
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                    ret = 2 * str.length;
                    break;
                case "hex":
                    ret = str.length >>> 1;
                    break;
                case "utf8":
                case "utf-8":
                    ret = utf8ToBytes(str).length;
                    break;
                case "base64":
                    ret = base64ToBytes(str).length;
                    break;
                default:
                    ret = str.length
                }
                return ret
            }
            ,
            Buffer.prototype.length = void 0,
            Buffer.prototype.parent = void 0,
            Buffer.prototype.toString = function(encoding, start, end) {
                var loweredCase = !1;
                if (start >>>= 0,
                end = void 0 === end || 1 / 0 === end ? this.length : end >>> 0,
                encoding || (encoding = "utf8"),
                0 > start && (start = 0),
                end > this.length && (end = this.length),
                start >= end)
                    return "";
                for (; ; )
                    switch (encoding) {
                    case "hex":
                        return hexSlice(this, start, end);
                    case "utf8":
                    case "utf-8":
                        return utf8Slice(this, start, end);
                    case "ascii":
                        return asciiSlice(this, start, end);
                    case "binary":
                        return binarySlice(this, start, end);
                    case "base64":
                        return base64Slice(this, start, end);
                    case "ucs2":
                    case "ucs-2":
                    case "utf16le":
                    case "utf-16le":
                        return utf16leSlice(this, start, end);
                    default:
                        if (loweredCase)
                            throw new TypeError("Unknown encoding: " + encoding);
                        encoding = (encoding + "").toLowerCase(),
                        loweredCase = !0
                    }
            }
            ,
            Buffer.prototype.equals = function(b) {
                if (!Buffer.isBuffer(b))
                    throw new TypeError("Argument must be a Buffer");
                return 0 === Buffer.compare(this, b)
            }
            ,
            Buffer.prototype.inspect = function() {
                var str = ""
                  , max = exports.INSPECT_MAX_BYTES;
                return this.length > 0 && (str = this.toString("hex", 0, max).match(/.{2}/g).join(" "),
                this.length > max && (str += " ... ")),
                "<Buffer " + str + ">"
            }
            ,
            Buffer.prototype.compare = function(b) {
                if (!Buffer.isBuffer(b))
                    throw new TypeError("Argument must be a Buffer");
                return Buffer.compare(this, b)
            }
            ,
            Buffer.prototype.get = function(offset) {
                return console.log(".get() is deprecated. Access using array indexes instead."),
                this.readUInt8(offset)
            }
            ,
            Buffer.prototype.set = function(v, offset) {
                return console.log(".set() is deprecated. Access using array indexes instead."),
                this.writeUInt8(v, offset)
            }
            ,
            Buffer.prototype.write = function(string, offset, length, encoding) {
                if (isFinite(offset))
                    isFinite(length) || (encoding = length,
                    length = void 0);
                else {
                    var swap = encoding;
                    encoding = offset,
                    offset = length,
                    length = swap
                }
                if (offset = Number(offset) || 0,
                0 > length || 0 > offset || offset > this.length)
                    throw new RangeError("attempt to write outside buffer bounds");
                var remaining = this.length - offset;
                length ? (length = Number(length),
                length > remaining && (length = remaining)) : length = remaining,
                encoding = String(encoding || "utf8").toLowerCase();
                var ret;
                switch (encoding) {
                case "hex":
                    ret = hexWrite(this, string, offset, length);
                    break;
                case "utf8":
                case "utf-8":
                    ret = utf8Write(this, string, offset, length);
                    break;
                case "ascii":
                    ret = asciiWrite(this, string, offset, length);
                    break;
                case "binary":
                    ret = binaryWrite(this, string, offset, length);
                    break;
                case "base64":
                    ret = base64Write(this, string, offset, length);
                    break;
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                    ret = utf16leWrite(this, string, offset, length);
                    break;
                default:
                    throw new TypeError("Unknown encoding: " + encoding)
                }
                return ret
            }
            ,
            Buffer.prototype.toJSON = function() {
                return {
                    type: "Buffer",
                    data: Array.prototype.slice.call(this._arr || this, 0)
                }
            }
            ,
            Buffer.prototype.slice = function(start, end) {
                var len = this.length;
                start = ~~start,
                end = void 0 === end ? len : ~~end,
                0 > start ? (start += len,
                0 > start && (start = 0)) : start > len && (start = len),
                0 > end ? (end += len,
                0 > end && (end = 0)) : end > len && (end = len),
                start > end && (end = start);
                var newBuf;
                if (Buffer.TYPED_ARRAY_SUPPORT)
                    newBuf = Buffer._augment(this.subarray(start, end));
                else {
                    var sliceLen = end - start;
                    newBuf = new Buffer(sliceLen,void 0,!0);
                    for (var i = 0; sliceLen > i; i++)
                        newBuf = this[i + start]
                }
                return newBuf.length && (newBuf.parent = this.parent || this),
                newBuf
            }
            ,
            Buffer.prototype.readUIntLE = function(offset, byteLength, noAssert) {
                offset >>>= 0,
                byteLength >>>= 0,
                noAssert || checkOffset(offset, byteLength, this.length);
                for (var val = this[offset], mul = 1, i = 0; ++i < byteLength && (mul *= 256); )
                    val += this[offset + i] * mul;
                return val
            }
            ,
            Buffer.prototype.readUIntBE = function(offset, byteLength, noAssert) {
                offset >>>= 0,
                byteLength >>>= 0,
                noAssert || checkOffset(offset, byteLength, this.length);
                for (var val = this[offset + --byteLength], mul = 1; byteLength > 0 && (mul *= 256); )
                    val += this[offset + --byteLength] * mul;
                return val
            }
            ,
            Buffer.prototype.readUInt8 = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 1, this.length),
                this[offset]
            }
            ,
            Buffer.prototype.readUInt16LE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 2, this.length),
                this[offset] | this[offset + 1] << 8
            }
            ,
            Buffer.prototype.readUInt16BE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 2, this.length),
                this[offset] << 8 | this[offset + 1]
            }
            ,
            Buffer.prototype.readUInt32LE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 4, this.length),
                (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + 16777216 * this[offset + 3]
            }
            ,
            Buffer.prototype.readUInt32BE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 4, this.length),
                16777216 * this[offset] + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3])
            }
            ,
            Buffer.prototype.readIntLE = function(offset, byteLength, noAssert) {
                offset >>>= 0,
                byteLength >>>= 0,
                noAssert || checkOffset(offset, byteLength, this.length);
                for (var val = this[offset], mul = 1, i = 0; ++i < byteLength && (mul *= 256); )
                    val += this[offset + i] * mul;
                return mul *= 128,
                val >= mul && (val -= Math.pow(2, 8 * byteLength)),
                val
            }
            ,
            Buffer.prototype.readIntBE = function(offset, byteLength, noAssert) {
                offset >>>= 0,
                byteLength >>>= 0,
                noAssert || checkOffset(offset, byteLength, this.length);
                for (var i = byteLength, mul = 1, val = this[offset + --i]; i > 0 && (mul *= 256); )
                    val += this[offset + --i] * mul;
                return mul *= 128,
                val >= mul && (val -= Math.pow(2, 8 * byteLength)),
                val
            }
            ,
            Buffer.prototype.readInt8 = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 1, this.length),
                128 & this[offset] ? -1 * (255 - this[offset] + 1) : this[offset]
            }
            ,
            Buffer.prototype.readInt16LE = function(offset, noAssert) {
                noAssert || checkOffset(offset, 2, this.length);
                var val = this[offset] | this[offset + 1] << 8;
                return 32768 & val ? 4294901760 | val : val
            }
            ,
            Buffer.prototype.readInt16BE = function(offset, noAssert) {
                noAssert || checkOffset(offset, 2, this.length);
                var val = this[offset + 1] | this[offset] << 8;
                return 32768 & val ? 4294901760 | val : val
            }
            ,
            Buffer.prototype.readInt32LE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 4, this.length),
                this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24
            }
            ,
            Buffer.prototype.readInt32BE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 4, this.length),
                this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]
            }
            ,
            Buffer.prototype.readFloatLE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 4, this.length),
                ieee754.read(this, offset, !0, 23, 4)
            }
            ,
            Buffer.prototype.readFloatBE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 4, this.length),
                ieee754.read(this, offset, !1, 23, 4)
            }
            ,
            Buffer.prototype.readDoubleLE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 8, this.length),
                ieee754.read(this, offset, !0, 52, 8)
            }
            ,
            Buffer.prototype.readDoubleBE = function(offset, noAssert) {
                return noAssert || checkOffset(offset, 8, this.length),
                ieee754.read(this, offset, !1, 52, 8)
            }
            ,
            Buffer.prototype.writeUIntLE = function(value, offset, byteLength, noAssert) {
                value = +value,
                offset >>>= 0,
                byteLength >>>= 0,
                noAssert || checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0);
                var mul = 1
                  , i = 0;
                for (this[offset] = 255 & value; ++i < byteLength && (mul *= 256); )
                    this[offset + i] = value / mul >>> 0 & 255;
                return offset + byteLength
            }
            ,
            Buffer.prototype.writeUIntBE = function(value, offset, byteLength, noAssert) {
                value = +value,
                offset >>>= 0,
                byteLength >>>= 0,
                noAssert || checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0);
                var i = byteLength - 1
                  , mul = 1;
                for (this[offset + i] = 255 & value; --i >= 0 && (mul *= 256); )
                    this[offset + i] = value / mul >>> 0 & 255;
                return offset + byteLength
            }
            ,
            Buffer.prototype.writeUInt8 = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 1, 255, 0),
                Buffer.TYPED_ARRAY_SUPPORT || (value = Math.floor(value)),
                this[offset] = value,
                offset + 1
            }
            ,
            Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 2, 65535, 0),
                Buffer.TYPED_ARRAY_SUPPORT ? (this[offset] = value,
                this[offset + 1] = value >>> 8) : objectWriteUInt16(this, value, offset, !0),
                offset + 2
            }
            ,
            Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 2, 65535, 0),
                Buffer.TYPED_ARRAY_SUPPORT ? (this[offset] = value >>> 8,
                this[offset + 1] = value) : objectWriteUInt16(this, value, offset, !1),
                offset + 2
            }
            ,
            Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 4, 4294967295, 0),
                Buffer.TYPED_ARRAY_SUPPORT ? (this[offset + 3] = value >>> 24,
                this[offset + 2] = value >>> 16,
                this[offset + 1] = value >>> 8,
                this[offset] = value) : objectWriteUInt32(this, value, offset, !0),
                offset + 4
            }
            ,
            Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 4, 4294967295, 0),
                Buffer.TYPED_ARRAY_SUPPORT ? (this[offset] = value >>> 24,
                this[offset + 1] = value >>> 16,
                this[offset + 2] = value >>> 8,
                this[offset + 3] = value) : objectWriteUInt32(this, value, offset, !1),
                offset + 4
            }
            ,
            Buffer.prototype.writeIntLE = function(value, offset, byteLength, noAssert) {
                value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength - 1) - 1, -Math.pow(2, 8 * byteLength - 1));
                var i = 0
                  , mul = 1
                  , sub = 0 > value ? 1 : 0;
                for (this[offset] = 255 & value; ++i < byteLength && (mul *= 256); )
                    this[offset + i] = (value / mul >> 0) - sub & 255;
                return offset + byteLength
            }
            ,
            Buffer.prototype.writeIntBE = function(value, offset, byteLength, noAssert) {
                value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength - 1) - 1, -Math.pow(2, 8 * byteLength - 1));
                var i = byteLength - 1
                  , mul = 1
                  , sub = 0 > value ? 1 : 0;
                for (this[offset + i] = 255 & value; --i >= 0 && (mul *= 256); )
                    this[offset + i] = (value / mul >> 0) - sub & 255;
                return offset + byteLength
            }
            ,
            Buffer.prototype.writeInt8 = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 1, 127, -128),
                Buffer.TYPED_ARRAY_SUPPORT || (value = Math.floor(value)),
                0 > value && (value = 255 + value + 1),
                this[offset] = value,
                offset + 1
            }
            ,
            Buffer.prototype.writeInt16LE = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 2, 32767, -32768),
                Buffer.TYPED_ARRAY_SUPPORT ? (this[offset] = value,
                this[offset + 1] = value >>> 8) : objectWriteUInt16(this, value, offset, !0),
                offset + 2
            }
            ,
            Buffer.prototype.writeInt16BE = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 2, 32767, -32768),
                Buffer.TYPED_ARRAY_SUPPORT ? (this[offset] = value >>> 8,
                this[offset + 1] = value) : objectWriteUInt16(this, value, offset, !1),
                offset + 2
            }
            ,
            Buffer.prototype.writeInt32LE = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 4, 2147483647, -2147483648),
                Buffer.TYPED_ARRAY_SUPPORT ? (this[offset] = value,
                this[offset + 1] = value >>> 8,
                this[offset + 2] = value >>> 16,
                this[offset + 3] = value >>> 24) : objectWriteUInt32(this, value, offset, !0),
                offset + 4
            }
            ,
            Buffer.prototype.writeInt32BE = function(value, offset, noAssert) {
                return value = +value,
                offset >>>= 0,
                noAssert || checkInt(this, value, offset, 4, 2147483647, -2147483648),
                0 > value && (value = 4294967295 + value + 1),
                Buffer.TYPED_ARRAY_SUPPORT ? (this[offset] = value >>> 24,
                this[offset + 1] = value >>> 16,
                this[offset + 2] = value >>> 8,
                this[offset + 3] = value) : objectWriteUInt32(this, value, offset, !1),
                offset + 4
            }
            ,
            Buffer.prototype.writeFloatLE = function(value, offset, noAssert) {
                return writeFloat(this, value, offset, !0, noAssert)
            }
            ,
            Buffer.prototype.writeFloatBE = function(value, offset, noAssert) {
                return writeFloat(this, value, offset, !1, noAssert)
            }
            ,
            Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) {
                return writeDouble(this, value, offset, !0, noAssert)
            }
            ,
            Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) {
                return writeDouble(this, value, offset, !1, noAssert)
            }
            ,
            Buffer.prototype.copy = function(target, target_start, start, end) {
                var source = this;
                if (start || (start = 0),
                end || 0 === end || (end = this.length),
                target_start >= target.length && (target_start = target.length),
                target_start || (target_start = 0),
                end > 0 && start > end && (end = start),
                end === start)
                    return 0;
                if (0 === target.length || 0 === source.length)
                    return 0;
                if (0 > target_start)
                    throw new RangeError("targetStart out of bounds");
                if (0 > start || start >= source.length)
                    throw new RangeError("sourceStart out of bounds");
                if (0 > end)
                    throw new RangeError("sourceEnd out of bounds");
                end > this.length && (end = this.length),
                target.length - target_start < end - start && (end = target.length - target_start + start);
                var len = end - start;
                if (1e3 > len || !Buffer.TYPED_ARRAY_SUPPORT)
                    for (var i = 0; len > i; i++)
                        target[i + target_start] = this[i + start];
                else
                    target._set(this.subarray(start, start + len), target_start);
                return len
            }
            ,
            Buffer.prototype.fill = function(value, start, end) {
                if (value || (value = 0),
                start || (start = 0),
                end || (end = this.length),
                start > end)
                    throw new RangeError("end < start");
                if (end !== start && 0 !== this.length) {
                    if (0 > start || start >= this.length)
                        throw new RangeError("start out of bounds");
                    if (0 > end || end > this.length)
                        throw new RangeError("end out of bounds");
                    var i;
                    if ("number" == typeof value)
                        for (i = start; end > i; i++)
                            this = value;
                    else {
                        var bytes = utf8ToBytes(value.toString())
                          , len = bytes.length;
                        for (i = start; end > i; i++)
                            this = bytes[i % len]
                    }
                    return this
                }
            }
            ,
            Buffer.prototype.toArrayBuffer = function() {
                if ("undefined" != typeof Uint8Array) {
                    if (Buffer.TYPED_ARRAY_SUPPORT)
                        return new Buffer(this).buffer;
                    for (var buf = new Uint8Array(this.length), i = 0, len = buf.length; len > i; i += 1)
                        buf = this;
                    return buf.buffer
                }
                throw new TypeError("Buffer.toArrayBuffer not supported in this browser")
            }
            ;
            var BP = Buffer.prototype;
            Buffer._augment = function(arr) {
                return arr.constructor = Buffer,
                arr._isBuffer = !0,
                arr._get = arr.get,
                arr._set = arr.set,
                arr.get = BP.get,
                arr.set = BP.set,
                arr.write = BP.write,
                arr.toString = BP.toString,
                arr.toLocaleString = BP.toString,
                arr.toJSON = BP.toJSON,
                arr.equals = BP.equals,
                arr.compare = BP.compare,
                arr.copy = BP.copy,
                arr.slice = BP.slice,
                arr.readUIntLE = BP.readUIntLE,
                arr.readUIntBE = BP.readUIntBE,
                arr.readUInt8 = BP.readUInt8,
                arr.readUInt16LE = BP.readUInt16LE,
                arr.readUInt16BE = BP.readUInt16BE,
                arr.readUInt32LE = BP.readUInt32LE,
                arr.readUInt32BE = BP.readUInt32BE,
                arr.readIntLE = BP.readIntLE,
                arr.readIntBE = BP.readIntBE,
                arr.readInt8 = BP.readInt8,
                arr.readInt16LE = BP.readInt16LE,
                arr.readInt16BE = BP.readInt16BE,
                arr.readInt32LE = BP.readInt32LE,
                arr.readInt32BE = BP.readInt32BE,
                arr.readFloatLE = BP.readFloatLE,
                arr.readFloatBE = BP.readFloatBE,
                arr.readDoubleLE = BP.readDoubleLE,
                arr.readDoubleBE = BP.readDoubleBE,
                arr.writeUInt8 = BP.writeUInt8,
                arr.writeUIntLE = BP.writeUIntLE,
                arr.writeUIntBE = BP.writeUIntBE,
                arr.writeUInt16LE = BP.writeUInt16LE,
                arr.writeUInt16BE = BP.writeUInt16BE,
                arr.writeUInt32LE = BP.writeUInt32LE,
                arr.writeUInt32BE = BP.writeUInt32BE,
                arr.writeIntLE = BP.writeIntLE,
                arr.writeIntBE = BP.writeIntBE,
                arr.writeInt8 = BP.writeInt8,
                arr.writeInt16LE = BP.writeInt16LE,
                arr.writeInt16BE = BP.writeInt16BE,
                arr.writeInt32LE = BP.writeInt32LE,
                arr.writeInt32BE = BP.writeInt32BE,
                arr.writeFloatLE = BP.writeFloatLE,
                arr.writeFloatBE = BP.writeFloatBE,
                arr.writeDoubleLE = BP.writeDoubleLE,
                arr.writeDoubleBE = BP.writeDoubleBE,
                arr.fill = BP.fill,
                arr.inspect = BP.inspect,
                arr.toArrayBuffer = BP.toArrayBuffer,
                arr
            }
            ;
            var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g
        }
        , {
            "base64-js": 3,
            ieee754: 4,
            "is-array": 5
        }],
        3: [function(require, module, exports) {
            var lookup = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
            !function(exports) {
                "use strict";
                function decode(elt) {
                    var code = elt.charCodeAt(0);
                    return code === PLUS || code === PLUS_URL_SAFE ? 62 : code === SLASH || code === SLASH_URL_SAFE ? 63 : NUMBER > code ? -1 : NUMBER + 10 > code ? code - NUMBER + 26 + 26 : UPPER + 26 > code ? code - UPPER : LOWER + 26 > code ? code - LOWER + 26 : void 0
                }
                function b64ToByteArray(b64) {
                    function push(v) {
                        arr[L++] = v
                    }
                    var i, j, l, tmp, placeHolders, arr;
                    if (b64.length % 4 > 0)
                        throw new Error("Invalid string. Length must be a multiple of 4");
                    var len = b64.length;
                    placeHolders = "=" === b64.charAt(len - 2) ? 2 : "=" === b64.charAt(len - 1) ? 1 : 0,
                    arr = new Arr(3 * b64.length / 4 - placeHolders),
                    l = placeHolders > 0 ? b64.length - 4 : b64.length;
                    var L = 0;
                    for (i = 0,
                    j = 0; l > i; i += 4,
                    j += 3)
                        tmp = decode(b64.charAt(i)) << 18 | decode(b64.charAt(i + 1)) << 12 | decode(b64.charAt(i + 2)) << 6 | decode(b64.charAt(i + 3)),
                        push((16711680 & tmp) >> 16),
                        push((65280 & tmp) >> 8),
                        push(255 & tmp);
                    return 2 === placeHolders ? (tmp = decode(b64.charAt(i)) << 2 | decode(b64.charAt(i + 1)) >> 4,
                    push(255 & tmp)) : 1 === placeHolders && (tmp = decode(b64.charAt(i)) << 10 | decode(b64.charAt(i + 1)) << 4 | decode(b64.charAt(i + 2)) >> 2,
                    push(tmp >> 8 & 255),
                    push(255 & tmp)),
                    arr
                }
                function uint8ToBase64(uint8) {
                    function encode(num) {
                        return lookup.charAt(num)
                    }
                    function tripletToBase64(num) {
                        return encode(num >> 18 & 63) + encode(num >> 12 & 63) + encode(num >> 6 & 63) + encode(63 & num)
                    }
                    var i, temp, length, extraBytes = uint8.length % 3, output = "";
                    for (i = 0,
                    length = uint8.length - extraBytes; length > i; i += 3)
                        temp = (uint8 << 16) + (uint8[i + 1] << 8) + uint8[i + 2],
                        output += tripletToBase64(temp);
                    switch (extraBytes) {
                    case 1:
                        temp = uint8[uint8.length - 1],
                        output += encode(temp >> 2),
                        output += encode(temp << 4 & 63),
                        output += "==";
                        break;
                    case 2:
                        temp = (uint8[uint8.length - 2] << 8) + uint8[uint8.length - 1],
                        output += encode(temp >> 10),
                        output += encode(temp >> 4 & 63),
                        output += encode(temp << 2 & 63),
                        output += "="
                    }
                    return output
                }
                var Arr = "undefined" != typeof Uint8Array ? Uint8Array : Array
                  , PLUS = "+".charCodeAt(0)
                  , SLASH = "/".charCodeAt(0)
                  , NUMBER = "0".charCodeAt(0)
                  , LOWER = "a".charCodeAt(0)
                  , UPPER = "A".charCodeAt(0)
                  , PLUS_URL_SAFE = "-".charCodeAt(0)
                  , SLASH_URL_SAFE = "_".charCodeAt(0);
                exports.toByteArray = b64ToByteArray,
                exports.fromByteArray = uint8ToBase64
            }("undefined" == typeof exports ? this.base64js = {} : exports)
        }
        , {}],
        4: [function(require, module, exports) {
            exports.read = function(buffer, offset, isLE, mLen, nBytes) {
                var e, m, eLen = 8 * nBytes - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, nBits = -7, i = isLE ? nBytes - 1 : 0, d = isLE ? -1 : 1, s = buffer[offset + i];
                for (i += d,
                e = s & (1 << -nBits) - 1,
                s >>= -nBits,
                nBits += eLen; nBits > 0; e = 256 * e + buffer[offset + i],
                i += d,
                nBits -= 8)
                    ;
                for (m = e & (1 << -nBits) - 1,
                e >>= -nBits,
                nBits += mLen; nBits > 0; m = 256 * m + buffer[offset + i],
                i += d,
                nBits -= 8)
                    ;
                if (0 === e)
                    e = 1 - eBias;
                else {
                    if (e === eMax)
                        return m ? 0 / 0 : 1 / 0 * (s ? -1 : 1);
                    m += Math.pow(2, mLen),
                    e -= eBias
                }
                return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
            }
            ,
            exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
                var e, m, c, eLen = 8 * nBytes - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, rt = 23 === mLen ? Math.pow(2, -24) - Math.pow(2, -77) : 0, i = isLE ? 0 : nBytes - 1, d = isLE ? 1 : -1, s = 0 > value || 0 === value && 0 > 1 / value ? 1 : 0;
                for (value = Math.abs(value),
                isNaN(value) || 1 / 0 === value ? (m = isNaN(value) ? 1 : 0,
                e = eMax) : (e = Math.floor(Math.log(value) / Math.LN2),
                value * (c = Math.pow(2, -e)) < 1 && (e--,
                c *= 2),
                value += e + eBias >= 1 ? rt / c : rt * Math.pow(2, 1 - eBias),
                value * c >= 2 && (e++,
                c /= 2),
                e + eBias >= eMax ? (m = 0,
                e = eMax) : e + eBias >= 1 ? (m = (value * c - 1) * Math.pow(2, mLen),
                e += eBias) : (m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen),
                e = 0)); mLen >= 8; buffer[offset + i] = 255 & m,
                i += d,
                m /= 256,
                mLen -= 8)
                    ;
                for (e = e << mLen | m,
                eLen += mLen; eLen > 0; buffer[offset + i] = 255 & e,
                i += d,
                e /= 256,
                eLen -= 8)
                    ;
                buffer[offset + i - d] |= 128 * s
            }
        }
        , {}],
        5: [function(require, module) {
            var isArray = Array.isArray
              , str = Object.prototype.toString;
            module.exports = isArray || function(val) {
                return !!val && "[object Array]" == str.call(val)
            }
        }
        , {}]
    }, {}, [1])(1)
});
var DEFAULT_RC4_KEY = "\x52\xf1\x12\xc0\x15\x9e\x88\xa0\x0c\xfb\x35\x76\xe2\x4c\xd1\xcd";
var RC4_SKIP_LENGTH = 1020;
function do_encrypt (input) {
var rc = new arc4 (DEFAULT_RC4_KEY);
return rc.encodeString (input, "utf8", "base64", RC4_SKIP_LENGTH);
}
function do_decrypt (input) {
var rc = new arc4 (DEFAULT_RC4_KEY);
return rc.decodeString (input, "base64", "utf8", RC4_SKIP_LENGTH);
}

评分

参与人数 1好评 +1 精币 +2 收起 理由
3awen + 1 + 2 新技能已get√

查看全部评分

回复 支持 反对

使用道具 举报

  高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:[email protected]
网站简介:精易论坛成立于2009年,是一个程序设计学习交流技术论坛,隶属于揭阳市揭东区精易科技有限公司所有。
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表