Are you human? Resistor edition

posted Apr 21st 2010 11:04am by
filed under: HackIt

[PT] tipped us off about a new way to screen bots from automatically leaving comments. Resisty is like CAPTCHA but it requires you to decipher color bands on a resistor instead of mangled text. This won’t do much for the cause of digitizing books, but if you can never remember your color codes this is a good way to practice. Resisty comes as a plug-in for WordPress, add it to your blog and for a geek cred +1.



72 Responses to Are you human? Resistor edition

  • woah says:

    I’m pretty sure this is easier to crack than a CAPTCHA. Still fun idea though :p

  • squidarthur says:

    where’s the hack?

    let’s see someone come up with a bot or webcam hack to crack this gimmicky captcha

  • fullmetal says:

    that’s probably pretty easy to hack, and it screws over us poor colorblind geeks who have to use multimeters on our resistors. Still pretty cool though.

  • endikos says:

    So the colorblind arent allowed to post? While a novel approach, utilizing the recognition of color as a necessary function of your website is a usability no-no.

  • Alexander Rossie says:

    Ridiculously simple to crack. But it is fun.

  • John says:

    Just what the internet needs, more methods of locking out people with poor vision.

  • Hiroe says:

    @John. The only time I can see poor vision being used to lock people out is with face recognition locks. hurr hurr.

  • monkeyslayer56 says:

    so hackaday, when will i be forced to review resistor color codes?

  • spiderwebby says:

    this could easily be cracked using roborealm

  • hn says:

    hackaday should use a version where you decode DRAM serial numbers. accessible & keeps out the trolls

  • icebrain says:

    @people saying its easily crackable: Yes, it is, but since it’s a custom built solution, it’s not cost effective. If every site had its own captcha system it would be impossible to make money of it.

  • jsngrimm says:

    @VEC7OR very much agreed!

  • fluidic says:

    Easy to crack, and there’s this thing called colorblindness that they seem to have forgotten about.

  • Dan Fruzzetti says:

    Great so colorblind guys like me can just forget about posting anywhere now?

  • Frogz says:

    somone PLEASE think of the chil….COLORBLIND
    oh wont somone PLEASE think of the color blind!

    considering it has the numerical value of it as well as the color, SCREW YOU COLORBLINDIES!
    just remember 4.7 with a multiplier of 1000 regardless of color used to indicate that is STILL 4.7k

  • Frogz says:

    please ignore my fail remembering my multiplier colors…
    47k*

  • jim says:

    Not cool for those of us who are color blind!
    The non-black and white ones commonly cause me problems

  • smoker_dave says:

    i like resistors.

  • therian says:

    So colorblind cant read numbers too ?

  • NoNeed says:

    Resistance is futile!

    For all those who are complaining about color blind. Just do it in reverse. Give a value and make people give the code. Problem solved!

    Blue Red Red / Gold / Red

    What is the value of that resister?

    Want to trip up the hackers. Change the order, or say don’t give the tolerance.

    Just a cute little hack. Oh and it IS a hack as it IS using the resister color coding for something other than giving you the value of the resister (i.e. granting access to a site).

    Bunch of cry babies! I swear, how did you ever reach adulthood.

  • nyder says:

    seriously, you know matching colors is an old trick?

    computers don’t have a problem with that.

    fail

  • Rob says:

    The way I remembered my resistor colors is what got me fired from RadioShack for sexual harassment:

    “Bad Boys Rape Only Young Girls But Violet Gives Willingly, Get Some Now”

  • Anonymouse says:

    I unintentionally memorized the resistor color code. I ordered 1500 resistors on eBay and discovered that some were incorrectly labeled. I had to check all of them.

  • mic says:

    I suggest that a Voight Kamph test be done instead, because it also protects against replicants…

  • B1rdm4n says:

    “Great so colorblind guys like me can just forget about posting anywhere now?”

    Yea – pretty much! Hopefully this catches on so I don’t have to listen to all of you whiners…

    I have a colorblind friend – He says he was taught to know what the colors look like that he can’t see. So he knows when a light is green, although he doesn’t really SEE to green.

    This is an awesome idea.

  • Whatnot says:

    Very cute, but from the comments over there I gather the guy that made it is a bit of an ass.
    But that should not matter really.
    What does matter is that although cute it’s dead easy for the spambot makers to bypass this, so you’ll ruin your site in no time if you don’t watch it.

  • Whatnot says:

    @B1rdm4n some common types of colorblindness don’t work well with standard monitors, various colors look the exact same, but there are ways to adjust the output of monitors to make it more distinct though.
    Another problem is that a surprisingly large number of people that are colorblind are actually not aware of it (seriously), they were born with an understanding of color as being how they see it and don’t realize people with normal colorvision see it all different, just like we that can see colors normally have a hard time to imagine how colorblind people actually see things.

  • supershwa says:

    I’m surprised at how many colorblind electronic engineers there are here…

    I mean…electronics…just about everything is color coded — talk about challenging yourself. This should be cake compared to the accidental grounding of electricity, mis-wired circuit boards, and of course recognizing your resistors…

  • brian4120 says:

    @ Engineers with colorblindness,
    Is this the reason why I find some projects using nothing but one colored wires?

    Also colorblind network engineers, thanks for wiring up our rack mount switches with all yellow cables.

    joking aside, nifty CAPTCHA

  • Jimmy Sultan says:

    I run a phpBB and I use to have one that was all about the cute and fuzzy kittens called KittenAuth.

    “Which one is the fuzzy kitten?” and it showed reptiles, waterfowl, dogs, etc… along with one cute and cuddly kitten.

    It stopped the spammer bots dead in their tracks, I was getting hundreds per week before that.

  • Whatnot says:

    @supershwa
    Well an engineer can just enter the values in his computer, and when prototyping (after testing the circuit on the computer in emulation) get them from the right drawer, plus it’s all SMD now and they aren’t colorcoded bur have unreadable tiny text and are placed by robots.
    And when confused you can measure the resistance with a simple meter too.

  • Skittle says:

    I’m Color blind. =(

  • jaded says:

    Colorblind EEs are one thing.

    Colorblind Bomb Technicians are an entirely different breed, often referred to as “hamburger”.

  • Amos says:

    It doesn’t matter that the captcha is simple for a computer to crack, because the spammers have a willing army of thousands from Pakistan, China, and dozens of other 3rd-world countries to crack the “secure” ones…

  • jeicrash says:

    Neat but you could just use autohotkey to compare the colorband to the colors available on the slider and click the ones that match. Might be more secure on geeky sites by just asking the resistance of the bands with no sliders.

  • cornelius says:

    @icebrain

    at first i was thinking that this is cool, but incredibly easy to crack/hack, and worthless. after reading your comment it made me realize that if a large portion of sites made their own captchas, it would lessen the need drive to build captcha crackers programs. it probably would result in small sites receiving minimal to none spam.

  • Freiheit says:

    I think I worked out how to hack this. I got the meaty bits taken care of, but I’m not motivated to glue it together into a script tonight.

    I used wget 10 times to get a sample of the resistor images.
    I found that the color of the bands were located at the following pixel locations:
    45×40
    80×40
    110×40
    150×40

    Ran those through ImageMagick like so:
    convert png:resistorImage.php.3[1x1+45+40] txt:
    convert png:resistorImage.php.3[1x1+80+40] txt:
    convert png:resistorImage.php.3[1x1+110+40] txt:
    convert png:resistorImage.php.3[1x1+150+40] txt:

    That spits out the correct RGB codes like so:
    $ convert png:resistorImage.php.3[1x1+45+40] txt:
    # ImageMagick pixel enumeration: 1,1,255,rgba
    0,0: (100, 50, 0,255) #643200 rgba(100,50,0,1)
    $ convert png:resistorImage.php.3[1x1+80+40] txt:
    # ImageMagick pixel enumeration: 1,1,255,rgba
    0,0: ( 0,255, 0,255) #00FF00 lime
    $ convert png:resistorImage.php.3[1x1+110+40] txt:
    # ImageMagick pixel enumeration: 1,1,255,rgba
    0,0: ( 0, 0,255,255) #0000FF blue
    $ convert png:resistorImage.php.3[1x1+150+40] txt:
    # ImageMagick pixel enumeration: 1,1,255,rgba

    So the outputs are nicely machine readable into RGB values.

    From there we have to match the RGB codes to the form, the form values resist1,2,3,4 are set to match the number shown in the slider. These don’t change so we can swipe them once and get the 0-9 values.

    Then we actually have to calculate the resistance and populate the hidden ohms and perc values using the code in the JS function getResistance().
    resist = parseInt(resist1 + resist2) * Math.pow(10, resist3);

    document.getElementById(‘ohms’).value = resist;
    document.getElementById(‘perc’).value = resist4;

    Now that we have resist1-4, ohms, and perc we can then fill in the standard WP form values and submit our post.

    I wonder how it can be made better. Maybe using an actual product image of a resistor, so take a catalouge image of a 47K Ohm resistor and then show that to the user. Rotation of the image and varying the angle or width of the bands.

    Its a neat and educational CAPTCHA. I had fun roughing out a script to get around it.

    Cross posted at the original site, just for my ego.

  • hiya, phil here – please read the post carefully. the goal is to teach people how to read resistors, that’s why we made it. we have many layers of spam protection on the site – if you take a look around adafruit you won’t see any spam comments in our very active blog (over 1m page views a month now) or the forums (thousands of posts a month). we have humans who read all the comments and posts carefully.

    it’s not a CAPTCHA challenge, if that’s what you’re looking for – this isn’t for you :)

  • Freiheit says:

    @phil – I saw CAPTCHA and immediately thought “anti-spam” and had to see if I could get around it. I certainly did not intend to show any disrespect to your work. It’s a great tool and it’s well coded, at least what I can see on the client side.

    I still had fun figuring out how to write a script to solve it.

  • jeicrash says:

    Another note, there are other free apps out there to teach resistors. With no dis-respect intended, I think simply associating this with CAPTCHA is whats bringing out all the negative comments. Yes it can be broke, and maybe thats just as fun for some as learning how to read a resistor for others. Either way, This project seams to have spawned two learning areas instead of one. I’d call it a win-win situation.

  • @Freiheit – it’s cool you were tinkering with it, that’s part of the fun – no worries :)

    that said, maybe one day we will make an impossible to crack via machine CAPTCHA – and for that one we’ll issue a challenge.

    right now, the bigger challenge is to get more people learning electronics :)

  • @jeicrash – i think the apps that teach resistors are for the people who are already interested – we’re thinking puzzles, science / engineering formulas and other topics that can be taught CAPTCHA-style might inspire people not only to post comments, but to learn something along the way.

    there are people who just crack CAPTCHAs for a living, we’re not interested in them – and i know they’re not interested in our site. we review each comment, there’s no money to be made trying to spam our site, it’s a dead end for them.

  • anonymous says:

    Perhaps take it to the next level. See the bottom of http://lib.mipt.ru/?spage=reg_user

    Found via http://duvet-dayz.com/archives/2008/03/19/609/ . I like the Rorschach CAPTCHA. :)

  • reboots says:

    For those interested in the accessibility issue, there are several page filter sites which simulate the various types of color blindness. Google search ‘colorblind web page filter’.

    Here’s the example captcha as viewed with red/green color blindness:

    http://vischeck.homeip.net/uploads/12719057986346/images/04_PT_2837.jpg

    This would leave the user differentiating values by brightness against the colored resistor body. It’s almost sadistic.

    +1 for cuteness; -1 for web accessibility.

  • Hip says:

    Is the tollerance always 0?!?

  • Hip says:

    @Rob… Awesome!!

  • Dosbomber says:

    There is a colorblind-friendly version available (in beta) for those of you going into hysterics over it.

    http://wordpress.org/extend/plugins/resisty/installation/

  • Sean says:

    Oh, yeah. This is stupid because colorblind people are left out :( We should revert back to regular captchas so as not to exclude anyone…

    Wait, thats strange, what is that wheelchair doing next to my captcha? You mean some people can’t use regular captchas, and *gasp* theres a workaround!

    The hack itself would never have a practical application and truly I don’t think it was supposed to, but colorblind people give me a break.

  • Susie B says:

    I’m a tetrachromat and I’m still extremely offended that I’m forced to use monitors and other equipment that only use 3 primary colors when I can see 4. I believe this is extremely damaging to my well-being and everyone should get on fixing this for that unlucky 0.00001% of us who have to deal with your dulled down senses right away.

  • cHRIS says:

    As many have posted already – i don’t see this as much of a learning experiment or whatever the owner says it it, seeing as I’m red/green deficient. I also mix blues and purples regularly. makes teaching your kids colours tricky when they’ve torn the crayon wrappers off. also makes hunting difficult – try following a blood trail in the fall – red coloured leaves on the ground… not easy (side note – running prey usually leave a nice enough foot trail for the most part though). I personally see this more of a deterrent to bother with the site, seeing as i have to use a multimeter to ‘read’ resistors – those don’t work with websites…

  • cHRIS says:

    @ susie B “forced to use monitors and other equipment that only use 3 primary colors when I can see 4. ”

    what exactly is the 4th primary colour? as far as i was ever taught there was only three… did you perhaps leave off your sarcasm tag by accident??

  • Peter says:

    Those of us who are Differently-Abled prefer the term “Chromatically Challenged”. Please don’t refer to us as “color-blind”. It only demonstrates your inability to empathize with our situation.

    Thank you.

    …and always remember: “Bad boys…but Violet gives willingly!”

    (and for the more politically correct: “Better be right or your great big venture goes west!”)

  • Punkguyta says:

    I TOTALLY agree, that’s such an awesome idea. No more first posts etc,.

    Btw, screw colourblind people, it’s like people with peanut allergies. If you allow people with peanut allergies to “procreate” and make children, they will most likely be allergic to peanuts too. I can only assume this goes the same for colourblind people.

    Seriously world wtf, our world is slowly devouring itself because the whole “big dog on top” where natural illness and disease would wipe out people that were not immune to it. Only the strongest survive they say, people used to die from the flu for christ sakes. Now they have a cure for that, so theres no need to build up a resistance to that kind of thing no.

  • markii says:

    i like it, i like it and i like it!

  • BeatJunkie says:

    As 5% to 9% of the male population are (knowingly) color-blind, these people are imho not neglectable as an audience.
    But if you really want to lock out 5% – 9% of all male internet-users, then just f*cking do it and live with the fact, that you’re gonna have that less visitors.

    btw: I’m color-blind too.

  • cantido says:

    @Peter

    Your post offends those that are offended by others being offended.

    You have been warned.

  • Archeious says:

    I posted the problems and was told I needed to read the code first before I could complain which I had already done. I sent them a detailed description of the problems and explained how trivial it would be to script a spam bot. I know how easy it is because I have a prototype on my site. I have a form with no captcha on my site that will post a comment to their site (with no authentication).

    Whereas adafruit is in the top 100k of all internet sites search engines give more weight to links than other sites. Furthermore they are distributing this as a security product which makes them negligent. It looks like they are not using the colorblind friendly version which means they do not care about accessibility.

    As a responsible security professional I have notified the vendor (adafruit) and described the problems. If they do not respond I will be compelled to release my code (which I don’t want to do).

  • Freiheit says:

    @Archeious – Too late dude.

    See the following posts in this thread:
    Posted at 7:50 pm on Apr 21st, 2010 by Freiheit
    Posted at 7:53 pm on Apr 21st, 2010 by adafruit support
    Posted at 8:00 pm on Apr 21st, 2010 by Freiheit
    Posted at 8:04 pm on Apr 21st, 2010 by adafruit support

    Phil@adafruit did a good job writing it, admits its an educational tool not a CAPTCHA, shares that adafruit does more aggressive post filtering than what we see, AND I already posted the significant outline of how to crack it.

    It’d be neat to see your code though.

  • cantido says:

    @Archeious

    >As a responsible security professional

    You would know that spam filtering != security?

  • bigalexe says:

    The sad thing is that despite my color deficiency I still think this will be easier than MOST of the Captcha’s I run into.

  • @Archeious – Freiheit is 100% correct, you cannot post anything on our site unless we approve it most of the time, all depends on what we’re doing each day :) so it really doesn’t matter. we’re also updating our plugin so you’ll likely need to keep up with the changes and features we’re adding… we do not see any emails from you so we’re not sure what type of reply you’re waiting for – responses on HaD aren’t really notifications i think.

  • Whatnot says:

    About evolution: colorblindness can be an advantage too, in the old days they used colorblind people to analyze aerial spy plane photographs because they had a superior ability to recognize (camouflaged) objects.
    Point being that what’s a slight disadvantage one day can be an advantage the next.

    As for complaints about taking them in consideration: just imagine the annoyance of not being able to post because of a silly little thing as having a captcha system that could easily be of a design that didn’t stop you, it’s like those youtubes that say ‘not available in your country’, annoying like hell.

  • Nemo says:

    @cHRIS
    did you not read Susie’s post? She stated “tetrachromat” – it’s a genetic trait that a fraction of the population has (all female) whereby they have four primary colours.

    The number of primary colours, btw, being a function of biology… trichromats have receptors in their eyes for 3 colours – red, green and blue. Tetrachromats have receptors for an additional fourth colour.

    yes, her post was sarcastic, but yours was ignorant.

  • Nitori says:

    The color blind problem could be partly solved by using fill patterns with each color.
    red could have a a brick fill and blue a cross hatch etc.

    As for fooling machines randomly play with the spacing of the bands and the location, and tilt of the resistor image.

  • cHRIS says:

    @Punkguyta -actually – there are benefits to being colourblind – better monochromatic and low light vision (ie night vision).

    @ Nemo – i was actually being genuine in asking what the third colour was, since i didn’t know about that – but thanks for making me sound like a douche.
    Also, did you know that the same genes that are connected to hair colour are connected to colourblindness – readheads aren’t colourblind

  • biozz says:

    my brother is colorblind and he said that the red and the gray are the same and the purple and the orange and the blue and the brown

  • Nemo says:

    @cHRIS sorry man, not intending to make you look bad – just pointing out that all the information you needed was in the original post.

    It should be clarified that being Tetrachromat doesn’t increase the range of colours that can be seen, but does increase the ability to discern differences between close frequencies.

    BTW, I just did a bit of research now – previously I was reporting on half-remembered reports from years ago – and looks like tetrachromancy is still only theoretical, so I bet if Susie B genuinly is, there are researches who would love to speak to her… :)

  • Saki_Kawa says:

    Wow! Very very beautiful comments!
    Fuck the color blind? .. Great civilization!

    Captcha always creates discriminations.. colorblinds, impaireds, blinds, etc..
    Do not use captcha at all!!

    Colorblinds are very common, but often they don’t know to be one, there is a great number of colorblind level!

    Learn to respect the others!

  • Nemo says:

    @Saki_Kawa …actually, the whole purpose of captcha systems *is* to discriminate.

    …to discriminate between a real person, and an automated program…

    creating something which can make that discrimination without error is exceedingly hard, however.

    “learn to respect the others” is great, and when the spammers and other troublemakers online learn that, then we wont need captcha systems at all. I look forward to that day.

    Till then, we’re stuck with captcha or similar systems… and many these days offer a listening option for the sight impaired :)

  • Saki_Kawa says:

    Sorry but I can’t share your comment.. it’s full of illogical thinks.. and some sentences are quite a joke!

    The answer is: “hackaday.com” and many many others sites don’t use captcha, but different and more efficient ways!
    Captchas are poor, they are cracked with some line of script, so privacy and security are fake needs..
    IMHO!

    Btw it’s a free choose of webmasters, I’m here to explain my point of view and trying to defense my colorblind condition, hoping none will post creepy sentences like some above..

  • Leave a Reply

    XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

    Send us your hacks






         




    Hacks

    Resources