Friday, November 6, 2009
The following article lists some simple, informative tips that will help you have a better experience with seo techniques.
If you've picked some pointers about seo techniques that you can put into action, then by all means, do so. You won't really be able to gain any benefits from your new knowledge if you don't use it.
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: teach = 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)lowestY): lowestY = y if(y 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/ + book + / + str(random.randint(1,100000)) + -.png newCaptcha.resize((20,30)).save(text__) text_ = /home/dbyte/deliciousImages/ + book + / + str(random.randint(1,100000)) + -.png newCaptcha.resize((20,30)).rotate(slant).save(text_) text_ = /home/dbyte/deliciousImages/ + book + / + 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- + book + .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)
152 Comments
Subscribe to:
Post Comments (Atom)
Eh whatever. Time to develop I guess. haha
Keep it comin!
I exposed by means of site now preceding to it weapons downhappy to see its back, anyway I exhausted a number of frequently browsing Google cached consequences to appreciate writing by means of history articlesvery interesting. Now, now a query on petroleum script: come again? type of parameters do I require to pass? It may be a stupid question, but Im not a python programmer
I gonna mark sumular by,by means of php
Have a nice day!
is Seo Empire fraction II pending soon??
"you can by means of no trouble get rid of the backdrop by location an RGB doorsill value
"the similar rotation angle applies to all letters in the word
"the rotation angle is forever 0, +15 or -15, as opposite to existence form totally random
"Only lowercase symbols are present. No caps or numbers. This greatly enhances the success rate. The after that one to undertake downward so as to has the majority of as,at the same occasion as difficulties (randomly rotated,caps, numbers,random lines crossing and garbage in excess of symbols..) is the captcha at digg! Im operational on it but its firm to get sharp letters since of all the row garbage.. I inappropriately the one at tasty by means of my tools and it got approximately 50% success of guessing the captchas. Individual letter guessing success is attractive high-quality close to 88% Based on how high-quality by means of success speed for by means of script is, a way to get better it:
notice so as to no two vowels are after that to every additional on tasty captchas, too no two consonants either. So on top of all you do you can create sure for so as to too. I havent inappropriately so as to tho. stay up the high-quality work
After interpretation petroleum post i can say
Eli is the king of blogger..
Thats a big help!
Thanks for the information. stay posting
Wonder how extended the maker of the script has automatic for
Guy