GithubHelp home page GithubHelp logo

dondestasmibebe / remoteauthclient Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ruslanuc/remoteauthclient

0.0 0.0 0.0 45 KB

Async remote auth client for discord (Login with qr code)

License: MIT License

Python 100.00%

remoteauthclient's Introduction

RemoteAuthClient

Due to lack of time, I unfortunately cannot maintain RemoteAuthClient (including the captcha solving). For now, I will not archive the repository, so if a fix to the captcha problem appears, you can create a pull request.

Installing

Python 3.7 or higher is required

pip install remoteauthclient

Example

from asyncio import run
from remoteauthclient import RemoteAuthClient

c = RemoteAuthClient()

@c.event("on_fingerprint")
async def on_fingerprint(data):
    print(f"Fingerprint: {data}")
    print(f"QrCode url: https://api.qrserver.com/v1/create-qr-code/?size=256x256&data={data}")

@c.event("on_userdata")
async def on_userdata(user):
    print(f"ID: {user.id}")
    print(f"Username: {user.username}")
    print(f"Discriminator: {user.discriminator}")
    print(f"Avatar hash: {user.avatar}")
    print(f"Name: {user.getName()}")
    print(f"Avatar URL: {user.getAvatarURL()}")

@c.event("on_token")
async def on_token(token):
    print(f"Token: {token}")

@c.event("on_cancel")
async def on_cancel():
    print(f"Auth canceled!")

@c.event("on_timeout")
async def on_timeout():
    print(f"Timeout")

@c.event("on_captcha")
async def on_captcha(captcha_data):
    # captcha_data contains captcha_sitekey, captcha_service (hcaptcha), captcha_rqdata and captcha_rqtoken
    print(f"Captcha!")
    captcha_key = ... # Solve captcha and get captcha_key, you must provide captcha_sitekey and captcha_rqdata to solving service
    return captcha_key

@c.event("on_error")
async def on_error(exc, client):
    print(f"Error: {exc.__class__.__name__}")
    if client.retries == 1:
        await client.run_task()

run(c.run())

Proxy example

from remoteauthclient import RemoteAuthClient

c = RemoteAuthClient(proxy="127.0.0.1:8080")
# Or with auth
c = RemoteAuthClient(proxy="127.0.0.1:8080", proxy_auth={"login": "user", "password": "password"})

...

remoteauthclient's People

Contributors

ruslanuc avatar what-xd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.