JellyFish666 Posted April 8, 2008 Share Posted April 8, 2008 I was looking around on the internet and found a source code to some php and seen a captcha so I am working on one for autoit, it is not finished yet but heres a start. here is our result once I finish it. expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> $oIE = _IECreateEmbedded () $Form1 = GUICreate("Are You a Human?", 500, 500) $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 500, 500) GUISetState(@SW_SHOW) _IENavigate ($oIE, "http://www.anythingweb.org/PHP/phpCaptcha/example1.php") While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndoÝ÷ Ù7¬´Z+«¢+رÐìýÁ¡À)ÍÍÍ¥½¹}ÍÑÉÐ ¤ì)¥¡¥ÍÍÐ ÀÌØí}A=MQlÌäíÍÕµ¥ÐÌäít¤¤ì(¥¡¥ÍÍÐ ÀÌØí}A=MQlÌäíÁÑ¡QáÐÌäít¤µÀìµÀì¥ÍÍÐ ÀÌØí}MMM%=9lÌäíÁÑ¡QáÐÌäít¤¤ì(¥¡µÔ ÀÌØí}A=MQlÌäíÁÑ¡QáÐÌäít¤ôôÀÌØí}MMM%=9lÌäíÁÑ¡QáÐÌäít¤ì(¡¼ÌäíQ¡ AQ !½¥Ì½ÉÉиe½Ô¸É¥ÉÐÑ¡ÕÍÈ¡ÉѼ¹ÜÁÌäìì(õ±Íì(¡¼ÌäíQ¡ AQ !½¥Ì¹½Ð½ÉÉиe½Ô¸É¥ÉÐÑ¡ÕÍÈ¡ÉѼ¹ÜÁÌäìì(ô(õ±Íì(¥ ÌÌí¥ÍÍÐ ÀÌØí}A=MQlÌäíÁÑ¡QáÐÌäít¤¤ì(¡¼ÌäíA±Í¹ÑÈÑ¡ÍÕÉ¥Ñä½ÌÌìÌäìì(ô(¥ ÌÌí¥ÍÍÐ ÀÌØí}MMM%=9lÌäíÁÑ¡QáÐÌäít¤¤ì(¡¼Ìäí9¼ AQ !ÝÌÙ¥±±Ìäìì(ô(ô)ô(üÐì(±Ðí½É´µÑ¡½ôÅÕ½ÐíA=MPÅÕ½ÐìÐì(±Ðí¥µÍÉôÅÕ½ÐíÁѡĹÁ¡ÀÅÕ½Ðì¼Ðì(±ÐíȼÐì)¹ÑÈÑ¡ ÁÑ¡QáÐÌÌì(±ÐíȼÐì(±Ðí¥¹ÁÕÐÑåÁôÅÕ½ÐíÑáÐÅÕ½Ðì¹µôÅÕ½ÐíÁÑ¡QáÐÅÕ½Ðì¼Ðì(±ÐíȼÐì(±Ðí¥¹ÁÕÐÑåÁôÅÕ½ÐíÍÕµ¥ÐÅÕ½Ðì¹µôÅÕ½ÐíÍÕµ¥ÐÅÕ½ÐìÙ±ÕôÅÕ½ÐíMÕµ¥ÐÅÕ½Ðì¼Ðì(±Ð콽ɴÐoÝ÷ Ø&©µÈZjëh×6<?php session_start(); $width = 160; $height = 80; $image = imagecreate($width, $height); $bgColor = imagecolorallocate($image, 0, 0, 0); $length = 7; $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $string = ''; for ($i = 0; $i < $length; $i++) { $pos = rand(0, strlen($chars)-1); $string .= $chars{$pos}; } $_SESSION['captchaText'] = md5($string); $gridColor = imagecolorallocate($image, 175, 0, 0); $lines = ceil($width / 20); for($i = 0; $i <$lines; $i++) { $x = ($i + 1) * 20; imageline($image, $x, 0, $x, $height, $gridColor); } $lines = ceil($height / 10); for($i = 0; $i < $lines; $i++) { $y = ($i + 1) * 10; imageline($image, 0, $y, $width, $y, $gridColor); } $randomNumber = rand(5,40); $lineColor = imagecolorallocate($image, 130, 0, 0); for($i = 0; $i < $randomNumber; $i++) { $randX = rand(0, $width - 1); $randX2 = rand(0, $width - 1); $randY = rand(0, $height - 1); $randY2 = rand(0, $height - 1); imageline($image, $randX, $randY, $randX2, $randY2, $lineColor); } // write the text $textColor = imagecolorallocate($image, 255, 0, 0); $randX = rand(0, $width - 50); $randY = rand(0, $height - 15); imagestring($image, 10, $randX, $randY, $string, $textColor); header ("Content-type: image/png"); imagepng($image); ?> and mine will not need php at all but its a base to work off of any idea's? Link to comment Share on other sites More sharing options...
BrettF Posted April 8, 2008 Share Posted April 8, 2008 (edited) Have a blank image, add the text to the blank image at runtime, and then store that text in a var. test if it works and walla you have captcha! Like so: expandcollapse popup#include <GuiConstantsEx.au3> #include <GDIPlus.au3> Opt('MustDeclareVars', 1) _Main() Func _Main() Local $hGUI, $hWnd, $hGraphic, $input, $button, $array, $msg, $text Local $array = StringSplit ("ABCDEFGHIJKLMNOPQRSTUVWXYZ", "") Local $string = "" For $i = 1 to 5 $string &= $array[Random (1, UBound ($array))] Next ; Create GUI $hGUI = GUICreate("GDI+", 400, 300) $hWnd = WinGetHandle("GDI+") GUISetState() ; Draw a string _GDIPlus_Startup () $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hWnd) _GDIPlus_GraphicsDrawString ($hGraphic, $string, 140, 110) $input = GUICtrlCreateInput ("", 190, 110, 50) $button = GUICtrlCreateButton ("Submit", 240, 140, 30) ; Loop until user exits While 1 $msg = GUIGetMsg () Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $button $text = GUICtrlRead ($input) If $text = $string Then MsgBox (0, "Captcha Example", "YAYZ! IT WORKED!") Else MsgBox (0, "Captcha Example", "MAYBE YOU NEED TO TEST IT MORE OR START AGAIN!") EndIf ExitLoop EndSelect WEnd ; Clean up resources _GDIPlus_GraphicsDispose ($hGraphic) _GDIPlus_Shutdown () EndFunc ;==>_Main EDIT: Updated the code... Also, I'll leave the painstakingly hard distortion up to you... Edited April 8, 2008 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
JellyFish666 Posted April 8, 2008 Author Share Posted April 8, 2008 (edited) Oh i see, so it creates a Captcha text/image?trying to and it will also read it as well, very busy but ill get it done unless someone does it before me lol.wow Bert I didn't know about the GDI functions that helps a lot thanks (back from downloading lol)hmm I came up with a cool captcha idea ill add as wellthe text in image will be two numbers and you will have to add them 0+5 enter captcha 5 Success! Edited April 8, 2008 by JellyFish666 Link to comment Share on other sites More sharing options...
cyberdude Posted April 22, 2008 Share Posted April 22, 2008 (edited) Here is another Captcha system that I like.https://www.passpack.com/beta/?showSignup=1The Passpack team shows 8 squares. The person must select the black colored square to get started.I think it is simple and effective. You can randomize the position of the colored square, you can randomize the color. Edited April 22, 2008 by cyberdude Link to comment Share on other sites More sharing options...
JellyFish666 Posted April 22, 2008 Author Share Posted April 22, 2008 Here is another Captcha system that I like.https://www.passpack.com/beta/?showSignup=1The Passpack team shows 8 squares. The person must select the black colored square to get started.I think it is simple and effective. You can randomize the position of the colored square, you can randomize the color.cool but that one is easy to bypass just look for the block square but if it changed colors and did a few other things it would work well, I almost forgot about this post I been really busy Link to comment Share on other sites More sharing options...
trinitrotoluen Posted March 27, 2009 Share Posted March 27, 2009 Are there any code can read captcha ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now