js代码生成个性签名

作者: 周伟林 分类: ECMAScript 发布时间: 2018-05-12 23:37
// 'zhouweilin'
(+[[]+(1<<1^1)+(~1+1e1+~1)+(+[])+(1+1<<1)+(1e1>>1)+(+[])+(1e1>>1)+(1<<1^1)+(1e1>>1)+(1+1<<1)+(1e1>>1)+(1<<1)+(~1+1e1+1)+(~1+1e1+~1)+(1+1<<1)+(1<<1^11>>1)])[[(!!/-/+[])[11&[]]+[[]+{11:11}+[]][111>>111][1+[]]]+([11/!1+/1/][1&1>>1][([{}]+{})[1e1>>1|1]+[[],[]+{111:111}+[]][1|1][111%11]+([]+[][11])[1<<1>>1]+[{},1e1,!/~/+{}][1<<1^1>>1][1<<1^1]+([]+11/!{})[~1+1e1+~1]+[!![111]+[]][1%1][1&1]+([]+[][111])[.1^!1]+[{},[]+{},1][111%11][11-~1+11>>1]+([]+!!1)[111>>>111]+([]+{}+[])[[]+1]+[!!1+[]][1^1][111%11]]+[])[(!1+{})[1^1<<1]+[/=/,[]+/^/[11]][1|[]][11.11>>11.11]+([]+{}+[])[~~(1.1+1.1)]+[1,!{}+/~/][1][1|1<<1]+(1/!{}+[])[~1+1e1+~1]+[!![1]+{}][111.111>>111.111][1+[]]]((11^1<<1)+((1>>1)==([]+/-/[(!!/-/+/-/)[+(111>111)]+(!![11]+[])[1-~1]+(![11]+{})[1|1<<1|1]+(!!{}+[])[11%11]])[111.111>>111.111]),11+1>>1)](~1-~1e1<<1<<1)

我的域名

(+[[]+(1<<1)+(~1+1e1+1)+(~1+1e1+1)+(1+1<<1)+(1e1>>1)+(+[])+(+[])+(~1+1e1)])[[(!!/-/+[])[11&[]]+[[]+{11:11}+[]][111>>111][1+[]]]+([11/!1+/1/][1&1>>1][([{}]+{})[1e1>>1|1]+[[],[]+{111:111}+[]][1|1][111%11]+([]+[][11])[1<<1>>1]+[{},1e1,!/~/+{}][1<<1^1>>1][1<<1^1]+([]+11/!{})[~1+1e1+~1]+[!![111]+[]][1%1][1&1]+([]+[][111])[.1^!1]+[{},[]+{},1][111%11][11-~1+11>>1]+([]+!!1)[111>>>111]+([]+{}+[])[[]+1]+[!!1+[]][1^1][111%11]]+[])[(!1+{})[1^1<<1]+[/=/,[]+/^/[11]][1|[]][11.11>>11.11]+([]+{}+[])[~~(1.1+1.1)]+[1,!{}+/~/][1][1|1<<1]+(1/!{}+[])[~1+1e1+~1]+[!![1]+{}][111.111>>111.111][1+[]]]((11^1<<1)+((1>>1)==([]+/-/[(!!/-/+/-/)[+(111>111)]+(!![11]+[])[1-~1]+(![11]+{})[1|1<<1|1]+(!!{}+[])[11%11]])[111.111>>111.111]),11+1>>1)](~1-~1e1<<1<<1)+":"+(([]===[])+/-/)[5]+(([]===[])+/-/)[5]+(+[[]+(1<<1^1)+(~1+1e1+~1)+(+[])+(1+1<<1)+(1e1>>1)+(+[])+(1e1>>1)+(1<<1^1)+(1e1>>1)+(1+1<<1)+(1e1>>1)+(1<<1)+(~1+1e1+1)+(~1+1e1+~1)+(1+1<<1)+(1<<1^11>>1)])[[(!!/-/+[])[11&[]]+[[]+{11:11}+[]][111>>111][1+[]]]+([11/!1+/1/][1&1>>1][([{}]+{})[1e1>>1|1]+[[],[]+{111:111}+[]][1|1][111%11]+([]+[][11])[1<<1>>1]+[{},1e1,!/~/+{}][1<<1^1>>1][1<<1^1]+([]+11/!{})[~1+1e1+~1]+[!![111]+[]][1%1][1&1]+([]+[][111])[.1^!1]+[{},[]+{},1][111%11][11-~1+11>>1]+([]+!!1)[111>>>111]+([]+{}+[])[[]+1]+[!!1+[]][1^1][111%11]]+[])[(!1+{})[1^1<<1]+[/=/,[]+/^/[11]][1|[]][11.11>>11.11]+([]+{}+[])[~~(1.1+1.1)]+[1,!{}+/~/][1][1|1<<1]+(1/!{}+[])[~1+1e1+~1]+[!![1]+{}][111.111>>111.111][1+[]]]((11^1<<1)+((1>>1)==([]+/-/[(!!/-/+/-/)[+(111>111)]+(!![11]+[])[1-~1]+(![11]+{})[1|1<<1|1]+(!!{}+[])[11%11]])[111.111>>111.111]),11+1>>1)](~1-~1e1<<1<<1)+"."+(+[[]+(1+1<<1)+(1e1>>1)+(1e1>>1)])[[(!!/-/+[])[11&[]]+[[]+{11:11}+[]][111>>111][1+[]]]+([11/!1+/1/][1&1>>1][([{}]+{})[1e1>>1|1]+[[],[]+{111:111}+[]][1|1][111%11]+([]+[][11])[1<<1>>1]+[{},1e1,!/~/+{}][1<<1^1>>1][1<<1^1]+([]+11/!{})[~1+1e1+~1]+[!![111]+[]][1%1][1&1]+([]+[][111])[.1^!1]+[{},[]+{},1][111%11][11-~1+11>>1]+([]+!!1)[111>>>111]+([]+{}+[])[[]+1]+[!!1+[]][1^1][111%11]]+[])[(!1+{})[1^1<<1]+[/=/,[]+/^/[11]][1|[]][11.11>>11.11]+([]+{}+[])[~~(1.1+1.1)]+[1,!{}+/~/][1][1|1<<1]+(1/!{}+[])[~1+1e1+~1]+[!![1]+{}][111.111>>111.111][1+[]]]((11^1<<1)+((1>>1)==([]+/-/[(!!/-/+/-/)[+(111>111)]+(!![11]+[])[1-~1]+(![11]+{})[1|1<<1|1]+(!!{}+[])[11%11]])[111.111>>111.111]),11+1>>1)](~1-~1e1<<1<<1)

原理

核心在于数字n用36进制表示。

n['toString'](36)

附源代码

function cipher_txt(input){
    let output = [];
    // 生成26字母表
    let alphaList = [];
    for(let i = 10; i <= 35; ++i){
        alphaList.push(i['toString'](36));
    }

    // 索引表
    let idxList = [];
    for(let i = 0; i < input.length; ++i){
        idxList.push(alphaList.indexOf(input[i])+10);
    }

    // 计算幸运数字n
    let n = 0;
    for(let i = idxList.length-1, t = 1; i >= 0; --i){
        n += idxList[i]*t;
        t = t*36;
    }

    // 计算加密表示
    let cipher = [];
    let DIGIT = ['(+[])', '(111%11)', '(1<<1)', '(1<<1^1)', '(1+1<<1)', '(1e1>>1)', '(~1+1e1+~1)', '(1<<1^11>>1)', '(~1+1e1)', '(~1+1e1+1)'];
    while(n > 0){
        let c = (n%10);
        cipher.unshift(DIGIT[c]);
        n = Math.floor(n/10);
    }
    cipher.unshift('(+[[]');
    // ['toString'](36)
    return cipher.join('+')+'])[[(!!/-/+[])[11&[]]+[[]+{11:11}+[]][111>>111][1+[]]]+([11/!1+/1/][1&1>>1][([{}]+{})[1e1>>1|1]+[[],[]+{111:111}+[]][1|1][111%11]+([]+[][11])[1<<1>>1]+[{},1e1,!/~/+{}][1<<1^1>>1][1<<1^1]+([]+11/!{})[~1+1e1+~1]+[!![111]+[]][1%1][1&1]+([]+[][111])[.1^!1]+[{},[]+{},1][111%11][11-~1+11>>1]+([]+!!1)[111>>>111]+([]+{}+[])[[]+1]+[!!1+[]][1^1][111%11]]+[])[(!1+{})[1^1<<1]+[/=/,[]+/^/[11]][1|[]][11.11>>11.11]+([]+{}+[])[~~(1.1+1.1)]+[1,!{}+/~/][1][1|1<<1]+(1/!{}+[])[~1+1e1+~1]+[!![1]+{}][111.111>>111.111][1+[]]]((11^1<<1)+((1>>1)==([]+/-/[(!!/-/+/-/)[+(111>111)]+(!![11]+[])[1-~1]+(![11]+{})[1|1<<1|1]+(!!{}+[])[11%11]])[111.111>>111.111]),11+1>>1)](~1-~1e1<<1<<1)';
}

let input = 'https://zhouweilin.cn';
console.log(cipher_txt('https')+'+":"+(([]===[])+/-/)[5]+(([]===[])+/-/)[5]+'+cipher_txt('zhouweilin')+'+"."+'+cipher_txt('cn'));

发表评论

电子邮件地址不会被公开。 必填项已用*标注