Login qr line & qr image

Overview

login-qr-line-qr-image

login qr line & qr image

python3 & linux ubuntu

api source: https://github.com/hert0t/BEAPI-BETA

"IOSIPAD\t10.5.2\tiPhone 8\t11.2.5" def LoginQR(headers, cert=""): qr = lineGetQr(headers,cert) cl.sendMessage(to,"Link QR: "+qr["result"]["qrlink"]) GenerateQRIMG(to,qr["result"]["qrcode"]) cl.sendMessage(to,"IP: "+qr["result"]["ip"]) if crt == "": pincode = lineGetQrPincode(qr["result"]["session"]) cl.sendMessage(to,"Pincode: "+pincode["result"]["pincode"]) auth = lineGetQrAuth(qr["result"]["session"]) print("Cert: "+auth["result"]["certificate"]) return auth["result"]["accessToken"]">
import httpx
import qrcode
from PIL import Image

host = "https://beta.beapi.me"
http = httpx.Client(http2=True,timeout=120)

#don't forget to enter the logo you want to generate, rename it to fxglogo.jpg

def GenerateQRIMG(to,link):
    Logo_link = 'fxglogo.jpg'
    logo = Image.open(Logo_link)
    basewidth = 100
    wpercent = (basewidth/float(logo.size[0])) 
    hsize = int((float(logo.size[1])*float(wpercent))) 
    logo = logo.resize((basewidth, hsize), Image.ANTIALIAS) 
    QRcode = qrcode.QRCode( error_correction=qrcode.constants.ERROR_CORRECT_H)
    url = str(link)
    QRcode.add_data(url)
    QRcode.make()
    QRcolor = 'Black'
    QRimg = QRcode.make_image(fill_color=QRcolor, back_color="white").convert('RGB')
    pos = ((QRimg.size[0] - logo.size[0]) // 2, (QRimg.size[1] - logo.size[1]) // 2)
    QRimg.paste(logo, pos)
    QRimg.save('scanme.png')
    alip.sendImage(to, 'scanme.png')
    os.system("rm -r scanme.png")

def lineGetQr(appName,cert=""):
    params = {"appname": appName}
    if cert != "":params["cert"] = cert
    resp = http.get(host+"/lineqr",params=params).json()
    if resp["status"] != 200: raise Exception (resp["reason"])
    return resp

def lineGetQrPincode(session):
    resp = http.get(host+"/lineqr/pincode/"+session).json()
    if resp["status"] != 200: raise Exception (resp["reason"])
    return resp

def lineGetQrAuth(self, session):
    resp = http.get(host+"/lineqr/auth/"+session).json()
    if resp["status"] != 200: raise Exception (resp["reason"])
    return resp

#LOGIN non cert

#headers > "IOSIPAD\t10.5.2\tiPhone 8\t11.2.5"

def LoginQR(headers, cert=""):
    qr = lineGetQr(headers,cert)
    cl.sendMessage(to,"Link QR: "+qr["result"]["qrlink"])
    GenerateQRIMG(to,qr["result"]["qrcode"])
    cl.sendMessage(to,"IP: "+qr["result"]["ip"])
    if crt == "":
        pincode = lineGetQrPincode(qr["result"]["session"])
        cl.sendMessage(to,"Pincode: "+pincode["result"]["pincode"])
    auth = lineGetQrAuth(qr["result"]["session"])
    print("Cert: "+auth["result"]["certificate"])
    return auth["result"]["accessToken"]

for login using def LoginQR

if cmd.startswith("login "):
    sep = text.split(" ")
    fxgsetup = text.replace(sep[0] + " ", "")
    # login header desktopwin, dekstopmac, chromeos
    if fxgsetup == "desktopwin":
        x = LoginQR("DESKTOPWIN\t7.4.0\tPC-9bujIF\t10")
        #x is access toke, you can use os.system for deploy your bot.
    elif fxgsetup == "desktopmac":
        x = LoginQR("DESKTOPMAC\t7.4.0\tPC-9bujIF\t10")
        #x is access toke, you can use os.system for deploy your bot.
    elif fxgsetup == "chromeos":
        x = LoginQR("CHROMEOS\t2.4.9\tChrome OS\t1")
        #x is access toke, you can use os.system for deploy your bot.
    else:
        cl.sendMessage(to, "headers not in list login")

if you have cert and want login with cert.

if cmd.startswith("login "):
    cert = "012324434353453454565768786785774546" # << your cert code
    sep = text.split(" ")
    fxgsetup = text.replace(sep[0] + " ", "")
    # login header desktopwin, dekstopmac, chromeos
    if fxgsetup == "desktopwin":
        x = LoginQR("DESKTOPWIN\t7.4.0\tPC-9bujIF\t10",cert)
        #x is access token, you can use os.system for deploy your bot.
    elif fxgsetup == "desktopmac":
        x = LoginQR("DESKTOPMAC\t7.4.0\tPC-9bujIF\t10",cert)
        #x is access token, you can use os.system for deploy your bot.
    elif fxgsetup == "chromeos":
        x = LoginQR("CHROMEOS\t2.4.9\tChrome OS\t1",cert)
        #x is access token, you can use os.system for deploy your bot.
    else:
        cl.sendMessage(to, "headers not in list login")
Owner
Alif Budiman
Just idiot people trying to learn code.
Alif Budiman
Auth-Starters - Different APIs using Django & Flask & FastAPI to see Authentication Service how its work

Auth-Starters Different APIs using Django & Flask & FastAPI to see Authentication Service how its work, and how to use it. This Repository based on my

Yasser Tahiri 7 Apr 22, 2022
Simplifying third-party authentication for web applications.

Velruse is a set of authentication routines that provide a unified way to have a website user authenticate to a variety of different identity provider

Ben Bangert 253 Nov 14, 2022
Flask JWT Router is a Python library that adds authorised routes to a Flask app.

Read the docs: Flask-JWT-Router Flask JWT Router Flask JWT Router is a Python library that adds authorised routes to a Flask app. Both basic & Google'

Joe Gasewicz 52 Jan 03, 2023
RSA Cryptography Authentication Proof-of-Concept

RSA Cryptography Authentication Proof-of-Concept This project was a request by Structured Programming lectures in Computer Science college. It runs wi

Dennys Marcos 1 Jan 22, 2022
Python One-Time Password Library

PyOTP - The Python One-Time Password Library PyOTP is a Python library for generating and verifying one-time passwords. It can be used to implement tw

PyAuth 2.2k Dec 26, 2022
Basic auth for Django.

easy-basicauth WARNING! THIS LIBRARY IS IN PROGRESS! ANYTHING CAN CHANGE AT ANY MOMENT WITHOUT ANY NOTICE! Installation pip install easy-basicauth Usa

bichanna 2 Mar 25, 2022
Per object permissions for Django

django-guardian django-guardian is an implementation of per object permissions [1] on top of Django's authorization backend Documentation Online docum

3.3k Jan 01, 2023
OAuth2 goodies for the Djangonauts!

Django OAuth Toolkit OAuth2 goodies for the Djangonauts! If you are facing one or more of the following: Your Django app exposes a web API you want to

Jazzband 2.7k Dec 31, 2022
python-social-auth and oauth2 support for django-rest-framework

Django REST Framework Social OAuth2 This module provides OAuth2 social authentication support for applications in Django REST Framework. The aim of th

1k Dec 22, 2022
Simple yet powerful authorization / authentication client library for Python web applications.

Authomatic Authomatic is a framework agnostic library for Python web applications with a minimalistic but powerful interface which simplifies authenti

1k Dec 28, 2022
Out-of-the-box support register, sign in, email verification and password recovery workflows for websites based on Django and MongoDB

Using djmongoauth What is it? djmongoauth provides out-of-the-box support for basic user management and additional operations including user registrat

hao 3 Oct 21, 2021
Awesome Django authorization, without the database

rules rules is a tiny but powerful app providing object-level permissions to Django, without requiring a database. At its core, it is a generic framew

1.6k Dec 30, 2022
Web authentication testing framework

What is this This is a framework designed to test authentication for web applications. While web proxies like ZAProxy and Burpsuite allow authenticate

OWASP 88 Jan 01, 2023
Django Rest Framework App wih JWT Authentication and other DRF stuff

Django Queries App with JWT authentication, Class Based Views, Serializers, Swagger UI, CI/CD and other cool DRF stuff API Documentaion /swagger - Swa

Rafael Salimov 4 Jan 29, 2022
User Authentication in Flask using Flask-Login

User-Authentication-in-Flask Set up & Installation. 1 .Clone/Fork the git repo and create an environment Windows git clone https://github.com/Dev-Elie

ONDIEK ELIJAH OCHIENG 31 Dec 11, 2022
FastAPI Simple authentication & Login API using GraphQL and JWT

JeffQL A Simple FastAPI authentication & Login API using GraphQL and JWT. I choose this Name JeffQL cause i have a Low level Friend with a Nickname Je

Yasser Tahiri 26 Nov 24, 2022
Django x Elasticsearch Templates

Django x Elasticsearch Requirements Python 3.7 Django = 3 Elasticsearch 7.15 Setup Elasticsearch Install via brew Install brew tap elastic/tap brew

Aji Pratama 0 May 22, 2022
Extending the Django authentication system with a phone verification step.

Extending the Django authentication system with a phone verification step.

Miguel Grinberg 50 Dec 04, 2022
Flask Implementation of a login page and some basic functionality.

login_page Flask Implementation of a login page and some basic functionality. How to Run $ chmod +x run.sh setup.sh $ # run setup.sh only if the datab

3 Jun 03, 2021
Python module for generating and verifying JSON Web Tokens

python-jwt Module for generating and verifying JSON Web Tokens. Note: From version 2.0.1 the namespace has changed from jwt to python_jwt, in order to

David Halls 210 Dec 24, 2022