} if "Your response has been recorded." in output: return True else: return False # The url of the google docs form that will accept POST values url = "https://docs.google.com/forms/d/1oyI2krnwwBhPq5HOkWJCAg0u9tasp0-A_-V3LxrloCg/formResponse" # Form data to use for the query data = { "draftResponse": [], "pageHistory": 0, "entry.1242870294": choice(first_entry_values), "entry.295214320": choice(second_entry_values) } # Using POST method and Mac OS TorBrowser Bundle. q = Query( url, request_data=post_data, method="POST") # Once the tor local process is running, use this function to check q.is_query_working = check_form_sent while 1: try: q.single_cycle(verbose=True) except KeyboardInterrupt: q.tor_process.terminate()
if method == "wired": path = urls[0] elif method == "tired": path = urls[1] elif method == "expired": path = urls[2] else: path = choice(urls) #path = urls[-1] return "%s%s" % (domain, path) url_to_nuke = find_url_to_query(the_url, the_method) query = Query(url_to_nuke) query.is_query_working = check_vote_done times = 0 while 1: try: sys.stdout.write("Querying %s : " % query.url) sys.stdout.flush() try: query.single_cycle(verbose=False) times += 1 except KeyboardInterrupt: query.tor_process.terminate() sys.stdout.flush() sys.stdout.write("\n %s votes done\n" % times) sys.stdout.flush()
if method == "wired": path = urls[0] elif method == "tired": path = urls[1] elif method == "expired": path = urls[2] else: path = choice(urls) #path = urls[-1] return "%s%s" % (domain,path) url_to_nuke = find_url_to_query(the_url, the_method) query = Query( url_to_nuke ) query.is_query_working = check_vote_done times = 0 while 1: try: sys.stdout.write("Querying %s : " % query.url) sys.stdout.flush() try: query.single_cycle(verbose=False) times += 1 except KeyboardInterrupt: query.tor_process.terminate() sys.stdout.flush() sys.stdout.write("\n %s votes done\n" % times) sys.stdout.flush()
#!/usr/bin/env python # -*- coding=utf-8 -*- from torquery import Query q = Query("http://google.com/search?q=koalalorenzo") q.start_loop() q.tor_process.terminate()
#!/usr/bin/env python # -*- coding=utf-8 -*- from torquery import Query # TorBrowser Bundle contains tor command inside /Application folder. q = Query("http://google.com/search?q=koalalorenzo", tor_cmd="/Applications/TorBrowser_en-US.app/Contents/MacOS/tor") q.start_loop() q.tor_process.terminate()