1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Disqus upvote bot (code)

Discussion in 'Black Hat SEO' started by Triggakb24, Mar 19, 2017.

  1. Triggakb24

    Triggakb24 Newbie

    Joined:
    Mar 19, 2017
    Messages:
    15
    Likes Received:
    1
    Gender:
    Male
    Code:
    import requests
    import random
    import string
    import threadpool
    import thread
    def gen(size=10, chars=string.ascii_uppercase + string.digits):
        return ''.join(random.choice(chars) for x in range(size))
    class Disqus:
        def __init__(self):
            print "Disqus Class Initialized"
            self.signup = "https://disqus.com/profile/signup/"
            self.http = requests.Session()
        def createAccount(self,email,username,password):
            pdata = {
                "email" : email,
                "username" : username,
                "password" : password
            }
            signup_headers = {
                "referer" : "https://disqus.com/profile/signup/",
                "content-type" : "application/x-www-form-urlencoded",
                ":host" : "disqus.com",
                ":method" : "POST",
                ":path" : "/profile/signup/",
                ":scheme" : "https",
                ":version" : "HTTP/1.1"
            }
            r = self.http.post(self.signup, data = pdata, headers = signup_headers)
            if r.status_code == 302:
                print "Good signup"
            else:
                print "Bad signup"
            #look for this in r.headers
            #x-user:loginas:None:108281152
        def upvote(self,postid):
            pdata = {
                "post" : postid,
                "vote" : "1",
                "api_key" : "E8Uh5l5fHZ6gD8U3KycjAIAk46f68Zw7C6eW8WSjZvCLXebZ7p0r1yrYDrLilk2F"
            }
            r = self.http.post("http://disqus.com/api/3.0/posts/vote.json",data = pdata)
            print r.content
    
    def rape(stack):
        dis,u,target = stack
        dis.createAccount(u+"@mailinator.com",u,u)
        print u
        print "Upvoting..."
        dis.upvote(target)
    
    if __name__ == "__main__":
        target = "1399861984"
        pool = threadpool.ThreadPool(100)
        queue_arguments = []
        for i in range(0,10):
            dis = Disqus()
            u = gen(10)
            queue_arguments.append([dis,u,target])
        request = threadpool.makeRequests(rape, queue_arguments)
        for req in request:
            pool.putRequest(req)
        pool.wait()
    Im looking for someone to verify that the code that i have works. Its for a disqus upvote bot that upvotes accounts using newly created accounts since disuqs does not allow gues upvoting. The API key may need to be updated because they may have updated their code base. The key can be found on their API website
     
  2. Triggakb24

    Triggakb24 Newbie

    Joined:
    Mar 19, 2017
    Messages:
    15
    Likes Received:
    1
    Gender:
    Male
    Replace email and password with your account to log in with
     
  3. Triggakb24

    Triggakb24 Newbie

    Joined:
    Mar 19, 2017
    Messages:
    15
    Likes Received:
    1
    Gender:
    Male
    No testers?
     
  4. aaddyy227

    aaddyy227 Newbie

    Joined:
    May 3, 2015
    Messages:
    12
    Likes Received:
    1
    i will
     
  5. malakaka

    malakaka Junior Member

    Joined:
    Dec 18, 2016
    Messages:
    177
    Likes Received:
    31
    What program is this for?
     
  6. Md Jayed

    Md Jayed Newbie

    Joined:
    Aug 20, 2016
    Messages:
    48
    Likes Received:
    9
    Gender:
    Male
    Great post.. can u tell me please how it works ?
    I mean how I can I implement this method ?
     
  7. malakaka

    malakaka Junior Member

    Joined:
    Dec 18, 2016
    Messages:
    177
    Likes Received:
    31
    Python