skotz / cbl-js

JavaScript CAPTCHA solving library
MIT License
159 stars 46 forks source link

need help with solving a simple captcha #61

Open mkp95 opened 3 years ago

mkp95 commented 3 years ago

I had previously used cbl for other captchas but i am unable to solve this captcha,.. 2 26 31 34 39

skotz commented 3 years ago

Oddly enough this CAPTCHA doesn't need any preprocessing at all. It's primary weakness is that each letter is a different color, so you can just set a few dimension settings to filter out the lines and it'll solve itself. Note that blob_max_width is new, so you'll need to redownload the library for it to work.

image

var cbl = new CBL({
    character_set: "0123456789",
    blob_min_width: 5,
    blob_min_height: 8,
    blob_max_width: 10,
    blob_max_height: 12,
    pattern_width: 8,
    pattern_height: 10,
    allow_console_log: true,
    perceptive_colorspace: true,
    exact_characters: 4,
    blob_console_debug: true,
    blob_debug: "debugSegmented"
});

cbl.train("0635.png");
cbl.train("2971.png");
cbl.train("3996.png");
cbl.train("6755.png");
cbl.train("8976.png");

var saveModel = function() {
    cbl.condenseModel();
    cbl.sortModel();
    cbl.visualizeModel("visualizeModel");
    cbl.saveModel();
}

All you need to do is train it on enough examples of each possible digit and you should get near 100% accuracy.