安云网 - AnYun.ORG | 专注于网络信息收集、网络数据分享、网络安全研究、网络各种猎奇八卦。
当前位置: 安云网 > 技术关注 > WooYun > WooYun-Zone > JS破解乌云验证码 (WOOYUN)

JS破解乌云验证码 (WOOYUN)

时间:2017-09-07来源: 作者:点击:
网络安全资讯、讨论,跨站师,渗透师,结界师聚集之地
//内容来自安云网 p.zJS破解乌云验证码  (WOOYUN) (谈钞票伤感情 谈感情又伤钞票又伤感情) JS破解乌云验证码  (WOOYUN) | 2015-01-17 15:35

以后盲打乌云后台有验证码也不怕啦

(function(){
    function decaptcha(image){
        var canvas = document.createElement("canvas").getContext('2d');
        var result = '';
        var letter = [[],[],[],[]];
        var letterArea = {
            '0': {'x1':14, 'x2':21, 'y1': 4, 'y2': 13},
            '1': {'x1':23, 'x2':30, 'y1': 4, 'y2': 13},
            '2': {'x1':32, 'x2':39, 'y1': 4, 'y2': 13},
            '3': {'x1':41, 'x2':50, 'y1': 4, 'y2': 13},
        }
        var captchaData = {
            '2':[[0,0,1,1,1,1,0,0],[0,1,1,0,0,1,1,0],[1,1,0,1,0,0,1,1],[0,0,0,0,0,0,1,1],[0,0,0,0,0,1,1,0],[0,0,0,0,1,1,0,0],[0,1,0,1,1,0,0,0],[0,0,1,1,0,0,0,0],[0,1,1,0,0,0,0,0],[1,1,1,1,1,1,1,1]], //内容来自AnYun.ORG
            '3':[[0,1,1,1,1,1,0,0],[1,1,0,0,0,1,1,0],[0,0,0,0,0,0,1,1],[0,0,0,0,0,1,1,0],[0,0,0,1,1,1,0,0],[0,0,0,0,0,1,1,0],[0,0,0,0,0,0,1,1],[0,0,0,0,0,0,1,1],[1,1,0,0,0,1,1,0],[0,1,1,1,1,1,0,0]],
            '4': [[0,0,0,0,0,1,1,0],[0,0,0,0,1,1,1,0],[0,0,0,1,1,1,1,0],[0,0,1,1,0,1,1,0],[0,1,1,0,0,1,1,0],[1,1,0,0,0,1,1,0],[1,1,1,1,1,1,1,1],[0,0,0,0,0,1,1,0],[0,0,0,0,0,1,1,0],[0,0,0,0,0,1,1,0]],
            '5': [[1,1,1,1,1,1,1,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,1],[1,1,1,1,1,1,0,0],[1,1,1,0,0,1,1,0],[0,0,0,0,0,0,1,1],[0,0,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,0]],
            '6': [[0,0,1,1,1,1,0,0],[0,1,1,0,0,1,1,0],[1,1,0,0,0,0,1,0],[1,1,0,1,0,0,0,0],[1,1,0,1,1,1,0,0],[1,1,1,0,0,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,0]],
            '7': [[1,1,1,1,1,1,1,1],[0,0,0,0,0,0,1,1],[0,0,0,0,0,0,1,1],[0,0,0,0,0,1,1,0],[0,0,0,0,1,1,0,0],[0,0,0,1,1,0,0,0],[0,0,1,1,0,0,0,0],[0,1,1,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0]],
            '8': [[0,0,1,1,1,1,0,0],[0,1,1,0,0,1,1,0],[1,1,0,0,0,0,1,1],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,0],[0,1,1,0,0,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,0]],
            '9': [[0,0,1,1,1,1,0,0],[0,1,1,0,0,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,1,0,0,1,1],[0,1,1,0,0,1,1,1],[0,0,1,1,1,0,1,1],[0,0,0,0,0,0,1,1],[0,1,0,0,0,0,1,1],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,0]],
            'a': [[0,0,0,1,1,0,0,0],[0,0,1,1,1,1,0,0],[0,1,1,0,0,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,1,1,1,1,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1]],

//内容来自AnYun.ORG

            'b': [[1,1,1,1,1,1,0,0],[1,1,0,0,0,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,1,1,0],[1,1,1,1,1,1,0,0],[1,1,0,0,0,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,1,1,0],[1,1,1,1,1,1,0,0]],
            'c': [[0,0,1,1,1,1,1,0],[0,1,1,0,0,0,1,1],[1,1,1,0,0,0,0,1],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,1],[0,1,1,0,0,0,1,1],[0,0,1,1,1,1,1,0]],
            'd': [[1,1,1,1,1,1,0,0],[1,1,0,0,0,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,1,0,1,1],[1,1,0,0,0,1,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,1,1,0],[1,1,1,1,1,1,0,0]],
            'e': [[1,1,1,1,1,1,1,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,1,0],[1,1,0,0,0,0,0,0],[1,1,1,1,1,1,0,1],[1,1,0,1,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,1,1,1,1,1,0]],
            'f': [[1,1,1,1,1,1,1,1],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,1,1,1,1,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0]],
            'g': [[0,0,1,1,1,1,1,0],[0,1,1,0,0,1,1,1],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,1,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[0,1,1,0,0,0,1,1],[0,0,1,1,1,1,1,0]],
            'h': [[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,1,1,1,1,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1]],
            'j': [[0,0,0,1,1,1,1,0],[0,0,0,0,0,1,1,0],[0,0,0,0,1,1,1,0],[1,0,0,0,0,1,1,0],[0,0,0,0,0,1,1,0],[0,1,0,0,0,1,1,0],[0,0,0,0,0,1,1,0],[0,1,0,0,0,1,1,0],[0,1,1,0,1,1,0,0],[0,0,1,1,1,0,0,0]],

//内容来自安云网


            'k': [[1,1,0,0,0,0,1,1],[1,1,0,0,0,1,1,0],[1,1,0,0,1,1,0,0],[1,1,0,1,1,0,0,0],[1,1,1,1,0,0,0,0],[1,1,1,1,0,0,0,0],[1,1,0,1,1,0,0,0],[1,1,0,0,1,1,0,0],[1,1,0,0,0,1,1,0],[1,1,0,0,0,0,1,1]],
            'l': [[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,1,1,1,1,1,0]],
            'm': [[1,1,0,0,0,0,1,1],[1,1,1,0,0,1,1,1],[1,1,1,1,1,1,1,1],[1,1,0,1,1,0,1,1],[1,1,0,1,1,0,1,1],[1,1,0,1,1,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1]],
            'n': [[1,1,0,0,0,0,1,1],[1,1,1,0,0,0,1,1],[1,1,1,1,0,0,1,1],[1,1,1,1,0,0,1,1],[1,1,0,1,1,0,1,1],[1,1,0,1,1,0,1,1],[1,1,0,0,1,1,1,1],[1,1,0,0,0,1,1,1],[1,1,0,0,0,1,1,1],[1,1,0,0,1,0,1,1]],
            'p': [[1,1,1,1,1,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,1,1,1,1,1,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0]],
            'q': [[0,0,1,1,1,1,0,0],[0,1,1,0,0,1,1,0],[1,1,0,1,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,1,1,0,1,1],[1,1,0,0,1,1,1,1],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,1]],
            'r': [[1,1,1,1,1,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,1,1,1,1,1,0],[1,1,1,1,1,0,0,0],[1,1,1,0,1,1,0,0],[1,1,0,0,0,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1]],
            's': [[0,1,1,1,1,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[0,1,1,1,1,1,1,0],[0,0,0,0,0,0,1,1],[0,0,0,0,0,0,1,1],[0,0,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[0,1,1,1,1,1,1,0]],
//本文来自安云网

            't': [[1,1,1,1,1,1,1,1],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0]],
            'u': [[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,0]],
            'v': [[1,1,0,0,0,0,1,1],[1,1,1,0,0,1,1,1],[1,1,0,0,0,0,1,1],[0,1,1,0,0,1,1,0],[0,1,1,0,0,1,1,0],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,0],[0,0,1,1,1,1,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0]],
            'w': [[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[1,1,0,1,1,0,1,1],[1,1,0,1,1,0,1,1],[1,1,0,1,1,0,1,1],[1,1,1,1,1,1,1,1],[1,1,1,0,0,1,1,1],[1,1,0,0,0,0,1,1]],
            'x': [[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,1,1,1,1,0,0],[0,1,1,0,0,1,1,0],[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1]],
            'y': [[1,1,0,0,0,0,1,1],[1,1,0,0,0,0,1,1],[0,1,1,0,0,1,1,0],[0,0,1,1,1,1,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0],[0,0,0,1,1,0,0,0]],
            'z': [[1,1,1,1,1,1,1,0],[0,0,0,0,0,1,1,0],[0,0,0,0,0,1,1,0],[0,0,0,0,1,1,0,0],[0,0,0,1,1,0,0,0],[0,0,1,1,0,0,0,0],[0,1,1,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,0,0,0,0,0,0],[1,1,1,1,1,1,1,0]],
        }

        var imageWidth = image.width;
        var imageHeight = image.height;

        canvas.drawImage(image, 0, 0)
        var imageData = canvas.getImageData(0, 0, imageWidth, imageHeight);
        var pixels = imageData.data;

        var isLetter = function(pixeldata){
            var sum = pixeldata[0] + pixeldata[1] + pixeldata[2];
            if (sum<6*3 || sum>250*3){
                return 1;
            }else{
                return 0;
            }
        }

        for(var _h=0; _h<imageHeight; _h++){
            for(var _w=0; _w<imageWidth; _w++){
                var i = 4*(_w + _h*imageWidth);
                for(var _offset in letterArea){
                    var areaData = letterArea[_offset]
                    if((_w>=areaData['x1']&&_w<=areaData['x2']) && (_h>=areaData['y1']&&_h<=areaData['y2'])){
                        var _x = _w - areaData['x1'];
                        var _y = _h - areaData['y1'];  
                        if(letter[_offset][_y] == undefined){
                            letter[_offset][_y] = [];
                        }
                        letter[_offset][_y][_x] = isLetter([].slice.call(pixels, i,i+4));
                    }
                }
            }
        }
        for(var i=0;i<letter.length;i++){
            var maxError = 1000;
            var bestResult = ' ';
            for(var _letter in captchaData){
                var _error = 0;
                for(var _i=0; _i<letter[i].length; _i++){
                    for(var _j=0; _j<letter[i][_i].length; _j++){
                        if(letter[i][_i][_j] != captchaData[_letter][_i][_j]){
                            _error += 1;
                        }
                    }
                }
                if(_error < maxError){
                    maxError = _error;
                    bestResult = _letter;
                }
            }
            result += bestResult;
        }

        return result
    }

    function main(target){
        if(!self.$) return;
        target.forEach(function(item){
            var cpt = $(item['cpt']);
            var ipt = $(item['ipt']);
            if(cpt.length && ipt.length){
                ipt.val(decaptcha(cpt[0]));
            }
        })
    }

    var target = [
        //评论/提交
        {'cpt': 'img[id^=captcha]','ipt':'input#captcha'},
        //集市
        {'cpt': 'img#captchabuy_img','ipt':'input#captchabuy'},
        //控制面板/登陆
        {'cpt': 'img[src^=http://www.wooyun.org/captcha.php]','ipt':'input[name=captcha]'}
    ];
    main(target);
})();

分享到:
  1. JS破解乌云验证码  (WOOYUN)
    1#
    回复此人 感谢
    Sogili (.) 长短短 (.) JS破解乌云验证码  (WOOYUN) | 2015-01-17 15:36

  2. JS破解乌云验证码  (WOOYUN)
    2#
    回复此人 感谢
    好基友一辈子 JS破解乌云验证码  (WOOYUN) | 2015-01-17 15:38

  3. JS破解乌云验证码  (WOOYUN)
    3#
    回复此人 感谢
    小马达 JS破解乌云验证码  (WOOYUN) | 2015-01-17 15:38

    火钳刘明

  4. JS破解乌云验证码  (WOOYUN)
    4#
    回复此人 感谢
    园长 (喵~) JS破解乌云验证码  (WOOYUN) | 2015-01-17 15:44

    围观

  5. JS破解乌云验证码  (WOOYUN)
    5#
    回复此人 感谢
    刘海哥 (‮moc.ghuil.www) JS破解乌云验证码  (WOOYUN) | 2015-01-17 15:47

    屌个不停!

  6. JS破解乌云验证码  (WOOYUN)
    6#
    回复此人 感谢
    泳少 (此号被射!by U神) JS破解乌云验证码  (WOOYUN) | 2015-01-17 15:53

    一直觉得乌云验证码就是个问题。

  7. JS破解乌云验证码  (WOOYUN)
    7#
    回复此人 感谢
    whale JS破解乌云验证码  (WOOYUN) | 2015-01-17 15:53

    怎么用。。。

  8. JS破解乌云验证码  (WOOYUN)
    8#
    回复此人 感谢
    猪猪侠JS破解乌云验证码  (WOOYUN) (每次有人骂我是猪我都说自己是猪猪侠) JS破解乌云验证码  (WOOYUN) | 2015-01-17 15:58

    厉害

  9. JS破解乌云验证码  (WOOYUN)
    9#
    回复此人 感谢
    July JS破解乌云验证码  (WOOYUN) | 2015-01-17 16:03

    膜拜

  10. JS破解乌云验证码  (WOOYUN)
    10#
    回复此人 感谢
    ljhj (但愿低调,好好学习。) JS破解乌云验证码  (WOOYUN) | 2015-01-17 16:05

    已经无力吐槽了好么,大乌云的验证码居然连干扰都没有。

  11. JS破解乌云验证码  (WOOYUN)
    11#
    回复此人 感谢
    B1uH4ck JS破解乌云验证码  (WOOYUN) | 2015-01-17 16:32

    怎么用看起来diao

  12. JS破解乌云验证码  (WOOYUN)
    12#
    回复此人 感谢
    M4ster (Black || White) JS破解乌云验证码  (WOOYUN) | 2015-01-17 17:01

    厉害

  13. JS破解乌云验证码  (WOOYUN)
    13#
    回复此人 感谢
    xiaoxin (己所不欲,勿施于人) JS破解乌云验证码  (WOOYUN) | 2015-01-17 17:04

    今天说吊的人,改天估计会说,我擦我的wb

  14. JS破解乌云验证码  (WOOYUN)
    14#
    回复此人 感谢
    风情万种 (JJ好痒) JS破解乌云验证码  (WOOYUN) | 2015-01-17 19:04

    牛哇

  15. JS破解乌云验证码  (WOOYUN)
    15#
    回复此人 感谢
    蓝哆 (我是作(zhao)死(shi)哆~) JS破解乌云验证码  (WOOYUN) | 2015-01-17 20:26

    厉害

  16. JS破解乌云验证码  (WOOYUN)
    16#
    回复此人 感谢
    sky (啪啪啪啪脸好疼是不是?) JS破解乌云验证码  (WOOYUN) | 2015-01-17 21:19

    。。真叼。。

  17. JS破解乌云验证码  (WOOYUN)
    17#
    回复此人 感谢
    zerackerJS破解乌云验证码  (WOOYUN) (多乌云、多机会!!! 微信公众号:301在路上) JS破解乌云验证码  (WOOYUN) | 2015-01-17 21:52

    贱人就是矫情...  过来我保证不打死你。

  18. JS破解乌云验证码  (WOOYUN)
    18#
    回复此人 感谢
    PING JS破解乌云验证码  (WOOYUN) | 2015-01-17 22:14

    猴犀利!

  19. JS破解乌云验证码  (WOOYUN)
    19#
    回复此人 感谢
    动后河 (☭) JS破解乌云验证码  (WOOYUN) | 2015-01-17 22:48

    这是要先安装node嘛

  20. JS破解乌云验证码  (WOOYUN)
    20#
    回复此人 感谢
    Me_Fortune (老子是要进土豪榜的男人。) JS破解乌云验证码  (WOOYUN) | 2015-01-17 23:39

    好厉害  =  =

  21. JS破解乌云验证码  (WOOYUN)
    21#
    回复此人 感谢
    0x12 (帽子掉了|多逛,少说话。|小学生                                                                                                                                                                                                                                               ) JS破解乌云验证码  (WOOYUN) | 2015-01-18 01:49

    6

  22. JS破解乌云验证码  (WOOYUN)
    22#
    回复此人 感谢
    我了个去 JS破解乌云验证码  (WOOYUN) | 2015-01-18 01:52

    点lz名字,直接把我重定向到 http://zone.wooyun.org/login ,完了,lz把我号给盗了。。。

  23. JS破解乌云验证码  (WOOYUN)
    23#
    回复此人 感谢
    我了个去 JS破解乌云验证码  (WOOYUN) | 2015-01-18 01:55

    我擦,是我网络问题

    http://xxx.xxx.xxx.8:83/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/zone.wooyun.org/user/p.z

    铁通的网络,代理把它当作一个文件下载了。。。

  24. JS破解乌云验证码  (WOOYUN)
    24#
    回复此人 感谢
    我了个去 JS破解乌云验证码  (WOOYUN) | 2015-01-18 01:58

    用大天朝的网络,真是一点都不省心啊。lz屌爆了,已顶。

  25. JS破解乌云验证码  (WOOYUN)
    25#
    回复此人 感谢
    xsserJS破解乌云验证码  (WOOYUN) (十根阳具有长短!!) JS破解乌云验证码  (WOOYUN) | 2015-01-18 08:04

    屌丝何必为难屌丝

  26. JS破解乌云验证码  (WOOYUN)
    26#
    回复此人 感谢
    cat73 JS破解乌云验证码  (WOOYUN) | 2015-01-18 09:03

    @xsser - -要花时间改验证码了么

  27. JS破解乌云验证码  (WOOYUN)
    27#
    回复此人 感谢
    cat73 JS破解乌云验证码  (WOOYUN) | 2015-01-18 09:05

    @xsser http://cat73.coding.io/phps/verify.html
    以前写的东东- -

  28. JS破解乌云验证码  (WOOYUN)
    28#
    回复此人 感谢
    cat73 JS破解乌云验证码  (WOOYUN) | 2015-01-18 09:06

    数学渣 实在是做不来模糊算法- -

  29. JS破解乌云验证码  (WOOYUN)
    29#
    回复此人 感谢
    coms JS破解乌云验证码  (WOOYUN) | 2015-01-18 09:48

    @我了个去 这是我们公司的产品,您告诉我具体设备IP,我上去把乌云整站放行掉

  30. JS破解乌云验证码  (WOOYUN)
    30#
    回复此人 感谢
    溯雪 JS破解乌云验证码  (WOOYUN) | 2015-01-18 10:03

    好屌 这个要顶

  31. JS破解乌云验证码  (WOOYUN)
    31#
    回复此人 感谢
    RainShine (I'm your angel of music.) JS破解乌云验证码  (WOOYUN) | 2015-01-18 10:13

    叼啊!JS破解乌云验证码……火钳刘明

  32. JS破解乌云验证码  (WOOYUN)
    32#
    回复此人 感谢
    我了个去 JS破解乌云验证码  (WOOYUN) | 2015-01-18 11:18

    @coms  。。。

  33. JS破解乌云验证码  (WOOYUN)
    33#
    回复此人 感谢
    cat73 JS破解乌云验证码  (WOOYUN) | 2015-01-18 12:00

    //仿造大牛的做了个EMS验证码识别
    //http://www.ems.com.cn/mailtracking/you_jian_cha_xun.html

    function decaptcha(image){
        var letterArea = {
            '0': {'x1': 7, 'x2': 15, 'y1': 3, 'y2': 15},
            '1': {'x1': 20, 'x2': 28, 'y1': 3, 'y2': 15},
            '2': {'x1': 33, 'x2': 41, 'y1': 3, 'y2': 15},
            '3': {'x1': 46, 'x2': 54, 'y1': 3, 'y2': 15},
            '4': {'x1': 59, 'x2': 67, 'y1': 3, 'y2': 15},
            '5': {'x1': 72, 'x2': 80, 'y1': 3, 'y2': 15}
        };

        var captchaData = {
            '0': [
                [0, 0, 0, 1, 1, 1, 0, 0, 0],
                [0, 1, 1, 1, 1, 1, 1, 1, 0],
                [0, 1, 1, 0, 0, 0, 1, 1, 0],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [0, 1, 1, 0, 0, 0, 1, 1, 0],
                [0, 1, 1, 1, 1, 1, 1, 1, 0],
                [0, 0, 0, 1, 1, 1, 0, 0, 0]
            ],
          
            '1': [
                [0, 0, 1, 1, 1, 0, 0, 0, 2],
                [1, 1, 1, 1, 1, 0, 0, 0, 2],
                [1, 1, 1, 1, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [1, 1, 1, 1, 1, 1, 1, 1, 2],
                [1, 1, 1, 1, 1, 1, 1, 1, 2]
            ],
          
            '2': [
                [0, 1, 1, 1, 1, 1, 0, 0, 2],
                [1, 1, 1, 1, 1, 1, 1, 0, 2],
                [1, 0, 0, 0, 0, 0, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 1, 2],
                [0, 0, 0, 0, 0, 1, 1, 0, 2],
                [0, 0, 0, 0, 1, 1, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [0, 0, 1, 1, 0, 0, 0, 0, 2],
                [0, 1, 1, 0, 0, 0, 0, 0, 2],
                [1, 1, 0, 0, 0, 0, 0, 0, 2],
                [1, 1, 1, 1, 1, 1, 1, 1, 2],
                [1, 1, 1, 1, 1, 1, 1, 1, 2]
            ],
          
            '3': [
                [0, 1, 1, 1, 1, 1, 0, 0, 2],
                [1, 1, 1, 1, 1, 1, 1, 1, 2],
                [1, 0, 0, 0, 0, 0, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 1, 2],
                [0, 1, 1, 1, 1, 1, 1, 0, 2],
                [0, 1, 1, 1, 1, 1, 1, 1, 2],
                [0, 0, 0, 0, 0, 1, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 1, 2],
                [1, 0, 0, 0, 0, 1, 1, 1, 2],
                [1, 1, 1, 1, 1, 1, 1, 0, 2],
                [0, 1, 1, 1, 1, 1, 0, 0, 2]
            ],
          
            '4': [
                [0, 0, 0, 0, 0, 1, 1, 0, 0],
                [0, 0, 0, 0, 1, 1, 1, 0, 0],
                [0, 0, 0, 0, 1, 1, 1, 0, 0],
                [0, 0, 0, 1, 1, 1, 1, 0, 0],
                [0, 0, 1, 1, 0, 1, 1, 0, 0],
                [0, 0, 1, 1, 0, 1, 1, 0, 0],
                [0, 1, 1, 0, 0, 1, 1, 0, 0],
                [0, 1, 1, 0, 0, 1, 1, 0, 0],
                [1, 1, 1, 1, 1, 1, 1, 1, 1],
                [1, 1, 1, 1, 1, 1, 1, 1, 1],
                [0, 0, 0, 0, 0, 1, 1, 0, 0],
                [0, 0, 0, 0, 0, 1, 1, 0, 0],
                [0, 0, 0, 0, 0, 1, 1, 0, 0]
            ],
          
            '5': [
                [1, 1, 1, 1, 1, 1, 1, 1, 2],
                [1, 1, 1, 1, 1, 1, 1, 1, 2],
                [1, 1, 0, 0, 0, 0, 0, 0, 2],
                [1, 1, 0, 0, 0, 0, 0, 0, 2],
                [1, 1, 0, 0, 0, 0, 0, 0, 2],
                [1, 1, 1, 1, 1, 0, 0, 0, 2],
                [1, 1, 1, 1, 1, 1, 1, 0, 2],
                [0, 0, 0, 0, 0, 1, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 1, 2],
                [1, 0, 0, 0, 0, 1, 1, 1, 2],
                [1, 1, 1, 1, 1, 1, 1, 0, 2],
                [0, 1, 1, 1, 1, 1, 0, 0, 2]
            ],
          
            '6': [
                [0, 0, 0, 1, 1, 1, 1, 0, 0],
                [0, 0, 1, 1, 1, 1, 1, 1, 0],
                [0, 1, 1, 0, 0, 0, 0, 1, 0],
                [0, 1, 1, 0, 0, 0, 0, 0, 0],
                [1, 1, 0, 0, 0, 0, 0, 0, 0],
                [1, 1, 0, 1, 1, 1, 1, 0, 0],
                [1, 1, 1, 1, 1, 1, 1, 1, 0],
                [1, 1, 1, 0, 0, 0, 1, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [0, 1, 1, 0, 0, 0, 1, 1, 1],
                [0, 1, 1, 1, 1, 1, 1, 1, 0],
                [0, 0, 0, 1, 1, 1, 1, 0, 0]
            ],
          
            '7': [
                [1, 1, 1, 1, 1, 1, 1, 1, 2],
                [1, 1, 1, 1, 1, 1, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 1, 2],
                [0, 0, 0, 0, 0, 0, 1, 0, 2],
                [0, 0, 0, 0, 0, 1, 1, 0, 2],
                [0, 0, 0, 0, 1, 1, 0, 0, 2],
                [0, 0, 0, 0, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 1, 0, 0, 0, 2],
                [0, 0, 0, 1, 0, 0, 0, 0, 2],
                [0, 0, 1, 1, 0, 0, 0, 0, 2],
                [0, 0, 1, 1, 0, 0, 0, 0, 2],
                [0, 1, 1, 0, 0, 0, 0, 0, 2],
                [0, 1, 1, 0, 0, 0, 0, 0, 2]
            ],
          
            '8': [
                [0, 0, 1, 1, 1, 1, 1, 0, 0],
                [0, 1, 1, 1, 1, 1, 1, 1, 0],
                [0, 1, 1, 0, 0, 0, 1, 1, 0],
                [0, 1, 1, 0, 0, 0, 1, 1, 0],
                [0, 1, 1, 1, 0, 0, 1, 0, 0],
                [0, 0, 1, 1, 1, 1, 1, 0, 0],
                [0, 0, 1, 1, 1, 1, 1, 0, 0],
                [0, 1, 1, 0, 0, 1, 1, 1, 0],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 1, 0, 0, 0, 1, 1, 1],
                [0, 1, 1, 1, 1, 1, 1, 1, 0],
                [0, 0, 1, 1, 1, 1, 1, 0, 0]
            ],
          
            '9': [
                [0, 0, 1, 1, 1, 1, 0, 0, 0],
                [0, 1, 1, 1, 1, 1, 1, 1, 0],
                [1, 1, 1, 0, 0, 0, 1, 1, 0],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 0, 0, 0, 0, 0, 1, 1],
                [1, 1, 1, 0, 0, 0, 1, 1, 1],
                [0, 1, 1, 1, 1, 1, 1, 1, 1],
                [0, 0, 1, 1, 1, 1, 0, 1, 1],
                [0, 0, 0, 0, 0, 0, 0, 1, 1],
                [0, 0, 0, 0, 0, 0, 1, 1, 0],
                [0, 1, 0, 0, 0, 0, 1, 1, 0],
                [0, 1, 1, 1, 1, 1, 1, 0, 0],
                [0, 0, 1, 1, 1, 1, 0, 0, 0]
            ]
        };

        var canvas = document.createElement("canvas").getContext('2d');
        canvas.drawImage(image, 0, 0);

        var isLetter = function(pixeldata) {
            var sum = pixeldata[0] + pixeldata[1] + pixeldata[2];
            if (sum < 150 * 3) {
                return 1;
            } else {
                return 0;
            }
        }

        var letter = [[], [], [], [], [], []];
        for(var id in letterArea) {
            var charWidth = letterArea[id].x2 - letterArea[id].x1;
            var charHeight = letterArea[id].y2 - letterArea[id].y1;
            var imageData = canvas.getImageData(letterArea[id].x1, letterArea[id].y1, charWidth, charHeight).data;


            for(var h = 0; h <= charHeight; h++) {
                letter[id][h] = [];
                for(var w = 0; w <= charWidth; w++) {
                    var i = 4 * (w + h * charWidth);
                    letter[id][h][w] = isLetter([].slice.call(imageData, i, i + 4));
                }
            }
        }

        var result = '';
        for(var i = 0; i < letter.length; i++){
            var maxError = 1000;
            var bestResult = ' ';
            for(var id in captchaData){
                var error = 0;
                for(var y = 0; y < letter[i].length; y++){
                    for(var x = 0; x < letter[i][y].length; x++){
                        if(captchaData[id][y][x] != 2 && letter[i][y][x] != captchaData[id][y][x]){
                            error += 1;
                        }
                    }
                }

                console.log("[" + i + ", " + id + "] " + error);

                if(error < maxError){
                    maxError = error;
                    bestResult = id;
                }
            }
            result += bestResult;
        }

        return result;
    }

    function main(target) {
        for(var id in target) {
            if(target[id]['img'] != undefined && target[id]['img'] != null && target[id]['input'] != undefined && target[id]['input'] != null) {
                target[id]['input'].value = decaptcha(target[id]['img']);
            }
        }
    }

    main([
        //速递查询
        {'img': document.getElementById("checkCode"), 'input':document.getElementsByName("checkCode")[0]}
    ]);

  34. JS破解乌云验证码  (WOOYUN)
    34#
    回复此人 感谢
    铜锣湾 JS破解乌云验证码  (WOOYUN) | 2015-01-18 19:22

    碉堡,还可以这样玩

  35. JS破解乌云验证码  (WOOYUN)
    35#
    回复此人 感谢
    香草 (离骚) JS破解乌云验证码  (WOOYUN) | 2015-01-18 20:15

    js无所不能啊

  36. JS破解乌云验证码  (WOOYUN)
    36#
    回复此人 感谢
    KamiSama JS破解乌云验证码  (WOOYUN) | 2015-01-19 00:16

    测试一下

  37. JS破解乌云验证码  (WOOYUN)
    37#
    回复此人 感谢
    NaiBa JS破解乌云验证码  (WOOYUN) | 2015-01-19 11:15

    niu

  38. JS破解乌云验证码  (WOOYUN)
    38#
    回复此人 感谢
    Tank (梦想创造奇迹!) JS破解乌云验证码  (WOOYUN) | 2015-01-19 11:20

  39. JS破解乌云验证码  (WOOYUN)
    39#
    回复此人 感谢
    Neeke JS破解乌云验证码  (WOOYUN) | 2015-01-19 11:50

    牛逼啊

  40. JS破解乌云验证码  (WOOYUN)
    40#
    回复此人 感谢
    风花雪月 (多喜欢我自己!) JS破解乌云验证码  (WOOYUN) | 2015-01-19 12:33

    @cat73 敢不敢不要这么蛋疼!

  41. JS破解乌云验证码  (WOOYUN)
    41#
    回复此人 感谢
    肉肉JS破解乌云验证码  (WOOYUN) (我我我我我我是乌云头号美男子) JS破解乌云验证码  (WOOYUN) | 2015-01-19 12:35

    pz姐姐好厉害

  42. JS破解乌云验证码  (WOOYUN)
    42#
    回复此人 感谢
    by灰客 JS破解乌云验证码  (WOOYUN) | 2015-01-19 12:55

    @cat73 你的验证码也能秒识别。。。
    取出颜色大于 你验证码字的
    直接就无干扰了
    然后建字摸

  43. JS破解乌云验证码  (WOOYUN)
    43#
    回复此人 感谢
    金属狂人 (你狂我不狂,谁为狂人?) JS破解乌云验证码  (WOOYUN) | 2015-01-19 13:05

    PZ无敌,混脸熟。

  44. JS破解乌云验证码  (WOOYUN)
    44#
    回复此人 感谢
    Fireweed JS破解乌云验证码  (WOOYUN) | 2015-01-19 20:22

    niubi

  45. JS破解乌云验证码  (WOOYUN)
    45#
    回复此人 感谢
    浮生若梦 JS破解乌云验证码  (WOOYUN) | 2015-01-22 09:21

    一个验证码识别而已。。。

  46. JS破解乌云验证码  (WOOYUN)
    46#
    回复此人 感谢
    Ivan (Null.) JS破解乌云验证码  (WOOYUN) | 2015-01-22 10:02

    屌炸天

  47. JS破解乌云验证码  (WOOYUN)
    47#
    回复此人 感谢
    眼神 JS破解乌云验证码  (WOOYUN) | 2015-01-28 01:13

    人艰不拆

  48. JS破解乌云验证码  (WOOYUN)
    48#
    回复此人 感谢
    px1624 (aaaaaaaaa) JS破解乌云验证码  (WOOYUN) | 2015-03-16 11:26

    怎么用,来个帮助文档啊。。。

  49. 本文标题: JS破解乌云验证码 (WOOYUN)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
验证码: 点击我更换图片
相关内容
推荐内容