Code Monkey home page Code Monkey logo

12306_captcha's Introduction

根据网上流传的方法尝试破解12306的验证码

文字和图片的组合验证

环境

urllib2.Request(url + str(len("图片")), "图片", {'Content-Type':'image/png', 'User-Agent':UA})

百度识别12306,屏蔽了小尺寸的图片识别(100px以下的)使用ImageMagick放大尺寸。 切图和放大图片,需要安装一下ImageMagick,确保能在命令行打出convert命令。

//放大图片尺寸 
def resizeImg() 
{ 
	arrargs = ["-resize", "440", "./test.jpg", "./new_test.jpg"]; 
	command = "convert"+ arrargs[0] + arrargs[1]+arrargs[2]+arrargs[3] os.system(command) 
}

深度学习

  • 学习深度学习后,使用基于thneano的keras可以构建卷积神经网络进行识别,用爬虫从sina和百度上做好样本后,编码实现网络,得到合适的训练的模型,效果还不错,调整参数和加大样本后,正确率估计达到0.92以上。
  • 样本分为文本和图片

12306_captcha's People

Contributors

jinhang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.