def generarQR(self): SSID = self.textEntryNombre.text() PASSWORD = self.textEntryContra.text() if SSID: if self.chkhidden.isChecked() == True: img = wifi_qrcode_generator.wifi_qrcode( SSID, True, 'WPA', PASSWORD) else: img = wifi_qrcode_generator.wifi_qrcode( SSID, False, 'WPA', PASSWORD) self.generar.setStyleSheet('background-color: #008F39') qr = ImageQt(img) pix = QPixmap.fromImage(qr) self.imageLabel.setPixmap(pix)
def qr_code_link_wifi(): """Returns a qrcode with wifi name and password.""" input_wifi_name = input("Type in a wifi name (SSID Name): ") input_auth_type = input("Type in the authentication type (WPA, WEP, nopass): ") input_wifi_pass = input("Type in the wifi password: ") qr = wifi_qrcode.wifi_qrcode(input_wifi_name, False, input_auth_type, input_wifi_pass) return qr
def generate_wifi_qrcode(ssid, password=None, authentication_type=None, hidden=False): # setup the data correctly if authentication_type is None or authentication_type == 'nopass': authentication_type = 'nopass' password = None # return generated qr code as PIL object return wifi_qrcode_generator.wifi_qrcode(ssid, hidden, authentication_type, password)
def generate_wifi_qrcode(ssid, password=None, authentication_type=None, hidden=False): if authentication_type is None or authentication_type == 'nopass': authentication_type = 'nopass' password = None return wifi_qrcode_generator.wifi_qrcode(ssid, hidden, authentication_type, password)
def generate_wifi_qrcode(login, password): return qr.wifi_qrcode(login, False, 'WPA', password)
import pyqrcode from pyqrcode import QRCode import wifi_qrcode_generator nameWifi = 'dlink' passWord = '******' typeEncrypt = 'WPA' image = wifi_qrcode_generator.wifi_qrcode(nameWifi, False, typeEncrypt, passWord) image.save('testwifi.png') # data = 'tel:0349881392' # data = 'smsto:0349881392:content sms here' # data="https://www.facebook.com/nguyen.hoangsang.9085"; # big_code = pyqrcode.create(data) # big_code.png('code.png', scale=8)
def wifi_QR(): import wifi_qrcode_generator as qr username = input("Enter the username: "******"Enter the password: ") qr.wifi_qrcode(username, False, 'WPA', password)
def generate_wifi_qr_code(config: WifiWidgetModel): qr_code = wifi_qrcode_generator.wifi_qrcode(config.ssid, False, config.auth_type, config.password) qr_code.save(QR_IMG_PATH)