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")
You might also like...
Django Admin Two-Factor Authentication, allows you to login django admin with google authenticator.
Django Admin Two-Factor Authentication, allows you to login django admin with google authenticator.

Django Admin Two-Factor Authentication Django Admin Two-Factor Authentication, allows you to login django admin with google authenticator. Why Django

 Flask App With Login
Flask App With Login

Flask App With Login by FranciscoCharles Este projeto basico é o resultado do estudos de algumas funcionalidades do micro framework Flask do Python. O

User Authentication in Flask using Flask-Login
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

Cack facebook tidak login

Cack facebook tidak login

A wagtail plugin to replace the login by an OAuth2.0 Authorization Server

Wagtail OAuth2.0 Login Plugin to replace Wagtail default login by an OAuth2.0 Authorization Server. What is wagtail-oauth2 OAuth2.0 is an authorizatio

Python's simple login system concept - Advanced level

Simple login system with Python - For beginners Creating a simple login system using python for beginners this repository aims to provide a simple ove

Beihang University Network Authentication Login

北航自动网络认证使用说明 主文件 gw_buaa.py # @file gw_buaa.py # @author Dong # @date 2022-01-25 # @email [email protected] # @brief This is a python script to l

A Login/Registration GUI Application with SQLite database for manipulating data.

Login-Register_Tk A Login/Registration GUI Application with SQLite database for manipulating data. What is this program? This program is a GUI applica

Official implementation of the AAAI 2022 paper
Official implementation of the AAAI 2022 paper "Learning Token-based Representation for Image Retrieval"

Token: Token-based Representation for Image Retrieval PyTorch training code for Token-based Representation for Image Retrieval. We propose a joint loc

Owner
Alif Budiman
Just idiot people trying to learn code.
Alif Budiman
Simple Login - Login Extension for Flask - maintainer @cuducos

Login Extension for Flask The simplest way to add login to flask! Top Contributors Add yourself, send a PR! How it works First install it from PyPI. p

Flask Extensions 132 Feb 10, 2021
Simple Login - Login Extension for Flask - maintainer @cuducos

Login Extension for Flask The simplest way to add login to flask! How it works First, install it from PyPI: $ pip install flask_simplelogin Then, use

Flask Extensions 181 Jan 1, 2023
Login-python - Login system made in Python, using native libraries

login-python Sistema de login feito 100% em Python, utilizando bibliotecas nativ

Nicholas Gabriel De Matos Leal 2 Jan 28, 2022
Login qr line & qr image

login-qr-line-qr-image login qr line & qr image python3 & linux ubuntu api source: https://github.com/hert0t/BEAPI-BETA import httpx import qrcode fro

Alif Budiman 1 Dec 27, 2021
Customizable User Authorization & User Management: Register, Confirm, Login, Change username/password, Forgot password and more.

Flask-User v1.0 Attention: Flask-User v1.0 is a Production/Stable version. The previous version is Flask-User v0.6. User Authentication and Management

Ling Thio 997 Jan 6, 2023
Customizable User Authorization & User Management: Register, Confirm, Login, Change username/password, Forgot password and more.

Flask-User v1.0 Attention: Flask-User v1.0 is a Production/Stable version. The previous version is Flask-User v0.6. User Authentication and Management

Ling Thio 916 Feb 15, 2021
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

null 3 Jun 3, 2021
Automatic login utility of free Wi-Fi captive portals

wicafe Automatic login utility of free Wi-Fi captive portals Disclaimer: read and grant the Terms of Service of Wi-Fi services before using it! This u

Takumi Sueda 8 May 31, 2022
🔐 Login & Register System

?? Login & Register System This is a developable login and register system. Enter your username and password to register or login to account. Automati

Firdevs Akbayır 10 Dec 12, 2022
Login System Using Django

Login System Django

Nandini Chhajed 6 Dec 12, 2021