7
2018-08-20 12:01:27 +08:00
贴一下源码
import time
from comm.atc import atLogger, atChat
import subprocess
import sys
import os
import time
import datetime
import requests
import json
import random
from PyQt5.QtWidgets import (QApplication,QWidget,QLabel,QAction,QProgressBar,
QPushButton,QMainWindow,QTextEdit,QGridLayout,QComboBox)
from PyQt5.QtGui import QIcon,QTextCursor
from PyQt5.QtCore import QThread,pyqtSignal,QCoreApplication,QObject,QBasicTimer,Qt,QProcess,QProcessEnvironment,QIODevice
from comm.at import COMPORT
class ThreadAp(QThread):
name = """操作 AP 控制"""
apstatus = pyqtSignal()
def run(self):
# url = "http://192.168.104.1/"
# s = requests.session()
# header ={
# "token":"Ku2vhFFTc9K5V%24Laf2l2V9I%24PqX%249I",
# "Accept-Encoding": "gzip, deflate",
# "Accept-Language": "zh-CN, zh;q=0.9",
# "Referer": "http://192.168.104.1/",
# "User-Agent":"Mozilla/5.0(Windows NT10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/67.0.3396.62 Safari/537.36",
# }
# login = {"method":"do","login":{"password":"0KcgeXhc9TefbwK"}}
# response = requests.post(url,data=json.dumps(login),headers=header).text
# jsonload = json.loads(response)
# stok =