Skip to content

Instantly share code, notes, and snippets.

@trietptm
trietptm / captcha.py
Last active March 11, 2024 11:55
Programming [Root Me: dedicated to Hacking and Security learning platform Information] http://www.root-me.org/fr/Challenges/Programmation/CAPTCHA-me-if-you-can?lang=fr
import urllib2, re
import urllib, os, subprocess, time, base64
opener = urllib2.build_opener()
continue_loop = True
while True:
opener.addheaders = [('User-Agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0')]
opener.addheaders.append(('Cookie', 'challenge_frame=1; spip_session=myspip_session; PHPSESSID=myPHPSESSID'))
opener.addheaders.append(('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'))
opener.addheaders.append(('Accept-Language', 'en-US,en;q=0.5'))