關(guān)于php驗證碼的破解。解決方案
Jun 13, 2016 am 10:09 AM
關(guān)于php驗證碼的破解。
網(wǎng)站防爆最好是加驗證碼了。
市場上的驗證碼一般有幾花樣,
英文+數(shù)字、中文與JS的,
還有很少見的中國移動識圖驗證碼。
這種看似很威武,實際上感覺也不太好,答案就固定有8個了。
做數(shù)字是否存在判斷后,答案就能鎖定4個了。靠蒙的話,蒙對的機率還是挺大的。
最后是加些干擾點、干擾線。再扭曲字體等。
php通常是用GD庫生成圖片+SESSION來實現(xiàn)認證,
當突破驗證碼這關(guān)之后,可以模擬請求獲sessionID,
用獲得sessionID取得驗證碼分析之后再模擬注冊登錄驗證。
驗證碼被破后基本是暢通無阻了。然后就爆力效驗賬號密碼,濫發(fā)信息之類云云了……
在明白過程后就好防備了,所以說涉及到幾個問題。
一、要加強驗證碼難度,一些位置固定字符形態(tài)不變的是很容易識別的了。
二、要SESSION做適當配置。SESSION效驗后及時清掉,禁止URL傳值設(shè)置等...
三、適當做些時間與次數(shù)限制。
下面是百度的驗證碼BZ6E,應(yīng)該有來路判斷的提交幾次就掛了,偽一下才行。
有些難度,每個字符都連接一起加干擾線加少許扭曲,跟淘寶的差不多,不過淘寶沒干擾線。
大家討論下看看怎么破,應(yīng)該還是有人破的了。貼吧上還是經(jīng)常有人爆吧的?!?br>
好了,先扯這么多。
- PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$image_name = 'baidu.jpg';$image = "http://tieba.baidu.com/cgi-bin/genimg?0013286908280168B65F46CEDCD48CF9D46DF47A64587DA42FC48BF1CF8D47BD0D0BC2EE39911C9918D5CF46E79CF94FFA71BC0DC14DAE59197F42F24B4455C205062670A2977101F1A661F7F4716A8BC2C21D586F886CA300E0D42874D6365A1216622D9740163479D1DD416DAE5D70C09EA834F6B9EC307A29CDAF8D0C78FE159402800B113F6039195E5D683695532E4E2FFD8563D732AD19EDFB147B7569B617BDFBE487CE77AE49E75D83BA56B7038971E2081F647A&t=0.7108543934300542"; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $image); curl_setopt($curl, CURLOPT_REFERER, 'http://tieba.baidu.com/f?kw=baidu'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); curl_close($curl); file_put_contents($image_name, $result);$size = getimagesize($image_name);$im = imagecreatefromjpeg($image_name);imagejpeg($im, 'baidu.jpg',100);$width = $size[0];$height = $size[1];for($x = 1; $x $val){ foreach ($val as $k=>$v) $col[$key] .= $v $val) if(array_sum($val) $val){ $val = trim($val); if(empty($val)) unset($col[$key]);}echo '<pre class="brush:php;toolbar:false">';print_r($col);
------解決方案--------------------
好帖.不過看過那個中極驗證破解的文章,不太理解哦...
------解決方案--------------------
啥意思 討論如何破解百度的驗證碼?很久以前,我記得那個時候百度的驗證碼是可以根據(jù)某個特征逆出來的,后來給修復了。
你說經(jīng)常有人爆吧,那是因為人肉ddos.當我發(fā)動1000個人一起攻擊的時候,如果程序和硬件跟不上是完全無法阻擋的,所以單單從程序上來說繞過驗證碼我覺得可能性不大。別小看了百度的程序員。至于識別出驗證碼,那是老生常談的問題了,識別關(guān)鍵是識別率,類似像淘寶這樣的 當你的驗證多少次輸入失敗后就直接封你ip多長時間,你的識別率要是不高的話,那就是浮云啊.
------解決方案--------------------
二值化不好,通常在處理過程就會丟失一些精度,要求驗證碼變化比較簡單的,還需用數(shù)據(jù)庫去比對能搞出來
非OCR的方法,我覺得用數(shù)據(jù)模擬覆蓋,達XX%以上就認為找出一個字,這么來可能更好一些。直接無視干擾
個人用這種方法,試過開源的部分程序,效果還可以,比率30%——90%以上都有
當然,開源的程序,用的字體、變形方式都是清楚的,,,非開源的只能靠自己發(fā)現(xiàn)啦,hoho~~~~~
------解決方案--------------------
圖像識別(OCR)是廣泛的技術(shù),算法巨多
目前OCR技術(shù)可謂爐火純青了
不過若用于識別驗證碼,未免也太不道德了
和諧社會是需要大家來創(chuàng)建的
------解決方案--------------------
高手都來了所
------解決方案--------------------
被爆過的路過
菜鳥的我還沒找到一個終極的解決辦法,想想還是用時間限制+ip&&次數(shù)來做點抵擋了
------解決方案--------------------
我一般用粘合 的方式 +字符變形 底紋細小的字母(就是增加噪點)
一般不被爆!~
------解決方案--------------------
坦白的說,干這個基本是浪費時間.....
我現(xiàn)在一般都推薦用recaptcha,實際上很多大網(wǎng)站都在用,破破看?
還有,現(xiàn)在的另一個趨勢是干脆不用驗證,而是通過統(tǒng)計方法來識別垃圾,
比如
http://disqus.com/welcome/

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Both curl and Pythonrequests are powerful tools for sending HTTP requests. While curl is a command-line tool that allows you to send requests directly from the terminal, Python's requests library provides a more programmatic way to send requests from Python code. The basic syntax for converting curl to Pythonrequestscurl command is as follows: curl[OPTIONS]URL When converting curl command to Python request, we need to convert the options and URL into Python code. Here is an example curlPOST command: curl-XPOST https://example.com/api

To update the curl version under Linux, you can follow the steps below: Check the current curl version: First, you need to determine the curl version installed in the current system. Open a terminal and execute the following command: curl --version This command will display the current curl version information. Confirm available curl version: Before updating curl, you need to confirm the latest version available. You can visit curl's official website (curl.haxx.se) or related software sources to find the latest version of curl. Download the curl source code: Using curl or a browser, download the source code file for the curl version of your choice (usually .tar.gz or .tar.bz2

PHP8.1 released: Introducing curl for concurrent processing of multiple requests. Recently, PHP officially released the latest version of PHP8.1, which introduced an important feature: curl for concurrent processing of multiple requests. This new feature provides developers with a more efficient and flexible way to handle multiple HTTP requests, greatly improving performance and user experience. In previous versions, handling multiple requests often required creating multiple curl resources and using loops to send and receive data respectively. Although this method can achieve the purpose

From start to finish: How to use php extension cURL for HTTP requests Introduction: In web development, it is often necessary to communicate with third-party APIs or other remote servers. Using cURL to make HTTP requests is a common and powerful way. This article will introduce how to use PHP to extend cURL to perform HTTP requests, and provide some practical code examples. 1. Preparation First, make sure that php has the cURL extension installed. You can execute php-m|grepcurl on the command line to check

How to handle 301 redirection of web pages in PHPCurl? When using PHPCurl to send network requests, you will often encounter a 301 status code returned by the web page, indicating that the page has been permanently redirected. In order to handle this situation correctly, we need to add some specific options and processing logic to the Curl request. The following will introduce in detail how to handle 301 redirection of web pages in PHPCurl, and provide specific code examples. 301 redirect processing principle 301 redirect means that the server returns a 30

In Linux, curl is a very practical tool for transferring data to and from the server. It is a file transfer tool that uses URL rules to work under the command line; it supports file upload and download, and is a comprehensive transfer tool. . Curl provides a lot of very useful functions, including proxy access, user authentication, ftp upload and download, HTTP POST, SSL connection, cookie support, breakpoint resume and so on.

How to set cookies in php curl: 1. Create a PHP sample file; 2. Set cURL transmission options through the "curl_setopt" function; 3. Pass the cookie in CURL.

This article will introduce seven ways to get high-quality output using the free BingImageCreator. BingImageCreator (now known as ImageCreator for Microsoft Designer) is one of the great online artificial intelligence art generators. It generates highly realistic visual effects based on user prompts. The more specific, clear, and creative your prompts are, the better the results will be. BingImageCreator has made significant progress in creating high-quality images. It now uses Dall-E3 training mode, showing a higher level of detail and realism. However, its ability to consistently produce HD results depends on several factors, including fast
