Check Mates22 Mar 2008 10:54 pm
Here ya go. This is the del.icio.us captcha busted in Python.
#!/usr/bin/python
import Image,time,random,glob,re,os,sys
##$$$$
train = raw_input("train? (y/n)")
if(train == "y") : train= True
else: train = False
##
fileName = ''.join(sys.argv[1:])
def getNeighbourhood(i,width,height,pixels):
results = []
try:
if(pixels[i+1] != 0): results.append(i+1)
if(pixels[i-1] != 0): results.append(i-1)
if(pixels[i-width] != 0): results.append(i-width)
if(pixels[i+width] != 0): results.append(i+width)
if(pixels[i-width+1] != 0): results.append(i-width+1)
if(pixels[i+width+1] != 0): results.append(i+width+1)
if(pixels[i-width-1] != 0): results.append(i-width-1)
if(pixels[i+width-1] != 0): results.append(i+width-1)
except:pass
return results
now = time.time()
captcha = Image.open(fileName)
(width,height) = captcha.size
pixels = list(captcha.getdata())
i=0
for pixel in pixels:
if (pixel == 2): pixels[i] = 0
i+=1
toclean = []
for i in xrange(len(pixels)):
neighbourhood = getNeighbourhood(i,width,height,pixels)
if (len(neighbourhood) < 4) : pixels[i] = 0
captcha.putdata(pixels)
started=False
lowestY,highestY,count = 0,10000,0
captchas = []
slant = 15
for x in xrange(width):
hasBlack = False
for y in xrange(height):
thisPixel = captcha.getpixel((x,y))
if(thisPixel != 0):
if(started == False):
started=True
firstX = x
firstY = y
else:
lastX = x
if(y > lowestY): lowestY = y
if(y< highestY): highestY = y
hasBlack = True
if((hasBlack == False) and (started==True)):
if((lowestY - highestY) > 4):
croppingBox = (firstX,highestY,lastX,lowestY)
newCaptcha = captcha.crop(croppingBox)
if(train):
text = raw_input(”char:n”)
try: os.mkdir(”/home/dbyte/deliciousImages/” + text)
except:pass
text__ = “/home/dbyte/deliciousImages/” + text + “/” + str(random.randint(1,100000)) + “-.png”
newCaptcha.resize((20,30)).save(text__)
text_ = “/home/dbyte/deliciousImages/” + text + “/” + str(random.randint(1,100000)) + “-.png”
newCaptcha.resize((20,30)).rotate(slant).save(text_)
text_ = “/home/dbyte/deliciousImages/” + text + “/” + str(random.randint(1,100000)) + “-.png”
newCaptcha.resize((20,30)).rotate(360 - slant).save(text_)
captchas.append(Image.open(text__))
else:
#text = str(count)
#text = “tmp-delicious-” + text + “.png”
#newCaptcha.save(text)
captchas.append(newCaptcha.resize((20,30)))
started=False
lowestY,highestY = 0,10000
count +=1
if(train == False):
imageFolders = os.listdir(”/home/dbyte/deliciousImages/”)
images =[]
for imageFolder in imageFolders:
imageFiles = glob.glob(”/home/dbyte/deliciousImages/” + imageFolder + “/*.png”)
for imageFile in imageFiles:
pixels = list(Image.open(imageFile).getdata())
for i in xrange(len(pixels)):
if pixels[i] != 0: pixels[i] = 1
images.append((pixels,imageFolder))
crackedString = “”
for captcha in captchas:
bestSum,bestChar = 0,”"
captchaPixels = list(captcha.getdata())
for i in xrange(len(captchaPixels)):
if captchaPixels[i] != 0: captchaPixels[i] = 1
for imageAll in images:
thisSum = 0
pixels = imageAll[0]
for i in xrange(len(captchaPixels)):
try:
if(captchaPixels[i] == pixels[i]): thisSum+=1
except: pass
if(thisSum > bestSum):
bestSum = thisSum
bestChar = imageAll[1]
crackedString += bestChar
print crackedString
#print “time taken: ” + str(time.time() - now)
You are really in war against that dude…
I might be.
LOL
nice but was not a strong captcha
It was hard to crack, i Think
This is a really stupid question but what language does the script need to be in?
trrrr
hahah this keeps getting better and better. Get em eli. lol
nice man…those retards can’t evolve so they have to keep bitchin’
this is your code? it’s very neat, i might add.
LOL
I’m glad your site is back anyway
God damn it Eli… I actually use this one on my own already! argghhh.
Eh whatever. Time to evolve I guess. haha
what a lovely piece of code, great share Eli!
Great Eli, thanks
Keep it comin’!
Hi Eli!
I discovered your site just before it goes down…happy to see it’s back, anyway I spent some hours browsing Google cached results to read your past articles…very interesting.
Now, just a question on this script: what kind of parameters do I need to pass? It may be a stupid question, but I’m not a python programmer…
I think this is a little out of my league, but I think the idea is cool.
thanks . ssuper
Some comments in the code would be nice. A short introduction what the algorithm behind this is, would be perfect
After a short glance I guess the solution is, that the letters are always the same (pixelwise), so you are searching for letters from the left to the right buy comparing pixels?
cool….
but pythone is out of my list… anyways I am eagerly waitin for something, from u r box, which i can utilize on full fledged basis…
This is awesome - but unfortunately well out of my league at the moment - just a matter of time me hopes though! Once again Eli you have pulled some great stuff out of the bag
The answer is Michael Jordan. “By acclamation, Michael Jordan is the greatest basketball player of all time.”
been waiting for this for ages. captcha is getting a joke these days. last week i have to type a 15 alpha numeric code just to submit something. i am glad this is now busted open
Thanks for the usefull information!
I gonna write sumular using php
Awesome post ! I wish I had some programming skills.
Damn crazy
Hope this will not end delicious life:)
Nice to see some new posts recently. Saw all of the drama on wf. To bad it took someone going after you server, though.
Anyway, hope to see more, and the seo empire pt. 2 post soon, too.
lol - please learn to code.
that code reads like some shit a 12 year old fat kid hacked into his xbox controller.
aka you
lol thats great…
phyton is beyond me i’m afraid. even though this is a great achievement. can someone explain what evil things they would do with this?
WOW I lost my bookmarks not to long ago and Im glad i found this site again! i’m never going to lose it this time..LOl Best SEO site hands down!
Thanks for sharing. Comes in handy
Thanks for the usefull information.
Have a nice day!
Great post Eli, as always! No one should mess with us )))).
Just when I thought the site was down and gone forever, I happen to land here and see that it’s back. I don’t know much about what you just posted, but I’m glad to see something here
Thanks for sharing this code. I will use it, for sure!
Seeing this in PHP would be nice.
::emp::
Good code! Thank you.
release more captchas!!
seconded.. i don’t know sh*t about python lol
couldnt help it. Had to start one.
Wow, how can this be ?
If Delicious offered you money to devise a captcha that wasn’t crackable, would you do it..and for how much?
Nice article!!!
Hilarious! At least you’re making as many friends as enemies along the way. I’d second Gadgets4nowt’s questions about creating a captcha.
Well it might bring more secure captcha…
LOL! I read a little bit into the controversy that cracking captchas has caused. Some of those forum posts are pretty amusing, I like the fact that you redirected to the whitehouse.gov site to get even!
Thanks a lot for this - and good to see you back posting!
Hey…
is Seo Empire part II coming soon??
Haha, thanks!
That is so sneaky mr Blue Hat
Nice news. Thanks you!
Thanks for sharing this code. Of course, it’s good thing
Cool, thanks for sharing the code.
hahah awesome sweet thanks man appreciate it
Sweet Eli keep it up. For the win.
That’s awesome man, keep up the good work. Going to try and dissect the code and see what I can learn.
How long did it take you?
How can you beat it? It’s great! You are master!
Why you want to beat the captcha of Del.icio.us? What use does it have to crack the captcha
For the people who make automated bots to join and submit links.
Of course…
I wonder if anybody could translate this into VB or C ?
You are very clever!
=)!Thank’s great code ! I will use it ! Continue in same direction! +1 for the post !
Nice! Now i just need to convert it to PHP
I will try to use this code on my blog. Thanks to the author!
Really nice but what about PHP?
I can’t understand why delicious haven’t done anything about this already.
now the spamwave goes on…
Still not sure why this would be helpful. Can anyone explain, please
This is a very nice post, thanks for posting about it!
Well, I guess old good days of captcha in the past now.
Kick as* blog, great stuff. I found another one recently that you all might enjoy (no affiliation). blackhatworld.com
Wow, just found your blog and bookmarked it as there’s so much to read.Keep up the great work
Thank you, i use this code in future.
This one at delicious isnt so bad to crack because:
–the letters are sharp without any garbage over them
–you can easily get rid of the background by setting an RGB threshold value
–the same rotation angle applies to all letters in the word
–the rotation angle is always 0, +15 or -15, as opposed to being completely random
–Only lowercase symbols are present. No caps or numbers. This greatly enhances the success rate.
The next one to tackle down that has most of these difficulties (randomly rotated,caps, numbers,random lines crossing and garbage over symbols..) is the captcha at digg! I’m working on it but it’s hard to obtain sharp letters because of all the line garbage.. I tried the one at delicious with my tools and it got around 50% success of guessing the captchas. Individual letter guessing success is pretty good near 88%
Based on how good your success rate for your script is, a way to improve it:
notice that no two vowels are next to each other on delicious captchas, also no two consonants either. So on top of everything you do you can check for that too. I haven’t tried that tho. keep up the good work
LoL, Now i just need to convert it to PHP
glad your site is back! I know that I can really this.
Great post. Thank you so much and keep it up!
After reading this post i can say…
Eli is the king of blogger..
Very impressive!
You are very clever!
Marvellous work. I always thought this would require some very intense analysis of the graph, but it looks like a miracle with a few lines of code.
Thanks for the info.
Thanks for sharing:)
This is really impressive!
Very Clever. thanks for this.
It’s four months since this post was written, has the captcha been updated in the meantime?
Thank you so much for a very useful information.
Great Nice post
Thanks a lot for posting the code! I learn a lot better when I can look at code like that and figure it out so I can understand whats going on.
Thats a big help!
Great job. Keep them flowing
Thanks for the useful info!
Gracias por el artículo.
Great post. keep up the goodwork.
Thank You! Works great!
I’m gonna try porting this to Perl..
Hey Man,
Thanks for the information. keep posting…
Does this still work? or did they update their stuff
ReCaptcha forever.
Hell yeah!
cool where did u get this
I really need to learn some programming…I don’t know how to use that…I am going to run and hope to find someone who can translate that for me….
I may be dense or something but can one just not sign up for delicious and use it the regular way. I am sure that works fine
I mean what is the application of this method, the benefits
Someone please answer?
And how can I use it to promote my site?
great tactics and Black hat methods : )
Thanks for the nice article.
Is this not a shade black?
Wow, This is definatly above my level of scripting but im glad ive found it, credit to the author and creator of this site, Bookmarked!
Wonder how long the creator of the script has programmed for
Why want to beat the captcha of Del.icio.us? What use does it have to crack the captcha
Why want to beat the captcha of Del.icio.us?
@MSN hacken
Because he can, that’s why!
Maybe you can’t put it on your resume, but it’s quite an impressive and handy feat.
Excellent! Thanks!!
Maybe you can’t put it on your resume, but it’s quite an impressive and handy feat.
This has to be one of the most useful piece of information
I wonder how many other sites are using this same Captcha. You may have screwed over a lot of people…
Nice content. Very simple to understand, i love it!!
keep up this focking good work
lovely piece of code, great share Eli!
another week captcha makes it asy to crack
Complex code.. Hard to understand… Mind-boggling
Its great,
but how this is useful to seo guys??
Well I guess this can be used for auto submissions to the site.
You’re an evil dude Eli, I must say that. Crackin’ captchas is RAW, but they must’ve changed their system by now!!
May captchas are dead not just this one.
It’s about time. The security had been flawed for a while.
It’s amazing to find that happening.
It’s about time someone did that.
That code confuses the crap out of me. Can someone explain?
Thats some sneaky stuff right there…how did you come about making it doe?
This is really impressive!
Thanks for this post.
best regards
Nice hack. But it is not work anymore, because this code is changes by Delicious.com at the moment. It’s outdated, but anyway it’s was very funny in the time when it worked!
nice, very cool script
People crack captchas and then complain when the stuff like the rapidshare captcha comes out.
I don’t think I’ll use it but it’s nice to know.
I discovered your site just before it goes down…happy to see it’s back, anyway I spent some hours browsing Google cached results to read your past articles…very interesting.
crackers are always ahed
Thats useful info.
You never cease to amaze me.
Guy
Thank you for the article! This is awesome - but unfortunately well out of my league at the moment - just a matter of time me hopes though! Once again Eli you have pulled some great stuff out of the bag
I’m impressed by your ability to reverse engineer this code, however I’m not sure what I’d be doing with it ^_^
Thanks for the great posts and tips - pretty intense stuff and I appreciate you disclosing all this information. Very helpful!
Not sure how you figure things out, but I have to say I’m impressed - thanks for the post.
I’ve been trying to crack this stuff for some of my own site exposure and I have to say this is wonderful. Thanks for sharing this information!
Nice post! Crazy that you found a way to do this…thanks for sharing.
This is quite and amazing feat. I mean the hackers.
Eli you are a genius
That’s amazing, and to think it all starts in learning simple coding languages LOL amazing Eli.
Allthough I can’t write a bit python, it’s good to know, that captchas can be broken, because personally I hate them!
thanks 4 this very usefull info. by
Thanks for the nice article.
thanks for this article learning new stuff every day
I’m working on it but it’s hard to obtain sharp letters because of all the line garbage.. I tried the one at delicious with my tools and it got around 50% success of guessing the captchas. Individual letter guessing success is pretty good near 88%
very nice code there, keep it up
I have been reading this blog for manydays which is full of exicting and knowledgable for the users.
The info you presented is overwhelming for its readers.
Very nice post man! keep posting ………. Thanks
I can’t believe this has been done - there are some real dedicated and highly able hackers out there - they could earn a fortune working for a corporation, assuming they are old enough.
Not sure how you figure things out, but I have to say I’m impressed - thanks for the post.
Not sure how you figure things out, but I have to say I’m impressed - thanks for the post.
It is like a pain in the dark side all those capchas. I think that 80 of captchas art broken already
I just need to compile this in python and it works right out of the box or do you need to code something else to create accounts or submit links?
Anyway, thanks for the share.
The code to do this is so simple an effective, nice work my friend. Much appreciated.
What about recaptcha ? This is the leading and most difficult type of captchas at the moment.
Thanks for the useful information.
Have a nice day!
Dang, that little piece of code can actually break a captcha??? Wow! I wish I knew more about programming.
Wow, This is definatly above my level of scripting but im glad ive found it, credit to the author and creator of this site, Bookmarked!
Wonder how long the creator of the script has programmed for
So the Del.icio.us Captcha is already Cracked. That’s bad, the hacker is going wild.
Banner Ads | Banner Advertising
thanks for sharing this information! it’s very useful for a lot people try to understand how we can use this product.
cool tips, totally original. I never thought of that.
This looks like a complicated script and I’ve never used Python but I think I’m going to have to learn it so I can put this to work. Thanks!
Great you are genius.
Thanks for great tutorial
This is a very complicated program to use. I tried it last week and was not successful in using and learning it.
Hope they release a better one soon.
Thanks this is a great tutorial for this program Python. I definitely needed this.
Its amazing that little piece of code can actually break a captcha. Wow! I wish I knew more about programming.
Excellent bit of code.
I do agree with you on this article, although I read from another blog something different from what you are saying.
Anyway thank you for your review.
All the best!
cool …. thanx ^^
I really need to learn some programming…I don’t know how to use that…I am going to run and hope to find someone who can translate that for me….
This information is simply.. delicious, great info, definately have to try it out some time, although i am a bit of a noob what it comes to programming!
THanks
Harry
I am obliged with you.Thanks. Have a nice day ahead.
I am very very obliged to you as you have mentioned good information. Thanks
Cool, thanks for sharing the code.
http://maxalas.blogspot.com νεα βιντεο φωτογραφιες
Intersting piece of code, thanks fopr sharing!
That what I was looking for. parardefumar
Nice code! I really need to learn some programming…
m thinking the same, tho i am in seo field with website marketing and all, learning a little programming wont do me a hard, so definitely giving it a try
Nice crack!
Thanks for great tutorial
Great post ! Your programming skills are awesome.
Great stuff! You never cease to amaze me. Wonderful skills you have.
I found this is an informative and interesting post so i think so it is very useful and knowledgeable. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing ability has inspired me. Really the article is spreading its wings rapidly…
Thanks for great tutorial
Very useful hacks, thanks a lot, I already implemented the
Very clever article. Thought evoking to say the least. Thanks for the post.
it was matter of time. obvious…
Great stuff! You never cease to amaze me. Wonderful skills you have.
That’s cool, the captcha is good, but nice to get around if needed.
Golden Triangle Tour Covering Delhi, Agra and Jaipur. Golden Triangle Tour is the most popular tourist circuit in India. This incredible Golden Triangle Tour Itinerary comprising the three famous cities of India-Delhi, Agra and Jaipur having grandeur, glory & history.
giving a try!
you can say that Very clever article. Thought evoking to say the least. Thanks for the post.
Northwest Indians told early explorers about the fiery Mount St. Helens. In fact, an Indian name for the mountain, Louwala-Clough, means “smoking mountain”. According to one legend, the mountain was once a beautiful maiden, “Loowit”. When two sons of the Great Spirit “Sahale” fell in love with her, she could not choose between them. The two braves, Wyeast and Klickitat fought over her, burying villages and forests in the process. Sahale was furious. He smote the three lovers and erected a mighty mountain peak where each fell. Because Loowit was beautiful, her mountain (Mount St. Helens) was a beautiful, symmetrical cone of dazzling white. Wyeast (Mount Hood) lifts his head in pride, but Klickitat (Mount Adams) wept to see the beautiful maiden wrapped in snow, so he bends his head as he gazes on St. Helens.
WTH is this? how is this anyway related to the topic? O.o
That’s cool, the captcha is good, but nice to get around if needed.
I just added this weblog to my feed reader, great stuff. Can’t get enough!
No doubt this is a useful hacks,thanks for providing with us.
and i used to think hacking captcha’s aint possible xD
I would like to say the captcha is good, but nice to get around if needed,and i really enjoy reading most part of the article.
my comments not appearing
It is appearing nw lol
You’re really shared to us a very helpful updates about SEO world. I will keep visiting to this site for latest updates.
Thank you…
I always prefer to SEO world.
And the concept of CAPTCHA was first described in 1998 in a patent application invented by Eran Reshef, Gili Raanan and Eilon Solan.
I appreciate your hard work and this very informative post.
I do agree with all of the ideas you have presented in your post. They’re really convincing and will definitely work. Still, the posts are too short for newbies. Could you please extend them a bit from next time? Thanks for the post.
If your working is right then this could be a new invention. I am agree with your working and so far convinced with the idea. Let’s see how its work.
I always browse this site. The fact is I have learned more about SEO.
Great post. I love coming to this site often.
I do agree with all of the ideas you have presented in your post. They’re really convincing and will definitely work. Still, the posts are too short for newbies. Could you please extend them a bit from next time? Thanks for the post.
Actually, I’ve been using this tool of one of my blogs. I don’t think so that that there are some errors with it.
You have done a great job by sharing this informative post. I would like to appreciate your good work and also would like to encourage you to keep it up.
It is a very informative and useful post thanks it is good material to read this post increases my knowledge
Good site. I’ve learned alot and will tell my friends.
And the concept of CAPTCHA was first described in 1998 in a patent application invented by Eran Reshef, Gili Raanan and Eilon Solan.
thats perfect looool
thanks man
Still, the posts are too short for newbies.
This is definatly above my level of scripting but im glad ive found it, credit to the author and creator of this site, Bookmarked!
waow. So how are we gonna feel us safe?
this is peeeerfect ! but our websites are in dangeour u know…
This is really impressive!
what a lovely piece of code, great share Eli!
so impressivE !
Das Orchester und der Chor verheiligten die Feier des Heiligen Abendmahls.
very interesting working and effort
thx for admin
very interesting thank you…
Thats amazing
Do follow list PR 7 Blogs SEO
concept of CAPTCHA was first described in 1998 in a patent application invented by Eran Reshef, Gili Raanan and Eilon Solan
ty fpr uys
okkkkkkkkkkkkkkkkkkkkkkkkkkkk
awesome eli lol maybe i should give it a try as well xD
Eli, No idea if this method still works, but I shall certainly implement it on my sites! Regards!
This is especially important when doing business on the internet. Reap the rewards of knowledge all of you!
After 3 hours trying, thinking and trying again, i understand how it works. Yeah! Great script, especially the way to get the best character after rotating them. To use the maximum of unclipped pixels as criteria is really tricky. Finally it has to be combined it with ocr.
Nice trick. It’s a good post and a great game plan. Well Done!
OKKKKKKKKKKKKKKKKKKKKKKKKK
YEEEEEESSSSSSSSSSSSSSSS
Nice trick. It’s a good post and a great game plan. Well Done!
nice guyz
ur mind works so fast and soooo intelligent
i lyk this blog its informative and ppl help each other. this is cooooolll acutly
realy impressed
Something say to me that I think this is a little out of my league, but I think the idea is cool.
Okay just finally got around to trying this
but most of the social bookmarking sites are using captcha to confirm the user as not a spammer
It’s amazing to find that happening.
Nice trick. It’s a good post and a great game plan. Well Done!
Way no, think this is a little out of my league, but I think the idea is cool.
This is really impressive!Thanks for sharing this.Selidbe
this is interesting. thanks for sharing!
Intersting piece of code, thanks fopr sharing!
genius!!! u r really genius!!! i don’t think anyone else can do that.
LOL this is very cool piece of code Eli.
thanks for sharing this code Eli!
Very useful yet hard to implement
great post .. very interesting
Thanks for sharing this. Hugs !
fjhhf jgfd dj fhdjhd
rhb hhfd jhdhfjd j
fhfh fjhf jdjf
Something say to me that I think this is a little out of my league, but I think the idea is cool.
but most of the social bookmarking sites are using captcha to confirm the user as not a spammer
Wow, I know this is old but it’s still interesting to see how it can be done.
I am very fond of swimming but i am unable to swim. Please give me suggestions to improve my swim capabilities. Thanks in advance.
I mean what is the application of this method, the benefits
nice poost
nice…… its useful for me
thanks man
very nice woork
awesome captcha crack
Nice Post. This post explains me very well.
thaaaaaaaaaaanks
thaaaaaaaaaaanks
This is the del.icio.us captcha busted in Python.
fantastic post contains various information and very interesting facts which make me to learn more on this topic.
I think this is one of the most interesting articles I’ve read on this subject.
It is my opinion it is a modest due to this nfl, however assume the reasoning is undoubtedly great
I love source code But now I have to read it again to understand all the details!
Keep updating the blog, looking forward for more contents…Great job, keep it up..
I have just starting focusing on SEO and I am intrigued in new techniques which can gain my clients better links. thanks
I am very happy with your post.Very good information are given right in this post.Waiting for your next upcoming post.
What a wonderful post. It is very informative.It is fun to view things from competitive viewpoint.
Many thanks for this brilliant post! Many points have extremely useful. Hopefully you’ll continue sharing your knowledge around.
Miami SEO really good code example here.
What fantastic wallpapers. Really couldn’t ask for anything more lovely.
I am wondering how I can be notified whenever a new post has been made