programming question - retrieve captcha from page via libcurl

duhduh

New member
Oct 8, 2009
1
0
0
I'm coding tools suite for myself and i got to 'fun' (not really) part - filling forms that have captcha.

I'm NOT asking how to break captcha, i know how (heh) but i don't have a clue how do i get/download captcha from website with form which i want to be automatically filled in (for example email account creation page, etc). I will probably code it in php or python (maybe php because i already used libcurl with it so i have some code ready to use). In php, I already know how to fill in forms that don't have captcha, so now, how do i retrieve captcha from form that has it, display it to user to enter it* and then add that captcha value to my code?

My problem is kinda algorithmic, I just can't imagine what i should tell my program to do. Because, if i'll just download captcha to directory on my hard drive and make curl use the same session via cookies my captcha will be already wrong because it will change to something else when i'll submit old, good one(?)... I was thinking about taking 'excerpt' (dumb name for it but i guess you get what i mean) of page but only piece that has captcha... but how do i add this captcha value to other form parts??

I'm totally lost. Any ideas for any language would help.

* i want to try manual entering them by myself first and then, when i learn basics try doing more fancy things
 


1. Delete any cookies your script may be using.
2. Scrape the register page and regex the url of captcha.
3. Download the captcha and save to hard drive.
4. Show captcha in browser and solve
5. Add solved captcha to your post string
6. Success

This was tricky for me the first time I done it too. Try finding a script that already has what you want and learn from that. pm me if you need more help