-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1a63452
Showing
5 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
decaptcha_creds | ||
selenium* | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
REAC - reddit account creator | ||
============================= | ||
|
||
A little python script for mass reddit account creation. Fucking hipsters! | ||
|
||
deps: | ||
- curl | ||
- selenium standalone server + selenium webdriver | ||
- a de-captcher.com account | ||
|
||
INSTALLATION | ||
------------ | ||
1. get curl | ||
2. get selenium (seleniumhq.org) | ||
3. get your de-captcher.com credentials and create a file named | ||
"decaptcha_creds" with your login:password. | ||
|
||
USAGE | ||
----- | ||
1) run ./captcha.py to check if your re-captcha.com credentials are right | ||
2) edit reac.py: change 'username' and 'password' to your desired account username/password | ||
3) run ./reac.py | ||
4) ... | ||
5) profit | ||
|
||
IDEA | ||
---- | ||
Automate this and use TOR or proxies. :3 | ||
|
||
(C) Leon Szpilewski, GPL3, leon.szpilewski@gmail.com | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env python | ||
|
||
import urllib2, os | ||
from StringIO import StringIO | ||
import subprocess | ||
|
||
def curl(*args): | ||
curl_path = '/usr/bin/curl' | ||
curl_list = [curl_path] | ||
for arg in args: | ||
# loop just in case we want to filter args in future. | ||
curl_list.append(arg) | ||
curl_result = subprocess.Popen( | ||
curl_list, | ||
stderr=subprocess.PIPE, | ||
stdout=subprocess.PIPE).communicate()[0] | ||
return curl_result | ||
|
||
def solve(captcha_url): | ||
captcha_path = download_captcha(captcha_url); | ||
solved_captcha = call_solver(captcha_path) | ||
os.remove(captcha_path) | ||
return solved_captcha | ||
|
||
def call_solver(captcha_img_path): | ||
creds = open("decaptcha_creds","r").read().rstrip('\n').split(':') | ||
|
||
resp = curl('-F', 'function=picture2', | ||
'-F', 'username=' + creds[0], | ||
'-F', 'password=' + creds[1], | ||
'-F', 'pict=@'+captcha_img_path, | ||
'-F', 'pict_to=0', | ||
'-F', 'pict_type=0', | ||
'http://poster.de-captcher.com') | ||
return resp.split('|')[5] | ||
|
||
def download_captcha(url): | ||
tempfn = os.path.basename(url) | ||
captcha = urllib2.urlopen(url) | ||
f = file(tempfn, "wb") | ||
f.write(captcha.read()) | ||
f.close() | ||
return tempfn | ||
|
||
def main(): | ||
solved = solve("http://www.reddit.com/captcha/Y1GE8H32Q5SOTi9QWGlfHwevrfNSZMyd.png") | ||
print "the solved captcha is: " + solved | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env python | ||
|
||
################################################################### | ||
# | ||
# Reddit Account Creator | ||
# | ||
# deps: | ||
# -selenium | ||
# -firefox | ||
# -de-captcher.com account | ||
# | ||
# license: GPL3 (c) Leon Szpilewski | ||
# | ||
################################################################### | ||
from selenium import webdriver | ||
import captcha | ||
|
||
username = "archlocherlol" | ||
password = "warbird" | ||
|
||
# don't change anything below | ||
|
||
browser = webdriver.Firefox() | ||
|
||
browser.get('http://reddit.com'); | ||
browser.get(browser.find_element_by_class_name('login-required').get_attribute('href')) | ||
|
||
browser.find_element_by_id('user_reg').click() | ||
browser.find_element_by_id('user_reg').send_keys(username) | ||
|
||
browser.find_element_by_id('passwd_reg').click() | ||
browser.find_element_by_id('passwd_reg').send_keys(password) | ||
|
||
browser.find_element_by_id('passwd2_reg').click() | ||
browser.find_element_by_id('passwd2_reg').send_keys(password) | ||
|
||
captcha_url = browser.find_element_by_class_name('capimage').get_attribute('src') | ||
solved_captcha = captcha.solve(captcha_url) | ||
|
||
browser.find_element_by_id('captcha_').click() | ||
browser.find_element_by_id('captcha_').send_keys(solved_captcha) | ||
|
||
for btn in browser.find_elements_by_class_name('button'): | ||
if btn.text == 'create account': | ||
btn.click() | ||
break | ||
else: | ||
print "couldn't find button!" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
java -jar selenium-server-standalone-2.20.0.jar |