@@ -0,0 +1,2970 @@
+import mechanize, cookielib, random, time%0A%0A# For ease of use this will create a bunch of users with the same string followed by a number and the same password%0A# This will come in handy further on down the road when we do vote manipulation%0AuserName = %22Some User Name%22%0ApassWord = %22Some password%22%0A%0Adef getProxies():%0A    #This is what gets a random good proxy from rmccurdy's list%0A    browser = mechanize.Browser()%0A    browser.set_handle_robots(False)%0A    page = browser.open('http://rmccurdy.com/scripts/proxy/good.txt')%0A%0A    proxies = %5B%5D%0A%0A    for proxy in page.readlines():%0A        proxies.append(%7B'http': proxy.replace('%5Cn', '')%7D)%0A    %0A    #Returns it in mechanize's format%0A    return proxies%0A%0A# This class if almost verbatim from *Violent Python*%0Aclass anonBrowser(mechanize.Browser):%0A%0A    def __init__(self, proxies = getProxies(), user_agents = %5B%5D):%0A        mechanize.Browser.__init__(self)%0A        self.set_handle_robots(False)%0A        self.proxies = proxies%0A        self.user_agents = user_agents + %5B'Mozilla/4.0 ',%5C%0A        'FireFox/6.01','ExactSearch', 'Nokia7110/1.0'%5D%0A        self.cookie_jar = cookielib.CookieJar()%0A        self.set_cookiejar(self.cookie_jar)%0A        self.anonymize()%0A%0A    def clear_cookies(self):%0A        self.cookie_jar = cookielib.CookieJar()%0A        self.set_cookiejar(self.cookie_jar)%0A%0A    def change_user_agent(self):%0A        userAgent = random.choice(self.user_agents)%0A        self.addheaders = %5B('User-agent', userAgent)%5D%0A%0A    def change_proxy(self):%0A        if self.proxies:%0A            proxy = random.choice(self.proxies)%0A            self.set_proxies(proxy)%0A%0A    def anonymize(self, sleep = True):%0A        self.clear_cookies()%0A        self.change_user_agent()%0A        self.change_proxy()%0A        %0A        # Sometimes this is good for other reasons to implement a sleep timer%0A        # But for our purposes it's just to automate it arround reddit's filter%0A        if sleep:%0A            print %22Sleep Started%22%0A            time.sleep(600)%0A            print %22Sleeping Finished%22%0A%0Adef main():    %0A%0A  # This will create 150 users with the same password%0A    for x in range(1, 150):%0A    %0A        # First we anonymize which also sleeps for 10 minutes%0A        br = anonBrowser()%0A        %0A        # Next we open up reddit's login and grab the create user form%0A        br.open('https://www.reddit.com/login')%0A        br.form = list(br.forms())%5B0%5D%0A%0A        # Creates a new user based on the string above and appends a number to it%0A        user = userName + str(x)%0A    %0A        br%5B'user'%5D = user%0A        br%5B'passwd'%5D = passWord%0A        br%5B'passwd2'%5D = passWord%0A%0A        br.method = %22POST%22%0A        response = br.submit()%0A        response2 = br.response().read()%0A        %0A        # As of right now the responses aren't too helpful so once I figure out this limit rating%0A        # I'll come back and make something for nicer response reading%0A        %0A        if response2:%0A            print %22%7B0%7D success%22.format(x)%0A%0Aif __name__ == %22__main__%22:%0A    main()%0A

Create MassRedditAccountCreator.py