diff --git a/2 b/2 new file mode 100644 index 0000000..d06bf22 --- /dev/null +++ b/2 @@ -0,0 +1 @@ +lalalal diff --git a/Rhasspy-LED-4mic.py b/Rhasspy-LED-4mic.py new file mode 100644 index 0000000..0c9ac86 --- /dev/null +++ b/Rhasspy-LED-4mic.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python +from apa102_pi.driver import apa102 +from pixel_ring import pixel_ring +from gpiozero import LED +from time import sleep +import paho.mqtt.client as mqtt +import RPi.GPIO as GPIO +import json +import os +import time + +rhasspyConfig = '/home/jd/.config/rhasspy/profiles/en/profile.json' + +counter = 0 +LED_ST = "on" +mute = "off" +siteId = "" +MQTThost = "" + +GPIO.setmode(GPIO.BCM) +GPIO.setup(5, GPIO.OUT) +GPIO.output(5, GPIO.HIGH) + +power = LED(5) +power.on() +pixel_ring.set_brightness(20) +pixel_ring.change_pattern('echo') +pixel_ring.wakeup() +time.sleep(2) + +with open(rhasspyConfig,'r', encoding='UTF-8') as file: + obj = json.loads(file.read()) + MQTTconfig = json.dumps(obj["mqtt"]) + MQTTconfig = MQTTconfig.replace("\"mqtt\": ","") + MQTTconfig = json.loads(MQTTconfig) + siteId = MQTTconfig["site_id"] + MQTThost = MQTTconfig["host"] + MQTThost = MQTThost.strip('"') + if "port" in json.dumps(MQTTconfig): + MQTTport = MQTTconfig["port"] + MQTTport = MQTTport.strip('"') + MQTTport = int(MQTTport) + else: + MQTTport = 1883 + +strip = apa102.APA102(num_led=12) +strip.clear_strip() + +def on_disconnect(): + # for i in range(0,12): + # strip.set_pixel(i,0,59,0,7) + # strip.show() + pixel_ring.wakeup() + +for i in range(0,12): + strip.set_pixel(i,255,0,0,30) +strip.show() +time.sleep(3) +def on_connect(client, userdata, flags, rc): + print("Connected with result code " + str(rc)) + client.subscribe("hermes/dialogueManager/sessionEnded/#") + client.subscribe("hermes/hotword/toggleOff/#") + client.subscribe("hermes/hotword/toggleOn/#") + client.subscribe("hermes/asr/stopListening") + client.subscribe("hermes/hotword/hey siri_raspberry-pi/detected") + client.subscribe("hermes/asr/textCaptured") + + for i in range(0,12): + strip.set_pixel(i,0,127,0,7) + strip.show() + sleep(2) + for i in range(0,12): + strip.set_pixel(i,0,255,0,0) + strip.show() +def on_message(client, userdata, msg): + jsonData = json.loads(msg.payload) + if msg.topic == "hermes/hotword/hey siri_raspberry-pi/detected" and jsonData["siteId"] == siteId and LED_ST == "on": + # for i in range(0,12): + # strip.set_pixel(i,0,100,0,7) + # strip.show() + pixel_ring.think() + + elif msg.topic == "hermes/asr/textCaptured" and jsonData["siteId"] == siteId: + # for i in range(0,12): + # strip.set_pixel(i,0,255,0,0) + # strip.show() + pixel_ring.wakeup() + time.sleep(0.3) + pixel_ring.off() + time.sleep(0.3) + pixel_ring.wakeup() + time.sleep(0.3) + pixel_ring.off() + elif msg.topic == "hermes/asr/stopListening": + #pixel_ring.off() + pass + elif msg.topic == "hermes/hotword/toggleOn": + # for i in range(0,12): + # strip.set_pixel(i,0,99,0,0) + # strip.show() + #pixel_ring.off() for i in range(0,12): + # strip.set_pixel(i,255,0,0,7) + # strip.show() + # time.sleep(0.2) + # pixel_ring.off() + # time.sleep(0.3) + # for i in range(0,12): + # strip.set_pixel(i,255,0,0,7) + # strip.show() + # time.sleep(0.2) + pass + else: + # for i in range(0,12): + # strip.set_pixel(i,0,99,0,0) + # strip.show() + pass +# for i in range(0,12): +# strip.set_pixel(i,0,127,255,7) +# sleep(0.1) +# strip.show() + +client = mqtt.Client() +client.username_pw_set("jaydee", password="jaydee1") +client.on_connect = on_connect +client.on_disconnect = on_disconnect +client.on_message = on_message +client.connect(MQTThost, MQTTport, 15) + +client.loop_forever() diff --git a/aida_send.py b/aida_send.py new file mode 100644 index 0000000..e1af7b4 --- /dev/null +++ b/aida_send.py @@ -0,0 +1,12 @@ +import python_aida64 +import json +from pprint import pprint +data = python_aida64.getData() +print(json.dumps(data)) +print(data["sys"][5]["value"]) +stats = {} +for i in data: + for j in data[i]: + stats[j["id"]] = j["value"] + +print(json.dumps(stats)) \ No newline at end of file diff --git a/auto_import.py b/auto_import.py new file mode 100644 index 0000000..4b4d23c --- /dev/null +++ b/auto_import.py @@ -0,0 +1,101 @@ +import os +from posixpath import ismount +import sys +import time +import subprocess +import datetime +import shutil +import json + +_DEST = "/share/Photo/imported" +_DEV = "" +_DEV_MOUNT = "/share/external/DEV3304_1/" +_DEV_DIR = "/share/external/DEV3304_1/DCIM/100GOPRO" +_IMP_FILE = "/share/external/DEV3304_1/auto_import" +_DEV_DATA = "/share/external/DEV3304_1/MISC/version.txt" + + + + +#sys.exit() +while True: + if os.path.ismount(_DEV_MOUNT): + if os.path.exists(_DEV_DATA): + file = open(_DEV_DATA, 'r') + content = file.read() + file.close() + strToReplace = ',' + replacementStr = '' + strToReplaceReversed = strToReplace[::-1] + replacementStrReversed = replacementStr[::-1] + + strValue = content[::-1].replace(strToReplaceReversed, replacementStrReversed, 1)[::-1] + c = content.replace("\n","") + + print("--------------") + print(c[-2]) + print("--------------") + print(strValue) + _DEV_CONT = json.loads(strValue) + wifimac = _DEV_CONT["wifi mac"] + if wifimac == "2474f742c017": + _DEV = "gopro9_1" + print("gopro9_1 registered") + + if os.path.exists(_IMP_FILE) and _DEV == "": + print("path exist") + time.sleep(5) + if _DEV == "": + file = open(_IMP_FILE, 'r') + content = file.read() + _DEV = json.loads(content)["device"] + file.close() + x = datetime.datetime.now() + print(x.year) + _DAT = x.strftime("%Y%m%d") + if len(os.listdir(_DEV_DIR)) == 0: + print("Folder is empty!") + myCmd = "umount /share/external/DEV3304_1" + status, output = subprocess.getstatusoutput(myCmd) + time.sleep(5) + continue + myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=101;sleep 1;/sbin/hal_app --se_buzzer enc_id=0,mode=101;sleep 1;/sbin/hal_app --se_buzzer enc_id=0,mode=101" + status, output = subprocess.getstatusoutput(myCmd) + if not _DEV == "": + if os.path.exists(_DEV_DIR): + for filename in os.listdir(_DEV_DIR): + print(filename) + c_time = os.path.getctime("{}/{}".format(_DEV_DIR,filename)) + dt_c = datetime.datetime.fromtimestamp(c_time) + print(dt_c) + _CDAT = dt_c.strftime("%Y-%m-%d") + print(_CDAT) + _FDEST = "{}/{}/{}".format(_DEST,_DEV, _CDAT) + if not os.path.exists(_FDEST): + cmnd = "mkdir -p {}".format(_FDEST) + status, output = subprocess.getstatusoutput(cmnd) + print("Moving file {} into {}".format(filename, _FDEST)) + try: + shutil.move("{}/{}".format(_DEV_DIR,filename),_FDEST) + except: + try: + shutil.move("{}/{}".format(_DEV_DIR,filename),"{}/{}".format(_FDEST,filename)) + except: + print("failed to move file {}".format(filename)) + print("Umounting") + myCmd = "umount /share/external/DEV3304_1" + status, output = subprocess.getstatusoutput(myCmd) + print(output) + print(status) + myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=100" + subprocess.getstatusoutput(myCmd) + time.sleep(5) + else: + print("Nothing to import") + time.sleep(5) + else: + print("Unknown device") + time.sleep(5) + else: + print("Usb does not connected") + time.sleep(5) \ No newline at end of file diff --git a/build/mqtt_srv/Analysis-00.toc b/build/mqtt_srv/Analysis-00.toc new file mode 100644 index 0000000..19d3456 --- /dev/null +++ b/build/mqtt_srv/Analysis-00.toc @@ -0,0 +1,864 @@ +(['X:\\__GITHUB\\python\\mqtt_srv.pyw'], + ['X:\\__GITHUB\\python'], + ['codecs'], + ['C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks\\__pycache__', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\rthooks', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\rthooks\\__pycache__', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks'], + {}, + [], + [], + False, + False, + False, + {}, + '3.10.2 (tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.1929 64 bit ' + '(AMD64)]', + [('pyi_rth_inspect', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py', + 'PYSOURCE'), + ('pyi_rth_subprocess', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_subprocess.py', + 'PYSOURCE'), + ('pyi_rth_pkgutil', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py', + 'PYSOURCE'), + ('pyi_rth_multiprocessing', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py', + 'PYSOURCE'), + ('mqtt_srv', + '\\\\192.168.77.106\\Data\\__GITHUB\\python\\mqtt_srv.pyw', + 'PYSOURCE')], + [('multiprocessing.popen_spawn_posix', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_spawn_posix.py', + 'PYMODULE'), + ('multiprocessing.resource_tracker', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\resource_tracker.py', + 'PYMODULE'), + ('threading', 'C:\\Program Files\\Python310\\lib\\threading.py', 'PYMODULE'), + ('_threading_local', + 'C:\\Program Files\\Python310\\lib\\_threading_local.py', + 'PYMODULE'), + ('contextlib', + 'C:\\Program Files\\Python310\\lib\\contextlib.py', + 'PYMODULE'), + ('signal', 'C:\\Program Files\\Python310\\lib\\signal.py', 'PYMODULE'), + ('multiprocessing.util', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\util.py', + 'PYMODULE'), + ('multiprocessing.forkserver', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\forkserver.py', + 'PYMODULE'), + ('multiprocessing.connection', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\connection.py', + 'PYMODULE'), + ('multiprocessing.resource_sharer', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\resource_sharer.py', + 'PYMODULE'), + ('xmlrpc.client', + 'C:\\Program Files\\Python310\\lib\\xmlrpc\\client.py', + 'PYMODULE'), + ('xmlrpc', + 'C:\\Program Files\\Python310\\lib\\xmlrpc\\__init__.py', + 'PYMODULE'), + ('gzip', 'C:\\Program Files\\Python310\\lib\\gzip.py', 'PYMODULE'), + ('argparse', 'C:\\Program Files\\Python310\\lib\\argparse.py', 'PYMODULE'), + ('textwrap', 'C:\\Program Files\\Python310\\lib\\textwrap.py', 'PYMODULE'), + ('copy', 'C:\\Program Files\\Python310\\lib\\copy.py', 'PYMODULE'), + ('gettext', 'C:\\Program Files\\Python310\\lib\\gettext.py', 'PYMODULE'), + ('_compression', + 'C:\\Program Files\\Python310\\lib\\_compression.py', + 'PYMODULE'), + ('xml.parsers.expat', + 'C:\\Program Files\\Python310\\lib\\xml\\parsers\\expat.py', + 'PYMODULE'), + ('xml.parsers', + 'C:\\Program Files\\Python310\\lib\\xml\\parsers\\__init__.py', + 'PYMODULE'), + ('xml', 'C:\\Program Files\\Python310\\lib\\xml\\__init__.py', 'PYMODULE'), + ('xml.sax.expatreader', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\expatreader.py', + 'PYMODULE'), + ('xml.sax.saxutils', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\saxutils.py', + 'PYMODULE'), + ('xml.sax', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\__init__.py', + 'PYMODULE'), + ('xml.sax.handler', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\handler.py', + 'PYMODULE'), + ('xml.sax._exceptions', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\_exceptions.py', + 'PYMODULE'), + ('xml.sax.xmlreader', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\xmlreader.py', + 'PYMODULE'), + ('http.client', + 'C:\\Program Files\\Python310\\lib\\http\\client.py', + 'PYMODULE'), + ('ssl', 'C:\\Program Files\\Python310\\lib\\ssl.py', 'PYMODULE'), + ('calendar', 'C:\\Program Files\\Python310\\lib\\calendar.py', 'PYMODULE'), + ('http', 'C:\\Program Files\\Python310\\lib\\http\\__init__.py', 'PYMODULE'), + ('email.message', + 'C:\\Program Files\\Python310\\lib\\email\\message.py', + 'PYMODULE'), + ('email.policy', + 'C:\\Program Files\\Python310\\lib\\email\\policy.py', + 'PYMODULE'), + ('email.contentmanager', + 'C:\\Program Files\\Python310\\lib\\email\\contentmanager.py', + 'PYMODULE'), + ('email.quoprimime', + 'C:\\Program Files\\Python310\\lib\\email\\quoprimime.py', + 'PYMODULE'), + ('string', 'C:\\Program Files\\Python310\\lib\\string.py', 'PYMODULE'), + ('email.headerregistry', + 'C:\\Program Files\\Python310\\lib\\email\\headerregistry.py', + 'PYMODULE'), + ('email._header_value_parser', + 'C:\\Program Files\\Python310\\lib\\email\\_header_value_parser.py', + 'PYMODULE'), + ('email.iterators', + 'C:\\Program Files\\Python310\\lib\\email\\iterators.py', + 'PYMODULE'), + ('email.generator', + 'C:\\Program Files\\Python310\\lib\\email\\generator.py', + 'PYMODULE'), + ('email._encoded_words', + 'C:\\Program Files\\Python310\\lib\\email\\_encoded_words.py', + 'PYMODULE'), + ('email.charset', + 'C:\\Program Files\\Python310\\lib\\email\\charset.py', + 'PYMODULE'), + ('email.encoders', + 'C:\\Program Files\\Python310\\lib\\email\\encoders.py', + 'PYMODULE'), + ('email.base64mime', + 'C:\\Program Files\\Python310\\lib\\email\\base64mime.py', + 'PYMODULE'), + ('email._policybase', + 'C:\\Program Files\\Python310\\lib\\email\\_policybase.py', + 'PYMODULE'), + ('email.header', + 'C:\\Program Files\\Python310\\lib\\email\\header.py', + 'PYMODULE'), + ('email.errors', + 'C:\\Program Files\\Python310\\lib\\email\\errors.py', + 'PYMODULE'), + ('email.utils', + 'C:\\Program Files\\Python310\\lib\\email\\utils.py', + 'PYMODULE'), + ('email._parseaddr', + 'C:\\Program Files\\Python310\\lib\\email\\_parseaddr.py', + 'PYMODULE'), + ('email', + 'C:\\Program Files\\Python310\\lib\\email\\__init__.py', + 'PYMODULE'), + ('quopri', 'C:\\Program Files\\Python310\\lib\\quopri.py', 'PYMODULE'), + ('uu', 'C:\\Program Files\\Python310\\lib\\uu.py', 'PYMODULE'), + ('optparse', 'C:\\Program Files\\Python310\\lib\\optparse.py', 'PYMODULE'), + ('email.parser', + 'C:\\Program Files\\Python310\\lib\\email\\parser.py', + 'PYMODULE'), + ('email.feedparser', + 'C:\\Program Files\\Python310\\lib\\email\\feedparser.py', + 'PYMODULE'), + ('decimal', 'C:\\Program Files\\Python310\\lib\\decimal.py', 'PYMODULE'), + ('_pydecimal', + 'C:\\Program Files\\Python310\\lib\\_pydecimal.py', + 'PYMODULE'), + ('contextvars', + 'C:\\Program Files\\Python310\\lib\\contextvars.py', + 'PYMODULE'), + ('numbers', 'C:\\Program Files\\Python310\\lib\\numbers.py', 'PYMODULE'), + ('base64', 'C:\\Program Files\\Python310\\lib\\base64.py', 'PYMODULE'), + ('hmac', 'C:\\Program Files\\Python310\\lib\\hmac.py', 'PYMODULE'), + ('hashlib', 'C:\\Program Files\\Python310\\lib\\hashlib.py', 'PYMODULE'), + ('struct', 'C:\\Program Files\\Python310\\lib\\struct.py', 'PYMODULE'), + ('selectors', 'C:\\Program Files\\Python310\\lib\\selectors.py', 'PYMODULE'), + ('tempfile', 'C:\\Program Files\\Python310\\lib\\tempfile.py', 'PYMODULE'), + ('shutil', 'C:\\Program Files\\Python310\\lib\\shutil.py', 'PYMODULE'), + ('zipfile', 'C:\\Program Files\\Python310\\lib\\zipfile.py', 'PYMODULE'), + ('py_compile', + 'C:\\Program Files\\Python310\\lib\\py_compile.py', + 'PYMODULE'), + ('importlib.machinery', + 'C:\\Program Files\\Python310\\lib\\importlib\\machinery.py', + 'PYMODULE'), + ('importlib', + 'C:\\Program Files\\Python310\\lib\\importlib\\__init__.py', + 'PYMODULE'), + ('importlib._common', + 'C:\\Program Files\\Python310\\lib\\importlib\\_common.py', + 'PYMODULE'), + ('importlib._adapters', + 'C:\\Program Files\\Python310\\lib\\importlib\\_adapters.py', + 'PYMODULE'), + ('typing', 'C:\\Program Files\\Python310\\lib\\typing.py', 'PYMODULE'), + ('importlib.abc', + 'C:\\Program Files\\Python310\\lib\\importlib\\abc.py', + 'PYMODULE'), + ('importlib._abc', + 'C:\\Program Files\\Python310\\lib\\importlib\\_abc.py', + 'PYMODULE'), + ('importlib._bootstrap', + 'C:\\Program Files\\Python310\\lib\\importlib\\_bootstrap.py', + 'PYMODULE'), + ('importlib._bootstrap_external', + 'C:\\Program Files\\Python310\\lib\\importlib\\_bootstrap_external.py', + 'PYMODULE'), + ('importlib.metadata', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\__init__.py', + 'PYMODULE'), + ('importlib.metadata._itertools', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_itertools.py', + 'PYMODULE'), + ('importlib.metadata._functools', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_functools.py', + 'PYMODULE'), + ('importlib.metadata._collections', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_collections.py', + 'PYMODULE'), + ('importlib.metadata._meta', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_meta.py', + 'PYMODULE'), + ('importlib.metadata._adapters', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_adapters.py', + 'PYMODULE'), + ('importlib.metadata._text', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_text.py', + 'PYMODULE'), + ('csv', 'C:\\Program Files\\Python310\\lib\\csv.py', 'PYMODULE'), + ('importlib.readers', + 'C:\\Program Files\\Python310\\lib\\importlib\\readers.py', + 'PYMODULE'), + ('importlib.util', + 'C:\\Program Files\\Python310\\lib\\importlib\\util.py', + 'PYMODULE'), + ('tarfile', 'C:\\Program Files\\Python310\\lib\\tarfile.py', 'PYMODULE'), + ('lzma', 'C:\\Program Files\\Python310\\lib\\lzma.py', 'PYMODULE'), + ('bz2', 'C:\\Program Files\\Python310\\lib\\bz2.py', 'PYMODULE'), + ('logging', + 'C:\\Program Files\\Python310\\lib\\logging\\__init__.py', + 'PYMODULE'), + ('pickle', 'C:\\Program Files\\Python310\\lib\\pickle.py', 'PYMODULE'), + ('pprint', 'C:\\Program Files\\Python310\\lib\\pprint.py', 'PYMODULE'), + ('dataclasses', + 'C:\\Program Files\\Python310\\lib\\dataclasses.py', + 'PYMODULE'), + ('inspect', 'C:\\Program Files\\Python310\\lib\\inspect.py', 'PYMODULE'), + ('dis', 'C:\\Program Files\\Python310\\lib\\dis.py', 'PYMODULE'), + ('opcode', 'C:\\Program Files\\Python310\\lib\\opcode.py', 'PYMODULE'), + ('ast', 'C:\\Program Files\\Python310\\lib\\ast.py', 'PYMODULE'), + ('_compat_pickle', + 'C:\\Program Files\\Python310\\lib\\_compat_pickle.py', + 'PYMODULE'), + ('multiprocessing.process', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\process.py', + 'PYMODULE'), + ('multiprocessing.context', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\context.py', + 'PYMODULE'), + ('multiprocessing.popen_forkserver', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_forkserver.py', + 'PYMODULE'), + ('multiprocessing.sharedctypes', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\sharedctypes.py', + 'PYMODULE'), + ('multiprocessing.heap', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\heap.py', + 'PYMODULE'), + ('bisect', 'C:\\Program Files\\Python310\\lib\\bisect.py', 'PYMODULE'), + ('multiprocessing.pool', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\pool.py', + 'PYMODULE'), + ('multiprocessing.dummy', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\dummy\\__init__.py', + 'PYMODULE'), + ('multiprocessing.dummy.connection', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\dummy\\connection.py', + 'PYMODULE'), + ('queue', 'C:\\Program Files\\Python310\\lib\\queue.py', 'PYMODULE'), + ('multiprocessing.queues', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\queues.py', + 'PYMODULE'), + ('multiprocessing.synchronize', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\synchronize.py', + 'PYMODULE'), + ('multiprocessing.managers', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\managers.py', + 'PYMODULE'), + ('multiprocessing.shared_memory', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\shared_memory.py', + 'PYMODULE'), + ('secrets', 'C:\\Program Files\\Python310\\lib\\secrets.py', 'PYMODULE'), + ('multiprocessing.reduction', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\reduction.py', + 'PYMODULE'), + ('multiprocessing.popen_fork', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_fork.py', + 'PYMODULE'), + ('multiprocessing.popen_spawn_win32', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_spawn_win32.py', + 'PYMODULE'), + ('multiprocessing.spawn', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\spawn.py', + 'PYMODULE'), + ('runpy', 'C:\\Program Files\\Python310\\lib\\runpy.py', 'PYMODULE'), + ('pkgutil', 'C:\\Program Files\\Python310\\lib\\pkgutil.py', 'PYMODULE'), + ('zipimport', 'C:\\Program Files\\Python310\\lib\\zipimport.py', 'PYMODULE'), + ('multiprocessing', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\__init__.py', + 'PYMODULE'), + ('getpass', 'C:\\Program Files\\Python310\\lib\\getpass.py', 'PYMODULE'), + ('nturl2path', + 'C:\\Program Files\\Python310\\lib\\nturl2path.py', + 'PYMODULE'), + ('ftplib', 'C:\\Program Files\\Python310\\lib\\ftplib.py', 'PYMODULE'), + ('netrc', 'C:\\Program Files\\Python310\\lib\\netrc.py', 'PYMODULE'), + ('shlex', 'C:\\Program Files\\Python310\\lib\\shlex.py', 'PYMODULE'), + ('mimetypes', 'C:\\Program Files\\Python310\\lib\\mimetypes.py', 'PYMODULE'), + ('http.cookiejar', + 'C:\\Program Files\\Python310\\lib\\http\\cookiejar.py', + 'PYMODULE'), + ('stringprep', + 'C:\\Program Files\\Python310\\lib\\stringprep.py', + 'PYMODULE'), + ('tracemalloc', + 'C:\\Program Files\\Python310\\lib\\tracemalloc.py', + 'PYMODULE'), + ('_py_abc', 'C:\\Program Files\\Python310\\lib\\_py_abc.py', 'PYMODULE'), + ('ping3', + 'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\__init__.py', + 'PYMODULE'), + ('ping3.enums', + 'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\enums.py', + 'PYMODULE'), + ('ping3.errors', + 'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\errors.py', + 'PYMODULE'), + ('psutil', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\__init__.py', + 'PYMODULE'), + ('psutil._psaix', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psaix.py', + 'PYMODULE'), + ('glob', 'C:\\Program Files\\Python310\\lib\\glob.py', 'PYMODULE'), + ('psutil._pssunos', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pssunos.py', + 'PYMODULE'), + ('psutil._psbsd', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psbsd.py', + 'PYMODULE'), + ('xml.etree.ElementTree', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementTree.py', + 'PYMODULE'), + ('xml.etree.cElementTree', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\cElementTree.py', + 'PYMODULE'), + ('xml.etree.ElementInclude', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementInclude.py', + 'PYMODULE'), + ('xml.etree.ElementPath', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementPath.py', + 'PYMODULE'), + ('xml.etree', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\__init__.py', + 'PYMODULE'), + ('psutil._psosx', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psosx.py', + 'PYMODULE'), + ('psutil._pswindows', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pswindows.py', + 'PYMODULE'), + ('psutil._pslinux', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pslinux.py', + 'PYMODULE'), + ('psutil._psposix', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psposix.py', + 'PYMODULE'), + ('psutil._compat', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_compat.py', + 'PYMODULE'), + ('psutil._common', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_common.py', + 'PYMODULE'), + ('curses', + 'C:\\Program Files\\Python310\\lib\\curses\\__init__.py', + 'PYMODULE'), + ('curses.has_key', + 'C:\\Program Files\\Python310\\lib\\curses\\has_key.py', + 'PYMODULE'), + ('__future__', + 'C:\\Program Files\\Python310\\lib\\__future__.py', + 'PYMODULE'), + ('requests', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\__init__.py', + 'PYMODULE'), + ('requests.status_codes', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\requests\\status_codes.py', + 'PYMODULE'), + ('requests.structures', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\structures.py', + 'PYMODULE'), + ('requests.compat', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\compat.py', + 'PYMODULE'), + ('http.cookies', + 'C:\\Program Files\\Python310\\lib\\http\\cookies.py', + 'PYMODULE'), + ('requests.models', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\models.py', + 'PYMODULE'), + ('idna', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\__init__.py', + 'PYMODULE'), + ('idna.intranges', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\intranges.py', + 'PYMODULE'), + ('idna.core', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\core.py', + 'PYMODULE'), + ('idna.uts46data', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\uts46data.py', + 'PYMODULE'), + ('idna.idnadata', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\idnadata.py', + 'PYMODULE'), + ('idna.package_data', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\package_data.py', + 'PYMODULE'), + ('requests.hooks', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\hooks.py', + 'PYMODULE'), + ('requests.cookies', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\cookies.py', + 'PYMODULE'), + ('requests.auth', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\auth.py', + 'PYMODULE'), + ('requests._internal_utils', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\requests\\_internal_utils.py', + 'PYMODULE'), + ('urllib3.util', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\__init__.py', + 'PYMODULE'), + ('urllib3.util.wait', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\wait.py', + 'PYMODULE'), + ('urllib3.util.url', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\url.py', + 'PYMODULE'), + ('urllib3.packages.six', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\six.py', + 'PYMODULE'), + ('urllib3.packages', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\__init__.py', + 'PYMODULE'), + ('urllib3.util.timeout', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\timeout.py', + 'PYMODULE'), + ('urllib3.util.ssl_', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssl_.py', + 'PYMODULE'), + ('urllib3.util.ssltransport', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssltransport.py', + 'PYMODULE'), + ('urllib3.util.retry', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\retry.py', + 'PYMODULE'), + ('urllib3.util.response', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\response.py', + 'PYMODULE'), + ('urllib3.util.request', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\request.py', + 'PYMODULE'), + ('urllib3.util.connection', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\connection.py', + 'PYMODULE'), + ('urllib3.contrib._appengine_environ', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\_appengine_environ.py', + 'PYMODULE'), + ('urllib3.filepost', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\filepost.py', + 'PYMODULE'), + ('urllib3.fields', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\fields.py', + 'PYMODULE'), + ('requests.api', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\api.py', + 'PYMODULE'), + ('requests.sessions', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\sessions.py', + 'PYMODULE'), + ('requests.adapters', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\adapters.py', + 'PYMODULE'), + ('urllib3.contrib.socks', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\socks.py', + 'PYMODULE'), + ('urllib3.connectionpool', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\connectionpool.py', + 'PYMODULE'), + ('urllib3.util.ssl_match_hostname', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssl_match_hostname.py', + 'PYMODULE'), + ('ipaddress', 'C:\\Program Files\\Python310\\lib\\ipaddress.py', 'PYMODULE'), + ('urllib3.util.queue', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\queue.py', + 'PYMODULE'), + ('urllib3.util.proxy', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\proxy.py', + 'PYMODULE'), + ('urllib3.request', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\request.py', + 'PYMODULE'), + ('urllib3.connection', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\connection.py', + 'PYMODULE'), + ('urllib3._version', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\_version.py', + 'PYMODULE'), + ('urllib3._collections', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\_collections.py', + 'PYMODULE'), + ('urllib3.response', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\response.py', + 'PYMODULE'), + ('urllib3.poolmanager', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\poolmanager.py', + 'PYMODULE'), + ('requests.__version__', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\__version__.py', + 'PYMODULE'), + ('requests.utils', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\utils.py', + 'PYMODULE'), + ('requests.certs', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\certs.py', + 'PYMODULE'), + ('certifi', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\__init__.py', + 'PYMODULE'), + ('certifi.core', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\core.py', + 'PYMODULE'), + ('importlib.resources', + 'C:\\Program Files\\Python310\\lib\\importlib\\resources.py', + 'PYMODULE'), + ('requests.packages', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\packages.py', + 'PYMODULE'), + ('urllib3.exceptions', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\exceptions.py', + 'PYMODULE'), + ('urllib3.contrib.pyopenssl', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\pyopenssl.py', + 'PYMODULE'), + ('urllib3.packages.backports.makefile', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\backports\\makefile.py', + 'PYMODULE'), + ('urllib3.packages.backports', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\backports\\__init__.py', + 'PYMODULE'), + ('urllib3.contrib', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\__init__.py', + 'PYMODULE'), + ('charset_normalizer', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\__init__.py', + 'PYMODULE'), + ('charset_normalizer.version', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\version.py', + 'PYMODULE'), + ('charset_normalizer.utils', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\utils.py', + 'PYMODULE'), + ('charset_normalizer.constant', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\constant.py', + 'PYMODULE'), + ('charset_normalizer.assets', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\assets\\__init__.py', + 'PYMODULE'), + ('charset_normalizer.models', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\models.py', + 'PYMODULE'), + ('charset_normalizer.cd', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\cd.py', + 'PYMODULE'), + ('charset_normalizer.md', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\md.py', + 'PYMODULE'), + ('charset_normalizer.legacy', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\legacy.py', + 'PYMODULE'), + ('charset_normalizer.api', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\api.py', + 'PYMODULE'), + ('requests.exceptions', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\exceptions.py', + 'PYMODULE'), + ('urllib3', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\__init__.py', + 'PYMODULE'), + ('random', 'C:\\Program Files\\Python310\\lib\\random.py', 'PYMODULE'), + ('statistics', + 'C:\\Program Files\\Python310\\lib\\statistics.py', + 'PYMODULE'), + ('fractions', 'C:\\Program Files\\Python310\\lib\\fractions.py', 'PYMODULE'), + ('getopt', 'C:\\Program Files\\Python310\\lib\\getopt.py', 'PYMODULE'), + ('ctypes', + 'C:\\Program Files\\Python310\\lib\\ctypes\\__init__.py', + 'PYMODULE'), + ('ctypes._endian', + 'C:\\Program Files\\Python310\\lib\\ctypes\\_endian.py', + 'PYMODULE'), + ('datetime', 'C:\\Program Files\\Python310\\lib\\datetime.py', 'PYMODULE'), + ('_strptime', 'C:\\Program Files\\Python310\\lib\\_strptime.py', 'PYMODULE'), + ('json', 'C:\\Program Files\\Python310\\lib\\json\\__init__.py', 'PYMODULE'), + ('json.encoder', + 'C:\\Program Files\\Python310\\lib\\json\\encoder.py', + 'PYMODULE'), + ('json.decoder', + 'C:\\Program Files\\Python310\\lib\\json\\decoder.py', + 'PYMODULE'), + ('json.scanner', + 'C:\\Program Files\\Python310\\lib\\json\\scanner.py', + 'PYMODULE'), + ('subprocess', + 'C:\\Program Files\\Python310\\lib\\subprocess.py', + 'PYMODULE'), + ('socket', 'C:\\Program Files\\Python310\\lib\\socket.py', 'PYMODULE'), + ('platform', 'C:\\Program Files\\Python310\\lib\\platform.py', 'PYMODULE'), + ('getmac', + 'C:\\Program Files\\Python310\\lib\\site-packages\\getmac\\__init__.py', + 'PYMODULE'), + ('getmac.getmac', + 'C:\\Program Files\\Python310\\lib\\site-packages\\getmac\\getmac.py', + 'PYMODULE'), + ('uuid', 'C:\\Program Files\\Python310\\lib\\uuid.py', 'PYMODULE'), + ('paho.mqtt.client', + 'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\client.py', + 'PYMODULE'), + ('paho.mqtt', + 'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\__init__.py', + 'PYMODULE'), + ('paho', + 'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\__init__.py', + 'PYMODULE'), + ('paho.mqtt.subscribeoptions', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\subscribeoptions.py', + 'PYMODULE'), + ('paho.mqtt.reasoncodes', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\reasoncodes.py', + 'PYMODULE'), + ('paho.mqtt.packettypes', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\packettypes.py', + 'PYMODULE'), + ('paho.mqtt.properties', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\properties.py', + 'PYMODULE'), + ('paho.mqtt.matcher', + 'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\matcher.py', + 'PYMODULE'), + ('asyncio.log', + 'C:\\Program Files\\Python310\\lib\\asyncio\\log.py', + 'PYMODULE'), + ('asyncio', + 'C:\\Program Files\\Python310\\lib\\asyncio\\__init__.py', + 'PYMODULE'), + ('asyncio.unix_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\unix_events.py', + 'PYMODULE'), + ('asyncio.windows_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\windows_events.py', + 'PYMODULE'), + ('asyncio.windows_utils', + 'C:\\Program Files\\Python310\\lib\\asyncio\\windows_utils.py', + 'PYMODULE'), + ('asyncio.selector_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\selector_events.py', + 'PYMODULE'), + ('asyncio.proactor_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\proactor_events.py', + 'PYMODULE'), + ('asyncio.base_subprocess', + 'C:\\Program Files\\Python310\\lib\\asyncio\\base_subprocess.py', + 'PYMODULE'), + ('asyncio.threads', + 'C:\\Program Files\\Python310\\lib\\asyncio\\threads.py', + 'PYMODULE'), + ('asyncio.subprocess', + 'C:\\Program Files\\Python310\\lib\\asyncio\\subprocess.py', + 'PYMODULE'), + ('asyncio.streams', + 'C:\\Program Files\\Python310\\lib\\asyncio\\streams.py', + 'PYMODULE'), + ('asyncio.queues', + 'C:\\Program Files\\Python310\\lib\\asyncio\\queues.py', + 'PYMODULE'), + ('asyncio.runners', + 'C:\\Program Files\\Python310\\lib\\asyncio\\runners.py', + 'PYMODULE'), + ('asyncio.base_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\base_events.py', + 'PYMODULE'), + ('concurrent.futures', + 'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\__init__.py', + 'PYMODULE'), + ('concurrent.futures.thread', + 'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\thread.py', + 'PYMODULE'), + ('concurrent.futures.process', + 'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\process.py', + 'PYMODULE'), + ('concurrent.futures._base', + 'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\_base.py', + 'PYMODULE'), + ('concurrent', + 'C:\\Program Files\\Python310\\lib\\concurrent\\__init__.py', + 'PYMODULE'), + ('asyncio.trsock', + 'C:\\Program Files\\Python310\\lib\\asyncio\\trsock.py', + 'PYMODULE'), + ('asyncio.staggered', + 'C:\\Program Files\\Python310\\lib\\asyncio\\staggered.py', + 'PYMODULE'), + ('asyncio.tasks', + 'C:\\Program Files\\Python310\\lib\\asyncio\\tasks.py', + 'PYMODULE'), + ('asyncio.base_tasks', + 'C:\\Program Files\\Python310\\lib\\asyncio\\base_tasks.py', + 'PYMODULE'), + ('asyncio.locks', + 'C:\\Program Files\\Python310\\lib\\asyncio\\locks.py', + 'PYMODULE'), + ('asyncio.mixins', + 'C:\\Program Files\\Python310\\lib\\asyncio\\mixins.py', + 'PYMODULE'), + ('asyncio.sslproto', + 'C:\\Program Files\\Python310\\lib\\asyncio\\sslproto.py', + 'PYMODULE'), + ('asyncio.transports', + 'C:\\Program Files\\Python310\\lib\\asyncio\\transports.py', + 'PYMODULE'), + ('asyncio.protocols', + 'C:\\Program Files\\Python310\\lib\\asyncio\\protocols.py', + 'PYMODULE'), + ('asyncio.futures', + 'C:\\Program Files\\Python310\\lib\\asyncio\\futures.py', + 'PYMODULE'), + ('asyncio.exceptions', + 'C:\\Program Files\\Python310\\lib\\asyncio\\exceptions.py', + 'PYMODULE'), + ('asyncio.events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\events.py', + 'PYMODULE'), + ('asyncio.coroutines', + 'C:\\Program Files\\Python310\\lib\\asyncio\\coroutines.py', + 'PYMODULE'), + ('asyncio.base_futures', + 'C:\\Program Files\\Python310\\lib\\asyncio\\base_futures.py', + 'PYMODULE'), + ('asyncio.format_helpers', + 'C:\\Program Files\\Python310\\lib\\asyncio\\format_helpers.py', + 'PYMODULE'), + ('asyncio.constants', + 'C:\\Program Files\\Python310\\lib\\asyncio\\constants.py', + 'PYMODULE')], + [('VCRUNTIME140.dll', + 'C:\\Program Files\\Python310\\VCRUNTIME140.dll', + 'BINARY'), + ('python310.dll', 'C:\\Program Files\\Python310\\python310.dll', 'BINARY'), + ('_multiprocessing', + 'C:\\Program Files\\Python310\\DLLs\\_multiprocessing.pyd', + 'EXTENSION'), + ('pyexpat', 'C:\\Program Files\\Python310\\DLLs\\pyexpat.pyd', 'EXTENSION'), + ('_ssl', 'C:\\Program Files\\Python310\\DLLs\\_ssl.pyd', 'EXTENSION'), + ('_decimal', 'C:\\Program Files\\Python310\\DLLs\\_decimal.pyd', 'EXTENSION'), + ('_hashlib', 'C:\\Program Files\\Python310\\DLLs\\_hashlib.pyd', 'EXTENSION'), + ('select', 'C:\\Program Files\\Python310\\DLLs\\select.pyd', 'EXTENSION'), + ('_lzma', 'C:\\Program Files\\Python310\\DLLs\\_lzma.pyd', 'EXTENSION'), + ('_bz2', 'C:\\Program Files\\Python310\\DLLs\\_bz2.pyd', 'EXTENSION'), + ('_queue', 'C:\\Program Files\\Python310\\DLLs\\_queue.pyd', 'EXTENSION'), + ('unicodedata', + 'C:\\Program Files\\Python310\\DLLs\\unicodedata.pyd', + 'EXTENSION'), + ('_elementtree', + 'C:\\Program Files\\Python310\\DLLs\\_elementtree.pyd', + 'EXTENSION'), + ('psutil._psutil_windows', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\psutil\\_psutil_windows.pyd', + 'EXTENSION'), + ('_ctypes', 'C:\\Program Files\\Python310\\DLLs\\_ctypes.pyd', 'EXTENSION'), + ('_socket', 'C:\\Program Files\\Python310\\DLLs\\_socket.pyd', 'EXTENSION'), + ('_uuid', 'C:\\Program Files\\Python310\\DLLs\\_uuid.pyd', 'EXTENSION'), + ('_overlapped', + 'C:\\Program Files\\Python310\\DLLs\\_overlapped.pyd', + 'EXTENSION'), + ('_asyncio', 'C:\\Program Files\\Python310\\DLLs\\_asyncio.pyd', 'EXTENSION'), + ('libcrypto-1_1.dll', + 'C:\\Program Files\\Python310\\DLLs\\libcrypto-1_1.dll', + 'BINARY'), + ('libssl-1_1.dll', + 'C:\\Program Files\\Python310\\DLLs\\libssl-1_1.dll', + 'BINARY'), + ('python3.dll', 'C:\\Program Files\\Python310\\python3.dll', 'BINARY'), + ('libffi-7.dll', + 'C:\\Program Files\\Python310\\DLLs\\libffi-7.dll', + 'BINARY')], + [], + [], + [('base_library.zip', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\base_library.zip', + 'DATA'), + ('certifi\\py.typed', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\py.typed', + 'DATA'), + ('certifi\\cacert.pem', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\cacert.pem', + 'DATA')], + []) diff --git a/build/mqtt_srv/EXE-00.toc b/build/mqtt_srv/EXE-00.toc new file mode 100644 index 0000000..8438080 --- /dev/null +++ b/build/mqtt_srv/EXE-00.toc @@ -0,0 +1,115 @@ +('X:\\__GITHUB\\python\\dist\\mqtt_srv.exe', + False, + False, + False, + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\PyInstaller\\bootloader\\images\\icon-windowed.ico', + None, + False, + False, + 'true', + True, + True, + False, + None, + None, + None, + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\mqtt_srv.pkg', + [('PYZ-00.pyz', 'X:\\__GITHUB\\python\\build\\mqtt_srv\\PYZ-00.pyz', 'PYZ'), + ('struct', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\struct.pyc', + 'PYMODULE'), + ('pyimod01_archive', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod01_archive.pyc', + 'PYMODULE'), + ('pyimod02_importers', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod02_importers.pyc', + 'PYMODULE'), + ('pyimod03_ctypes', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod03_ctypes.pyc', + 'PYMODULE'), + ('pyimod04_pywin32', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod04_pywin32.pyc', + 'PYMODULE'), + ('pyiboot01_bootstrap', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\PyInstaller\\loader\\pyiboot01_bootstrap.py', + 'PYSOURCE'), + ('pyi_rth_inspect', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py', + 'PYSOURCE'), + ('pyi_rth_subprocess', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_subprocess.py', + 'PYSOURCE'), + ('pyi_rth_pkgutil', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py', + 'PYSOURCE'), + ('pyi_rth_multiprocessing', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py', + 'PYSOURCE'), + ('mqtt_srv', + '\\\\192.168.77.106\\Data\\__GITHUB\\python\\mqtt_srv.pyw', + 'PYSOURCE'), + ('VCRUNTIME140.dll', + 'C:\\Program Files\\Python310\\VCRUNTIME140.dll', + 'BINARY'), + ('python310.dll', 'C:\\Program Files\\Python310\\python310.dll', 'BINARY'), + ('_multiprocessing', + 'C:\\Program Files\\Python310\\DLLs\\_multiprocessing.pyd', + 'EXTENSION'), + ('pyexpat', 'C:\\Program Files\\Python310\\DLLs\\pyexpat.pyd', 'EXTENSION'), + ('_ssl', 'C:\\Program Files\\Python310\\DLLs\\_ssl.pyd', 'EXTENSION'), + ('_decimal', 'C:\\Program Files\\Python310\\DLLs\\_decimal.pyd', 'EXTENSION'), + ('_hashlib', 'C:\\Program Files\\Python310\\DLLs\\_hashlib.pyd', 'EXTENSION'), + ('select', 'C:\\Program Files\\Python310\\DLLs\\select.pyd', 'EXTENSION'), + ('_lzma', 'C:\\Program Files\\Python310\\DLLs\\_lzma.pyd', 'EXTENSION'), + ('_bz2', 'C:\\Program Files\\Python310\\DLLs\\_bz2.pyd', 'EXTENSION'), + ('_queue', 'C:\\Program Files\\Python310\\DLLs\\_queue.pyd', 'EXTENSION'), + ('unicodedata', + 'C:\\Program Files\\Python310\\DLLs\\unicodedata.pyd', + 'EXTENSION'), + ('_elementtree', + 'C:\\Program Files\\Python310\\DLLs\\_elementtree.pyd', + 'EXTENSION'), + ('psutil._psutil_windows', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\psutil\\_psutil_windows.pyd', + 'EXTENSION'), + ('_ctypes', 'C:\\Program Files\\Python310\\DLLs\\_ctypes.pyd', 'EXTENSION'), + ('_socket', 'C:\\Program Files\\Python310\\DLLs\\_socket.pyd', 'EXTENSION'), + ('_uuid', 'C:\\Program Files\\Python310\\DLLs\\_uuid.pyd', 'EXTENSION'), + ('_overlapped', + 'C:\\Program Files\\Python310\\DLLs\\_overlapped.pyd', + 'EXTENSION'), + ('_asyncio', 'C:\\Program Files\\Python310\\DLLs\\_asyncio.pyd', 'EXTENSION'), + ('libcrypto-1_1.dll', + 'C:\\Program Files\\Python310\\DLLs\\libcrypto-1_1.dll', + 'BINARY'), + ('libssl-1_1.dll', + 'C:\\Program Files\\Python310\\DLLs\\libssl-1_1.dll', + 'BINARY'), + ('python3.dll', 'C:\\Program Files\\Python310\\python3.dll', 'BINARY'), + ('libffi-7.dll', + 'C:\\Program Files\\Python310\\DLLs\\libffi-7.dll', + 'BINARY'), + ('base_library.zip', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\base_library.zip', + 'DATA'), + ('certifi\\py.typed', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\py.typed', + 'DATA'), + ('certifi\\cacert.pem', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\cacert.pem', + 'DATA')], + [], + False, + False, + 1669484603, + [('runw.exe', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\PyInstaller\\bootloader\\Windows-64bit\\runw.exe', + 'EXECUTABLE')]) diff --git a/build/mqtt_srv/PKG-00.toc b/build/mqtt_srv/PKG-00.toc new file mode 100644 index 0000000..e0d9ac0 --- /dev/null +++ b/build/mqtt_srv/PKG-00.toc @@ -0,0 +1,106 @@ +('X:\\__GITHUB\\python\\build\\mqtt_srv\\mqtt_srv.pkg', + {'BINARY': 1, + 'DATA': 1, + 'EXECUTABLE': 1, + 'EXTENSION': 1, + 'PYMODULE': 1, + 'PYSOURCE': 1, + 'PYZ': 0, + 'SPLASH': 1}, + [('PYZ-00.pyz', 'X:\\__GITHUB\\python\\build\\mqtt_srv\\PYZ-00.pyz', 'PYZ'), + ('struct', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\struct.pyc', + 'PYMODULE'), + ('pyimod01_archive', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod01_archive.pyc', + 'PYMODULE'), + ('pyimod02_importers', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod02_importers.pyc', + 'PYMODULE'), + ('pyimod03_ctypes', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod03_ctypes.pyc', + 'PYMODULE'), + ('pyimod04_pywin32', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod04_pywin32.pyc', + 'PYMODULE'), + ('pyiboot01_bootstrap', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\PyInstaller\\loader\\pyiboot01_bootstrap.py', + 'PYSOURCE'), + ('pyi_rth_inspect', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py', + 'PYSOURCE'), + ('pyi_rth_subprocess', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_subprocess.py', + 'PYSOURCE'), + ('pyi_rth_pkgutil', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py', + 'PYSOURCE'), + ('pyi_rth_multiprocessing', + 'C:\\Program ' + 'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py', + 'PYSOURCE'), + ('mqtt_srv', + '\\\\192.168.77.106\\Data\\__GITHUB\\python\\mqtt_srv.pyw', + 'PYSOURCE'), + ('VCRUNTIME140.dll', + 'C:\\Program Files\\Python310\\VCRUNTIME140.dll', + 'BINARY'), + ('python310.dll', 'C:\\Program Files\\Python310\\python310.dll', 'BINARY'), + ('_multiprocessing', + 'C:\\Program Files\\Python310\\DLLs\\_multiprocessing.pyd', + 'EXTENSION'), + ('pyexpat', 'C:\\Program Files\\Python310\\DLLs\\pyexpat.pyd', 'EXTENSION'), + ('_ssl', 'C:\\Program Files\\Python310\\DLLs\\_ssl.pyd', 'EXTENSION'), + ('_decimal', 'C:\\Program Files\\Python310\\DLLs\\_decimal.pyd', 'EXTENSION'), + ('_hashlib', 'C:\\Program Files\\Python310\\DLLs\\_hashlib.pyd', 'EXTENSION'), + ('select', 'C:\\Program Files\\Python310\\DLLs\\select.pyd', 'EXTENSION'), + ('_lzma', 'C:\\Program Files\\Python310\\DLLs\\_lzma.pyd', 'EXTENSION'), + ('_bz2', 'C:\\Program Files\\Python310\\DLLs\\_bz2.pyd', 'EXTENSION'), + ('_queue', 'C:\\Program Files\\Python310\\DLLs\\_queue.pyd', 'EXTENSION'), + ('unicodedata', + 'C:\\Program Files\\Python310\\DLLs\\unicodedata.pyd', + 'EXTENSION'), + ('_elementtree', + 'C:\\Program Files\\Python310\\DLLs\\_elementtree.pyd', + 'EXTENSION'), + ('psutil._psutil_windows', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\psutil\\_psutil_windows.pyd', + 'EXTENSION'), + ('_ctypes', 'C:\\Program Files\\Python310\\DLLs\\_ctypes.pyd', 'EXTENSION'), + ('_socket', 'C:\\Program Files\\Python310\\DLLs\\_socket.pyd', 'EXTENSION'), + ('_uuid', 'C:\\Program Files\\Python310\\DLLs\\_uuid.pyd', 'EXTENSION'), + ('_overlapped', + 'C:\\Program Files\\Python310\\DLLs\\_overlapped.pyd', + 'EXTENSION'), + ('_asyncio', 'C:\\Program Files\\Python310\\DLLs\\_asyncio.pyd', 'EXTENSION'), + ('libcrypto-1_1.dll', + 'C:\\Program Files\\Python310\\DLLs\\libcrypto-1_1.dll', + 'BINARY'), + ('libssl-1_1.dll', + 'C:\\Program Files\\Python310\\DLLs\\libssl-1_1.dll', + 'BINARY'), + ('python3.dll', 'C:\\Program Files\\Python310\\python3.dll', 'BINARY'), + ('libffi-7.dll', + 'C:\\Program Files\\Python310\\DLLs\\libffi-7.dll', + 'BINARY'), + ('base_library.zip', + 'X:\\__GITHUB\\python\\build\\mqtt_srv\\base_library.zip', + 'DATA'), + ('certifi\\py.typed', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\py.typed', + 'DATA'), + ('certifi\\cacert.pem', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\cacert.pem', + 'DATA')], + False, + False, + False, + [], + None, + None, + None) diff --git a/build/mqtt_srv/PYZ-00.pyz b/build/mqtt_srv/PYZ-00.pyz new file mode 100644 index 0000000..fa53da2 Binary files /dev/null and b/build/mqtt_srv/PYZ-00.pyz differ diff --git a/build/mqtt_srv/PYZ-00.toc b/build/mqtt_srv/PYZ-00.toc new file mode 100644 index 0000000..41963d4 --- /dev/null +++ b/build/mqtt_srv/PYZ-00.toc @@ -0,0 +1,770 @@ +('X:\\__GITHUB\\python\\build\\mqtt_srv\\PYZ-00.pyz', + [('multiprocessing.popen_spawn_posix', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_spawn_posix.py', + 'PYMODULE'), + ('multiprocessing.resource_tracker', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\resource_tracker.py', + 'PYMODULE'), + ('threading', 'C:\\Program Files\\Python310\\lib\\threading.py', 'PYMODULE'), + ('_threading_local', + 'C:\\Program Files\\Python310\\lib\\_threading_local.py', + 'PYMODULE'), + ('contextlib', + 'C:\\Program Files\\Python310\\lib\\contextlib.py', + 'PYMODULE'), + ('signal', 'C:\\Program Files\\Python310\\lib\\signal.py', 'PYMODULE'), + ('multiprocessing.util', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\util.py', + 'PYMODULE'), + ('multiprocessing.forkserver', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\forkserver.py', + 'PYMODULE'), + ('multiprocessing.connection', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\connection.py', + 'PYMODULE'), + ('multiprocessing.resource_sharer', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\resource_sharer.py', + 'PYMODULE'), + ('xmlrpc.client', + 'C:\\Program Files\\Python310\\lib\\xmlrpc\\client.py', + 'PYMODULE'), + ('xmlrpc', + 'C:\\Program Files\\Python310\\lib\\xmlrpc\\__init__.py', + 'PYMODULE'), + ('gzip', 'C:\\Program Files\\Python310\\lib\\gzip.py', 'PYMODULE'), + ('argparse', 'C:\\Program Files\\Python310\\lib\\argparse.py', 'PYMODULE'), + ('textwrap', 'C:\\Program Files\\Python310\\lib\\textwrap.py', 'PYMODULE'), + ('copy', 'C:\\Program Files\\Python310\\lib\\copy.py', 'PYMODULE'), + ('gettext', 'C:\\Program Files\\Python310\\lib\\gettext.py', 'PYMODULE'), + ('_compression', + 'C:\\Program Files\\Python310\\lib\\_compression.py', + 'PYMODULE'), + ('xml.parsers.expat', + 'C:\\Program Files\\Python310\\lib\\xml\\parsers\\expat.py', + 'PYMODULE'), + ('xml.parsers', + 'C:\\Program Files\\Python310\\lib\\xml\\parsers\\__init__.py', + 'PYMODULE'), + ('xml', 'C:\\Program Files\\Python310\\lib\\xml\\__init__.py', 'PYMODULE'), + ('xml.sax.expatreader', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\expatreader.py', + 'PYMODULE'), + ('xml.sax.saxutils', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\saxutils.py', + 'PYMODULE'), + ('xml.sax', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\__init__.py', + 'PYMODULE'), + ('xml.sax.handler', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\handler.py', + 'PYMODULE'), + ('xml.sax._exceptions', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\_exceptions.py', + 'PYMODULE'), + ('xml.sax.xmlreader', + 'C:\\Program Files\\Python310\\lib\\xml\\sax\\xmlreader.py', + 'PYMODULE'), + ('http.client', + 'C:\\Program Files\\Python310\\lib\\http\\client.py', + 'PYMODULE'), + ('ssl', 'C:\\Program Files\\Python310\\lib\\ssl.py', 'PYMODULE'), + ('calendar', 'C:\\Program Files\\Python310\\lib\\calendar.py', 'PYMODULE'), + ('http', 'C:\\Program Files\\Python310\\lib\\http\\__init__.py', 'PYMODULE'), + ('email.message', + 'C:\\Program Files\\Python310\\lib\\email\\message.py', + 'PYMODULE'), + ('email.policy', + 'C:\\Program Files\\Python310\\lib\\email\\policy.py', + 'PYMODULE'), + ('email.contentmanager', + 'C:\\Program Files\\Python310\\lib\\email\\contentmanager.py', + 'PYMODULE'), + ('email.quoprimime', + 'C:\\Program Files\\Python310\\lib\\email\\quoprimime.py', + 'PYMODULE'), + ('string', 'C:\\Program Files\\Python310\\lib\\string.py', 'PYMODULE'), + ('email.headerregistry', + 'C:\\Program Files\\Python310\\lib\\email\\headerregistry.py', + 'PYMODULE'), + ('email._header_value_parser', + 'C:\\Program Files\\Python310\\lib\\email\\_header_value_parser.py', + 'PYMODULE'), + ('email.iterators', + 'C:\\Program Files\\Python310\\lib\\email\\iterators.py', + 'PYMODULE'), + ('email.generator', + 'C:\\Program Files\\Python310\\lib\\email\\generator.py', + 'PYMODULE'), + ('email._encoded_words', + 'C:\\Program Files\\Python310\\lib\\email\\_encoded_words.py', + 'PYMODULE'), + ('email.charset', + 'C:\\Program Files\\Python310\\lib\\email\\charset.py', + 'PYMODULE'), + ('email.encoders', + 'C:\\Program Files\\Python310\\lib\\email\\encoders.py', + 'PYMODULE'), + ('email.base64mime', + 'C:\\Program Files\\Python310\\lib\\email\\base64mime.py', + 'PYMODULE'), + ('email._policybase', + 'C:\\Program Files\\Python310\\lib\\email\\_policybase.py', + 'PYMODULE'), + ('email.header', + 'C:\\Program Files\\Python310\\lib\\email\\header.py', + 'PYMODULE'), + ('email.errors', + 'C:\\Program Files\\Python310\\lib\\email\\errors.py', + 'PYMODULE'), + ('email.utils', + 'C:\\Program Files\\Python310\\lib\\email\\utils.py', + 'PYMODULE'), + ('email._parseaddr', + 'C:\\Program Files\\Python310\\lib\\email\\_parseaddr.py', + 'PYMODULE'), + ('email', + 'C:\\Program Files\\Python310\\lib\\email\\__init__.py', + 'PYMODULE'), + ('quopri', 'C:\\Program Files\\Python310\\lib\\quopri.py', 'PYMODULE'), + ('uu', 'C:\\Program Files\\Python310\\lib\\uu.py', 'PYMODULE'), + ('optparse', 'C:\\Program Files\\Python310\\lib\\optparse.py', 'PYMODULE'), + ('email.parser', + 'C:\\Program Files\\Python310\\lib\\email\\parser.py', + 'PYMODULE'), + ('email.feedparser', + 'C:\\Program Files\\Python310\\lib\\email\\feedparser.py', + 'PYMODULE'), + ('decimal', 'C:\\Program Files\\Python310\\lib\\decimal.py', 'PYMODULE'), + ('_pydecimal', + 'C:\\Program Files\\Python310\\lib\\_pydecimal.py', + 'PYMODULE'), + ('contextvars', + 'C:\\Program Files\\Python310\\lib\\contextvars.py', + 'PYMODULE'), + ('numbers', 'C:\\Program Files\\Python310\\lib\\numbers.py', 'PYMODULE'), + ('base64', 'C:\\Program Files\\Python310\\lib\\base64.py', 'PYMODULE'), + ('hmac', 'C:\\Program Files\\Python310\\lib\\hmac.py', 'PYMODULE'), + ('hashlib', 'C:\\Program Files\\Python310\\lib\\hashlib.py', 'PYMODULE'), + ('struct', 'C:\\Program Files\\Python310\\lib\\struct.py', 'PYMODULE'), + ('selectors', 'C:\\Program Files\\Python310\\lib\\selectors.py', 'PYMODULE'), + ('tempfile', 'C:\\Program Files\\Python310\\lib\\tempfile.py', 'PYMODULE'), + ('shutil', 'C:\\Program Files\\Python310\\lib\\shutil.py', 'PYMODULE'), + ('zipfile', 'C:\\Program Files\\Python310\\lib\\zipfile.py', 'PYMODULE'), + ('py_compile', + 'C:\\Program Files\\Python310\\lib\\py_compile.py', + 'PYMODULE'), + ('importlib.machinery', + 'C:\\Program Files\\Python310\\lib\\importlib\\machinery.py', + 'PYMODULE'), + ('importlib', + 'C:\\Program Files\\Python310\\lib\\importlib\\__init__.py', + 'PYMODULE'), + ('importlib._common', + 'C:\\Program Files\\Python310\\lib\\importlib\\_common.py', + 'PYMODULE'), + ('importlib._adapters', + 'C:\\Program Files\\Python310\\lib\\importlib\\_adapters.py', + 'PYMODULE'), + ('typing', 'C:\\Program Files\\Python310\\lib\\typing.py', 'PYMODULE'), + ('importlib.abc', + 'C:\\Program Files\\Python310\\lib\\importlib\\abc.py', + 'PYMODULE'), + ('importlib._abc', + 'C:\\Program Files\\Python310\\lib\\importlib\\_abc.py', + 'PYMODULE'), + ('importlib._bootstrap', + 'C:\\Program Files\\Python310\\lib\\importlib\\_bootstrap.py', + 'PYMODULE'), + ('importlib._bootstrap_external', + 'C:\\Program Files\\Python310\\lib\\importlib\\_bootstrap_external.py', + 'PYMODULE'), + ('importlib.metadata', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\__init__.py', + 'PYMODULE'), + ('importlib.metadata._itertools', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_itertools.py', + 'PYMODULE'), + ('importlib.metadata._functools', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_functools.py', + 'PYMODULE'), + ('importlib.metadata._collections', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_collections.py', + 'PYMODULE'), + ('importlib.metadata._meta', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_meta.py', + 'PYMODULE'), + ('importlib.metadata._adapters', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_adapters.py', + 'PYMODULE'), + ('importlib.metadata._text', + 'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_text.py', + 'PYMODULE'), + ('csv', 'C:\\Program Files\\Python310\\lib\\csv.py', 'PYMODULE'), + ('importlib.readers', + 'C:\\Program Files\\Python310\\lib\\importlib\\readers.py', + 'PYMODULE'), + ('importlib.util', + 'C:\\Program Files\\Python310\\lib\\importlib\\util.py', + 'PYMODULE'), + ('tarfile', 'C:\\Program Files\\Python310\\lib\\tarfile.py', 'PYMODULE'), + ('lzma', 'C:\\Program Files\\Python310\\lib\\lzma.py', 'PYMODULE'), + ('bz2', 'C:\\Program Files\\Python310\\lib\\bz2.py', 'PYMODULE'), + ('logging', + 'C:\\Program Files\\Python310\\lib\\logging\\__init__.py', + 'PYMODULE'), + ('pickle', 'C:\\Program Files\\Python310\\lib\\pickle.py', 'PYMODULE'), + ('pprint', 'C:\\Program Files\\Python310\\lib\\pprint.py', 'PYMODULE'), + ('dataclasses', + 'C:\\Program Files\\Python310\\lib\\dataclasses.py', + 'PYMODULE'), + ('inspect', 'C:\\Program Files\\Python310\\lib\\inspect.py', 'PYMODULE'), + ('dis', 'C:\\Program Files\\Python310\\lib\\dis.py', 'PYMODULE'), + ('opcode', 'C:\\Program Files\\Python310\\lib\\opcode.py', 'PYMODULE'), + ('ast', 'C:\\Program Files\\Python310\\lib\\ast.py', 'PYMODULE'), + ('_compat_pickle', + 'C:\\Program Files\\Python310\\lib\\_compat_pickle.py', + 'PYMODULE'), + ('multiprocessing.process', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\process.py', + 'PYMODULE'), + ('multiprocessing.context', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\context.py', + 'PYMODULE'), + ('multiprocessing.popen_forkserver', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_forkserver.py', + 'PYMODULE'), + ('multiprocessing.sharedctypes', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\sharedctypes.py', + 'PYMODULE'), + ('multiprocessing.heap', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\heap.py', + 'PYMODULE'), + ('bisect', 'C:\\Program Files\\Python310\\lib\\bisect.py', 'PYMODULE'), + ('multiprocessing.pool', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\pool.py', + 'PYMODULE'), + ('multiprocessing.dummy', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\dummy\\__init__.py', + 'PYMODULE'), + ('multiprocessing.dummy.connection', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\dummy\\connection.py', + 'PYMODULE'), + ('queue', 'C:\\Program Files\\Python310\\lib\\queue.py', 'PYMODULE'), + ('multiprocessing.queues', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\queues.py', + 'PYMODULE'), + ('multiprocessing.synchronize', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\synchronize.py', + 'PYMODULE'), + ('multiprocessing.managers', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\managers.py', + 'PYMODULE'), + ('multiprocessing.shared_memory', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\shared_memory.py', + 'PYMODULE'), + ('secrets', 'C:\\Program Files\\Python310\\lib\\secrets.py', 'PYMODULE'), + ('multiprocessing.reduction', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\reduction.py', + 'PYMODULE'), + ('multiprocessing.popen_fork', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_fork.py', + 'PYMODULE'), + ('multiprocessing.popen_spawn_win32', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_spawn_win32.py', + 'PYMODULE'), + ('multiprocessing.spawn', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\spawn.py', + 'PYMODULE'), + ('runpy', 'C:\\Program Files\\Python310\\lib\\runpy.py', 'PYMODULE'), + ('pkgutil', 'C:\\Program Files\\Python310\\lib\\pkgutil.py', 'PYMODULE'), + ('zipimport', 'C:\\Program Files\\Python310\\lib\\zipimport.py', 'PYMODULE'), + ('multiprocessing', + 'C:\\Program Files\\Python310\\lib\\multiprocessing\\__init__.py', + 'PYMODULE'), + ('getpass', 'C:\\Program Files\\Python310\\lib\\getpass.py', 'PYMODULE'), + ('nturl2path', + 'C:\\Program Files\\Python310\\lib\\nturl2path.py', + 'PYMODULE'), + ('ftplib', 'C:\\Program Files\\Python310\\lib\\ftplib.py', 'PYMODULE'), + ('netrc', 'C:\\Program Files\\Python310\\lib\\netrc.py', 'PYMODULE'), + ('shlex', 'C:\\Program Files\\Python310\\lib\\shlex.py', 'PYMODULE'), + ('mimetypes', 'C:\\Program Files\\Python310\\lib\\mimetypes.py', 'PYMODULE'), + ('http.cookiejar', + 'C:\\Program Files\\Python310\\lib\\http\\cookiejar.py', + 'PYMODULE'), + ('stringprep', + 'C:\\Program Files\\Python310\\lib\\stringprep.py', + 'PYMODULE'), + ('tracemalloc', + 'C:\\Program Files\\Python310\\lib\\tracemalloc.py', + 'PYMODULE'), + ('_py_abc', 'C:\\Program Files\\Python310\\lib\\_py_abc.py', 'PYMODULE'), + ('ping3', + 'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\__init__.py', + 'PYMODULE'), + ('ping3.enums', + 'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\enums.py', + 'PYMODULE'), + ('ping3.errors', + 'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\errors.py', + 'PYMODULE'), + ('psutil', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\__init__.py', + 'PYMODULE'), + ('psutil._psaix', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psaix.py', + 'PYMODULE'), + ('glob', 'C:\\Program Files\\Python310\\lib\\glob.py', 'PYMODULE'), + ('psutil._pssunos', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pssunos.py', + 'PYMODULE'), + ('psutil._psbsd', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psbsd.py', + 'PYMODULE'), + ('xml.etree.ElementTree', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementTree.py', + 'PYMODULE'), + ('xml.etree.cElementTree', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\cElementTree.py', + 'PYMODULE'), + ('xml.etree.ElementInclude', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementInclude.py', + 'PYMODULE'), + ('xml.etree.ElementPath', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementPath.py', + 'PYMODULE'), + ('xml.etree', + 'C:\\Program Files\\Python310\\lib\\xml\\etree\\__init__.py', + 'PYMODULE'), + ('psutil._psosx', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psosx.py', + 'PYMODULE'), + ('psutil._pswindows', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pswindows.py', + 'PYMODULE'), + ('psutil._pslinux', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pslinux.py', + 'PYMODULE'), + ('psutil._psposix', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psposix.py', + 'PYMODULE'), + ('psutil._compat', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_compat.py', + 'PYMODULE'), + ('psutil._common', + 'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_common.py', + 'PYMODULE'), + ('curses', + 'C:\\Program Files\\Python310\\lib\\curses\\__init__.py', + 'PYMODULE'), + ('curses.has_key', + 'C:\\Program Files\\Python310\\lib\\curses\\has_key.py', + 'PYMODULE'), + ('__future__', + 'C:\\Program Files\\Python310\\lib\\__future__.py', + 'PYMODULE'), + ('requests', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\__init__.py', + 'PYMODULE'), + ('requests.status_codes', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\requests\\status_codes.py', + 'PYMODULE'), + ('requests.structures', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\structures.py', + 'PYMODULE'), + ('requests.compat', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\compat.py', + 'PYMODULE'), + ('http.cookies', + 'C:\\Program Files\\Python310\\lib\\http\\cookies.py', + 'PYMODULE'), + ('requests.models', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\models.py', + 'PYMODULE'), + ('idna', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\__init__.py', + 'PYMODULE'), + ('idna.intranges', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\intranges.py', + 'PYMODULE'), + ('idna.core', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\core.py', + 'PYMODULE'), + ('idna.uts46data', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\uts46data.py', + 'PYMODULE'), + ('idna.idnadata', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\idnadata.py', + 'PYMODULE'), + ('idna.package_data', + 'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\package_data.py', + 'PYMODULE'), + ('requests.hooks', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\hooks.py', + 'PYMODULE'), + ('requests.cookies', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\cookies.py', + 'PYMODULE'), + ('requests.auth', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\auth.py', + 'PYMODULE'), + ('requests._internal_utils', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\requests\\_internal_utils.py', + 'PYMODULE'), + ('urllib3.util', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\__init__.py', + 'PYMODULE'), + ('urllib3.util.wait', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\wait.py', + 'PYMODULE'), + ('urllib3.util.url', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\url.py', + 'PYMODULE'), + ('urllib3.packages.six', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\six.py', + 'PYMODULE'), + ('urllib3.packages', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\__init__.py', + 'PYMODULE'), + ('urllib3.util.timeout', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\timeout.py', + 'PYMODULE'), + ('urllib3.util.ssl_', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssl_.py', + 'PYMODULE'), + ('urllib3.util.ssltransport', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssltransport.py', + 'PYMODULE'), + ('urllib3.util.retry', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\retry.py', + 'PYMODULE'), + ('urllib3.util.response', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\response.py', + 'PYMODULE'), + ('urllib3.util.request', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\request.py', + 'PYMODULE'), + ('urllib3.util.connection', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\connection.py', + 'PYMODULE'), + ('urllib3.contrib._appengine_environ', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\_appengine_environ.py', + 'PYMODULE'), + ('urllib3.filepost', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\filepost.py', + 'PYMODULE'), + ('urllib3.fields', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\fields.py', + 'PYMODULE'), + ('requests.api', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\api.py', + 'PYMODULE'), + ('requests.sessions', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\sessions.py', + 'PYMODULE'), + ('requests.adapters', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\adapters.py', + 'PYMODULE'), + ('urllib3.contrib.socks', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\socks.py', + 'PYMODULE'), + ('urllib3.connectionpool', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\connectionpool.py', + 'PYMODULE'), + ('urllib3.util.ssl_match_hostname', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssl_match_hostname.py', + 'PYMODULE'), + ('ipaddress', 'C:\\Program Files\\Python310\\lib\\ipaddress.py', 'PYMODULE'), + ('urllib3.util.queue', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\queue.py', + 'PYMODULE'), + ('urllib3.util.proxy', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\proxy.py', + 'PYMODULE'), + ('urllib3.request', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\request.py', + 'PYMODULE'), + ('urllib3.connection', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\connection.py', + 'PYMODULE'), + ('urllib3._version', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\_version.py', + 'PYMODULE'), + ('urllib3._collections', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\_collections.py', + 'PYMODULE'), + ('urllib3.response', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\response.py', + 'PYMODULE'), + ('urllib3.poolmanager', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\poolmanager.py', + 'PYMODULE'), + ('requests.__version__', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\__version__.py', + 'PYMODULE'), + ('requests.utils', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\utils.py', + 'PYMODULE'), + ('requests.certs', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\certs.py', + 'PYMODULE'), + ('certifi', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\__init__.py', + 'PYMODULE'), + ('certifi.core', + 'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\core.py', + 'PYMODULE'), + ('importlib.resources', + 'C:\\Program Files\\Python310\\lib\\importlib\\resources.py', + 'PYMODULE'), + ('requests.packages', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\packages.py', + 'PYMODULE'), + ('urllib3.exceptions', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\exceptions.py', + 'PYMODULE'), + ('urllib3.contrib.pyopenssl', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\pyopenssl.py', + 'PYMODULE'), + ('urllib3.packages.backports.makefile', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\backports\\makefile.py', + 'PYMODULE'), + ('urllib3.packages.backports', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\backports\\__init__.py', + 'PYMODULE'), + ('urllib3.contrib', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\__init__.py', + 'PYMODULE'), + ('charset_normalizer', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\__init__.py', + 'PYMODULE'), + ('charset_normalizer.version', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\version.py', + 'PYMODULE'), + ('charset_normalizer.utils', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\utils.py', + 'PYMODULE'), + ('charset_normalizer.constant', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\constant.py', + 'PYMODULE'), + ('charset_normalizer.assets', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\assets\\__init__.py', + 'PYMODULE'), + ('charset_normalizer.models', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\models.py', + 'PYMODULE'), + ('charset_normalizer.cd', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\cd.py', + 'PYMODULE'), + ('charset_normalizer.md', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\md.py', + 'PYMODULE'), + ('charset_normalizer.legacy', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\legacy.py', + 'PYMODULE'), + ('charset_normalizer.api', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\charset_normalizer\\api.py', + 'PYMODULE'), + ('requests.exceptions', + 'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\exceptions.py', + 'PYMODULE'), + ('urllib3', + 'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\__init__.py', + 'PYMODULE'), + ('random', 'C:\\Program Files\\Python310\\lib\\random.py', 'PYMODULE'), + ('statistics', + 'C:\\Program Files\\Python310\\lib\\statistics.py', + 'PYMODULE'), + ('fractions', 'C:\\Program Files\\Python310\\lib\\fractions.py', 'PYMODULE'), + ('getopt', 'C:\\Program Files\\Python310\\lib\\getopt.py', 'PYMODULE'), + ('ctypes', + 'C:\\Program Files\\Python310\\lib\\ctypes\\__init__.py', + 'PYMODULE'), + ('ctypes._endian', + 'C:\\Program Files\\Python310\\lib\\ctypes\\_endian.py', + 'PYMODULE'), + ('datetime', 'C:\\Program Files\\Python310\\lib\\datetime.py', 'PYMODULE'), + ('_strptime', 'C:\\Program Files\\Python310\\lib\\_strptime.py', 'PYMODULE'), + ('json', 'C:\\Program Files\\Python310\\lib\\json\\__init__.py', 'PYMODULE'), + ('json.encoder', + 'C:\\Program Files\\Python310\\lib\\json\\encoder.py', + 'PYMODULE'), + ('json.decoder', + 'C:\\Program Files\\Python310\\lib\\json\\decoder.py', + 'PYMODULE'), + ('json.scanner', + 'C:\\Program Files\\Python310\\lib\\json\\scanner.py', + 'PYMODULE'), + ('subprocess', + 'C:\\Program Files\\Python310\\lib\\subprocess.py', + 'PYMODULE'), + ('socket', 'C:\\Program Files\\Python310\\lib\\socket.py', 'PYMODULE'), + ('platform', 'C:\\Program Files\\Python310\\lib\\platform.py', 'PYMODULE'), + ('getmac', + 'C:\\Program Files\\Python310\\lib\\site-packages\\getmac\\__init__.py', + 'PYMODULE'), + ('getmac.getmac', + 'C:\\Program Files\\Python310\\lib\\site-packages\\getmac\\getmac.py', + 'PYMODULE'), + ('uuid', 'C:\\Program Files\\Python310\\lib\\uuid.py', 'PYMODULE'), + ('paho.mqtt.client', + 'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\client.py', + 'PYMODULE'), + ('paho.mqtt', + 'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\__init__.py', + 'PYMODULE'), + ('paho', + 'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\__init__.py', + 'PYMODULE'), + ('paho.mqtt.subscribeoptions', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\subscribeoptions.py', + 'PYMODULE'), + ('paho.mqtt.reasoncodes', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\reasoncodes.py', + 'PYMODULE'), + ('paho.mqtt.packettypes', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\packettypes.py', + 'PYMODULE'), + ('paho.mqtt.properties', + 'C:\\Program ' + 'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\properties.py', + 'PYMODULE'), + ('paho.mqtt.matcher', + 'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\matcher.py', + 'PYMODULE'), + ('asyncio.log', + 'C:\\Program Files\\Python310\\lib\\asyncio\\log.py', + 'PYMODULE'), + ('asyncio', + 'C:\\Program Files\\Python310\\lib\\asyncio\\__init__.py', + 'PYMODULE'), + ('asyncio.unix_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\unix_events.py', + 'PYMODULE'), + ('asyncio.windows_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\windows_events.py', + 'PYMODULE'), + ('asyncio.windows_utils', + 'C:\\Program Files\\Python310\\lib\\asyncio\\windows_utils.py', + 'PYMODULE'), + ('asyncio.selector_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\selector_events.py', + 'PYMODULE'), + ('asyncio.proactor_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\proactor_events.py', + 'PYMODULE'), + ('asyncio.base_subprocess', + 'C:\\Program Files\\Python310\\lib\\asyncio\\base_subprocess.py', + 'PYMODULE'), + ('asyncio.threads', + 'C:\\Program Files\\Python310\\lib\\asyncio\\threads.py', + 'PYMODULE'), + ('asyncio.subprocess', + 'C:\\Program Files\\Python310\\lib\\asyncio\\subprocess.py', + 'PYMODULE'), + ('asyncio.streams', + 'C:\\Program Files\\Python310\\lib\\asyncio\\streams.py', + 'PYMODULE'), + ('asyncio.queues', + 'C:\\Program Files\\Python310\\lib\\asyncio\\queues.py', + 'PYMODULE'), + ('asyncio.runners', + 'C:\\Program Files\\Python310\\lib\\asyncio\\runners.py', + 'PYMODULE'), + ('asyncio.base_events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\base_events.py', + 'PYMODULE'), + ('concurrent.futures', + 'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\__init__.py', + 'PYMODULE'), + ('concurrent.futures.thread', + 'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\thread.py', + 'PYMODULE'), + ('concurrent.futures.process', + 'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\process.py', + 'PYMODULE'), + ('concurrent.futures._base', + 'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\_base.py', + 'PYMODULE'), + ('concurrent', + 'C:\\Program Files\\Python310\\lib\\concurrent\\__init__.py', + 'PYMODULE'), + ('asyncio.trsock', + 'C:\\Program Files\\Python310\\lib\\asyncio\\trsock.py', + 'PYMODULE'), + ('asyncio.staggered', + 'C:\\Program Files\\Python310\\lib\\asyncio\\staggered.py', + 'PYMODULE'), + ('asyncio.tasks', + 'C:\\Program Files\\Python310\\lib\\asyncio\\tasks.py', + 'PYMODULE'), + ('asyncio.base_tasks', + 'C:\\Program Files\\Python310\\lib\\asyncio\\base_tasks.py', + 'PYMODULE'), + ('asyncio.locks', + 'C:\\Program Files\\Python310\\lib\\asyncio\\locks.py', + 'PYMODULE'), + ('asyncio.mixins', + 'C:\\Program Files\\Python310\\lib\\asyncio\\mixins.py', + 'PYMODULE'), + ('asyncio.sslproto', + 'C:\\Program Files\\Python310\\lib\\asyncio\\sslproto.py', + 'PYMODULE'), + ('asyncio.transports', + 'C:\\Program Files\\Python310\\lib\\asyncio\\transports.py', + 'PYMODULE'), + ('asyncio.protocols', + 'C:\\Program Files\\Python310\\lib\\asyncio\\protocols.py', + 'PYMODULE'), + ('asyncio.futures', + 'C:\\Program Files\\Python310\\lib\\asyncio\\futures.py', + 'PYMODULE'), + ('asyncio.exceptions', + 'C:\\Program Files\\Python310\\lib\\asyncio\\exceptions.py', + 'PYMODULE'), + ('asyncio.events', + 'C:\\Program Files\\Python310\\lib\\asyncio\\events.py', + 'PYMODULE'), + ('asyncio.coroutines', + 'C:\\Program Files\\Python310\\lib\\asyncio\\coroutines.py', + 'PYMODULE'), + ('asyncio.base_futures', + 'C:\\Program Files\\Python310\\lib\\asyncio\\base_futures.py', + 'PYMODULE'), + ('asyncio.format_helpers', + 'C:\\Program Files\\Python310\\lib\\asyncio\\format_helpers.py', + 'PYMODULE'), + ('asyncio.constants', + 'C:\\Program Files\\Python310\\lib\\asyncio\\constants.py', + 'PYMODULE')]) diff --git a/build/mqtt_srv/base_library.zip b/build/mqtt_srv/base_library.zip new file mode 100644 index 0000000..212f0ad Binary files /dev/null and b/build/mqtt_srv/base_library.zip differ diff --git a/build/mqtt_srv/localpycs/pyimod01_archive.pyc b/build/mqtt_srv/localpycs/pyimod01_archive.pyc new file mode 100644 index 0000000..6d14367 Binary files /dev/null and b/build/mqtt_srv/localpycs/pyimod01_archive.pyc differ diff --git a/build/mqtt_srv/localpycs/pyimod02_importers.pyc b/build/mqtt_srv/localpycs/pyimod02_importers.pyc new file mode 100644 index 0000000..1fc7736 Binary files /dev/null and b/build/mqtt_srv/localpycs/pyimod02_importers.pyc differ diff --git a/build/mqtt_srv/localpycs/pyimod03_ctypes.pyc b/build/mqtt_srv/localpycs/pyimod03_ctypes.pyc new file mode 100644 index 0000000..d64ffd9 Binary files /dev/null and b/build/mqtt_srv/localpycs/pyimod03_ctypes.pyc differ diff --git a/build/mqtt_srv/localpycs/pyimod04_pywin32.pyc b/build/mqtt_srv/localpycs/pyimod04_pywin32.pyc new file mode 100644 index 0000000..00397ca Binary files /dev/null and b/build/mqtt_srv/localpycs/pyimod04_pywin32.pyc differ diff --git a/build/mqtt_srv/localpycs/struct.pyc b/build/mqtt_srv/localpycs/struct.pyc new file mode 100644 index 0000000..9251ff0 Binary files /dev/null and b/build/mqtt_srv/localpycs/struct.pyc differ diff --git a/build/mqtt_srv/mqtt_srv.exe.manifest b/build/mqtt_srv/mqtt_srv.exe.manifest new file mode 100644 index 0000000..5358d10 --- /dev/null +++ b/build/mqtt_srv/mqtt_srv.exe.manifest @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + \ No newline at end of file diff --git a/build/mqtt_srv/mqtt_srv.pkg b/build/mqtt_srv/mqtt_srv.pkg new file mode 100644 index 0000000..3447a62 Binary files /dev/null and b/build/mqtt_srv/mqtt_srv.pkg differ diff --git a/build/mqtt_srv/warn-mqtt_srv.txt b/build/mqtt_srv/warn-mqtt_srv.txt new file mode 100644 index 0000000..f41c4ec --- /dev/null +++ b/build/mqtt_srv/warn-mqtt_srv.txt @@ -0,0 +1,70 @@ + +This file lists modules PyInstaller was not able to find. This does not +necessarily mean this module is required for running your program. Python and +Python 3rd-party packages include a lot of conditional or optional modules. For +example the module 'ntpath' only exists on Windows, whereas the module +'posixpath' only exists on Posix systems. + +Types if import: +* top-level: imported at the top-level - look at these first +* conditional: imported within an if-statement +* delayed: imported within a function +* optional: imported within a try-except-statement + +IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for + tracking down the missing module yourself. Thanks! + +missing module named _posixshmem - imported by multiprocessing.resource_tracker (conditional), multiprocessing.shared_memory (conditional) +missing module named org - imported by copy (optional) +missing module named 'org.python' - imported by pickle (optional), xml.sax (delayed, conditional) +missing module named 'java.lang' - imported by platform (delayed, optional), getmac.getmac (conditional, optional), xml.sax._exceptions (conditional) +missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level) +missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level) +missing module named _posixsubprocess - imported by subprocess (optional), multiprocessing.util (delayed) +missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level) +excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), zipimport (top-level) +missing module named pep517 - imported by importlib.metadata (delayed) +missing module named pwd - imported by posixpath (delayed, conditional), shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional), netrc (delayed, conditional), getpass (delayed), psutil (optional) +missing module named grp - imported by shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional) +missing module named posix - imported by os (conditional, optional), shutil (conditional), importlib._bootstrap_external (conditional) +missing module named resource - imported by posix (top-level), psutil._pslinux (optional) +missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level) +missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level) +missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level) +missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level) +missing module named pyimod02_importers - imported by C:\Program Files\Python310\Lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgutil.py (top-level) +missing module named _scproxy - imported by urllib.request (conditional) +missing module named termios - imported by getpass (optional), psutil._compat (delayed, optional) +missing module named autorandr - imported by \\192.168.77.106\Data\__GITHUB\python\mqtt_srv.pyw (conditional) +missing module named psutil._psutil_aix - imported by psutil (top-level), psutil._psaix (top-level) +missing module named psutil._psutil_sunos - imported by psutil (top-level), psutil._pssunos (top-level) +missing module named psutil._psutil_bsd - imported by psutil (top-level), psutil._psbsd (top-level) +missing module named psutil._psutil_linux - imported by psutil (top-level), psutil._pslinux (top-level) +missing module named psutil._psutil_osx - imported by psutil (conditional), psutil._psposix (conditional), psutil._psosx (top-level) +missing module named fcntl - imported by subprocess (optional), getmac.getmac (delayed), psutil._compat (delayed, optional) +missing module named dummy_threading - imported by requests.cookies (optional), psutil._compat (optional) +missing module named _curses - imported by curses (top-level), curses.has_key (top-level) +missing module named simplejson - imported by requests.compat (conditional, optional) +missing module named StringIO - imported by urllib3.packages.six (conditional) +runtime module named urllib3.packages.six.moves - imported by http.client (top-level), urllib3.util.response (top-level), urllib3.connectionpool (top-level), 'urllib3.packages.six.moves.urllib' (top-level), urllib3.util.queue (top-level) +missing module named brotli - imported by urllib3.util.request (optional), urllib3.response (optional) +missing module named brotlicffi - imported by urllib3.util.request (optional), urllib3.response (optional) +missing module named Queue - imported by urllib3.util.queue (conditional) +missing module named "'urllib3.packages.six.moves.urllib'.parse" - imported by urllib3.request (top-level), urllib3.poolmanager (top-level) +missing module named socks - imported by paho.mqtt.client (optional), urllib3.contrib.socks (optional) +missing module named 'typing.io' - imported by importlib.resources (top-level) +missing module named cryptography - imported by urllib3.contrib.pyopenssl (top-level), requests (conditional, optional) +missing module named 'OpenSSL.crypto' - imported by urllib3.contrib.pyopenssl (delayed) +missing module named 'cryptography.x509' - imported by urllib3.contrib.pyopenssl (delayed, optional) +missing module named 'cryptography.hazmat' - imported by urllib3.contrib.pyopenssl (top-level) +missing module named 'OpenSSL.SSL' - imported by urllib3.contrib.pyopenssl (top-level) +missing module named OpenSSL - imported by urllib3.contrib.pyopenssl (top-level) +missing module named chardet - imported by requests.compat (optional), requests (optional), requests.packages (optional) +missing module named unicodedata2 - imported by charset_normalizer.utils (optional) +missing module named urllib3_secure_extra - imported by urllib3 (optional) +missing module named vms_lib - imported by platform (delayed, optional) +missing module named java - imported by platform (delayed) +missing module named _winreg - imported by platform (delayed, optional) +missing module named dns - imported by paho.mqtt.client (optional) +missing module named urlparse - imported by paho.mqtt.client (optional) +missing module named asyncio.DefaultEventLoopPolicy - imported by asyncio (delayed, conditional), asyncio.events (delayed, conditional) diff --git a/build/mqtt_srv/xref-mqtt_srv.html b/build/mqtt_srv/xref-mqtt_srv.html new file mode 100644 index 0000000..a53b1a5 --- /dev/null +++ b/build/mqtt_srv/xref-mqtt_srv.html @@ -0,0 +1,13794 @@ + + + + + modulegraph cross reference for mqtt_srv.pyw, pyi_rth_inspect.py, pyi_rth_multiprocessing.py, pyi_rth_pkgutil.py, pyi_rth_subprocess.py + + + +

modulegraph cross reference for mqtt_srv.pyw, pyi_rth_inspect.py, pyi_rth_multiprocessing.py, pyi_rth_pkgutil.py, pyi_rth_subprocess.py

+ +
+ + mqtt_srv.pyw +Script
+imports: + _collections_abc + • _weakrefset + • abc + • asyncio.log + • autorandr + • codecs + • collections + • collections.abc + • copyreg + • ctypes + • datetime + • encodings + • encodings.aliases + • encodings.ascii + • encodings.base64_codec + • encodings.big5 + • encodings.big5hkscs + • encodings.bz2_codec + • encodings.charmap + • encodings.cp037 + • encodings.cp1006 + • encodings.cp1026 + • encodings.cp1125 + • encodings.cp1140 + • encodings.cp1250 + • encodings.cp1251 + • encodings.cp1252 + • encodings.cp1253 + • encodings.cp1254 + • encodings.cp1255 + • encodings.cp1256 + • encodings.cp1257 + • encodings.cp1258 + • encodings.cp273 + • encodings.cp424 + • encodings.cp437 + • encodings.cp500 + • encodings.cp720 + • encodings.cp737 + • encodings.cp775 + • encodings.cp850 + • encodings.cp852 + • encodings.cp855 + • encodings.cp856 + • encodings.cp857 + • encodings.cp858 + • encodings.cp860 + • encodings.cp861 + • encodings.cp862 + • encodings.cp863 + • encodings.cp864 + • encodings.cp865 + • encodings.cp866 + • encodings.cp869 + • encodings.cp874 + • encodings.cp875 + • encodings.cp932 + • encodings.cp949 + • encodings.cp950 + • encodings.euc_jis_2004 + • encodings.euc_jisx0213 + • encodings.euc_jp + • encodings.euc_kr + • encodings.gb18030 + • encodings.gb2312 + • encodings.gbk + • encodings.hex_codec + • encodings.hp_roman8 + • encodings.hz + • encodings.idna + • encodings.iso2022_jp + • encodings.iso2022_jp_1 + • encodings.iso2022_jp_2 + • encodings.iso2022_jp_2004 + • encodings.iso2022_jp_3 + • encodings.iso2022_jp_ext + • encodings.iso2022_kr + • encodings.iso8859_1 + • encodings.iso8859_10 + • encodings.iso8859_11 + • encodings.iso8859_13 + • encodings.iso8859_14 + • encodings.iso8859_15 + • encodings.iso8859_16 + • encodings.iso8859_2 + • encodings.iso8859_3 + • encodings.iso8859_4 + • encodings.iso8859_5 + • encodings.iso8859_6 + • encodings.iso8859_7 + • encodings.iso8859_8 + • encodings.iso8859_9 + • encodings.johab + • encodings.koi8_r + • encodings.koi8_t + • encodings.koi8_u + • encodings.kz1048 + • encodings.latin_1 + • encodings.mac_arabic + • encodings.mac_croatian + • encodings.mac_cyrillic + • encodings.mac_farsi + • encodings.mac_greek + • encodings.mac_iceland + • encodings.mac_latin2 + • encodings.mac_roman + • encodings.mac_romanian + • encodings.mac_turkish + • encodings.mbcs + • encodings.oem + • encodings.palmos + • encodings.ptcp154 + • encodings.punycode + • encodings.quopri_codec + • encodings.raw_unicode_escape + • encodings.rot_13 + • encodings.shift_jis + • encodings.shift_jis_2004 + • encodings.shift_jisx0213 + • encodings.tis_620 + • encodings.undefined + • encodings.unicode_escape + • encodings.utf_16 + • encodings.utf_16_be + • encodings.utf_16_le + • encodings.utf_32 + • encodings.utf_32_be + • encodings.utf_32_le + • encodings.utf_7 + • encodings.utf_8 + • encodings.utf_8_sig + • encodings.uu_codec + • encodings.zlib_codec + • enum + • fnmatch + • functools + • genericpath + • getmac + • getopt + • heapq + • io + • json + • keyword + • linecache + • locale + • ntpath + • operator + • os + • paho.mqtt.client + • pathlib + • ping3 + • platform + • posixpath + • psutil + • pyi_rth_inspect.py + • pyi_rth_multiprocessing.py + • pyi_rth_pkgutil.py + • pyi_rth_subprocess.py + • random + • re + • reprlib + • requests + • socket + • sre_compile + • sre_constants + • sre_parse + • stat + • subprocess + • sys + • time + • token + • tokenize + • traceback + • types + • urllib + • urllib.error + • urllib.parse + • urllib.request + • urllib.response + • urllib.robotparser + • warnings + • weakref + • winreg + +
+ +
+ +
+ + pyi_rth_inspect.py +Script
+imports: + inspect + • os + • sys + +
+
+imported by: + mqtt_srv.pyw + +
+ +
+ +
+ + pyi_rth_multiprocessing.py +Script
+imports: + multiprocessing + • multiprocessing.popen_fork + • multiprocessing.popen_spawn_posix + • multiprocessing.popen_spawn_win32 + • multiprocessing.spawn + • os + • subprocess + • sys + +
+
+imported by: + mqtt_srv.pyw + +
+ +
+ +
+ + pyi_rth_pkgutil.py +Script
+imports: + os + • pkgutil + • pyimod02_importers + • sys + +
+
+imported by: + mqtt_srv.pyw + +
+ +
+ +
+ + pyi_rth_subprocess.py +Script
+imports: + io + • subprocess + • sys + +
+
+imported by: + mqtt_srv.pyw + +
+ +
+ +
+ + "'urllib3.packages.six.moves.urllib'.parse" +MissingModule
+imported by: + urllib3.poolmanager + • urllib3.request + +
+ +
+ +
+ + 'OpenSSL.SSL' +MissingModule
+imported by: + urllib3.contrib.pyopenssl + +
+ +
+ +
+ + 'OpenSSL.crypto' +MissingModule
+imported by: + urllib3.contrib.pyopenssl + +
+ +
+ +
+ + 'cryptography.hazmat' +MissingModule
+imported by: + urllib3.contrib.pyopenssl + +
+ +
+ +
+ + 'cryptography.x509' +MissingModule
+imported by: + urllib3.contrib.pyopenssl + +
+ +
+ +
+ + 'java.lang' +MissingModule
+imported by: + getmac.getmac + • platform + • xml.sax._exceptions + +
+ +
+ +
+ + 'org.python' +MissingModule
+imported by: + pickle + • xml.sax + +
+ +
+ +
+ + 'typing.io' +MissingModule
+imported by: + importlib.resources + +
+ +
+ +
+ + 'urllib3.packages.six.moves.urllib' +MissingModule
+imported by: + 'urllib3.packages.six.moves.urllib' + +
+ +
+ +
+ + OpenSSL +MissingModule
+imported by: + urllib3.contrib.pyopenssl + +
+ +
+ +
+ + Queue +MissingModule
+imported by: + urllib3.util.queue + +
+ +
+ +
+ + StringIO +MissingModule
+imported by: + urllib3.packages.six + +
+ +
+ +
+ + __future__ +SourceModule
+imported by: + psutil + • psutil._common + • psutil._pslinux + • urllib3 + • urllib3._collections + • urllib3.connection + • urllib3.connectionpool + • urllib3.contrib.pyopenssl + • urllib3.contrib.socks + • urllib3.exceptions + • urllib3.fields + • urllib3.filepost + • urllib3.packages.six + • urllib3.poolmanager + • urllib3.request + • urllib3.response + • urllib3.util + • urllib3.util.connection + • urllib3.util.request + • urllib3.util.response + • urllib3.util.retry + • urllib3.util.ssl_ + • urllib3.util.timeout + • urllib3.util.url + +
+ +
+ +
+ + _abc (builtin module)
+imported by: + abc + +
+ +
+ +
+ + _ast (builtin module)
+imported by: + ast + +
+ +
+ +
+ + _asyncio C:\Program Files\Python310\DLLs\_asyncio.pyd
+imported by: + asyncio.events + • asyncio.futures + • asyncio.tasks + +
+ +
+ +
+ + _bisect (builtin module)
+imported by: + bisect + +
+ +
+ +
+ + _blake2 (builtin module)
+imported by: + hashlib + +
+ +
+ +
+ + _bz2 C:\Program Files\Python310\DLLs\_bz2.pyd
+imported by: + bz2 + +
+ +
+ +
+ + _codecs (builtin module)
+imported by: + codecs + +
+ +
+ +
+ + _codecs_cn (builtin module)
+imported by: + encodings.gb18030 + • encodings.gb2312 + • encodings.gbk + • encodings.hz + +
+ +
+ +
+ + _codecs_hk (builtin module)
+imported by: + encodings.big5hkscs + +
+ +
+ +
+ + _codecs_iso2022 (builtin module)
+imported by: + encodings.iso2022_jp + • encodings.iso2022_jp_1 + • encodings.iso2022_jp_2 + • encodings.iso2022_jp_2004 + • encodings.iso2022_jp_3 + • encodings.iso2022_jp_ext + • encodings.iso2022_kr + +
+ +
+ +
+ + _codecs_jp (builtin module)
+imported by: + encodings.cp932 + • encodings.euc_jis_2004 + • encodings.euc_jisx0213 + • encodings.euc_jp + • encodings.shift_jis + • encodings.shift_jis_2004 + • encodings.shift_jisx0213 + +
+ +
+ +
+ + _codecs_kr (builtin module)
+imported by: + encodings.cp949 + • encodings.euc_kr + • encodings.johab + +
+ +
+ +
+ + _codecs_tw (builtin module)
+imported by: + encodings.big5 + • encodings.cp950 + +
+ +
+ +
+ + _collections (builtin module)
+imported by: + collections + • threading + +
+ +
+ +
+ + _collections_abc +SourceModule
+imports: + abc + • sys + +
+
+imported by: + collections + • collections.abc + • contextlib + • locale + • mqtt_srv.pyw + • os + • pathlib + • random + • types + • weakref + +
+ +
+ +
+ + _compat_pickle +SourceModule
+imported by: + _pickle + • pickle + +
+ +
+ +
+ + _compression +SourceModule
+imports: + io + • sys + +
+
+imported by: + bz2 + • gzip + • lzma + +
+ +
+ +
+ + _contextvars (builtin module)
+imported by: + contextvars + +
+ +
+ +
+ + _csv (builtin module)
+imported by: + csv + +
+ +
+ +
+ + _ctypes C:\Program Files\Python310\DLLs\_ctypes.pyd
+imported by: + ctypes + +
+ +
+ +
+ + _curses +MissingModule
+imports: + curses + +
+
+imported by: + curses + • curses.has_key + +
+ +
+ +
+ + _datetime (builtin module)
+imports: + _strptime + • time + +
+
+imported by: + datetime + +
+ +
+ +
+ + _decimal C:\Program Files\Python310\DLLs\_decimal.pyd
+imported by: + decimal + +
+ +
+ +
+ + _elementtree C:\Program Files\Python310\DLLs\_elementtree.pyd
+imports: + pyexpat + • xml.etree.ElementInclude + • xml.etree.ElementPath + • xml.etree.ElementTree + • xml.etree.cElementTree + +
+
+imported by: + xml.etree.ElementTree + +
+ +
+ +
+ + _frozen_importlib +ExcludedModule
+imported by: + importlib + • importlib.abc + • zipimport + +
+ +
+ +
+ + _frozen_importlib_external +MissingModule
+imported by: + importlib + • importlib._bootstrap + • importlib.abc + • zipimport + +
+ +
+ +
+ + _functools (builtin module)
+imported by: + functools + +
+ +
+ +
+ + _hashlib C:\Program Files\Python310\DLLs\_hashlib.pyd
+imported by: + hashlib + • hmac + +
+ +
+ +
+ + _heapq (builtin module)
+imported by: + heapq + +
+ +
+ +
+ + _imp (builtin module)
+imported by: + importlib + • importlib._bootstrap_external + • importlib.util + • zipimport + +
+ +
+ +
+ + _io (builtin module)
+imported by: + importlib._bootstrap_external + • io + • zipimport + +
+ +
+ +
+ + _json (builtin module)
+imports: + json.decoder + +
+
+imported by: + json.decoder + • json.encoder + • json.scanner + +
+ +
+ +
+ + _locale (builtin module)
+imported by: + locale + • re + +
+ +
+ +
+ + _lzma C:\Program Files\Python310\DLLs\_lzma.pyd
+imported by: + lzma + +
+ +
+ +
+ + _md5 (builtin module)
+imported by: + hashlib + +
+ +
+ +
+ + _multibytecodec (builtin module)
+imported by: + charset_normalizer.utils + • encodings.big5 + • encodings.big5hkscs + • encodings.cp932 + • encodings.cp949 + • encodings.cp950 + • encodings.euc_jis_2004 + • encodings.euc_jisx0213 + • encodings.euc_jp + • encodings.euc_kr + • encodings.gb18030 + • encodings.gb2312 + • encodings.gbk + • encodings.hz + • encodings.iso2022_jp + • encodings.iso2022_jp_1 + • encodings.iso2022_jp_2 + • encodings.iso2022_jp_2004 + • encodings.iso2022_jp_3 + • encodings.iso2022_jp_ext + • encodings.iso2022_kr + • encodings.johab + • encodings.shift_jis + • encodings.shift_jis_2004 + • encodings.shift_jisx0213 + +
+ +
+ +
+ + _multiprocessing C:\Program Files\Python310\DLLs\_multiprocessing.pyd
+imported by: + multiprocessing.connection + • multiprocessing.queues + • multiprocessing.resource_tracker + • multiprocessing.synchronize + +
+ +
+ +
+ + _opcode (builtin module)
+imported by: + opcode + +
+ +
+ +
+ + _operator (builtin module)
+imported by: + hmac + • operator + +
+ +
+ +
+ + _overlapped C:\Program Files\Python310\DLLs\_overlapped.pyd
+imported by: + asyncio.windows_events + +
+ +
+ +
+ + _pickle (builtin module)
+imports: + _compat_pickle + • codecs + • copyreg + +
+
+imported by: + pickle + +
+ +
+ +
+ + _posixshmem +MissingModule
+imported by: + multiprocessing.resource_tracker + • multiprocessing.shared_memory + +
+ +
+ +
+ + _posixsubprocess +MissingModule
+imports: + gc + +
+
+imported by: + multiprocessing.util + • subprocess + +
+ +
+ +
+ + _py_abc +SourceModule
+imports: + _weakrefset + +
+
+imported by: + abc + +
+ +
+ +
+ + _pydecimal +SourceModule
+imports: + collections + • contextvars + • itertools + • locale + • math + • numbers + • re + • sys + +
+
+imported by: + decimal + +
+ +
+ +
+ + _queue C:\Program Files\Python310\DLLs\_queue.pyd
+imported by: + queue + +
+ +
+ +
+ + _random (builtin module)
+imported by: + random + +
+ +
+ +
+ + _scproxy +MissingModule
+imported by: + urllib.request + +
+ +
+ +
+ + _sha1 (builtin module)
+imported by: + hashlib + +
+ +
+ +
+ + _sha256 (builtin module)
+imported by: + hashlib + +
+ +
+ +
+ + _sha3 (builtin module)
+imported by: + hashlib + +
+ +
+ +
+ + _sha512 (builtin module)
+imported by: + hashlib + • random + +
+ +
+ +
+ + _signal (builtin module)
+imported by: + signal + +
+ +
+ +
+ + _socket C:\Program Files\Python310\DLLs\_socket.pyd
+imported by: + socket + +
+ +
+ +
+ + _sre (builtin module)
+imports: + copy + • re + +
+
+imported by: + sre_compile + • sre_constants + +
+ +
+ +
+ + _ssl C:\Program Files\Python310\DLLs\_ssl.pyd
+imports: + socket + +
+
+imported by: + ssl + +
+ +
+ +
+ + _stat (builtin module)
+imported by: + stat + +
+ +
+ +
+ + _statistics (builtin module)
+imported by: + statistics + +
+ +
+ +
+ + _string (builtin module)
+imported by: + string + +
+ +
+ +
+ + _strptime +SourceModule
+imports: + _thread + • calendar + • datetime + • locale + • re + • time + +
+
+imported by: + _datetime + • datetime + • time + +
+ +
+ +
+ + _struct (builtin module)
+imported by: + struct + +
+ +
+ +
+ + _thread (builtin module)
+imported by: + _strptime + • asyncio.base_futures + • dataclasses + • functools + • reprlib + • tempfile + • threading + +
+ +
+ +
+ + _threading_local +SourceModule
+imports: + contextlib + • threading + • weakref + +
+
+imported by: + threading + +
+ +
+ +
+ + _tracemalloc (builtin module)
+imported by: + tracemalloc + +
+ +
+ +
+ + _uuid C:\Program Files\Python310\DLLs\_uuid.pyd
+imported by: + uuid + +
+ +
+ +
+ + _warnings (builtin module)
+imported by: + importlib._bootstrap_external + • warnings + • zipimport + +
+ +
+ +
+ + _weakref (builtin module)
+imported by: + _weakrefset + • collections + • weakref + • xml.sax.expatreader + +
+ +
+ +
+ + _weakrefset +SourceModule
+imports: + _weakref + • types + +
+
+imported by: + _py_abc + • mqtt_srv.pyw + • multiprocessing.process + • threading + • weakref + +
+ +
+ +
+ + _winapi (builtin module)
+imported by: + asyncio.windows_events + • asyncio.windows_utils + • encodings + • mimetypes + • multiprocessing.connection + • multiprocessing.heap + • multiprocessing.popen_spawn_win32 + • multiprocessing.reduction + • multiprocessing.shared_memory + • multiprocessing.spawn + • subprocess + +
+ +
+ +
+ + _winreg +MissingModule
+imported by: + platform + +
+ +
+ +
+ + abc +SourceModule
+imports: + _abc + • _py_abc + +
+
+imported by: + _collections_abc + • contextlib + • dataclasses + • email._policybase + • functools + • importlib._abc + • importlib.abc + • importlib.metadata + • inspect + • io + • mqtt_srv.pyw + • multiprocessing.reduction + • numbers + • os + • selectors + • typing + +
+ +
+ +
+ + argparse +SourceModule
+imports: + copy + • gettext + • os + • re + • shutil + • sys + • textwrap + • warnings + +
+
+imported by: + ast + • calendar + • dis + • gzip + • inspect + • py_compile + • tarfile + • tokenize + • zipfile + +
+ +
+ +
+ + array (builtin module)
+imported by: + multiprocessing.dummy + • multiprocessing.managers + • multiprocessing.reduction + • socket + +
+ +
+ +
+ + ast +SourceModule
+imports: + _ast + • argparse + • collections + • contextlib + • enum + • inspect + • sys + • warnings + +
+
+imported by: + inspect + +
+ +
+ +
+ + asyncio +Package
+imports: + asyncio + • asyncio.DefaultEventLoopPolicy + • asyncio.base_events + • asyncio.base_futures + • asyncio.base_subprocess + • asyncio.base_tasks + • asyncio.constants + • asyncio.coroutines + • asyncio.events + • asyncio.exceptions + • asyncio.format_helpers + • asyncio.futures + • asyncio.locks + • asyncio.mixins + • asyncio.proactor_events + • asyncio.protocols + • asyncio.queues + • asyncio.runners + • asyncio.selector_events + • asyncio.sslproto + • asyncio.staggered + • asyncio.streams + • asyncio.subprocess + • asyncio.tasks + • asyncio.threads + • asyncio.transports + • asyncio.trsock + • asyncio.unix_events + • asyncio.windows_events + • asyncio.windows_utils + • sys + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.base_futures + • asyncio.base_subprocess + • asyncio.base_tasks + • asyncio.constants + • asyncio.coroutines + • asyncio.events + • asyncio.exceptions + • asyncio.format_helpers + • asyncio.futures + • asyncio.locks + • asyncio.log + • asyncio.mixins + • asyncio.proactor_events + • asyncio.protocols + • asyncio.queues + • asyncio.runners + • asyncio.selector_events + • asyncio.sslproto + • asyncio.staggered + • asyncio.streams + • asyncio.subprocess + • asyncio.tasks + • asyncio.threads + • asyncio.transports + • asyncio.trsock + • asyncio.unix_events + • asyncio.windows_events + • asyncio.windows_utils + +
+ +
+ +
+ + asyncio.DefaultEventLoopPolicy +MissingModule
+imported by: + asyncio + • asyncio.events + +
+ +
+ +
+ + asyncio.base_events +SourceModule
+imports: + asyncio + • asyncio.constants + • asyncio.coroutines + • asyncio.events + • asyncio.exceptions + • asyncio.futures + • asyncio.log + • asyncio.protocols + • asyncio.sslproto + • asyncio.staggered + • asyncio.tasks + • asyncio.transports + • asyncio.trsock + • collections + • collections.abc + • concurrent.futures + • functools + • heapq + • itertools + • os + • socket + • ssl + • stat + • subprocess + • sys + • threading + • time + • traceback + • warnings + • weakref + +
+
+imported by: + asyncio + • asyncio.proactor_events + • asyncio.selector_events + • asyncio.unix_events + +
+ +
+ +
+ + asyncio.base_futures +SourceModule
+imports: + _thread + • asyncio + • asyncio.format_helpers + • reprlib + +
+
+imported by: + asyncio + • asyncio.base_tasks + • asyncio.coroutines + • asyncio.futures + +
+ +
+ +
+ + asyncio.base_subprocess +SourceModule
+imports: + asyncio + • asyncio.log + • asyncio.protocols + • asyncio.transports + • collections + • subprocess + • warnings + +
+
+imported by: + asyncio + • asyncio.unix_events + • asyncio.windows_events + +
+ +
+ +
+ + asyncio.base_tasks +SourceModule
+imports: + asyncio + • asyncio.base_futures + • asyncio.coroutines + • linecache + • traceback + +
+
+imported by: + asyncio + • asyncio.tasks + +
+ +
+ +
+ + asyncio.constants +SourceModule
+imports: + asyncio + • enum + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.coroutines + • asyncio.format_helpers + • asyncio.proactor_events + • asyncio.selector_events + • asyncio.sslproto + • asyncio.unix_events + +
+ +
+ +
+ + asyncio.coroutines +SourceModule
+imports: + asyncio + • asyncio.base_futures + • asyncio.constants + • asyncio.format_helpers + • asyncio.log + • collections.abc + • functools + • inspect + • os + • sys + • traceback + • types + • warnings + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.base_tasks + • asyncio.runners + • asyncio.streams + • asyncio.tasks + • asyncio.unix_events + +
+ +
+ +
+ + asyncio.events +SourceModule
+imports: + _asyncio + • asyncio + • asyncio.DefaultEventLoopPolicy + • asyncio.format_helpers + • contextvars + • os + • socket + • subprocess + • sys + • threading + • warnings + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.futures + • asyncio.mixins + • asyncio.runners + • asyncio.selector_events + • asyncio.staggered + • asyncio.streams + • asyncio.subprocess + • asyncio.tasks + • asyncio.threads + • asyncio.unix_events + • asyncio.windows_events + +
+ +
+ +
+ + asyncio.exceptions +SourceModule
+imports: + asyncio + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.futures + • asyncio.locks + • asyncio.proactor_events + • asyncio.staggered + • asyncio.streams + • asyncio.tasks + • asyncio.unix_events + • asyncio.windows_events + +
+ +
+ +
+ + asyncio.format_helpers +SourceModule
+imports: + asyncio + • asyncio.constants + • functools + • inspect + • reprlib + • sys + • traceback + +
+
+imported by: + asyncio + • asyncio.base_futures + • asyncio.coroutines + • asyncio.events + • asyncio.futures + • asyncio.streams + +
+ +
+ +
+ + asyncio.futures +SourceModule
+imports: + _asyncio + • asyncio + • asyncio.base_futures + • asyncio.events + • asyncio.exceptions + • asyncio.format_helpers + • concurrent.futures + • contextvars + • logging + • sys + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.proactor_events + • asyncio.selector_events + • asyncio.tasks + • asyncio.unix_events + • asyncio.windows_events + +
+ +
+ +
+ + asyncio.locks +SourceModule
+imports: + asyncio + • asyncio.exceptions + • asyncio.mixins + • collections + +
+
+imported by: + asyncio + • asyncio.queues + • asyncio.staggered + +
+ +
+ +
+ + asyncio.log +SourceModule
+imports: + asyncio + • logging + +
+
+imported by: + asyncio.base_events + • asyncio.base_subprocess + • asyncio.coroutines + • asyncio.proactor_events + • asyncio.selector_events + • asyncio.sslproto + • asyncio.streams + • asyncio.subprocess + • asyncio.unix_events + • asyncio.windows_events + • mqtt_srv.pyw + +
+ +
+ +
+ + asyncio.mixins +SourceModule
+imports: + asyncio + • asyncio.events + • threading + +
+
+imported by: + asyncio + • asyncio.locks + • asyncio.queues + +
+ +
+ +
+ + asyncio.proactor_events +SourceModule
+imports: + asyncio + • asyncio.base_events + • asyncio.constants + • asyncio.exceptions + • asyncio.futures + • asyncio.log + • asyncio.protocols + • asyncio.sslproto + • asyncio.transports + • asyncio.trsock + • collections + • io + • os + • signal + • socket + • threading + • warnings + +
+
+imported by: + asyncio + • asyncio.windows_events + +
+ +
+ +
+ + asyncio.protocols +SourceModule
+imports: + asyncio + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.base_subprocess + • asyncio.proactor_events + • asyncio.selector_events + • asyncio.sslproto + • asyncio.streams + • asyncio.subprocess + +
+ +
+ +
+ + asyncio.queues +SourceModule
+imports: + asyncio + • asyncio.locks + • asyncio.mixins + • collections + • heapq + +
+
+imported by: + asyncio + • asyncio.tasks + +
+ +
+ +
+ + asyncio.runners +SourceModule
+imports: + asyncio + • asyncio.coroutines + • asyncio.events + • asyncio.tasks + +
+
+imported by: + asyncio + +
+ +
+ +
+ + asyncio.selector_events +SourceModule
+imports: + asyncio + • asyncio.base_events + • asyncio.constants + • asyncio.events + • asyncio.futures + • asyncio.log + • asyncio.protocols + • asyncio.sslproto + • asyncio.transports + • asyncio.trsock + • collections + • errno + • functools + • selectors + • socket + • ssl + • warnings + • weakref + +
+
+imported by: + asyncio + • asyncio.unix_events + • asyncio.windows_events + +
+ +
+ +
+ + asyncio.sslproto +SourceModule
+imports: + asyncio + • asyncio.constants + • asyncio.log + • asyncio.protocols + • asyncio.transports + • collections + • ssl + • warnings + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.proactor_events + • asyncio.selector_events + +
+ +
+ +
+ + asyncio.staggered +SourceModule
+imports: + asyncio + • asyncio.events + • asyncio.exceptions + • asyncio.locks + • asyncio.tasks + • contextlib + • typing + +
+
+imported by: + asyncio + • asyncio.base_events + +
+ +
+ +
+ + asyncio.streams +SourceModule
+imports: + asyncio + • asyncio.coroutines + • asyncio.events + • asyncio.exceptions + • asyncio.format_helpers + • asyncio.log + • asyncio.protocols + • asyncio.tasks + • socket + • sys + • warnings + • weakref + +
+
+imported by: + asyncio + • asyncio.subprocess + +
+ +
+ +
+ + asyncio.subprocess +SourceModule
+imports: + asyncio + • asyncio.events + • asyncio.log + • asyncio.protocols + • asyncio.streams + • asyncio.tasks + • subprocess + +
+
+imported by: + asyncio + +
+ +
+ +
+ + asyncio.tasks +SourceModule
+imports: + _asyncio + • asyncio + • asyncio.base_tasks + • asyncio.coroutines + • asyncio.events + • asyncio.exceptions + • asyncio.futures + • asyncio.queues + • concurrent.futures + • contextvars + • functools + • inspect + • itertools + • types + • warnings + • weakref + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.runners + • asyncio.staggered + • asyncio.streams + • asyncio.subprocess + • asyncio.unix_events + • asyncio.windows_events + +
+ +
+ +
+ + asyncio.threads +SourceModule
+imports: + asyncio + • asyncio.events + • contextvars + • functools + +
+
+imported by: + asyncio + +
+ +
+ +
+ + asyncio.transports +SourceModule
+imports: + asyncio + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.base_subprocess + • asyncio.proactor_events + • asyncio.selector_events + • asyncio.sslproto + • asyncio.unix_events + +
+ +
+ +
+ + asyncio.trsock +SourceModule
+imports: + asyncio + • socket + • warnings + +
+
+imported by: + asyncio + • asyncio.base_events + • asyncio.proactor_events + • asyncio.selector_events + +
+ +
+ +
+ + asyncio.unix_events +SourceModule
+imports: + asyncio + • asyncio.base_events + • asyncio.base_subprocess + • asyncio.constants + • asyncio.coroutines + • asyncio.events + • asyncio.exceptions + • asyncio.futures + • asyncio.log + • asyncio.selector_events + • asyncio.tasks + • asyncio.transports + • errno + • io + • itertools + • os + • selectors + • signal + • socket + • stat + • subprocess + • sys + • threading + • warnings + +
+
+imported by: + asyncio + +
+ +
+ +
+ + asyncio.windows_events +SourceModule
+imports: + _overlapped + • _winapi + • asyncio + • asyncio.base_subprocess + • asyncio.events + • asyncio.exceptions + • asyncio.futures + • asyncio.log + • asyncio.proactor_events + • asyncio.selector_events + • asyncio.tasks + • asyncio.windows_utils + • errno + • math + • msvcrt + • socket + • struct + • sys + • time + • weakref + +
+
+imported by: + asyncio + +
+ +
+ +
+ + asyncio.windows_utils +SourceModule
+imports: + _winapi + • asyncio + • itertools + • msvcrt + • os + • subprocess + • sys + • tempfile + • warnings + +
+
+imported by: + asyncio + • asyncio.windows_events + +
+ +
+ +
+ + atexit (builtin module)
+imported by: + logging + • multiprocessing.util + • weakref + +
+ +
+ +
+ + autorandr +MissingModule
+imported by: + mqtt_srv.pyw + +
+ +
+ +
+ + base64 +SourceModule
+imports: + binascii + • getopt + • re + • struct + • sys + +
+
+imported by: + email._encoded_words + • email.base64mime + • email.encoders + • encodings.base64_codec + • paho.mqtt.client + • psutil._pslinux + • requests.auth + • secrets + • ssl + • urllib.request + • urllib3.util.request + • xmlrpc.client + +
+ +
+ +
+ + binascii (builtin module)
+imported by: + base64 + • email._encoded_words + • email.base64mime + • email.contentmanager + • email.header + • encodings.hex_codec + • encodings.uu_codec + • quopri + • secrets + • urllib3.filepost + • urllib3.util.ssl_ + • uu + • zipfile + +
+ +
+ +
+ + bisect +SourceModule
+imports: + _bisect + +
+
+imported by: + idna.core + • idna.intranges + • multiprocessing.heap + • random + • statistics + • urllib.request + +
+ +
+ +
+ + brotli +MissingModule
+imported by: + urllib3.response + • urllib3.util.request + +
+ +
+ +
+ + brotlicffi +MissingModule
+imported by: + urllib3.response + • urllib3.util.request + +
+ +
+ +
+ + builtins (builtin module)
+imported by: + bz2 + • codecs + • dataclasses + • gettext + • gzip + • inspect + • locale + • lzma + • operator + • reprlib + • subprocess + • tarfile + • tokenize + • warnings + +
+ +
+ +
+ + bz2 +SourceModule
+imports: + _bz2 + • _compression + • builtins + • io + • os + +
+
+imported by: + encodings.bz2_codec + • shutil + • tarfile + • zipfile + +
+ +
+ +
+ + calendar +SourceModule
+imports: + argparse + • datetime + • itertools + • locale + • sys + +
+
+imported by: + _strptime + • email._parseaddr + • http.cookiejar + • requests.cookies + • ssl + +
+ +
+ +
+ + certifi +Package
+imports: + certifi.core + +
+
+imported by: + certifi.core + • requests.certs + +
+ +
+ +
+ + certifi.core +SourceModule
+imports: + certifi + • importlib.resources + • os + • sys + • types + • typing + +
+
+imported by: + certifi + +
+ +
+ +
+ + chardet +MissingModule
+imported by: + requests + • requests.compat + • requests.packages + +
+ +
+ +
+ + charset_normalizer +Package
+imports: + charset_normalizer.api + • charset_normalizer.legacy + • charset_normalizer.models + • charset_normalizer.utils + • charset_normalizer.version + • logging + +
+
+imported by: + charset_normalizer.api + • charset_normalizer.assets + • charset_normalizer.cd + • charset_normalizer.constant + • charset_normalizer.legacy + • charset_normalizer.md + • charset_normalizer.models + • charset_normalizer.utils + • charset_normalizer.version + • requests + • requests.compat + • requests.packages + +
+ +
+ +
+ + charset_normalizer.api +SourceModule
+imports: + charset_normalizer + • charset_normalizer.cd + • charset_normalizer.constant + • charset_normalizer.md + • charset_normalizer.models + • charset_normalizer.utils + • logging + • ntpath + • os + • typing + • warnings + +
+
+imported by: + charset_normalizer + • charset_normalizer.legacy + +
+ +
+ +
+ + charset_normalizer.assets +Package
+imports: + charset_normalizer + • typing + +
+
+imported by: + charset_normalizer.cd + • charset_normalizer.constant + +
+ +
+ +
+ + charset_normalizer.cd +SourceModule
+imports: + charset_normalizer + • charset_normalizer.assets + • charset_normalizer.constant + • charset_normalizer.md + • charset_normalizer.models + • charset_normalizer.utils + • codecs + • collections + • functools + • importlib + • typing + +
+
+imported by: + charset_normalizer.api + • charset_normalizer.models + +
+ +
+ +
+ + charset_normalizer.constant +SourceModule
+imports: + charset_normalizer + • charset_normalizer.assets + • codecs + • encodings.aliases + • re + • typing + +
+
+imported by: + charset_normalizer.api + • charset_normalizer.cd + • charset_normalizer.legacy + • charset_normalizer.md + • charset_normalizer.models + • charset_normalizer.utils + +
+ +
+ +
+ + charset_normalizer.legacy +SourceModule
+imports: + charset_normalizer + • charset_normalizer.api + • charset_normalizer.constant + • charset_normalizer.models + • typing + • warnings + +
+
+imported by: + charset_normalizer + +
+ +
+ +
+ + charset_normalizer.md +SourceModule
+imports: + charset_normalizer + • charset_normalizer.constant + • charset_normalizer.utils + • functools + • typing + +
+
+imported by: + charset_normalizer.api + • charset_normalizer.cd + • charset_normalizer.models + +
+ +
+ +
+ + charset_normalizer.models +SourceModule
+imports: + charset_normalizer + • charset_normalizer.cd + • charset_normalizer.constant + • charset_normalizer.md + • charset_normalizer.utils + • collections + • encodings.aliases + • hashlib + • json + • re + • typing + • warnings + +
+
+imported by: + charset_normalizer + • charset_normalizer.api + • charset_normalizer.cd + • charset_normalizer.legacy + +
+ +
+ +
+ + charset_normalizer.utils +SourceModule
+imports: + _multibytecodec + • charset_normalizer + • charset_normalizer.constant + • codecs + • encodings.aliases + • functools + • importlib + • logging + • re + • typing + • unicodedata + • unicodedata2 + +
+
+imported by: + charset_normalizer + • charset_normalizer.api + • charset_normalizer.cd + • charset_normalizer.md + • charset_normalizer.models + +
+ +
+ +
+ + charset_normalizer.version +SourceModule
+imports: + charset_normalizer + +
+
+imported by: + charset_normalizer + +
+ +
+ +
+ + codecs +SourceModule
+imports: + _codecs + • builtins + • encodings + • sys + +
+
+imported by: + _pickle + • charset_normalizer.cd + • charset_normalizer.constant + • charset_normalizer.utils + • encodings + • encodings.ascii + • encodings.base64_codec + • encodings.big5 + • encodings.big5hkscs + • encodings.bz2_codec + • encodings.charmap + • encodings.cp037 + • encodings.cp1006 + • encodings.cp1026 + • encodings.cp1125 + • encodings.cp1140 + • encodings.cp1250 + • encodings.cp1251 + • encodings.cp1252 + • encodings.cp1253 + • encodings.cp1254 + • encodings.cp1255 + • encodings.cp1256 + • encodings.cp1257 + • encodings.cp1258 + • encodings.cp273 + • encodings.cp424 + • encodings.cp437 + • encodings.cp500 + • encodings.cp720 + • encodings.cp737 + • encodings.cp775 + • encodings.cp850 + • encodings.cp852 + • encodings.cp855 + • encodings.cp856 + • encodings.cp857 + • encodings.cp858 + • encodings.cp860 + • encodings.cp861 + • encodings.cp862 + • encodings.cp863 + • encodings.cp864 + • encodings.cp865 + • encodings.cp866 + • encodings.cp869 + • encodings.cp874 + • encodings.cp875 + • encodings.cp932 + • encodings.cp949 + • encodings.cp950 + • encodings.euc_jis_2004 + • encodings.euc_jisx0213 + • encodings.euc_jp + • encodings.euc_kr + • encodings.gb18030 + • encodings.gb2312 + • encodings.gbk + • encodings.hex_codec + • encodings.hp_roman8 + • encodings.hz + • encodings.idna + • encodings.iso2022_jp + • encodings.iso2022_jp_1 + • encodings.iso2022_jp_2 + • encodings.iso2022_jp_2004 + • encodings.iso2022_jp_3 + • encodings.iso2022_jp_ext + • encodings.iso2022_kr + • encodings.iso8859_1 + • encodings.iso8859_10 + • encodings.iso8859_11 + • encodings.iso8859_13 + • encodings.iso8859_14 + • encodings.iso8859_15 + • encodings.iso8859_16 + • encodings.iso8859_2 + • encodings.iso8859_3 + • encodings.iso8859_4 + • encodings.iso8859_5 + • encodings.iso8859_6 + • encodings.iso8859_7 + • encodings.iso8859_8 + • encodings.iso8859_9 + • encodings.johab + • encodings.koi8_r + • encodings.koi8_t + • encodings.koi8_u + • encodings.kz1048 + • encodings.latin_1 + • encodings.mac_arabic + • encodings.mac_croatian + • encodings.mac_cyrillic + • encodings.mac_farsi + • encodings.mac_greek + • encodings.mac_iceland + • encodings.mac_latin2 + • encodings.mac_roman + • encodings.mac_romanian + • encodings.mac_turkish + • encodings.mbcs + • encodings.oem + • encodings.palmos + • encodings.ptcp154 + • encodings.punycode + • encodings.quopri_codec + • encodings.raw_unicode_escape + • encodings.rot_13 + • encodings.shift_jis + • encodings.shift_jis_2004 + • encodings.shift_jisx0213 + • encodings.tis_620 + • encodings.undefined + • encodings.unicode_escape + • encodings.utf_16 + • encodings.utf_16_be + • encodings.utf_16_le + • encodings.utf_32 + • encodings.utf_32_be + • encodings.utf_32_le + • encodings.utf_7 + • encodings.utf_8 + • encodings.utf_8_sig + • encodings.uu_codec + • encodings.zlib_codec + • json + • mqtt_srv.pyw + • pickle + • requests.utils + • tokenize + • urllib3.filepost + • xml.sax.saxutils + +
+ +
+ +
+ + collections +Package
+imports: + _collections + • _collections_abc + • _weakref + • collections.Mapping + • collections.MutableMapping + • copy + • heapq + • itertools + • keyword + • operator + • reprlib + • sys + +
+
+imported by: + _pydecimal + • ast + • asyncio.base_events + • asyncio.base_subprocess + • asyncio.locks + • asyncio.proactor_events + • asyncio.queues + • asyncio.selector_events + • asyncio.sslproto + • charset_normalizer.cd + • charset_normalizer.models + • collections.abc + • concurrent.futures._base + • contextlib + • dis + • email.feedparser + • functools + • importlib.metadata + • importlib.metadata._collections + • importlib.readers + • inspect + • mqtt_srv.pyw + • multiprocessing.heap + • multiprocessing.pool + • multiprocessing.queues + • paho.mqtt.client + • pkgutil + • platform + • pprint + • psutil + • psutil._common + • psutil._compat + • psutil._psaix + • psutil._psbsd + • psutil._pslinux + • psutil._psosx + • psutil._pssunos + • psutil._pswindows + • queue + • requests.compat + • requests.sessions + • requests.structures + • requests.utils + • selectors + • shlex + • shutil + • ssl + • statistics + • string + • threading + • tokenize + • traceback + • typing + • urllib.parse + • urllib.robotparser + • urllib3._collections + • urllib3.poolmanager + • urllib3.util.queue + • urllib3.util.retry + • urllib3.util.url + • xml.etree.ElementTree + +
+ +
+ +
+ + collections.Mapping +MissingModule
+imported by: + collections + • urllib3._collections + +
+ +
+ +
+ + collections.MutableMapping +MissingModule
+imported by: + collections + • urllib3._collections + +
+ +
+ +
+ + collections.abc +SourceModule
+imports: + _collections_abc + • collections + +
+
+imported by: + asyncio.base_events + • asyncio.coroutines + • http.client + • importlib.resources + • inspect + • logging + • mqtt_srv.pyw + • requests.compat + • selectors + • tracemalloc + • typing + • urllib3._collections + • xml.etree.ElementTree + +
+ +
+ +
+ + concurrent +Package
+imported by: + concurrent.futures + +
+ +
+ +
+ + concurrent.futures +Package
+imports: + concurrent + • concurrent.futures._base + • concurrent.futures.process + • concurrent.futures.thread + +
+
+imported by: + asyncio.base_events + • asyncio.futures + • asyncio.tasks + • concurrent.futures._base + • concurrent.futures.process + • concurrent.futures.thread + +
+ +
+ +
+ + concurrent.futures._base +SourceModule
+imports: + collections + • concurrent.futures + • logging + • threading + • time + • types + +
+
+imported by: + concurrent.futures + • concurrent.futures.process + • concurrent.futures.thread + +
+ +
+ +
+ + concurrent.futures.process +SourceModule
+imports: + concurrent.futures + • concurrent.futures._base + • functools + • itertools + • multiprocessing + • multiprocessing.connection + • multiprocessing.queues + • multiprocessing.synchronize + • os + • queue + • sys + • threading + • traceback + • weakref + +
+
+imported by: + concurrent.futures + +
+ +
+ +
+ + concurrent.futures.thread +SourceModule
+imports: + concurrent.futures + • concurrent.futures._base + • itertools + • os + • queue + • threading + • types + • weakref + +
+
+imported by: + concurrent.futures + +
+ +
+ +
+ + contextlib +SourceModule
+imports: + _collections_abc + • abc + • collections + • functools + • sys + • types + +
+
+imported by: + _threading_local + • ast + • asyncio.staggered + • getpass + • glob + • importlib._adapters + • importlib._common + • importlib.metadata + • importlib.resources + • importlib.util + • psutil + • psutil._common + • psutil._compat + • psutil._psbsd + • psutil._pswindows + • requests.utils + • subprocess + • typing + • urllib.request + • urllib3.response + • xml.etree.ElementTree + • zipfile + +
+ +
+ +
+ + contextvars +SourceModule
+imports: + _contextvars + +
+
+imported by: + _pydecimal + • asyncio.events + • asyncio.futures + • asyncio.tasks + • asyncio.threads + +
+ +
+ +
+ + copy +SourceModule
+imports: + copyreg + • org + • types + • weakref + +
+
+imported by: + _sre + • argparse + • collections + • dataclasses + • email.generator + • gettext + • http.cookiejar + • requests.cookies + • tarfile + • weakref + • xml.etree.ElementInclude + +
+ +
+ +
+ + copyreg +SourceModule
+imports: + functools + • operator + +
+
+imported by: + _pickle + • copy + • mqtt_srv.pyw + • multiprocessing.reduction + • pickle + • re + +
+ +
+ +
+ + cryptography +MissingModule
+imported by: + requests + • urllib3.contrib.pyopenssl + +
+ +
+ +
+ + csv +SourceModule
+imports: + _csv + • io + • re + +
+
+imported by: + importlib.metadata + +
+ +
+ +
+ + ctypes +Package
+imports: + _ctypes + • ctypes._endian + • nt + • os + • struct + • sys + • types + +
+
+imported by: + ctypes._endian + • getmac.getmac + • mqtt_srv.pyw + • multiprocessing.sharedctypes + • psutil._common + • psutil._pslinux + +
+ +
+ +
+ + ctypes._endian +SourceModule
+imports: + ctypes + • sys + +
+
+imported by: + ctypes + +
+ +
+ +
+ + curses +Package
+imports: + _curses + • curses + • curses.has_key + • os + • sys + +
+
+imported by: + _curses + • curses + • curses.has_key + • psutil._common + +
+ +
+ +
+ + curses.has_key +SourceModule
+imports: + _curses + • curses + +
+
+imported by: + curses + +
+ +
+ +
+ + dataclasses +SourceModule
+imports: + _thread + • abc + • builtins + • copy + • functools + • inspect + • keyword + • re + • sys + • types + +
+
+imported by: + pprint + +
+ +
+ +
+ + datetime +SourceModule
+imports: + _datetime + • _strptime + • math + • operator + • sys + • time + +
+
+imported by: + _strptime + • calendar + • email.utils + • http.cookiejar + • mqtt_srv.pyw + • psutil + • requests.models + • requests.sessions + • urllib3.connection + • xmlrpc.client + +
+ +
+ +
+ + decimal +SourceModule
+imports: + _decimal + • _pydecimal + +
+
+imported by: + fractions + • statistics + • xmlrpc.client + +
+ +
+ +
+ + dis +SourceModule
+imports: + argparse + • collections + • io + • opcode + • sys + • types + +
+
+imported by: + inspect + +
+ +
+ +
+ + dns +MissingModule
+imported by: + paho.mqtt.client + +
+ +
+ +
+ + dummy_threading +MissingModule
+imported by: + psutil._compat + • requests.cookies + +
+ +
+ +
+ + email +Package
+imports: + email._header_value_parser + • email.charset + • email.errors + • email.header + • email.parser + +
+
+imported by: + email._encoded_words + • email._header_value_parser + • email._parseaddr + • email._policybase + • email.base64mime + • email.charset + • email.contentmanager + • email.encoders + • email.errors + • email.feedparser + • email.generator + • email.header + • email.headerregistry + • email.iterators + • email.message + • email.parser + • email.policy + • email.quoprimime + • email.utils + • importlib.metadata + • urllib.request + • urllib3.util.retry + +
+ +
+ +
+ + email._encoded_words +SourceModule
+imports: + base64 + • binascii + • email + • email.errors + • functools + • re + • string + +
+
+imported by: + email._header_value_parser + • email.message + +
+ +
+ +
+ + email._header_value_parser +SourceModule
+imports: + email + • email._encoded_words + • email.errors + • email.utils + • operator + • re + • string + • sys + • urllib + +
+
+imported by: + email + • email.headerregistry + +
+ +
+ +
+ + email._parseaddr +SourceModule
+imports: + calendar + • email + • time + +
+
+imported by: + email.utils + +
+ +
+ +
+ + email._policybase +SourceModule
+imports: + abc + • email + • email.charset + • email.header + • email.utils + +
+
+imported by: + email.feedparser + • email.message + • email.parser + • email.policy + +
+ +
+ +
+ + email.base64mime +SourceModule
+imports: + base64 + • binascii + • email + +
+
+imported by: + email.charset + • email.header + +
+ +
+ +
+ + email.charset +SourceModule
+imports: + email + • email.base64mime + • email.encoders + • email.errors + • email.quoprimime + • functools + +
+
+imported by: + email + • email._policybase + • email.contentmanager + • email.header + • email.message + • email.utils + +
+ +
+ +
+ + email.contentmanager +SourceModule
+imports: + binascii + • email + • email.charset + • email.errors + • email.message + • email.quoprimime + +
+
+imported by: + email.policy + +
+ +
+ +
+ + email.encoders +SourceModule
+imports: + base64 + • email + • quopri + +
+
+imported by: + email.charset + +
+ +
+ +
+ + email.errors +SourceModule
+imports: + email + +
+
+imported by: + email + • email._encoded_words + • email._header_value_parser + • email.charset + • email.contentmanager + • email.feedparser + • email.header + • email.headerregistry + • email.message + • urllib3.util.response + +
+ +
+ +
+ + email.feedparser +SourceModule
+imports: + collections + • email + • email._policybase + • email.errors + • email.message + • io + • re + +
+
+imported by: + email.parser + +
+ +
+ +
+ + email.generator +SourceModule
+imports: + copy + • email + • email.utils + • io + • random + • re + • sys + • time + +
+
+imported by: + email.message + +
+ +
+ +
+ + email.header +SourceModule
+imports: + binascii + • email + • email.base64mime + • email.charset + • email.errors + • email.quoprimime + • re + +
+
+imported by: + email + • email._policybase + +
+ +
+ +
+ + email.headerregistry +SourceModule
+imports: + email + • email._header_value_parser + • email.errors + • email.utils + • types + +
+
+imported by: + email.policy + +
+ +
+ +
+ + email.iterators +SourceModule
+imports: + email + • io + • sys + +
+
+imported by: + email.message + +
+ +
+ +
+ + email.message +SourceModule
+imports: + email + • email._encoded_words + • email._policybase + • email.charset + • email.errors + • email.generator + • email.iterators + • email.policy + • email.utils + • io + • quopri + • re + • uu + +
+
+imported by: + email.contentmanager + • email.feedparser + • email.policy + • http.client + • importlib.metadata._adapters + +
+ +
+ +
+ + email.parser +SourceModule
+imports: + email + • email._policybase + • email.feedparser + • io + +
+
+imported by: + email + • http.client + +
+ +
+ +
+ + email.policy +SourceModule
+imports: + email + • email._policybase + • email.contentmanager + • email.headerregistry + • email.message + • email.utils + • re + • sys + +
+
+imported by: + email.message + +
+ +
+ +
+ + email.quoprimime +SourceModule
+imports: + email + • re + • string + +
+
+imported by: + email.charset + • email.contentmanager + • email.header + +
+ +
+ +
+ + email.utils +SourceModule
+imports: + datetime + • email + • email._parseaddr + • email.charset + • os + • random + • re + • socket + • time + • urllib.parse + +
+
+imported by: + email._header_value_parser + • email._policybase + • email.generator + • email.headerregistry + • email.message + • email.policy + • urllib.request + • urllib3.fields + +
+ +
+ +
+ + encodings +Package
+imports: + _winapi + • codecs + • encodings + • encodings.aliases + • encodings.ascii + • encodings.base64_codec + • encodings.big5 + • encodings.big5hkscs + • encodings.bz2_codec + • encodings.charmap + • encodings.cp037 + • encodings.cp1006 + • encodings.cp1026 + • encodings.cp1125 + • encodings.cp1140 + • encodings.cp1250 + • encodings.cp1251 + • encodings.cp1252 + • encodings.cp1253 + • encodings.cp1254 + • encodings.cp1255 + • encodings.cp1256 + • encodings.cp1257 + • encodings.cp1258 + • encodings.cp273 + • encodings.cp424 + • encodings.cp437 + • encodings.cp500 + • encodings.cp720 + • encodings.cp737 + • encodings.cp775 + • encodings.cp850 + • encodings.cp852 + • encodings.cp855 + • encodings.cp856 + • encodings.cp857 + • encodings.cp858 + • encodings.cp860 + • encodings.cp861 + • encodings.cp862 + • encodings.cp863 + • encodings.cp864 + • encodings.cp865 + • encodings.cp866 + • encodings.cp869 + • encodings.cp874 + • encodings.cp875 + • encodings.cp932 + • encodings.cp949 + • encodings.cp950 + • encodings.euc_jis_2004 + • encodings.euc_jisx0213 + • encodings.euc_jp + • encodings.euc_kr + • encodings.gb18030 + • encodings.gb2312 + • encodings.gbk + • encodings.hex_codec + • encodings.hp_roman8 + • encodings.hz + • encodings.idna + • encodings.iso2022_jp + • encodings.iso2022_jp_1 + • encodings.iso2022_jp_2 + • encodings.iso2022_jp_2004 + • encodings.iso2022_jp_3 + • encodings.iso2022_jp_ext + • encodings.iso2022_kr + • encodings.iso8859_1 + • encodings.iso8859_10 + • encodings.iso8859_11 + • encodings.iso8859_13 + • encodings.iso8859_14 + • encodings.iso8859_15 + • encodings.iso8859_16 + • encodings.iso8859_2 + • encodings.iso8859_3 + • encodings.iso8859_4 + • encodings.iso8859_5 + • encodings.iso8859_6 + • encodings.iso8859_7 + • encodings.iso8859_8 + • encodings.iso8859_9 + • encodings.johab + • encodings.koi8_r + • encodings.koi8_t + • encodings.koi8_u + • encodings.kz1048 + • encodings.latin_1 + • encodings.mac_arabic + • encodings.mac_croatian + • encodings.mac_cyrillic + • encodings.mac_farsi + • encodings.mac_greek + • encodings.mac_iceland + • encodings.mac_latin2 + • encodings.mac_roman + • encodings.mac_romanian + • encodings.mac_turkish + • encodings.mbcs + • encodings.oem + • encodings.palmos + • encodings.ptcp154 + • encodings.punycode + • encodings.quopri_codec + • encodings.raw_unicode_escape + • encodings.rot_13 + • encodings.shift_jis + • encodings.shift_jis_2004 + • encodings.shift_jisx0213 + • encodings.tis_620 + • encodings.undefined + • encodings.unicode_escape + • encodings.utf_16 + • encodings.utf_16_be + • encodings.utf_16_le + • encodings.utf_32 + • encodings.utf_32_be + • encodings.utf_32_le + • encodings.utf_7 + • encodings.utf_8 + • encodings.utf_8_sig + • encodings.uu_codec + • encodings.zlib_codec + • sys + +
+
+imported by: + codecs + • encodings + • encodings.aliases + • encodings.ascii + • encodings.base64_codec + • encodings.big5 + • encodings.big5hkscs + • encodings.bz2_codec + • encodings.charmap + • encodings.cp037 + • encodings.cp1006 + • encodings.cp1026 + • encodings.cp1125 + • encodings.cp1140 + • encodings.cp1250 + • encodings.cp1251 + • encodings.cp1252 + • encodings.cp1253 + • encodings.cp1254 + • encodings.cp1255 + • encodings.cp1256 + • encodings.cp1257 + • encodings.cp1258 + • encodings.cp273 + • encodings.cp424 + • encodings.cp437 + • encodings.cp500 + • encodings.cp720 + • encodings.cp737 + • encodings.cp775 + • encodings.cp850 + • encodings.cp852 + • encodings.cp855 + • encodings.cp856 + • encodings.cp857 + • encodings.cp858 + • encodings.cp860 + • encodings.cp861 + • encodings.cp862 + • encodings.cp863 + • encodings.cp864 + • encodings.cp865 + • encodings.cp866 + • encodings.cp869 + • encodings.cp874 + • encodings.cp875 + • encodings.cp932 + • encodings.cp949 + • encodings.cp950 + • encodings.euc_jis_2004 + • encodings.euc_jisx0213 + • encodings.euc_jp + • encodings.euc_kr + • encodings.gb18030 + • encodings.gb2312 + • encodings.gbk + • encodings.hex_codec + • encodings.hp_roman8 + • encodings.hz + • encodings.idna + • encodings.iso2022_jp + • encodings.iso2022_jp_1 + • encodings.iso2022_jp_2 + • encodings.iso2022_jp_2004 + • encodings.iso2022_jp_3 + • encodings.iso2022_jp_ext + • encodings.iso2022_kr + • encodings.iso8859_1 + • encodings.iso8859_10 + • encodings.iso8859_11 + • encodings.iso8859_13 + • encodings.iso8859_14 + • encodings.iso8859_15 + • encodings.iso8859_16 + • encodings.iso8859_2 + • encodings.iso8859_3 + • encodings.iso8859_4 + • encodings.iso8859_5 + • encodings.iso8859_6 + • encodings.iso8859_7 + • encodings.iso8859_8 + • encodings.iso8859_9 + • encodings.johab + • encodings.koi8_r + • encodings.koi8_t + • encodings.koi8_u + • encodings.kz1048 + • encodings.latin_1 + • encodings.mac_arabic + • encodings.mac_croatian + • encodings.mac_cyrillic + • encodings.mac_farsi + • encodings.mac_greek + • encodings.mac_iceland + • encodings.mac_latin2 + • encodings.mac_roman + • encodings.mac_romanian + • encodings.mac_turkish + • encodings.mbcs + • encodings.oem + • encodings.palmos + • encodings.ptcp154 + • encodings.punycode + • encodings.quopri_codec + • encodings.raw_unicode_escape + • encodings.rot_13 + • encodings.shift_jis + • encodings.shift_jis_2004 + • encodings.shift_jisx0213 + • encodings.tis_620 + • encodings.undefined + • encodings.unicode_escape + • encodings.utf_16 + • encodings.utf_16_be + • encodings.utf_16_le + • encodings.utf_32 + • encodings.utf_32_be + • encodings.utf_32_le + • encodings.utf_7 + • encodings.utf_8 + • encodings.utf_8_sig + • encodings.uu_codec + • encodings.zlib_codec + • locale + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.aliases +SourceModule
+imports: + encodings + +
+
+imported by: + charset_normalizer.constant + • charset_normalizer.models + • charset_normalizer.utils + • encodings + • locale + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.ascii +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.base64_codec +SourceModule
+imports: + base64 + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.big5 +SourceModule
+imports: + _codecs_tw + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.big5hkscs +SourceModule
+imports: + _codecs_hk + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.bz2_codec +SourceModule
+imports: + bz2 + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.charmap +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp037 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1006 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1026 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1125 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1140 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1250 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1251 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1252 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1253 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1254 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1255 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1256 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1257 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp1258 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp273 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp424 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp437 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp500 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp720 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp737 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp775 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp850 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp852 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp855 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp856 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp857 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp858 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp860 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp861 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp862 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp863 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp864 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp865 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp866 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp869 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp874 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp875 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp932 +SourceModule
+imports: + _codecs_jp + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp949 +SourceModule
+imports: + _codecs_kr + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.cp950 +SourceModule
+imports: + _codecs_tw + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.euc_jis_2004 +SourceModule
+imports: + _codecs_jp + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.euc_jisx0213 +SourceModule
+imports: + _codecs_jp + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.euc_jp +SourceModule
+imports: + _codecs_jp + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.euc_kr +SourceModule
+imports: + _codecs_kr + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.gb18030 +SourceModule
+imports: + _codecs_cn + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.gb2312 +SourceModule
+imports: + _codecs_cn + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.gbk +SourceModule
+imports: + _codecs_cn + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.hex_codec +SourceModule
+imports: + binascii + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.hp_roman8 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.hz +SourceModule
+imports: + _codecs_cn + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.idna +SourceModule
+imports: + codecs + • encodings + • re + • stringprep + • unicodedata + +
+
+imported by: + encodings + • mqtt_srv.pyw + • requests.models + +
+ +
+ +
+ + encodings.iso2022_jp +SourceModule
+imports: + _codecs_iso2022 + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso2022_jp_1 +SourceModule
+imports: + _codecs_iso2022 + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso2022_jp_2 +SourceModule
+imports: + _codecs_iso2022 + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso2022_jp_2004 +SourceModule
+imports: + _codecs_iso2022 + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso2022_jp_3 +SourceModule
+imports: + _codecs_iso2022 + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso2022_jp_ext +SourceModule
+imports: + _codecs_iso2022 + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso2022_kr +SourceModule
+imports: + _codecs_iso2022 + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_1 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_10 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_11 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_13 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_14 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_15 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_16 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_2 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_3 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_4 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_5 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_6 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_7 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_8 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.iso8859_9 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.johab +SourceModule
+imports: + _codecs_kr + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.koi8_r +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.koi8_t +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.koi8_u +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.kz1048 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.latin_1 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_arabic +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_croatian +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_cyrillic +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_farsi +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_greek +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_iceland +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_latin2 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_roman +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_romanian +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mac_turkish +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.mbcs +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.oem +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.palmos +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.ptcp154 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.punycode +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.quopri_codec +SourceModule
+imports: + codecs + • encodings + • io + • quopri + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.raw_unicode_escape +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.rot_13 +SourceModule
+imports: + codecs + • encodings + • sys + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.shift_jis +SourceModule
+imports: + _codecs_jp + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.shift_jis_2004 +SourceModule
+imports: + _codecs_jp + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.shift_jisx0213 +SourceModule
+imports: + _codecs_jp + • _multibytecodec + • codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.tis_620 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.undefined +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.unicode_escape +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.utf_16 +SourceModule
+imports: + codecs + • encodings + • sys + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.utf_16_be +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.utf_16_le +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.utf_32 +SourceModule
+imports: + codecs + • encodings + • sys + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.utf_32_be +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.utf_32_le +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.utf_7 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.utf_8 +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.utf_8_sig +SourceModule
+imports: + codecs + • encodings + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.uu_codec +SourceModule
+imports: + binascii + • codecs + • encodings + • io + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + encodings.zlib_codec +SourceModule
+imports: + codecs + • encodings + • zlib + +
+
+imported by: + encodings + • mqtt_srv.pyw + +
+ +
+ +
+ + enum +SourceModule
+imports: + sys + • types + • warnings + +
+
+imported by: + ast + • asyncio.constants + • http + • inspect + • mqtt_srv.pyw + • ping3.enums + • psutil._common + • psutil._pslinux + • psutil._psposix + • psutil._pswindows + • py_compile + • re + • signal + • socket + • ssl + • uuid + +
+ +
+ +
+ + errno (builtin module)
+imported by: + asyncio.selector_events + • asyncio.unix_events + • asyncio.windows_events + • gettext + • gzip + • http.client + • multiprocessing.forkserver + • multiprocessing.queues + • multiprocessing.shared_memory + • paho.mqtt.client + • pathlib + • ping3 + • psutil._common + • psutil._compat + • psutil._psbsd + • psutil._pslinux + • psutil._psosx + • psutil._pssunos + • psutil._pswindows + • shutil + • socket + • ssl + • subprocess + • tempfile + • urllib3.connectionpool + • urllib3.util.wait + • xmlrpc.client + +
+ +
+ +
+ + fcntl +MissingModule
+imported by: + getmac.getmac + • psutil._compat + • subprocess + +
+ +
+ +
+ + fnmatch +SourceModule
+imports: + functools + • itertools + • os + • posixpath + • re + +
+
+imported by: + glob + • mqtt_srv.pyw + • pathlib + • shutil + • tracemalloc + • urllib.request + +
+ +
+ +
+ + fractions +SourceModule
+imports: + decimal + • math + • numbers + • operator + • re + • sys + +
+
+imported by: + statistics + +
+ +
+ +
+ + ftplib +SourceModule
+imports: + netrc + • re + • socket + • ssl + • sys + • warnings + +
+
+imported by: + urllib.request + +
+ +
+ +
+ + functools +SourceModule
+imports: + _functools + • _thread + • abc + • collections + • reprlib + • types + • typing + • weakref + +
+
+imported by: + asyncio.base_events + • asyncio.coroutines + • asyncio.format_helpers + • asyncio.selector_events + • asyncio.tasks + • asyncio.threads + • charset_normalizer.cd + • charset_normalizer.md + • charset_normalizer.utils + • concurrent.futures.process + • contextlib + • copyreg + • dataclasses + • email._encoded_words + • email.charset + • fnmatch + • importlib._common + • importlib.metadata + • importlib.metadata._functools + • importlib.resources + • importlib.util + • inspect + • ipaddress + • linecache + • locale + • mqtt_srv.pyw + • multiprocessing.reduction + • multiprocessing.shared_memory + • operator + • pathlib + • pickle + • ping3 + • pkgutil + • platform + • psutil + • psutil._common + • psutil._compat + • psutil._psaix + • psutil._psbsd + • psutil._pslinux + • psutil._psosx + • psutil._pssunos + • psutil._pswindows + • re + • tempfile + • threading + • tokenize + • tracemalloc + • types + • typing + • urllib3.packages.six + • urllib3.poolmanager + • urllib3.util.wait + +
+ +
+ +
+ + gc (builtin module)
+imports: + time + +
+
+imported by: + _posixsubprocess + • weakref + +
+ +
+ +
+ + genericpath +SourceModule
+imports: + os + • stat + +
+
+imported by: + mqtt_srv.pyw + • ntpath + • posixpath + +
+ +
+ +
+ + getmac +Package
+imports: + getmac.getmac + +
+
+imported by: + getmac.getmac + • mqtt_srv.pyw + +
+ +
+ +
+ + getmac.getmac +SourceModule
+imports: + 'java.lang' + • ctypes + • fcntl + • getmac + • logging + • os + • platform + • re + • shlex + • socket + • struct + • subprocess + • sys + • traceback + • typing + • uuid + • warnings + +
+
+imported by: + getmac + +
+ +
+ +
+ + getopt +SourceModule
+imports: + gettext + • os + • sys + +
+
+imported by: + base64 + • mimetypes + • mqtt_srv.pyw + • quopri + +
+ +
+ +
+ + getpass +SourceModule
+imports: + contextlib + • io + • msvcrt + • os + • pwd + • sys + • termios + • warnings + +
+
+imported by: + urllib.request + +
+ +
+ +
+ + gettext +SourceModule
+imports: + builtins + • copy + • errno + • locale + • os + • re + • struct + • sys + • warnings + +
+
+imported by: + argparse + • getopt + • optparse + +
+ +
+ +
+ + glob +SourceModule
+imports: + contextlib + • fnmatch + • itertools + • os + • re + • stat + • sys + +
+
+imported by: + psutil._psaix + • psutil._pslinux + • psutil._psposix + +
+ +
+ +
+ + grp +MissingModule
+imported by: + pathlib + • shutil + • subprocess + • tarfile + +
+ +
+ +
+ + gzip +SourceModule
+imports: + _compression + • argparse + • builtins + • errno + • io + • os + • struct + • sys + • time + • warnings + • zlib + +
+
+imported by: + tarfile + • xmlrpc.client + +
+ +
+ +
+ + hashlib +SourceModule
+imports: + _blake2 + • _hashlib + • _md5 + • _sha1 + • _sha256 + • _sha3 + • _sha512 + • logging + • warnings + +
+
+imported by: + charset_normalizer.models + • hmac + • paho.mqtt.client + • random + • requests.auth + • urllib.request + • urllib3.util.ssl_ + • uuid + +
+ +
+ +
+ + heapq +SourceModule
+imports: + _heapq + +
+
+imported by: + asyncio.base_events + • asyncio.queues + • collections + • mqtt_srv.pyw + • queue + +
+ +
+ +
+ + hmac +SourceModule
+imports: + _hashlib + • _operator + • hashlib + • warnings + +
+
+imported by: + multiprocessing.connection + • secrets + • urllib3.util.ssl_ + +
+ +
+ +
+ + http +Package
+imports: + enum + +
+
+imported by: + http.client + • http.cookiejar + • http.cookies + • requests.compat + +
+ +
+ +
+ + http.client +SourceModule
+imports: + collections.abc + • email.message + • email.parser + • errno + • http + • io + • re + • socket + • ssl + • sys + • urllib.parse + • warnings + +
+
+imported by: + http.client + • http.cookiejar + • urllib.request + • xmlrpc.client + +
+ +
+ +
+ + http.client +AliasNode
+imports: + http.client + • urllib3.packages.six.moves + +
+
+imported by: + urllib3.connection + • urllib3.exceptions + • urllib3.util.response + +
+ +
+ +
+ + http.cookiejar +SourceModule
+imports: + calendar + • copy + • datetime + • http + • http.client + • io + • logging + • os + • re + • threading + • time + • traceback + • urllib.parse + • urllib.request + • warnings + +
+
+imported by: + requests.compat + • urllib.request + +
+ +
+ +
+ + http.cookies +SourceModule
+imports: + http + • re + • string + • time + • types + +
+
+imported by: + requests.compat + +
+ +
+ +
+ + idna +Package
+imports: + idna + • idna.core + • idna.idnadata + • idna.intranges + • idna.package_data + +
+
+imported by: + idna + • idna.core + • idna.idnadata + • idna.intranges + • idna.package_data + • idna.uts46data + • requests.models + • urllib3.contrib.pyopenssl + • urllib3.util.url + +
+ +
+ +
+ + idna.core +SourceModule
+imports: + bisect + • idna + • idna.idnadata + • idna.intranges + • idna.uts46data + • re + • typing + • unicodedata + +
+
+imported by: + idna + +
+ +
+ +
+ + idna.idnadata +SourceModule
+imports: + idna + +
+
+imported by: + idna + • idna.core + +
+ +
+ +
+ + idna.intranges +SourceModule
+imports: + bisect + • idna + • typing + +
+
+imported by: + idna + • idna.core + +
+ +
+ +
+ + idna.package_data +SourceModule
+imports: + idna + +
+
+imported by: + idna + +
+ +
+ +
+ + idna.uts46data +SourceModule
+imports: + idna + • typing + +
+
+imported by: + idna.core + +
+ +
+ +
+ + importlib +Package
+imports: + _frozen_importlib + • _frozen_importlib_external + • _imp + • importlib + • importlib._bootstrap + • importlib._bootstrap_external + • importlib._common + • importlib.abc + • importlib.machinery + • sys + • warnings + +
+
+imported by: + charset_normalizer.cd + • charset_normalizer.utils + • importlib + • importlib._abc + • importlib._adapters + • importlib._bootstrap + • importlib._bootstrap_external + • importlib._common + • importlib.abc + • importlib.machinery + • importlib.metadata + • importlib.readers + • importlib.resources + • importlib.util + • inspect + • pkgutil + +
+ +
+ +
+ + importlib._abc +SourceModule
+imports: + abc + • importlib + • importlib._bootstrap + • warnings + +
+
+imported by: + importlib.abc + • importlib.util + +
+ +
+ +
+ + importlib._adapters +SourceModule
+imports: + contextlib + • importlib + • importlib.abc + +
+
+imported by: + importlib._common + +
+ +
+ +
+ + importlib._bootstrap +SourceModule
+imports: + _frozen_importlib_external + • importlib + +
+
+imported by: + importlib + • importlib._abc + • importlib.machinery + • importlib.util + +
+ +
+ +
+ + importlib._bootstrap_external +SourceModule
+imports: + _imp + • _io + • _warnings + • importlib + • importlib.metadata + • importlib.readers + • marshal + • nt + • posix + • sys + • tokenize + • winreg + +
+
+imported by: + importlib + • importlib.abc + • importlib.machinery + • importlib.util + • py_compile + +
+ +
+ +
+ + importlib._common +SourceModule
+imports: + contextlib + • functools + • importlib + • importlib._adapters + • importlib.abc + • os + • pathlib + • tempfile + • types + • typing + +
+
+imported by: + importlib + • importlib.resources + +
+ +
+ +
+ + importlib.abc +SourceModule
+imports: + _frozen_importlib + • _frozen_importlib_external + • abc + • importlib + • importlib._abc + • importlib._bootstrap_external + • importlib.machinery + • typing + • warnings + +
+
+imported by: + importlib + • importlib._adapters + • importlib._common + • importlib.metadata + • importlib.readers + • importlib.resources + +
+ +
+ +
+ + importlib.machinery +SourceModule
+imports: + importlib + • importlib._bootstrap + • importlib._bootstrap_external + +
+
+imported by: + importlib + • importlib.abc + • importlib.resources + • inspect + • pkgutil + • py_compile + • runpy + +
+ +
+ +
+ + importlib.metadata +Package
+imports: + abc + • collections + • contextlib + • csv + • email + • functools + • importlib + • importlib.abc + • importlib.metadata + • importlib.metadata._adapters + • importlib.metadata._collections + • importlib.metadata._functools + • importlib.metadata._itertools + • importlib.metadata._meta + • itertools + • operator + • os + • pathlib + • pep517 + • posixpath + • re + • sys + • textwrap + • typing + • warnings + • zipfile + +
+
+imported by: + importlib._bootstrap_external + • importlib.metadata + • importlib.metadata._adapters + • importlib.metadata._collections + • importlib.metadata._functools + • importlib.metadata._itertools + • importlib.metadata._meta + • importlib.metadata._text + +
+ +
+ +
+ + importlib.metadata._adapters +SourceModule
+imports: + email.message + • importlib.metadata + • importlib.metadata._text + • re + • textwrap + +
+
+imported by: + importlib.metadata + +
+ +
+ +
+ + importlib.metadata._collections +SourceModule
+imports: + collections + • importlib.metadata + +
+
+imported by: + importlib.metadata + +
+ +
+ +
+ + importlib.metadata._functools +SourceModule
+imports: + functools + • importlib.metadata + • types + +
+
+imported by: + importlib.metadata + • importlib.metadata._text + +
+ +
+ +
+ + importlib.metadata._itertools +SourceModule
+imports: + importlib.metadata + • itertools + +
+
+imported by: + importlib.metadata + +
+ +
+ +
+ + importlib.metadata._meta +SourceModule
+imports: + importlib.metadata + • typing + +
+
+imported by: + importlib.metadata + +
+ +
+ +
+ + importlib.metadata._text +SourceModule
+imports: + importlib.metadata + • importlib.metadata._functools + • re + +
+
+imported by: + importlib.metadata._adapters + +
+ +
+ +
+ + importlib.readers +SourceModule
+imports: + collections + • importlib + • importlib.abc + • pathlib + • zipfile + +
+
+imported by: + importlib._bootstrap_external + • zipimport + +
+ +
+ +
+ + importlib.resources +SourceModule
+imports: + 'typing.io' + • collections.abc + • contextlib + • functools + • importlib + • importlib._common + • importlib.abc + • importlib.machinery + • io + • os + • pathlib + • types + • typing + +
+
+imported by: + certifi.core + +
+ +
+ +
+ + importlib.util +SourceModule
+imports: + _imp + • contextlib + • functools + • importlib + • importlib._abc + • importlib._bootstrap + • importlib._bootstrap_external + • sys + • types + • warnings + +
+
+imported by: + pkgutil + • py_compile + • runpy + • urllib3.packages.six + • zipfile + +
+ +
+ +
+ + inspect +SourceModule
+imports: + abc + • argparse + • ast + • builtins + • collections + • collections.abc + • dis + • enum + • functools + • importlib + • importlib.machinery + • itertools + • linecache + • operator + • os + • re + • sys + • token + • tokenize + • types + • warnings + +
+
+imported by: + ast + • asyncio.coroutines + • asyncio.format_helpers + • asyncio.tasks + • dataclasses + • pkgutil + • psutil._common + • pyi_rth_inspect.py + +
+ +
+ +
+ + io +SourceModule
+imports: + _io + • abc + • warnings + +
+
+imported by: + _compression + • asyncio.proactor_events + • asyncio.unix_events + • bz2 + • csv + • dis + • email.feedparser + • email.generator + • email.iterators + • email.message + • email.parser + • encodings.quopri_codec + • encodings.uu_codec + • getpass + • gzip + • http.client + • http.cookiejar + • importlib.resources + • logging + • lzma + • mqtt_srv.pyw + • multiprocessing.connection + • multiprocessing.popen_forkserver + • multiprocessing.popen_spawn_posix + • multiprocessing.reduction + • os + • pathlib + • pickle + • pprint + • pyi_rth_subprocess.py + • quopri + • requests.compat + • requests.models + • requests.utils + • runpy + • shlex + • socket + • subprocess + • tarfile + • tempfile + • tokenize + • urllib.request + • urllib3.contrib.pyopenssl + • urllib3.filepost + • urllib3.packages.backports.makefile + • urllib3.packages.six + • urllib3.response + • urllib3.util.ssltransport + • uuid + • xml.etree.ElementTree + • xml.sax + • xml.sax.saxutils + • xmlrpc.client + • zipfile + +
+ +
+ +
+ + ipaddress +SourceModule
+imports: + functools + • re + +
+
+imported by: + urllib3.util.ssl_match_hostname + +
+ +
+ +
+ + itertools (builtin module)
+imported by: + _pydecimal + • asyncio.base_events + • asyncio.tasks + • asyncio.unix_events + • asyncio.windows_utils + • calendar + • collections + • concurrent.futures.process + • concurrent.futures.thread + • fnmatch + • glob + • importlib.metadata + • importlib.metadata._itertools + • inspect + • multiprocessing.connection + • multiprocessing.pool + • multiprocessing.process + • multiprocessing.util + • pickle + • platform + • random + • reprlib + • statistics + • threading + • tokenize + • traceback + • urllib3.packages.six + • urllib3.util.retry + • weakref + • zipfile + +
+ +
+ +
+ + java +MissingModule
+imported by: + platform + +
+ +
+ +
+ + json +Package
+imports: + codecs + • json.decoder + • json.encoder + • json.scanner + +
+
+imported by: + charset_normalizer.models + • json.decoder + • json.encoder + • json.scanner + • mqtt_srv.pyw + • requests.compat + +
+ +
+ +
+ + json.decoder +SourceModule
+imports: + _json + • json + • json.scanner + • re + +
+
+imported by: + _json + • json + +
+ +
+ +
+ + json.encoder +SourceModule
+imports: + _json + • json + • re + +
+
+imported by: + json + +
+ +
+ +
+ + json.scanner +SourceModule
+imports: + _json + • json + • re + +
+
+imported by: + json + • json.decoder + +
+ +
+ +
+ + keyword +SourceModule
+imported by: + collections + • dataclasses + • mqtt_srv.pyw + +
+ +
+ +
+ + linecache +SourceModule
+imports: + functools + • os + • sys + • tokenize + +
+
+imported by: + asyncio.base_tasks + • inspect + • mqtt_srv.pyw + • traceback + • tracemalloc + • warnings + +
+ +
+ +
+ + locale +SourceModule
+imports: + _collections_abc + • _locale + • builtins + • encodings + • encodings.aliases + • functools + • os + • re + • sys + • warnings + +
+
+imported by: + _pydecimal + • _strptime + • calendar + • gettext + • mqtt_srv.pyw + • xml.etree.ElementTree + +
+ +
+ +
+ + logging +Package
+imports: + atexit + • collections.abc + • io + • os + • pickle + • re + • string + • sys + • threading + • time + • traceback + • warnings + • weakref + +
+
+imported by: + asyncio.futures + • asyncio.log + • charset_normalizer + • charset_normalizer.api + • charset_normalizer.utils + • concurrent.futures._base + • getmac.getmac + • hashlib + • http.cookiejar + • multiprocessing.util + • paho.mqtt.client + • ping3 + • requests + • urllib3 + • urllib3.connection + • urllib3.connectionpool + • urllib3.contrib.pyopenssl + • urllib3.poolmanager + • urllib3.response + • urllib3.util.retry + +
+ +
+ +
+ + lzma +SourceModule
+imports: + _compression + • _lzma + • builtins + • io + • os + +
+
+imported by: + shutil + • tarfile + • zipfile + +
+ +
+ +
+ + marshal (builtin module)
+imported by: + importlib._bootstrap_external + • pkgutil + • zipimport + +
+ +
+ +
+ + math (builtin module)
+imported by: + _pydecimal + • asyncio.windows_events + • datetime + • fractions + • random + • selectors + • statistics + +
+ +
+ +
+ + mimetypes +SourceModule
+imports: + _winapi + • getopt + • os + • posixpath + • sys + • urllib.parse + • winreg + +
+
+imported by: + urllib.request + • urllib3.fields + +
+ +
+ +
+ + mmap (builtin module)
+imported by: + multiprocessing.heap + • multiprocessing.shared_memory + +
+ +
+ +
+ + msvcrt (builtin module)
+imported by: + asyncio.windows_events + • asyncio.windows_utils + • getpass + • multiprocessing.popen_spawn_win32 + • multiprocessing.spawn + • subprocess + +
+ +
+ +
+ + multiprocessing +Package
+imports: + multiprocessing + • multiprocessing.AuthenticationError + • multiprocessing.BufferTooShort + • multiprocessing.TimeoutError + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.forkserver + • multiprocessing.get_context + • multiprocessing.get_start_method + • multiprocessing.pool + • multiprocessing.process + • multiprocessing.reduction + • multiprocessing.resource_sharer + • multiprocessing.resource_tracker + • multiprocessing.set_start_method + • multiprocessing.shared_memory + • multiprocessing.spawn + • multiprocessing.util + • sys + +
+
+imported by: + concurrent.futures.process + • multiprocessing + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.dummy + • multiprocessing.forkserver + • multiprocessing.heap + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.popen_fork + • multiprocessing.popen_forkserver + • multiprocessing.popen_spawn_posix + • multiprocessing.popen_spawn_win32 + • multiprocessing.process + • multiprocessing.queues + • multiprocessing.reduction + • multiprocessing.resource_sharer + • multiprocessing.resource_tracker + • multiprocessing.shared_memory + • multiprocessing.sharedctypes + • multiprocessing.spawn + • multiprocessing.synchronize + • multiprocessing.util + • pyi_rth_multiprocessing.py + +
+ +
+ +
+ + multiprocessing.AuthenticationError +MissingModule
+imported by: + multiprocessing + • multiprocessing.connection + +
+ +
+ +
+ + multiprocessing.BufferTooShort +MissingModule
+imported by: + multiprocessing + • multiprocessing.connection + +
+ +
+ +
+ + multiprocessing.TimeoutError +MissingModule
+imported by: + multiprocessing + • multiprocessing.pool + +
+ +
+ +
+ + multiprocessing.connection +SourceModule
+imports: + _multiprocessing + • _winapi + • hmac + • io + • itertools + • multiprocessing + • multiprocessing.AuthenticationError + • multiprocessing.BufferTooShort + • multiprocessing.context + • multiprocessing.resource_sharer + • multiprocessing.util + • os + • selectors + • socket + • struct + • sys + • tempfile + • time + • xmlrpc.client + +
+
+imported by: + concurrent.futures.process + • multiprocessing + • multiprocessing.context + • multiprocessing.forkserver + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.popen_fork + • multiprocessing.popen_forkserver + • multiprocessing.process + • multiprocessing.queues + • multiprocessing.resource_sharer + +
+ +
+ +
+ + multiprocessing.context +SourceModule
+imports: + multiprocessing + • multiprocessing.connection + • multiprocessing.forkserver + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.popen_fork + • multiprocessing.popen_forkserver + • multiprocessing.popen_spawn_posix + • multiprocessing.popen_spawn_win32 + • multiprocessing.process + • multiprocessing.queues + • multiprocessing.reduction + • multiprocessing.sharedctypes + • multiprocessing.spawn + • multiprocessing.synchronize + • multiprocessing.util + • os + • sys + • threading + +
+
+imported by: + multiprocessing + • multiprocessing.connection + • multiprocessing.forkserver + • multiprocessing.heap + • multiprocessing.managers + • multiprocessing.popen_forkserver + • multiprocessing.popen_spawn_posix + • multiprocessing.popen_spawn_win32 + • multiprocessing.process + • multiprocessing.queues + • multiprocessing.reduction + • multiprocessing.resource_sharer + • multiprocessing.sharedctypes + • multiprocessing.spawn + • multiprocessing.synchronize + +
+ +
+ +
+ + multiprocessing.dummy +Package
+imports: + array + • multiprocessing + • multiprocessing.dummy.connection + • multiprocessing.pool + • queue + • sys + • threading + • weakref + +
+
+imported by: + multiprocessing.dummy.connection + • multiprocessing.pool + +
+ +
+ +
+ + multiprocessing.dummy.connection +SourceModule
+imports: + multiprocessing.dummy + • queue + +
+
+imported by: + multiprocessing.dummy + +
+ +
+ +
+ + multiprocessing.forkserver +SourceModule
+imports: + errno + • multiprocessing + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.process + • multiprocessing.resource_tracker + • multiprocessing.spawn + • multiprocessing.util + • os + • selectors + • signal + • socket + • struct + • sys + • threading + • warnings + +
+
+imported by: + multiprocessing + • multiprocessing.context + • multiprocessing.popen_forkserver + • multiprocessing.util + +
+ +
+ +
+ + multiprocessing.get_context +MissingModule
+imported by: + multiprocessing + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.sharedctypes + +
+ +
+ +
+ + multiprocessing.get_start_method +MissingModule
+imported by: + multiprocessing + • multiprocessing.spawn + +
+ +
+ +
+ + multiprocessing.heap +SourceModule
+imports: + _winapi + • bisect + • collections + • mmap + • multiprocessing + • multiprocessing.context + • multiprocessing.util + • os + • sys + • tempfile + • threading + +
+
+imported by: + multiprocessing.sharedctypes + • multiprocessing.synchronize + +
+ +
+ +
+ + multiprocessing.managers +SourceModule
+imports: + array + • multiprocessing + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.get_context + • multiprocessing.pool + • multiprocessing.process + • multiprocessing.resource_tracker + • multiprocessing.shared_memory + • multiprocessing.util + • os + • queue + • signal + • sys + • threading + • time + • traceback + • types + +
+
+imported by: + multiprocessing.context + +
+ +
+ +
+ + multiprocessing.pool +SourceModule
+imports: + collections + • itertools + • multiprocessing + • multiprocessing.TimeoutError + • multiprocessing.connection + • multiprocessing.dummy + • multiprocessing.get_context + • multiprocessing.util + • os + • queue + • threading + • time + • traceback + • types + • warnings + +
+
+imported by: + multiprocessing + • multiprocessing.context + • multiprocessing.dummy + • multiprocessing.managers + +
+ +
+ +
+ + multiprocessing.popen_fork +SourceModule
+imports: + multiprocessing + • multiprocessing.connection + • multiprocessing.util + • os + • signal + +
+
+imported by: + multiprocessing.context + • multiprocessing.popen_forkserver + • multiprocessing.popen_spawn_posix + • pyi_rth_multiprocessing.py + +
+ +
+ +
+ + multiprocessing.popen_forkserver +SourceModule
+imports: + io + • multiprocessing + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.forkserver + • multiprocessing.popen_fork + • multiprocessing.spawn + • multiprocessing.util + • os + +
+
+imported by: + multiprocessing.context + +
+ +
+ +
+ + multiprocessing.popen_spawn_posix +SourceModule
+imports: + io + • multiprocessing + • multiprocessing.context + • multiprocessing.popen_fork + • multiprocessing.resource_tracker + • multiprocessing.spawn + • multiprocessing.util + • os + +
+
+imported by: + multiprocessing.context + • pyi_rth_multiprocessing.py + +
+ +
+ +
+ + multiprocessing.popen_spawn_win32 +SourceModule
+imports: + _winapi + • msvcrt + • multiprocessing + • multiprocessing.context + • multiprocessing.spawn + • multiprocessing.util + • os + • signal + • sys + +
+
+imported by: + multiprocessing.context + • pyi_rth_multiprocessing.py + +
+ +
+ +
+ + multiprocessing.process +SourceModule
+imports: + _weakrefset + • itertools + • multiprocessing + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.util + • os + • signal + • sys + • threading + • traceback + +
+
+imported by: + multiprocessing + • multiprocessing.context + • multiprocessing.forkserver + • multiprocessing.managers + • multiprocessing.resource_sharer + • multiprocessing.spawn + • multiprocessing.synchronize + • multiprocessing.util + +
+ +
+ +
+ + multiprocessing.queues +SourceModule
+imports: + _multiprocessing + • collections + • errno + • multiprocessing + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.synchronize + • multiprocessing.util + • os + • queue + • sys + • threading + • time + • traceback + • types + • weakref + +
+
+imported by: + concurrent.futures.process + • multiprocessing.context + +
+ +
+ +
+ + multiprocessing.reduction +SourceModule
+imports: + _winapi + • abc + • array + • copyreg + • functools + • io + • multiprocessing + • multiprocessing.context + • multiprocessing.resource_sharer + • os + • pickle + • socket + • sys + +
+
+imported by: + multiprocessing + • multiprocessing.context + +
+ +
+ +
+ + multiprocessing.resource_sharer +SourceModule
+imports: + multiprocessing + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.process + • multiprocessing.util + • os + • signal + • socket + • sys + • threading + +
+
+imported by: + multiprocessing + • multiprocessing.connection + • multiprocessing.reduction + +
+ +
+ +
+ + multiprocessing.resource_tracker +SourceModule
+imports: + _multiprocessing + • _posixshmem + • multiprocessing + • multiprocessing.spawn + • multiprocessing.util + • os + • signal + • sys + • threading + • warnings + +
+
+imported by: + multiprocessing + • multiprocessing.forkserver + • multiprocessing.managers + • multiprocessing.popen_spawn_posix + • multiprocessing.shared_memory + • multiprocessing.spawn + • multiprocessing.synchronize + • multiprocessing.util + +
+ +
+ +
+ + multiprocessing.set_start_method +MissingModule
+imported by: + multiprocessing + • multiprocessing.spawn + +
+ +
+ +
+ + multiprocessing.shared_memory +SourceModule
+imports: + _posixshmem + • _winapi + • errno + • functools + • mmap + • multiprocessing + • multiprocessing.resource_tracker + • os + • secrets + • struct + • types + +
+
+imported by: + multiprocessing + • multiprocessing.managers + +
+ +
+ +
+ + multiprocessing.sharedctypes +SourceModule
+imports: + ctypes + • multiprocessing + • multiprocessing.context + • multiprocessing.get_context + • multiprocessing.heap + • weakref + +
+
+imported by: + multiprocessing.context + +
+ +
+ +
+ + multiprocessing.spawn +SourceModule
+imports: + _winapi + • msvcrt + • multiprocessing + • multiprocessing.context + • multiprocessing.get_start_method + • multiprocessing.process + • multiprocessing.resource_tracker + • multiprocessing.set_start_method + • multiprocessing.util + • os + • runpy + • sys + • types + +
+
+imported by: + multiprocessing + • multiprocessing.context + • multiprocessing.forkserver + • multiprocessing.popen_forkserver + • multiprocessing.popen_spawn_posix + • multiprocessing.popen_spawn_win32 + • multiprocessing.resource_tracker + • pyi_rth_multiprocessing.py + +
+ +
+ +
+ + multiprocessing.synchronize +SourceModule
+imports: + _multiprocessing + • multiprocessing + • multiprocessing.context + • multiprocessing.heap + • multiprocessing.process + • multiprocessing.resource_tracker + • multiprocessing.util + • struct + • sys + • tempfile + • threading + • time + +
+
+imported by: + concurrent.futures.process + • multiprocessing.context + • multiprocessing.queues + +
+ +
+ +
+ + multiprocessing.util +SourceModule
+imports: + _posixsubprocess + • atexit + • itertools + • logging + • multiprocessing + • multiprocessing.forkserver + • multiprocessing.process + • multiprocessing.resource_tracker + • os + • shutil + • subprocess + • sys + • tempfile + • threading + • traceback + • weakref + +
+
+imported by: + multiprocessing + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.forkserver + • multiprocessing.heap + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.popen_fork + • multiprocessing.popen_forkserver + • multiprocessing.popen_spawn_posix + • multiprocessing.popen_spawn_win32 + • multiprocessing.process + • multiprocessing.queues + • multiprocessing.resource_sharer + • multiprocessing.resource_tracker + • multiprocessing.spawn + • multiprocessing.synchronize + +
+ +
+ +
+ + netrc +SourceModule
+imports: + os + • pwd + • shlex + • stat + +
+
+imported by: + ftplib + • requests.utils + +
+ +
+ +
+ + nt (builtin module)
+imported by: + ctypes + • importlib._bootstrap_external + • ntpath + • os + • shutil + +
+ +
+ +
+ + ntpath +SourceModule
+imports: + genericpath + • nt + • os + • stat + • string + • sys + +
+
+imported by: + mqtt_srv.pyw + • ntpath + • os + • pathlib + +
+ +
+ +
+ + ntpath +AliasNode
+imports: + ntpath + • os + +
+
+imported by: + charset_normalizer.api + • os + • pkgutil + • py_compile + • requests.adapters + • tracemalloc + +
+ +
+ +
+ + nturl2path +SourceModule
+imports: + string + • urllib.parse + +
+
+imported by: + urllib.request + +
+ +
+ +
+ + numbers +SourceModule
+imports: + abc + +
+
+imported by: + _pydecimal + • fractions + • statistics + +
+ +
+ +
+ + opcode +SourceModule
+imports: + _opcode + +
+
+imported by: + dis + +
+ +
+ +
+ + operator +SourceModule
+imports: + _operator + • builtins + • functools + +
+
+imported by: + collections + • copyreg + • datetime + • email._header_value_parser + • fractions + • importlib.metadata + • inspect + • mqtt_srv.pyw + • pathlib + • random + • statistics + • typing + • urllib3.packages.six + +
+ +
+ +
+ + optparse +SourceModule
+imports: + gettext + • os + • sys + • textwrap + +
+
+imported by: + uu + +
+ +
+ +
+ + org +MissingModule
+imported by: + copy + +
+ +
+ +
+ + os +SourceModule
+imports: + _collections_abc + • abc + • io + • nt + • ntpath + • ntpath + • posix + • posixpath + • stat + • subprocess + • sys + • warnings + +
+
+imported by: + argparse + • asyncio.base_events + • asyncio.coroutines + • asyncio.events + • asyncio.proactor_events + • asyncio.unix_events + • asyncio.windows_utils + • bz2 + • certifi.core + • charset_normalizer.api + • concurrent.futures.process + • concurrent.futures.thread + • ctypes + • curses + • email.utils + • fnmatch + • genericpath + • getmac.getmac + • getopt + • getpass + • gettext + • glob + • gzip + • http.cookiejar + • importlib._common + • importlib.metadata + • importlib.resources + • inspect + • linecache + • locale + • logging + • lzma + • mimetypes + • mqtt_srv.pyw + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.forkserver + • multiprocessing.heap + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.popen_fork + • multiprocessing.popen_forkserver + • multiprocessing.popen_spawn_posix + • multiprocessing.popen_spawn_win32 + • multiprocessing.process + • multiprocessing.queues + • multiprocessing.reduction + • multiprocessing.resource_sharer + • multiprocessing.resource_tracker + • multiprocessing.shared_memory + • multiprocessing.spawn + • multiprocessing.util + • netrc + • ntpath + • ntpath + • optparse + • paho.mqtt.client + • pathlib + • ping3 + • pkgutil + • platform + • posixpath + • psutil + • psutil._common + • psutil._compat + • psutil._psaix + • psutil._psbsd + • psutil._pslinux + • psutil._psosx + • psutil._psposix + • psutil._pssunos + • psutil._pswindows + • py_compile + • pyi_rth_inspect.py + • pyi_rth_multiprocessing.py + • pyi_rth_pkgutil.py + • random + • requests.auth + • requests.sessions + • requests.utils + • runpy + • shlex + • shutil + • socket + • ssl + • subprocess + • tarfile + • tempfile + • threading + • urllib.request + • urllib3.connection + • urllib3.contrib._appengine_environ + • urllib3.filepost + • urllib3.util.ssl_ + • uu + • uuid + • xml.sax + • xml.sax.saxutils + • zipfile + • zipimport + +
+ +
+ +
+ + paho +Package
+imported by: + paho.mqtt + +
+ +
+ +
+ + paho.mqtt +Package
+imports: + paho + +
+
+imported by: + paho.mqtt.client + • paho.mqtt.matcher + • paho.mqtt.packettypes + • paho.mqtt.properties + • paho.mqtt.reasoncodes + • paho.mqtt.subscribeoptions + +
+ +
+ +
+ + paho.mqtt.client +SourceModule
+imports: + base64 + • collections + • dns + • errno + • hashlib + • logging + • os + • paho.mqtt + • paho.mqtt.matcher + • paho.mqtt.properties + • paho.mqtt.reasoncodes + • paho.mqtt.subscribeoptions + • platform + • select + • socket + • socks + • ssl + • string + • struct + • sys + • threading + • time + • urllib + • urllib.parse + • urllib.request + • urlparse + • uuid + +
+
+imported by: + mqtt_srv.pyw + +
+ +
+ +
+ + paho.mqtt.matcher +SourceModule
+imports: + paho.mqtt + +
+
+imported by: + paho.mqtt.client + +
+ +
+ +
+ + paho.mqtt.packettypes +SourceModule
+imports: + paho.mqtt + +
+
+imported by: + paho.mqtt.properties + • paho.mqtt.reasoncodes + +
+ +
+ +
+ + paho.mqtt.properties +SourceModule
+imports: + paho.mqtt + • paho.mqtt.packettypes + • struct + • sys + +
+
+imported by: + paho.mqtt.client + +
+ +
+ +
+ + paho.mqtt.reasoncodes +SourceModule
+imports: + paho.mqtt + • paho.mqtt.packettypes + • sys + +
+
+imported by: + paho.mqtt.client + +
+ +
+ +
+ + paho.mqtt.subscribeoptions +SourceModule
+imports: + paho.mqtt + • sys + +
+
+imported by: + paho.mqtt.client + +
+ +
+ +
+ + pathlib +SourceModule
+imports: + _collections_abc + • errno + • fnmatch + • functools + • grp + • io + • ntpath + • operator + • os + • posixpath + • pwd + • re + • stat + • sys + • urllib.parse + • warnings + +
+
+imported by: + importlib._common + • importlib.metadata + • importlib.readers + • importlib.resources + • mqtt_srv.pyw + • zipfile + +
+ +
+ +
+ + pep517 +MissingModule
+imported by: + importlib.metadata + +
+ +
+ +
+ + pickle +SourceModule
+imports: + 'org.python' + • _compat_pickle + • _pickle + • codecs + • copyreg + • functools + • io + • itertools + • pprint + • re + • struct + • sys + • types + +
+
+imported by: + logging + • multiprocessing.reduction + • tracemalloc + +
+ +
+ +
+ + ping3 +Package
+imports: + errno + • functools + • logging + • os + • ping3 + • ping3.enums + • ping3.errors + • platform + • select + • socket + • struct + • threading + • time + • zlib + +
+
+imported by: + mqtt_srv.pyw + • ping3 + • ping3.enums + • ping3.errors + +
+ +
+ +
+ + ping3.enums +SourceModule
+imports: + enum + • ping3 + +
+
+imported by: + ping3 + +
+ +
+ +
+ + ping3.errors +SourceModule
+imports: + ping3 + +
+
+imported by: + ping3 + +
+ +
+ +
+ + pkgutil +SourceModule
+imports: + collections + • functools + • importlib + • importlib.machinery + • importlib.util + • inspect + • marshal + • ntpath + • os + • re + • sys + • types + • warnings + • zipimport + +
+
+imported by: + pyi_rth_pkgutil.py + • runpy + +
+ +
+ +
+ + platform +SourceModule
+imports: + 'java.lang' + • _winreg + • collections + • functools + • itertools + • java + • os + • re + • socket + • struct + • subprocess + • sys + • vms_lib + • winreg + +
+
+imported by: + getmac.getmac + • mqtt_srv.pyw + • paho.mqtt.client + • ping3 + • psutil._compat + • uuid + +
+ +
+ +
+ + posix +MissingModule
+imports: + resource + +
+
+imported by: + importlib._bootstrap_external + • os + • shutil + +
+ +
+ +
+ + posixpath +SourceModule
+imports: + genericpath + • os + • pwd + • re + • stat + • sys + +
+
+imported by: + fnmatch + • importlib.metadata + • mimetypes + • mqtt_srv.pyw + • os + • pathlib + • urllib.request + • zipfile + +
+ +
+ +
+ + pprint +SourceModule
+imports: + collections + • dataclasses + • io + • re + • sys + • time + • types + +
+
+imported by: + pickle + +
+ +
+ +
+ + psutil +Package
+imports: + __future__ + • collections + • contextlib + • datetime + • functools + • os + • psutil + • psutil._common + • psutil._compat + • psutil._psaix + • psutil._psbsd + • psutil._pslinux + • psutil._psosx + • psutil._psposix + • psutil._pssunos + • psutil._psutil_aix + • psutil._psutil_bsd + • psutil._psutil_linux + • psutil._psutil_osx + • psutil._psutil_sunos + • psutil._psutil_windows + • psutil._pswindows + • pwd + • signal + • socket + • subprocess + • sys + • threading + • time + +
+
+imported by: + mqtt_srv.pyw + • psutil + • psutil._common + • psutil._compat + • psutil._psaix + • psutil._psbsd + • psutil._pslinux + • psutil._psosx + • psutil._psposix + • psutil._pssunos + • psutil._psutil_windows + • psutil._pswindows + +
+ +
+ +
+ + psutil._common +SourceModule
+imports: + __future__ + • collections + • contextlib + • ctypes + • curses + • enum + • errno + • functools + • inspect + • os + • psutil + • socket + • stat + • sys + • threading + • warnings + +
+
+imported by: + psutil + • psutil._psaix + • psutil._psbsd + • psutil._pslinux + • psutil._psosx + • psutil._psposix + • psutil._pssunos + • psutil._pswindows + +
+ +
+ +
+ + psutil._compat +SourceModule
+imports: + collections + • contextlib + • dummy_threading + • errno + • fcntl + • functools + • os + • platform + • psutil + • shutil + • struct + • subprocess + • sys + • termios + • threading + • types + +
+
+imported by: + psutil + • psutil._psaix + • psutil._psbsd + • psutil._pslinux + • psutil._psosx + • psutil._psposix + • psutil._pssunos + • psutil._pswindows + +
+ +
+ +
+ + psutil._psaix +SourceModule
+imports: + collections + • functools + • glob + • os + • psutil + • psutil._common + • psutil._compat + • psutil._psposix + • psutil._psutil_aix + • re + • subprocess + • sys + +
+
+imported by: + psutil + +
+ +
+ +
+ + psutil._psbsd +SourceModule
+imports: + collections + • contextlib + • errno + • functools + • os + • psutil + • psutil._common + • psutil._compat + • psutil._psposix + • psutil._psutil_bsd + • xml.etree.ElementTree + +
+
+imported by: + psutil + +
+ +
+ +
+ + psutil._pslinux +SourceModule
+imports: + __future__ + • base64 + • collections + • ctypes + • enum + • errno + • functools + • glob + • os + • psutil + • psutil._common + • psutil._compat + • psutil._psposix + • psutil._psutil_linux + • re + • resource + • socket + • struct + • sys + • traceback + • warnings + +
+
+imported by: + psutil + +
+ +
+ +
+ + psutil._psosx +SourceModule
+imports: + collections + • errno + • functools + • os + • psutil + • psutil._common + • psutil._compat + • psutil._psposix + • psutil._psutil_osx + +
+
+imported by: + psutil + +
+ +
+ +
+ + psutil._psposix +SourceModule
+imports: + enum + • glob + • os + • psutil + • psutil._common + • psutil._compat + • psutil._psutil_osx + • signal + • sys + • time + +
+
+imported by: + psutil + • psutil._psaix + • psutil._psbsd + • psutil._pslinux + • psutil._psosx + • psutil._pssunos + +
+ +
+ +
+ + psutil._pssunos +SourceModule
+imports: + collections + • errno + • functools + • os + • psutil + • psutil._common + • psutil._compat + • psutil._psposix + • psutil._psutil_sunos + • socket + • subprocess + • sys + +
+
+imported by: + psutil + +
+ +
+ +
+ + psutil._psutil_aix +MissingModule
+imported by: + psutil + • psutil._psaix + +
+ +
+ +
+ + psutil._psutil_bsd +MissingModule
+imported by: + psutil + • psutil._psbsd + +
+ +
+ +
+ + psutil._psutil_linux +MissingModule
+imported by: + psutil + • psutil._pslinux + +
+ +
+ +
+ + psutil._psutil_osx +MissingModule
+imported by: + psutil + • psutil._psosx + • psutil._psposix + +
+ +
+ +
+ + psutil._psutil_sunos +MissingModule
+imported by: + psutil + • psutil._pssunos + +
+ +
+ +
+ + psutil._psutil_windows C:\Program Files\Python310\lib\site-packages\psutil\_psutil_windows.pyd
+imports: + psutil + +
+
+imported by: + psutil + • psutil._pswindows + +
+ +
+ +
+ + psutil._pswindows +SourceModule
+imports: + collections + • contextlib + • enum + • errno + • functools + • os + • psutil + • psutil._common + • psutil._compat + • psutil._psutil_windows + • signal + • sys + • time + +
+
+imported by: + psutil + +
+ +
+ +
+ + pwd +MissingModule
+imported by: + getpass + • netrc + • pathlib + • posixpath + • psutil + • shutil + • subprocess + • tarfile + +
+ +
+ +
+ + py_compile +SourceModule
+imports: + argparse + • enum + • importlib._bootstrap_external + • importlib.machinery + • importlib.util + • ntpath + • os + • sys + • traceback + +
+
+imported by: + zipfile + +
+ +
+ +
+ + pyexpat C:\Program Files\Python310\DLLs\pyexpat.pyd
+imported by: + _elementtree + • xml.etree.ElementTree + • xml.parsers.expat + +
+ +
+ +
+ + pyimod02_importers +MissingModule
+imported by: + pyi_rth_pkgutil.py + +
+ +
+ +
+ + queue +SourceModule
+imports: + _queue + • collections + • heapq + • threading + • time + • types + +
+
+imported by: + concurrent.futures.process + • concurrent.futures.thread + • multiprocessing.dummy + • multiprocessing.dummy.connection + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.queues + • queue + +
+ +
+ +
+ + queue +AliasNode
+imports: + queue + +
+
+imported by: + urllib3.connectionpool + • urllib3.packages.six.moves + • urllib3.util.queue + +
+ +
+ +
+ + quopri +SourceModule
+imports: + binascii + • getopt + • io + • sys + +
+
+imported by: + email.encoders + • email.message + • encodings.quopri_codec + +
+ +
+ +
+ + random +SourceModule
+imports: + _collections_abc + • _random + • _sha512 + • bisect + • hashlib + • itertools + • math + • operator + • os + • statistics + • time + • warnings + +
+
+imported by: + email.generator + • email.utils + • mqtt_srv.pyw + • secrets + • statistics + • tempfile + • uuid + +
+ +
+ +
+ + re +SourceModule
+imports: + _locale + • copyreg + • enum + • functools + • sre_compile + • sre_constants + • sre_parse + +
+
+imported by: + _pydecimal + • _sre + • _strptime + • argparse + • base64 + • charset_normalizer.constant + • charset_normalizer.models + • charset_normalizer.utils + • csv + • dataclasses + • email._encoded_words + • email._header_value_parser + • email.feedparser + • email.generator + • email.header + • email.message + • email.policy + • email.quoprimime + • email.utils + • encodings.idna + • fnmatch + • fractions + • ftplib + • getmac.getmac + • gettext + • glob + • http.client + • http.cookiejar + • http.cookies + • idna.core + • importlib.metadata + • importlib.metadata._adapters + • importlib.metadata._text + • inspect + • ipaddress + • json.decoder + • json.encoder + • json.scanner + • locale + • logging + • mqtt_srv.pyw + • pathlib + • pickle + • pkgutil + • platform + • posixpath + • pprint + • psutil._psaix + • psutil._pslinux + • requests._internal_utils + • requests.auth + • requests.utils + • shlex + • string + • tarfile + • textwrap + • tokenize + • typing + • urllib.parse + • urllib.request + • urllib3.connection + • urllib3.connectionpool + • urllib3.fields + • urllib3.util.retry + • urllib3.util.ssl_match_hostname + • urllib3.util.url + • warnings + • xml.etree.ElementPath + • xml.etree.ElementTree + +
+ +
+ +
+ + reprlib +SourceModule
+imports: + _thread + • builtins + • itertools + +
+
+imported by: + asyncio.base_futures + • asyncio.format_helpers + • collections + • functools + • mqtt_srv.pyw + +
+ +
+ +
+ + requests +Package
+imports: + chardet + • charset_normalizer + • cryptography + • logging + • requests + • requests.__version__ + • requests.api + • requests.certs + • requests.exceptions + • requests.models + • requests.packages + • requests.sessions + • requests.status_codes + • requests.utils + • ssl + • urllib3 + • urllib3.contrib + • urllib3.contrib.pyopenssl + • urllib3.exceptions + • warnings + +
+
+imported by: + mqtt_srv.pyw + • requests + • requests.__version__ + • requests._internal_utils + • requests.adapters + • requests.api + • requests.auth + • requests.certs + • requests.compat + • requests.cookies + • requests.exceptions + • requests.hooks + • requests.models + • requests.packages + • requests.sessions + • requests.status_codes + • requests.structures + • requests.utils + +
+ +
+ +
+ + requests.__version__ +SourceModule
+imports: + requests + +
+
+imported by: + requests + • requests.utils + +
+ +
+ +
+ + requests._internal_utils +SourceModule
+imports: + re + • requests + • requests.compat + +
+
+imported by: + requests.auth + • requests.cookies + • requests.models + • requests.sessions + • requests.utils + +
+ +
+ +
+ + requests.adapters +SourceModule
+imports: + ntpath + • requests + • requests.auth + • requests.compat + • requests.cookies + • requests.exceptions + • requests.models + • requests.structures + • requests.utils + • socket + • urllib3.contrib.socks + • urllib3.exceptions + • urllib3.poolmanager + • urllib3.response + • urllib3.util + • urllib3.util.retry + +
+
+imported by: + requests.sessions + +
+ +
+ +
+ + requests.api +SourceModule
+imports: + requests + • requests.sessions + +
+
+imported by: + requests + +
+ +
+ +
+ + requests.auth +SourceModule
+imports: + base64 + • hashlib + • os + • re + • requests + • requests._internal_utils + • requests.compat + • requests.cookies + • requests.utils + • threading + • time + • warnings + +
+
+imported by: + requests.adapters + • requests.models + • requests.sessions + +
+ +
+ +
+ + requests.certs +SourceModule
+imports: + certifi + • requests + +
+
+imported by: + requests + • requests.utils + +
+ +
+ +
+ + requests.compat +SourceModule
+imports: + chardet + • charset_normalizer + • collections + • collections.abc + • http + • http.cookiejar + • http.cookies + • io + • json + • requests + • simplejson + • sys + • urllib.parse + • urllib.request + +
+
+imported by: + requests._internal_utils + • requests.adapters + • requests.auth + • requests.cookies + • requests.exceptions + • requests.models + • requests.sessions + • requests.structures + • requests.utils + +
+ +
+ +
+ + requests.cookies +SourceModule
+imports: + calendar + • copy + • dummy_threading + • requests + • requests._internal_utils + • requests.compat + • threading + • time + +
+
+imported by: + requests.adapters + • requests.auth + • requests.models + • requests.sessions + • requests.utils + +
+ +
+ +
+ + requests.exceptions +SourceModule
+imports: + requests + • requests.compat + • urllib3.exceptions + +
+
+imported by: + requests + • requests.adapters + • requests.models + • requests.sessions + • requests.utils + +
+ +
+ +
+ + requests.hooks +SourceModule
+imports: + requests + +
+
+imported by: + requests.models + • requests.sessions + +
+ +
+ +
+ + requests.models +SourceModule
+imports: + datetime + • encodings.idna + • idna + • io + • requests + • requests._internal_utils + • requests.auth + • requests.compat + • requests.cookies + • requests.exceptions + • requests.hooks + • requests.status_codes + • requests.structures + • requests.utils + • urllib3.exceptions + • urllib3.fields + • urllib3.filepost + • urllib3.util + +
+
+imported by: + requests + • requests.adapters + • requests.sessions + +
+ +
+ +
+ + requests.packages +SourceModule
+imports: + chardet + • charset_normalizer + • requests + • sys + • warnings + +
+
+imported by: + requests + +
+ +
+ +
+ + requests.sessions +SourceModule
+imports: + collections + • datetime + • os + • requests + • requests._internal_utils + • requests.adapters + • requests.auth + • requests.compat + • requests.cookies + • requests.exceptions + • requests.hooks + • requests.models + • requests.status_codes + • requests.structures + • requests.utils + • sys + • time + +
+
+imported by: + requests + • requests.api + +
+ +
+ +
+ + requests.status_codes +SourceModule
+imports: + requests + • requests.structures + +
+
+imported by: + requests + • requests.models + • requests.sessions + +
+ +
+ +
+ + requests.structures +SourceModule
+imports: + collections + • requests + • requests.compat + +
+
+imported by: + requests.adapters + • requests.models + • requests.sessions + • requests.status_codes + • requests.utils + +
+ +
+ +
+ + requests.utils +SourceModule
+imports: + codecs + • collections + • contextlib + • io + • netrc + • os + • re + • requests + • requests.__version__ + • requests._internal_utils + • requests.certs + • requests.compat + • requests.cookies + • requests.exceptions + • requests.structures + • socket + • struct + • sys + • tempfile + • urllib3.util + • warnings + • winreg + • zipfile + +
+
+imported by: + requests + • requests.adapters + • requests.auth + • requests.models + • requests.sessions + +
+ +
+ +
+ + resource +MissingModule
+imported by: + posix + • psutil._pslinux + +
+ +
+ +
+ + runpy +SourceModule
+imports: + importlib.machinery + • importlib.util + • io + • os + • pkgutil + • sys + • types + • warnings + +
+
+imported by: + multiprocessing.spawn + +
+ +
+ +
+ + secrets +SourceModule
+imports: + base64 + • binascii + • hmac + • random + +
+
+imported by: + multiprocessing.shared_memory + +
+ +
+ +
+ + select C:\Program Files\Python310\DLLs\select.pyd
+imported by: + paho.mqtt.client + • ping3 + • selectors + • subprocess + • urllib3.util.wait + +
+ +
+ +
+ + selectors +SourceModule
+imports: + abc + • collections + • collections.abc + • math + • select + • sys + +
+
+imported by: + asyncio.selector_events + • asyncio.unix_events + • multiprocessing.connection + • multiprocessing.forkserver + • socket + • subprocess + +
+ +
+ +
+ + shlex +SourceModule
+imports: + collections + • io + • os + • re + • sys + • warnings + +
+
+imported by: + getmac.getmac + • netrc + +
+ +
+ +
+ + shutil +SourceModule
+imports: + bz2 + • collections + • errno + • fnmatch + • grp + • lzma + • nt + • os + • posix + • pwd + • stat + • sys + • tarfile + • zipfile + • zlib + +
+
+imported by: + argparse + • multiprocessing.util + • psutil._compat + • tarfile + • tempfile + • uuid + • zipfile + +
+ +
+ +
+ + signal +SourceModule
+imports: + _signal + • enum + +
+
+imported by: + asyncio.proactor_events + • asyncio.unix_events + • multiprocessing.forkserver + • multiprocessing.managers + • multiprocessing.popen_fork + • multiprocessing.popen_spawn_win32 + • multiprocessing.process + • multiprocessing.resource_sharer + • multiprocessing.resource_tracker + • psutil + • psutil._psposix + • psutil._pswindows + • subprocess + +
+ +
+ +
+ + simplejson +MissingModule
+imported by: + requests.compat + +
+ +
+ +
+ + socket +SourceModule
+imports: + _socket + • array + • enum + • errno + • io + • os + • selectors + • sys + +
+
+imported by: + _ssl + • asyncio.base_events + • asyncio.events + • asyncio.proactor_events + • asyncio.selector_events + • asyncio.streams + • asyncio.trsock + • asyncio.unix_events + • asyncio.windows_events + • email.utils + • ftplib + • getmac.getmac + • http.client + • mqtt_srv.pyw + • multiprocessing.connection + • multiprocessing.forkserver + • multiprocessing.reduction + • multiprocessing.resource_sharer + • paho.mqtt.client + • ping3 + • platform + • psutil + • psutil._common + • psutil._pslinux + • psutil._pssunos + • requests.adapters + • requests.utils + • ssl + • urllib.request + • urllib3.connection + • urllib3.connectionpool + • urllib3.contrib.pyopenssl + • urllib3.contrib.socks + • urllib3.packages.backports.makefile + • urllib3.response + • urllib3.util.connection + • urllib3.util.ssltransport + • urllib3.util.timeout + • uuid + +
+ +
+ +
+ + socks +MissingModule
+imported by: + paho.mqtt.client + • urllib3.contrib.socks + +
+ +
+ +
+ + sre_compile +SourceModule
+imports: + _sre + • sre_constants + • sre_parse + • sys + +
+
+imported by: + mqtt_srv.pyw + • re + +
+ +
+ +
+ + sre_constants +SourceModule
+imports: + _sre + +
+
+imported by: + mqtt_srv.pyw + • re + • sre_compile + • sre_parse + +
+ +
+ +
+ + sre_parse +SourceModule
+imports: + sre_constants + • unicodedata + • warnings + +
+
+imported by: + mqtt_srv.pyw + • re + • sre_compile + +
+ +
+ +
+ + ssl +SourceModule
+imports: + _ssl + • base64 + • calendar + • collections + • enum + • errno + • os + • socket + • sys + • time + • warnings + +
+
+imported by: + asyncio.base_events + • asyncio.selector_events + • asyncio.sslproto + • ftplib + • http.client + • paho.mqtt.client + • requests + • urllib.request + • urllib3.connection + • urllib3.contrib.pyopenssl + • urllib3.contrib.socks + • urllib3.util.ssl_ + • urllib3.util.ssltransport + +
+ +
+ +
+ + stat +SourceModule
+imports: + _stat + +
+
+imported by: + asyncio.base_events + • asyncio.unix_events + • genericpath + • glob + • mqtt_srv.pyw + • netrc + • ntpath + • os + • pathlib + • posixpath + • psutil._common + • shutil + • tarfile + • zipfile + +
+ +
+ +
+ + statistics +SourceModule
+imports: + _statistics + • bisect + • collections + • decimal + • fractions + • itertools + • math + • numbers + • operator + • random + +
+
+imported by: + random + +
+ +
+ +
+ + string +SourceModule
+imports: + _string + • collections + • re + +
+
+imported by: + email._encoded_words + • email._header_value_parser + • email.quoprimime + • http.cookies + • logging + • ntpath + • nturl2path + • paho.mqtt.client + • urllib.request + +
+ +
+ +
+ + stringprep +SourceModule
+imports: + unicodedata + +
+
+imported by: + encodings.idna + +
+ +
+ +
+ + struct +SourceModule
+imports: + _struct + +
+
+imported by: + asyncio.windows_events + • base64 + • ctypes + • getmac.getmac + • gettext + • gzip + • multiprocessing.connection + • multiprocessing.forkserver + • multiprocessing.shared_memory + • multiprocessing.synchronize + • paho.mqtt.client + • paho.mqtt.properties + • pickle + • ping3 + • platform + • psutil._compat + • psutil._pslinux + • requests.utils + • tarfile + • urllib3.packages.six + • zipfile + +
+ +
+ +
+ + subprocess +SourceModule
+imports: + _posixsubprocess + • _winapi + • builtins + • contextlib + • errno + • fcntl + • grp + • io + • msvcrt + • os + • pwd + • select + • selectors + • signal + • sys + • threading + • time + • types + • warnings + +
+
+imported by: + asyncio.base_events + • asyncio.base_subprocess + • asyncio.events + • asyncio.subprocess + • asyncio.unix_events + • asyncio.windows_utils + • getmac.getmac + • mqtt_srv.pyw + • multiprocessing.util + • os + • platform + • psutil + • psutil._compat + • psutil._psaix + • psutil._pssunos + • pyi_rth_multiprocessing.py + • pyi_rth_subprocess.py + • uuid + +
+ +
+ +
+ + sys (builtin module)
+imported by: + _collections_abc + • _compression + • _pydecimal + • argparse + • ast + • asyncio + • asyncio.base_events + • asyncio.coroutines + • asyncio.events + • asyncio.format_helpers + • asyncio.futures + • asyncio.streams + • asyncio.unix_events + • asyncio.windows_events + • asyncio.windows_utils + • base64 + • calendar + • certifi.core + • codecs + • collections + • concurrent.futures.process + • contextlib + • ctypes + • ctypes._endian + • curses + • dataclasses + • datetime + • dis + • email._header_value_parser + • email.generator + • email.iterators + • email.policy + • encodings + • encodings.rot_13 + • encodings.utf_16 + • encodings.utf_32 + • enum + • fractions + • ftplib + • getmac.getmac + • getopt + • getpass + • gettext + • glob + • gzip + • http.client + • importlib + • importlib._bootstrap_external + • importlib.metadata + • importlib.util + • inspect + • linecache + • locale + • logging + • mimetypes + • mqtt_srv.pyw + • multiprocessing + • multiprocessing.connection + • multiprocessing.context + • multiprocessing.dummy + • multiprocessing.forkserver + • multiprocessing.heap + • multiprocessing.managers + • multiprocessing.popen_spawn_win32 + • multiprocessing.process + • multiprocessing.queues + • multiprocessing.reduction + • multiprocessing.resource_sharer + • multiprocessing.resource_tracker + • multiprocessing.spawn + • multiprocessing.synchronize + • multiprocessing.util + • ntpath + • optparse + • os + • paho.mqtt.client + • paho.mqtt.properties + • paho.mqtt.reasoncodes + • paho.mqtt.subscribeoptions + • pathlib + • pickle + • pkgutil + • platform + • posixpath + • pprint + • psutil + • psutil._common + • psutil._compat + • psutil._psaix + • psutil._pslinux + • psutil._psposix + • psutil._pssunos + • psutil._pswindows + • py_compile + • pyi_rth_inspect.py + • pyi_rth_multiprocessing.py + • pyi_rth_pkgutil.py + • pyi_rth_subprocess.py + • quopri + • requests.compat + • requests.packages + • requests.sessions + • requests.utils + • runpy + • selectors + • shlex + • shutil + • socket + • sre_compile + • ssl + • subprocess + • tarfile + • tempfile + • threading + • tokenize + • traceback + • types + • typing + • urllib.parse + • urllib.request + • urllib3.connectionpool + • urllib3.contrib.pyopenssl + • urllib3.packages.six + • urllib3.response + • urllib3.util.ssl_ + • urllib3.util.ssl_match_hostname + • urllib3.util.wait + • uu + • uuid + • warnings + • weakref + • xml.etree.ElementTree + • xml.parsers.expat + • xml.sax + • xml.sax._exceptions + • xml.sax.expatreader + • xml.sax.saxutils + • xmlrpc.client + • zipfile + • zipimport + +
+ +
+ +
+ + tarfile +SourceModule
+imports: + argparse + • builtins + • bz2 + • copy + • grp + • gzip + • io + • lzma + • os + • pwd + • re + • shutil + • stat + • struct + • sys + • time + • zlib + +
+
+imported by: + shutil + +
+ +
+ +
+ + tempfile +SourceModule
+imports: + _thread + • errno + • functools + • io + • os + • random + • shutil + • sys + • types + • warnings + • weakref + +
+
+imported by: + asyncio.windows_utils + • importlib._common + • multiprocessing.connection + • multiprocessing.heap + • multiprocessing.synchronize + • multiprocessing.util + • requests.utils + • urllib.request + • urllib.response + +
+ +
+ +
+ + termios +MissingModule
+imported by: + getpass + • psutil._compat + +
+ +
+ +
+ + textwrap +SourceModule
+imports: + re + +
+
+imported by: + argparse + • importlib.metadata + • importlib.metadata._adapters + • optparse + +
+ +
+ +
+ + threading +SourceModule
+imports: + _collections + • _thread + • _threading_local + • _weakrefset + • collections + • functools + • itertools + • os + • sys + • time + • traceback + • warnings + +
+
+imported by: + _threading_local + • asyncio.base_events + • asyncio.events + • asyncio.mixins + • asyncio.proactor_events + • asyncio.unix_events + • concurrent.futures._base + • concurrent.futures.process + • concurrent.futures.thread + • http.cookiejar + • logging + • multiprocessing.context + • multiprocessing.dummy + • multiprocessing.forkserver + • multiprocessing.heap + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.process + • multiprocessing.queues + • multiprocessing.resource_sharer + • multiprocessing.resource_tracker + • multiprocessing.synchronize + • multiprocessing.util + • paho.mqtt.client + • ping3 + • psutil + • psutil._common + • psutil._compat + • queue + • requests.auth + • requests.cookies + • subprocess + • urllib3._collections + • zipfile + +
+ +
+ +
+ + time (builtin module)
+imports: + _strptime + +
+
+imported by: + _datetime + • _strptime + • asyncio.base_events + • asyncio.windows_events + • concurrent.futures._base + • datetime + • email._parseaddr + • email.generator + • email.utils + • gc + • gzip + • http.cookiejar + • http.cookies + • logging + • mqtt_srv.pyw + • multiprocessing.connection + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.queues + • multiprocessing.synchronize + • paho.mqtt.client + • ping3 + • pprint + • psutil + • psutil._psposix + • psutil._pswindows + • queue + • random + • requests.auth + • requests.cookies + • requests.sessions + • ssl + • subprocess + • tarfile + • threading + • urllib.request + • urllib.robotparser + • urllib3.util.retry + • urllib3.util.timeout + • urllib3.util.wait + • uuid + • xmlrpc.client + • zipfile + • zipimport + +
+ +
+ +
+ + token +SourceModule
+imported by: + inspect + • mqtt_srv.pyw + • tokenize + +
+ +
+ +
+ + tokenize +SourceModule
+imports: + argparse + • builtins + • codecs + • collections + • functools + • io + • itertools + • re + • sys + • token + +
+
+imported by: + importlib._bootstrap_external + • inspect + • linecache + • mqtt_srv.pyw + +
+ +
+ +
+ + traceback +SourceModule
+imports: + collections + • itertools + • linecache + • sys + +
+
+imported by: + asyncio.base_events + • asyncio.base_tasks + • asyncio.coroutines + • asyncio.format_helpers + • concurrent.futures.process + • getmac.getmac + • http.cookiejar + • logging + • mqtt_srv.pyw + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.process + • multiprocessing.queues + • multiprocessing.util + • psutil._pslinux + • py_compile + • threading + • warnings + +
+ +
+ +
+ + tracemalloc +SourceModule
+imports: + _tracemalloc + • collections.abc + • fnmatch + • functools + • linecache + • ntpath + • pickle + +
+
+imported by: + warnings + +
+ +
+ +
+ + types +SourceModule
+imports: + _collections_abc + • functools + • sys + +
+
+imported by: + _weakrefset + • asyncio.coroutines + • asyncio.tasks + • certifi.core + • concurrent.futures._base + • concurrent.futures.thread + • contextlib + • copy + • ctypes + • dataclasses + • dis + • email.headerregistry + • enum + • functools + • http.cookies + • importlib._common + • importlib.metadata._functools + • importlib.resources + • importlib.util + • inspect + • mqtt_srv.pyw + • multiprocessing.managers + • multiprocessing.pool + • multiprocessing.queues + • multiprocessing.shared_memory + • multiprocessing.spawn + • pickle + • pkgutil + • pprint + • psutil._compat + • queue + • runpy + • subprocess + • tempfile + • typing + • urllib.parse + • urllib3.packages.six + +
+ +
+ +
+ + typing +SourceModule
+imports: + abc + • collections + • collections.abc + • contextlib + • functools + • operator + • re + • sys + • types + +
+
+imported by: + asyncio.staggered + • certifi.core + • charset_normalizer.api + • charset_normalizer.assets + • charset_normalizer.cd + • charset_normalizer.constant + • charset_normalizer.legacy + • charset_normalizer.md + • charset_normalizer.models + • charset_normalizer.utils + • functools + • getmac.getmac + • idna.core + • idna.intranges + • idna.uts46data + • importlib._common + • importlib.abc + • importlib.metadata + • importlib.metadata._meta + • importlib.resources + +
+ +
+ +
+ + unicodedata C:\Program Files\Python310\DLLs\unicodedata.pyd
+imported by: + charset_normalizer.utils + • encodings.idna + • idna.core + • sre_parse + • stringprep + • urllib.parse + +
+ +
+ +
+ + unicodedata2 +MissingModule
+imported by: + charset_normalizer.utils + +
+ +
+ +
+ + urllib +Package
+imported by: + email._header_value_parser + • mqtt_srv.pyw + • paho.mqtt.client + • urllib.error + • urllib.parse + • urllib.request + • urllib.response + • urllib.robotparser + +
+ +
+ +
+ + urllib.error +SourceModule
+imports: + urllib + • urllib.response + +
+
+imported by: + mqtt_srv.pyw + • urllib.request + +
+ +
+ +
+ + urllib.parse +SourceModule
+imports: + collections + • re + • sys + • types + • unicodedata + • urllib + • warnings + +
+
+imported by: + email.utils + • http.client + • http.cookiejar + • mimetypes + • mqtt_srv.pyw + • nturl2path + • paho.mqtt.client + • pathlib + • requests.compat + • urllib.request + • urllib.robotparser + • xml.etree.ElementInclude + • xml.sax.saxutils + • xmlrpc.client + +
+ +
+ +
+ + urllib.request +SourceModule
+imports: + _scproxy + • base64 + • bisect + • contextlib + • email + • email.utils + • fnmatch + • ftplib + • getpass + • hashlib + • http.client + • http.cookiejar + • io + • mimetypes + • nturl2path + • os + • posixpath + • re + • socket + • ssl + • string + • sys + • tempfile + • time + • urllib + • urllib.error + • urllib.parse + • urllib.response + • warnings + • winreg + +
+
+imported by: + http.cookiejar + • mqtt_srv.pyw + • paho.mqtt.client + • requests.compat + • urllib.robotparser + • xml.sax.saxutils + +
+ +
+ +
+ + urllib.response +SourceModule
+imports: + tempfile + • urllib + +
+
+imported by: + mqtt_srv.pyw + • urllib.error + • urllib.request + +
+ +
+ +
+ + urllib.robotparser +SourceModule
+imports: + collections + • time + • urllib + • urllib.parse + • urllib.request + +
+
+imported by: + mqtt_srv.pyw + +
+ +
+ +
+ + urllib3 +Package
+imports: + __future__ + • logging + • urllib3 + • urllib3._version + • urllib3.connectionpool + • urllib3.exceptions + • urllib3.filepost + • urllib3.poolmanager + • urllib3.response + • urllib3.util.request + • urllib3.util.retry + • urllib3.util.timeout + • urllib3.util.url + • urllib3_secure_extra + • warnings + +
+
+imported by: + requests + • urllib3 + • urllib3._collections + • urllib3._version + • urllib3.connection + • urllib3.connectionpool + • urllib3.contrib + • urllib3.contrib.pyopenssl + • urllib3.exceptions + • urllib3.fields + • urllib3.filepost + • urllib3.packages + • urllib3.poolmanager + • urllib3.request + • urllib3.response + • urllib3.util + +
+ +
+ +
+ + urllib3._collections +SourceModule
+imports: + __future__ + • collections + • collections.Mapping + • collections.MutableMapping + • collections.abc + • threading + • urllib3 + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + +
+
+imported by: + urllib3.connection + • urllib3.poolmanager + • urllib3.response + +
+ +
+ +
+ + urllib3._version +SourceModule
+imports: + urllib3 + +
+
+imported by: + urllib3 + • urllib3.connection + +
+ +
+ +
+ + urllib3.connection +SourceModule
+imports: + __future__ + • datetime + • http.client + • logging + • os + • re + • socket + • ssl + • urllib3 + • urllib3._collections + • urllib3._version + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + • urllib3.util + • urllib3.util.connection + • urllib3.util.proxy + • urllib3.util.ssl_ + • urllib3.util.ssl_match_hostname + • warnings + +
+
+imported by: + urllib3.connectionpool + • urllib3.contrib.socks + • urllib3.response + +
+ +
+ +
+ + urllib3.connectionpool +SourceModule
+imports: + __future__ + • errno + • logging + • queue + • re + • socket + • sys + • urllib3 + • urllib3.connection + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + • urllib3.packages.six.moves + • urllib3.request + • urllib3.response + • urllib3.util.connection + • urllib3.util.proxy + • urllib3.util.queue + • urllib3.util.request + • urllib3.util.response + • urllib3.util.retry + • urllib3.util.ssl_match_hostname + • urllib3.util.timeout + • urllib3.util.url + • warnings + +
+
+imported by: + urllib3 + • urllib3.contrib.socks + • urllib3.poolmanager + +
+ +
+ +
+ + urllib3.contrib +Package
+imports: + urllib3 + • urllib3.contrib._appengine_environ + • urllib3.contrib.pyopenssl + +
+
+imported by: + requests + • urllib3.contrib._appengine_environ + • urllib3.contrib.pyopenssl + • urllib3.contrib.socks + • urllib3.util.connection + +
+ +
+ +
+ + urllib3.contrib._appengine_environ +SourceModule
+imports: + os + • urllib3.contrib + +
+
+imported by: + urllib3.contrib + • urllib3.util.connection + +
+ +
+ +
+ + urllib3.contrib.pyopenssl +SourceModule
+imports: + 'OpenSSL.SSL' + • 'OpenSSL.crypto' + • 'cryptography.hazmat' + • 'cryptography.x509' + • OpenSSL + • __future__ + • cryptography + • idna + • io + • logging + • socket + • ssl + • sys + • urllib3 + • urllib3.contrib + • urllib3.packages + • urllib3.packages.backports.makefile + • urllib3.packages.six + • urllib3.util + • urllib3.util.ssl_ + • warnings + +
+
+imported by: + requests + • urllib3.contrib + +
+ +
+ +
+ + urllib3.contrib.socks +SourceModule
+imports: + __future__ + • socket + • socks + • ssl + • urllib3.connection + • urllib3.connectionpool + • urllib3.contrib + • urllib3.exceptions + • urllib3.poolmanager + • urllib3.util.url + • warnings + +
+
+imported by: + requests.adapters + +
+ +
+ +
+ + urllib3.exceptions +SourceModule
+imports: + __future__ + • http.client + • urllib3 + +
+
+imported by: + requests + • requests.adapters + • requests.exceptions + • requests.models + • urllib3 + • urllib3._collections + • urllib3.connection + • urllib3.connectionpool + • urllib3.contrib.socks + • urllib3.poolmanager + • urllib3.response + • urllib3.util.connection + • urllib3.util.request + • urllib3.util.response + • urllib3.util.retry + • urllib3.util.ssl_ + • urllib3.util.ssltransport + • urllib3.util.timeout + • urllib3.util.url + +
+ +
+ +
+ + urllib3.fields +SourceModule
+imports: + __future__ + • email.utils + • mimetypes + • re + • urllib3 + • urllib3.packages + • urllib3.packages.six + +
+
+imported by: + requests.models + • urllib3.filepost + +
+ +
+ +
+ + urllib3.filepost +SourceModule
+imports: + __future__ + • binascii + • codecs + • io + • os + • urllib3 + • urllib3.fields + • urllib3.packages + • urllib3.packages.six + +
+
+imported by: + requests.models + • urllib3 + • urllib3.request + +
+ +
+ +
+ + urllib3.packages +Package
+imports: + urllib3 + +
+
+imported by: + urllib3._collections + • urllib3.connection + • urllib3.connectionpool + • urllib3.contrib.pyopenssl + • urllib3.fields + • urllib3.filepost + • urllib3.packages.backports + • urllib3.packages.six + • urllib3.poolmanager + • urllib3.response + • urllib3.util.connection + • urllib3.util.queue + • urllib3.util.retry + • urllib3.util.ssl_ + • urllib3.util.ssltransport + • urllib3.util.url + +
+ +
+ +
+ + urllib3.packages.backports +Package
+imports: + urllib3.packages + +
+
+imported by: + urllib3.packages.backports.makefile + +
+ +
+ +
+ + urllib3.packages.backports.makefile +SourceModule
+imports: + io + • socket + • urllib3.packages.backports + +
+
+imported by: + urllib3.contrib.pyopenssl + +
+ +
+ +
+ + urllib3.packages.six +SourceModule
+imports: + StringIO + • __future__ + • functools + • importlib.util + • io + • itertools + • operator + • struct + • sys + • types + • urllib3.packages + +
+
+imported by: + urllib3._collections + • urllib3.connection + • urllib3.connectionpool + • urllib3.contrib.pyopenssl + • urllib3.fields + • urllib3.filepost + • urllib3.packages.six.moves + • urllib3.poolmanager + • urllib3.response + • urllib3.util.connection + • urllib3.util.queue + • urllib3.util.request + • urllib3.util.retry + • urllib3.util.ssl_ + • urllib3.util.ssltransport + • urllib3.util.url + +
+ +
+ +
+ + urllib3.packages.six.moves +RuntimePackage
+imports: + queue + • urllib3.packages.six + +
+
+imported by: + 'urllib3.packages.six.moves.urllib' + • http.client + • urllib3.connectionpool + • urllib3.util.queue + • urllib3.util.response + +
+ +
+ +
+ + urllib3.poolmanager +SourceModule
+imports: + "'urllib3.packages.six.moves.urllib'.parse" + • __future__ + • collections + • functools + • logging + • urllib3 + • urllib3._collections + • urllib3.connectionpool + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + • urllib3.request + • urllib3.util.proxy + • urllib3.util.retry + • urllib3.util.url + +
+
+imported by: + requests.adapters + • urllib3 + • urllib3.contrib.socks + +
+ +
+ +
+ + urllib3.request +SourceModule
+imports: + "'urllib3.packages.six.moves.urllib'.parse" + • __future__ + • urllib3 + • urllib3.filepost + +
+
+imported by: + urllib3.connectionpool + • urllib3.poolmanager + +
+ +
+ +
+ + urllib3.response +SourceModule
+imports: + __future__ + • brotli + • brotlicffi + • contextlib + • io + • logging + • socket + • sys + • urllib3 + • urllib3._collections + • urllib3.connection + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + • urllib3.util + • urllib3.util.response + • warnings + • zlib + +
+
+imported by: + requests.adapters + • urllib3 + • urllib3.connectionpool + +
+ +
+ +
+ + urllib3.util +Package
+imports: + __future__ + • urllib3 + • urllib3.util.connection + • urllib3.util.request + • urllib3.util.response + • urllib3.util.retry + • urllib3.util.ssl_ + • urllib3.util.timeout + • urllib3.util.url + • urllib3.util.wait + +
+
+imported by: + requests.adapters + • requests.models + • requests.utils + • urllib3.connection + • urllib3.contrib.pyopenssl + • urllib3.response + • urllib3.util.connection + • urllib3.util.proxy + • urllib3.util.queue + • urllib3.util.request + • urllib3.util.response + • urllib3.util.retry + • urllib3.util.ssl_ + • urllib3.util.ssl_match_hostname + • urllib3.util.ssltransport + • urllib3.util.timeout + • urllib3.util.url + • urllib3.util.wait + +
+ +
+ +
+ + urllib3.util.connection +SourceModule
+imports: + __future__ + • socket + • urllib3.contrib + • urllib3.contrib._appengine_environ + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + • urllib3.util + • urllib3.util.wait + +
+
+imported by: + urllib3.connection + • urllib3.connectionpool + • urllib3.util + +
+ +
+ +
+ + urllib3.util.proxy +SourceModule
+imports: + urllib3.util + • urllib3.util.ssl_ + +
+
+imported by: + urllib3.connection + • urllib3.connectionpool + • urllib3.poolmanager + +
+ +
+ +
+ + urllib3.util.queue +SourceModule
+imports: + Queue + • collections + • queue + • urllib3.packages + • urllib3.packages.six + • urllib3.packages.six.moves + • urllib3.util + +
+
+imported by: + urllib3.connectionpool + +
+ +
+ +
+ + urllib3.util.request +SourceModule
+imports: + __future__ + • base64 + • brotli + • brotlicffi + • urllib3.exceptions + • urllib3.packages.six + • urllib3.util + +
+
+imported by: + urllib3 + • urllib3.connectionpool + • urllib3.util + +
+ +
+ +
+ + urllib3.util.response +SourceModule
+imports: + __future__ + • email.errors + • http.client + • urllib3.exceptions + • urllib3.packages.six.moves + • urllib3.util + +
+
+imported by: + urllib3.connectionpool + • urllib3.response + • urllib3.util + +
+ +
+ +
+ + urllib3.util.retry +SourceModule
+imports: + __future__ + • collections + • email + • itertools + • logging + • re + • time + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + • urllib3.util + • warnings + +
+
+imported by: + requests.adapters + • urllib3 + • urllib3.connectionpool + • urllib3.poolmanager + • urllib3.util + +
+ +
+ +
+ + urllib3.util.ssl_ +SourceModule
+imports: + __future__ + • binascii + • hashlib + • hmac + • os + • ssl + • sys + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + • urllib3.util + • urllib3.util.ssltransport + • urllib3.util.url + • warnings + +
+
+imported by: + urllib3.connection + • urllib3.contrib.pyopenssl + • urllib3.util + • urllib3.util.proxy + +
+ +
+ +
+ + urllib3.util.ssl_match_hostname +SourceModule
+imports: + ipaddress + • re + • sys + • urllib3.util + +
+
+imported by: + urllib3.connection + • urllib3.connectionpool + +
+ +
+ +
+ + urllib3.util.ssltransport +SourceModule
+imports: + io + • socket + • ssl + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + • urllib3.util + +
+
+imported by: + urllib3.util.ssl_ + +
+ +
+ +
+ + urllib3.util.timeout +SourceModule
+imports: + __future__ + • socket + • time + • urllib3.exceptions + • urllib3.util + +
+
+imported by: + urllib3 + • urllib3.connectionpool + • urllib3.util + +
+ +
+ +
+ + urllib3.util.url +SourceModule
+imports: + __future__ + • collections + • idna + • re + • urllib3.exceptions + • urllib3.packages + • urllib3.packages.six + • urllib3.util + +
+
+imported by: + urllib3 + • urllib3.connectionpool + • urllib3.contrib.socks + • urllib3.poolmanager + • urllib3.util + • urllib3.util.ssl_ + +
+ +
+ +
+ + urllib3.util.wait +SourceModule
+imports: + errno + • functools + • select + • sys + • time + • urllib3.util + +
+
+imported by: + urllib3.util + • urllib3.util.connection + +
+ +
+ +
+ + urllib3_secure_extra +MissingModule
+imported by: + urllib3 + +
+ +
+ +
+ + urlparse +MissingModule
+imported by: + paho.mqtt.client + +
+ +
+ +
+ + uu +SourceModule
+imports: + binascii + • optparse + • os + • sys + +
+
+imported by: + email.message + +
+ +
+ +
+ + uuid +SourceModule
+imports: + _uuid + • enum + • hashlib + • io + • os + • platform + • random + • shutil + • socket + • subprocess + • sys + • time + +
+
+imported by: + getmac.getmac + • paho.mqtt.client + +
+ +
+ +
+ + vms_lib +MissingModule
+imported by: + platform + +
+ +
+ +
+ + warnings +SourceModule
+imports: + _warnings + • builtins + • linecache + • re + • sys + • traceback + • tracemalloc + +
+
+imported by: + argparse + • ast + • asyncio.base_events + • asyncio.base_subprocess + • asyncio.coroutines + • asyncio.events + • asyncio.proactor_events + • asyncio.selector_events + • asyncio.sslproto + • asyncio.streams + • asyncio.tasks + • asyncio.trsock + • asyncio.unix_events + • asyncio.windows_utils + • charset_normalizer.api + • charset_normalizer.legacy + • charset_normalizer.models + • enum + • ftplib + • getmac.getmac + • getpass + • gettext + • gzip + • hashlib + • hmac + • http.client + • http.cookiejar + • importlib + • importlib._abc + • importlib.abc + • importlib.metadata + • importlib.util + • inspect + • io + • locale + • logging + • mqtt_srv.pyw + • multiprocessing.forkserver + • multiprocessing.pool + • multiprocessing.resource_tracker + • os + • pathlib + • pkgutil + • psutil._common + • psutil._pslinux + • random + • requests + • requests.auth + • requests.packages + • requests.utils + • runpy + • shlex + • sre_parse + • ssl + • subprocess + • tempfile + • threading + • urllib.parse + • urllib.request + • urllib3 + • urllib3.connection + • urllib3.connectionpool + • urllib3.contrib.pyopenssl + • urllib3.contrib.socks + • urllib3.response + • urllib3.util.retry + • urllib3.util.ssl_ + • xml.etree.ElementTree + • zipfile + +
+ +
+ +
+ + weakref +SourceModule
+imports: + _collections_abc + • _weakref + • _weakrefset + • atexit + • copy + • gc + • itertools + • sys + +
+
+imported by: + _threading_local + • asyncio.base_events + • asyncio.selector_events + • asyncio.streams + • asyncio.tasks + • asyncio.windows_events + • concurrent.futures.process + • concurrent.futures.thread + • copy + • functools + • logging + • mqtt_srv.pyw + • multiprocessing.dummy + • multiprocessing.queues + • multiprocessing.sharedctypes + • multiprocessing.util + • tempfile + • xml.sax.expatreader + +
+ +
+ +
+ + winreg (builtin module)
+imported by: + importlib._bootstrap_external + • mimetypes + • mqtt_srv.pyw + • platform + • requests.utils + • urllib.request + +
+ +
+ +
+ + xml +Package
+imports: + xml.sax.expatreader + • xml.sax.xmlreader + +
+
+imported by: + xml.etree + • xml.parsers + • xml.sax + +
+ +
+ +
+ + xml.etree +Package
+imports: + xml + • xml.etree + • xml.etree.ElementPath + • xml.etree.ElementTree + +
+
+imported by: + xml.etree + • xml.etree.ElementInclude + • xml.etree.ElementPath + • xml.etree.ElementTree + • xml.etree.cElementTree + +
+ +
+ +
+ + xml.etree.ElementInclude +SourceModule
+imports: + copy + • urllib.parse + • xml.etree + • xml.etree.ElementTree + +
+
+imported by: + _elementtree + +
+ +
+ +
+ + xml.etree.ElementPath +SourceModule
+imports: + re + • xml.etree + +
+
+imported by: + _elementtree + • xml.etree + • xml.etree.ElementTree + +
+ +
+ +
+ + xml.etree.ElementTree +SourceModule
+imports: + _elementtree + • collections + • collections.abc + • contextlib + • io + • locale + • pyexpat + • re + • sys + • warnings + • xml.etree + • xml.etree.ElementPath + • xml.parsers + • xml.parsers.expat + +
+
+imported by: + _elementtree + • psutil._psbsd + • xml.etree + • xml.etree.ElementInclude + • xml.etree.cElementTree + +
+ +
+ +
+ + xml.etree.cElementTree +SourceModule
+imports: + xml.etree + • xml.etree.ElementTree + +
+
+imported by: + _elementtree + +
+ +
+ +
+ + xml.parsers +Package
+imports: + xml + • xml.parsers.expat + +
+
+imported by: + xml.etree.ElementTree + • xml.parsers.expat + • xml.sax.expatreader + • xmlrpc.client + +
+ +
+ +
+ + xml.parsers.expat +SourceModule
+imports: + pyexpat + • sys + • xml.parsers + +
+
+imported by: + xml.etree.ElementTree + • xml.parsers + • xml.sax.expatreader + • xmlrpc.client + +
+ +
+ +
+ + xml.sax +Package
+imports: + 'org.python' + • io + • os + • sys + • xml + • xml.sax + • xml.sax._exceptions + • xml.sax.expatreader + • xml.sax.handler + • xml.sax.saxutils + • xml.sax.xmlreader + +
+
+imported by: + xml.sax + • xml.sax._exceptions + • xml.sax.expatreader + • xml.sax.handler + • xml.sax.saxutils + • xml.sax.xmlreader + +
+ +
+ +
+ + xml.sax._exceptions +SourceModule
+imports: + 'java.lang' + • sys + • xml.sax + +
+
+imported by: + xml.sax + • xml.sax.expatreader + • xml.sax.xmlreader + +
+ +
+ +
+ + xml.sax.expatreader +SourceModule
+imports: + _weakref + • sys + • weakref + • xml.parsers + • xml.parsers.expat + • xml.sax + • xml.sax._exceptions + • xml.sax.handler + • xml.sax.saxutils + • xml.sax.xmlreader + +
+
+imported by: + xml + • xml.sax + +
+ +
+ +
+ + xml.sax.handler +SourceModule
+imports: + xml.sax + +
+
+imported by: + xml.sax + • xml.sax.expatreader + • xml.sax.saxutils + • xml.sax.xmlreader + +
+ +
+ +
+ + xml.sax.saxutils +SourceModule
+imports: + codecs + • io + • os + • sys + • urllib.parse + • urllib.request + • xml.sax + • xml.sax.handler + • xml.sax.xmlreader + +
+
+imported by: + xml.sax + • xml.sax.expatreader + • xml.sax.xmlreader + +
+ +
+ +
+ + xml.sax.xmlreader +SourceModule
+imports: + xml.sax + • xml.sax._exceptions + • xml.sax.handler + • xml.sax.saxutils + +
+
+imported by: + xml + • xml.sax + • xml.sax.expatreader + • xml.sax.saxutils + +
+ +
+ +
+ + xmlrpc +Package
+imported by: + xmlrpc.client + +
+ +
+ +
+ + xmlrpc.client +SourceModule
+imports: + base64 + • datetime + • decimal + • errno + • gzip + • http.client + • io + • sys + • time + • urllib.parse + • xml.parsers + • xml.parsers.expat + • xmlrpc + +
+
+imported by: + multiprocessing.connection + +
+ +
+ +
+ + zipfile +SourceModule
+imports: + argparse + • binascii + • bz2 + • contextlib + • importlib.util + • io + • itertools + • lzma + • os + • pathlib + • posixpath + • py_compile + • shutil + • stat + • struct + • sys + • threading + • time + • warnings + • zlib + +
+
+imported by: + importlib.metadata + • importlib.readers + • requests.utils + • shutil + +
+ +
+ +
+ + zipimport +SourceModule
+imports: + _frozen_importlib + • _frozen_importlib_external + • _imp + • _io + • _warnings + • importlib.readers + • marshal + • os + • sys + • time + • zlib + +
+
+imported by: + pkgutil + +
+ +
+ +
+ + zlib (builtin module)
+imported by: + encodings.zlib_codec + • gzip + • ping3 + • shutil + • tarfile + • urllib3.response + • zipfile + • zipimport + +
+ +
+ + + diff --git a/builder.py b/builder.py new file mode 100644 index 0000000..22b7978 --- /dev/null +++ b/builder.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 +import getopt +import sys +import platform +import subprocess +import os + +curos = platform.system() +pth = os.path.abspath(__file__) +wd = os.path.dirname(pth) +try: + opts, args = getopt.getopt(sys.argv[1:], "h:", ["command=", "help", "output="]) +except getopt.GetoptError as err: + # print help information and exit: + print(str(err)) # will print something like "option -a not recognized" + #usage() + sys.exit(2) +output = None +# QJ : getopts + +for o, a in opts: + if o == "-h": + _ACTION = True + elif o in ("-m", "--publish"): + _MESSAGE = a + else: + _WIZZARD = True + +print(wd) + +if curos == "Windows": + cmnd = ["scp.exe mqtt_srv.py root@192.168.77.1:/root/", "copy mqtt_srv.py mqtt_srv.pyw", "python.exe -m PyInstaller --onefile mqtt_srv.pyw --distpath .\dist", "Rmdir /Q /S .\\__pycache__", "Rmdir /Q /S .\\build"] + #out = subprocess.Popen(cmnd.split()) +else: + cmnd = ["cp mqtt_srv.py mqtt_srv.pyw", "python -m pyinstaller --onefile mqtt_srv.pyw --distpath ./dist", "rm -rf ./__pycache__", "rm -rf ./build"] + +for c in cmnd: + status, output = subprocess.getstatusoutput(c) + print(output) + + +if curos == "Windows": + cmnd = ["copy .\\dist\\mqtt_srv.exe ..\\MyApp\\source\\"] + +for c in cmnd: + status, output = subprocess.getstatusoutput(c) + print(output) + + + + diff --git a/cue.py b/cue.py new file mode 100644 index 0000000..15fb467 --- /dev/null +++ b/cue.py @@ -0,0 +1,65 @@ +from cuesdk import CueSdk +import time +import subprocess +global sdk +sdk = CueSdk() +sdk.connect() + +global activity_flag +global control_flag +global keyboard_index +print(sdk.protocol_details) +keyboard_index = 0 +print(sdk.get_devices()) +print(CueSdk().get_device_count()) +def get_available_leds(): + """ + Output: list of leds available to control + Taken from a code sample of Cuesdk + """ + leds = list() + device_count = sdk.get_device_count() + for device_index in range(device_count): + led_positions = sdk.get_led_positions_by_device_index(device_index) + leds.append(led_positions) + return leds + +def turn_off_leds(all_leds): + """ + Input: list of leds + Applies zero RGB values to all the leds available so the keyboard lights will shut off + """ + + print("turn off") + cmnd = "powershell (New-Object -ComObject WScript.Shell).SendKeys('{NUMLOCK}')" + status, output = subprocess.getstatusoutput(cmnd) + print(status) + print(output) + for led in all_leds[keyboard_index]: + print(led) + all_leds[keyboard_index][led] = (0, 0, 0) + sdk.set_led_colors_buffer_by_device_index(keyboard_index, all_leds[keyboard_index]) + sdk.set_led_colors_flush_buffer() + print("sleep1") + time.sleep(2) + + + while True: + time.sleep(4) + +for i in sdk.get_devices(): + print(str(i.type)) + if str(i.type) == 'CorsairDeviceType.Keyboard': + break + else: + keyboard_index += 1 +print(keyboard_index) +colors = get_available_leds() +print(str(sdk.get_devices()[keyboard_index].type)) +print("\nModel: " + str(sdk.get_devices()[keyboard_index]) + "\n") +print("keyboard_index :" + str(keyboard_index)) +print("keyboard lights will shutdown after: " + str(60 / 60) + " minutes") +print("Checking idle") + +print(colors) +turn_off_leds(colors) \ No newline at end of file diff --git a/cue_con.py b/cue_con.py new file mode 100644 index 0000000..026c3ab --- /dev/null +++ b/cue_con.py @@ -0,0 +1,2 @@ +from cue_sdk import * + \ No newline at end of file diff --git a/dist/mqtt_srv b/dist/mqtt_srv new file mode 100644 index 0000000..69d28d4 Binary files /dev/null and b/dist/mqtt_srv differ diff --git a/dist/mqtt_srv.exe b/dist/mqtt_srv.exe new file mode 100644 index 0000000..76a1f0c Binary files /dev/null and b/dist/mqtt_srv.exe differ diff --git a/dist/scan_tasmotas b/dist/scan_tasmotas new file mode 100644 index 0000000..31b11dc Binary files /dev/null and b/dist/scan_tasmotas differ diff --git a/gg.py b/gg.py new file mode 100644 index 0000000..1aa3d7e --- /dev/null +++ b/gg.py @@ -0,0 +1,192 @@ +import requests +import time + +DOMAIN = "ptz_camera" + +ATTR_HOST = "host" +ATTR_PROFILE = "profile" +DEFAULT_HOST = "192.168.77.237" +DEFAULT_PROFILE = "Profile_1" +ATTR_PAN_TIME = "pan_time" +DEFAULT_PANT_TIME = 0.1 +ATTR_MOVE_TIME = "move_time" +DEFAULT_MOVE_TIME = 0.05 +DEFAULT_HEADERS = {'Content-Type':'application/soap+xml;charset=UTF8'} + +def setup(hass, config): + + def stop(call): + host = call.data.get(ATTR_HOST, DEFAULT_HOST) + print(host) + profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE) + + xml = """ + + + + Profile_1 + true + true + + + """ + + r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS) + + def move_left(call): + host = call.data.get(ATTR_HOST, DEFAULT_HOST) + profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE) + move_time = call.data.get(ATTR_MOVE_TIME, DEFAULT_MOVE_TIME) + + xml = """ + + + + Profile_1 + + + + + + + """ + + r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS) + time.sleep(move_time) + stop(call) + + def move_right(call): + host = call.data.get(ATTR_HOST, DEFAULT_HOST) + profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE) + move_time = call.data.get(ATTR_MOVE_TIME, DEFAULT_MOVE_TIME) + + xml = """ + + + + Profile_1 + + + + + + + """ + + r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS) + time.sleep(move_time) + stop(call) + + def move_up(call): + host = call.data.get(ATTR_HOST, DEFAULT_HOST) + profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE) + move_time = call.data.get(ATTR_MOVE_TIME, DEFAULT_MOVE_TIME) + + xml = """ + + + + Profile_1 + + + + + + + """ + + r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS) + time.sleep(move_time) + stop(call) + + def move_down(call): + host = call.data.get(ATTR_HOST, DEFAULT_HOST) + profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE) + move_time = call.data.get(ATTR_MOVE_TIME, DEFAULT_MOVE_TIME) + + xml = """ + + + + Profile_1 + + + + + + + """ + + r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS) + time.sleep(move_time) + stop(call) + + def move_origin_pan(call): + host = call.data.get(ATTR_HOST, DEFAULT_HOST) + profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE) + + xml = """ + + + + Profile_1 + + + + + + + """ + + r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS) + + def move_origin_tilt(call): + host = call.data.get(ATTR_HOST, DEFAULT_HOST) + profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE) + + xml = """ + + + + Profile_1 + + + + + + + """ + + r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS) + + def move_origin(call): + pan_time = call.data.get(ATTR_PAN_TIME, DEFAULT_PANT_TIME) + move_origin_pan(call) + time.sleep(pan_time) + move_origin_tilt(call) + + + hass.services.register(DOMAIN, "move_left", move_left) + hass.services.register(DOMAIN, "move_right", move_right) + hass.services.register(DOMAIN, "move_up", move_up) + hass.services.register(DOMAIN, "move_down", move_down) + hass.services.register(DOMAIN, "stop", stop) + hass.services.register(DOMAIN, "move_origin", move_origin) + hass.services.register(DOMAIN, "move_origin_pan", move_origin_pan) + hass.services.register(DOMAIN, "move_origin_tilt", move_origin_tilt) + + # Return boolean to indicate that initialization was successfully. + return True diff --git a/ha.py b/ha.py new file mode 100644 index 0000000..e73016b --- /dev/null +++ b/ha.py @@ -0,0 +1,86 @@ +#!/usr/bin/python +import subprocess +import getopt +import sys +import time +import requests +import re +__IP = '192.168.77.106' + +try: + opts, args = getopt.getopt(sys.argv[1:], "d:p:", ["destination=", "publish", "output="]) +except getopt.GetoptError as err: + # print help information and exit: + print(str(err)) # will print something like "option -a not recognized" + #usage() + sys.exit(2) +output = None +# QJ : getopts + +for o, a in opts: + if o in ("-d", "--destination"): + __IP = a + elif o in ("-p", "--publish"): + _PUBLISH = True + else: + _WIZZARD = True + + +__RULES = ["EMAIL993", "EMAIL25", "EMAIL143", "EMAIL995", "EMAIL465", "HTTPS", "HTTP"] + +for i in __RULES: + print(i) + status, output = subprocess.getstatusoutput("uci set firewall." + i + ".dest_ip='" + __IP + "'") +status, output = subprocess.getstatusoutput("uci commit") + + +for i in __RULES: + status, output = subprocess.getstatusoutput("uci get firewall." + i + ".dest_ip") + #print(output) +time.sleep(3) +status, output = subprocess.getstatusoutput("/etc/init.d/firewall restart") + +if __IP == "192.168.77.246": + act = "start" + print("Starting containers on Raspbian!") +else: + act = "stop" + print("Stopping containers on Raspbian!") + +status, output = subprocess.getstatusoutput("docker -H ssh://root@192.168.77.246 " + act + " mosquitto_mosquitto_1 HomeAssistant mailu_resolver_1 mailu_redis_1 mailu_smtp_1 mailu_imap_1 mailu_antispam_1 mailu_webmail_1 mailu_admin_1 mailu_front_1 nextcloud_db_1 nextcloud_app_1 webhub_client_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 ") + +MQTT_BROKER = __IP +MQTT_USER = "jaydee" +MQTT_PASS = "jaydee1" + +cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\"" +#print(cmnd) +status, output = subprocess.getstatusoutput(cmnd) + +print(output) + +ips = output.splitlines() +tasm_data = {} +for sys_ip in ips: + if not re.match('([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})', sys_ip): + print("wrong ip : " + str(sys_ip)) + continue + print("This is ip : " + sys_ip) + + cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\"" + status, output = subprocess.getstatusoutput(cmnd) + # print("status of 80 : " + str(status)) + if status == 0: + try: + # url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5" + + url = "http://" + sys_ip + "/cm?cmnd=Backlog%20MqttHost%20" + MQTT_BROKER + "%3BMqttUser%20" + MQTT_USER + "%3BMqttPassword%20" + MQTT_PASS + print(url) + requests.get(url) + + except: + #print(sys_ip + " : Not a tasmota!") + pass + else: + #print(sys_ip + " : Not a listening") + pass diff --git a/handle_backups.py b/handle_backups.py new file mode 100644 index 0000000..dd06c30 --- /dev/null +++ b/handle_backups.py @@ -0,0 +1,184 @@ +import requests +import untangle +import socket +import sys +import time +import random +import json +import getopt +from urllib3.exceptions import InsecureRequestWarning +from urllib3 import disable_warnings +disable_warnings(InsecureRequestWarning) +from paho.mqtt import client as mqtt_client +import datetime + +jobId = "0ceadf5e-0b9e-11ed-9806-9a2cbecf0a5f" +try: + opts, args = getopt.getopt(sys.argv[1:], "cT:", ["command=", "help", "output="]) +except getopt.GetoptError as err: + # print help information and exit: + print(str(err)) # will print something like "option -a not recognized" + #usage() + sys.exit(2) +output = None +# QJ : getopts +_ACTION = "default" +for o, a in opts: + if o == "-c": + _ACTION = "check" + elif o in ("-p", "--publish"): + _PUBLISH = True + elif o in ("-m", "--publish"): + _MESSAGE = a + elif o in ("-t", "--publish"): + _TOPIC = a + elif o in ("-S", "--setvar"): + _SETVAR = True + _THR_NAME = sys.argv[2] + _THR_VAL = sys.argv[3] + elif o in ("-T", "--task"): + if a == "task1": + jobId = "0ceadf5e-0b9e-11ed-9806-9a2cbecf0a5f" + elif a == "task2": + jobId = "1bba7e36-6ea9-11ed-91cb-d63dc5df381e" + else: + _WIZZARD = True +nasIp = "192.168.77.106" +nasPort = "4443" +user = "jaydee" +password = "l4c1j4yd33Du5lo" + +def get_sid(): + headers = {"Content-type": "application/x-www-form-urlencoded"} + params = { + "user": "jaydee", + "serviceKey": 1, + "pwd": "bDRjMWo0eWQzM0R1NWxv" + } + url = "https://{}:{}/cgi-bin/authLogin.cgi".format(nasIp, nasPort) + + response = requests.get(url, headers=headers, params=params, verify=False) + + #print("Status Code", response.status_code) + #print("JSON Response ", response.text) + obj = untangle.parse(response.text) + sid = (obj.QDocRoot.authSid.cdata) + return sid + +def check_status(): + sid = get_sid() + headers = {"X-QNAP-SID": sid} + params = {} + + url = "https://{}:{}/cc3/v1/users/system/jobs".format(nasIp, nasPort) + response = requests.get(url, headers=headers, params=params, verify=False) + + + + # print("JSON Response ", response.text) + data = json.loads(response.text) + wait_for_done = True + while wait_for_done: + for i in data["jobs"]: + + #print(i["_id"]) + #print(data["jobs"][i]["_id"]) + if i["_id"] == jobId: + # print(i) + print(i["statistics"]["progress"]) + time.sleep(3) + + + ''' + auth=$(curl --insecure "https://$nasIp/cgi-bin/authLogin.cgi" -H "Content-type: application/x-www-form-urlencoded" --data-urlencode "user=$user" --data-urlencode "serviceKey=1" --data-urlencode "pwd=$(echo -n $password | base64)" --silent) + echo $auth + sidXML=$(echo "$auth" | grep -Eo "(.+?)") + sidStrip="${sidXML/<\/authSid>/}" + curl "https://$nasIp/cc3/v1/users/system/jobs/$1?command=start" -H "X-QNAP-SID: $sid" --data-raw '{}' --silent --insecure + curl 'https://192.168.77.106:4443/cc3/v1/users/system/jobs' -H 'X-QNAP-SID: r299e6x3' --silent --insecure + ''' + + + +if _ACTION == "default": + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + service_online = False + broker = '192.168.77.106' + port = 1883 + topic = "sectorq/systems/hbs" + mqtt_username = 'jaydee' + mqtt_password = 'jaydee1' + + while not service_online: + result = sock.connect_ex(('192.168.77.189',873)) + if result == 0: + print("Port is open") + service_online = True + else: + print("Port is not open") + time.sleep(5) + sock.close() + + sid = get_sid() + + #print("-----------------") + #print(sid) + #print("-----------------") + + headers = {"X-QNAP-SID": sid} + params = {} + + url = "https://{}:{}/cc3/v1/users/system/jobs/{}?command=start".format(nasIp, nasPort, jobId) + #print(url) + response = requests.post(url, headers=headers, params=params, verify=False) + + + #print("Status Code", response.status_code) + #print("JSON Response ", response.text) + client = mqtt_client.Client() + client.username_pw_set(mqtt_username, mqtt_password) + client.connect(broker,1883,60) + msg = {"status":"initializing","start_time":"now","progress":0} + client.publish(topic, json.dumps(msg)); + client.disconnect(); + + wait_for_done = True + task1_done = False + task2_done = False + url = "https://{}:{}/cc3/v1/users/system/jobs".format(nasIp, nasPort) + client = mqtt_client.Client() + client.username_pw_set(mqtt_username, mqtt_password) + client.connect(broker,1883,60) + + while wait_for_done: + response = requests.get(url, headers=headers, params=params, verify=False) + print("Status Code", response.status_code) + #print("JSON Response ", response.text) + data = json.loads(response.text) + # print(data["jobs"]) + for i in data["jobs"]: + time.sleep(3) + #print(i["_id"]) + #print(data["jobs"][i]["_id"]) + #if i["_id"] == jobId: + # print(i) + # print(i["statistics"]) + + try: + msg = {"status":i["statistics"]["status"],"name":i["name"],"start_time":i["statistics"]["start_time"],"stop_time":i["statistics"]["stop_time"],"elapsed_time":str(datetime.timedelta(seconds=round(i["statistics"]["elapse_time"],0))),"progress":i["statistics"]["progress"]} + + except: + msg = {"status":i["statistics"]["status"],"name":i["name"],"start_time": i["statistics"]["start_time"]} + client.publish(topic, json.dumps(msg)); + if i["statistics"]["status"] == "Finished": + wait_for_done = False + + client.disconnect(); + #curl "https://$nasIp/cc3/v1/users/system/jobs/$1?command=start" -H "X-QNAP-SID: $sid" --data-raw '{}' --silent --insecure + + + + +if _ACTION == "check": + check_status() \ No newline at end of file diff --git a/handle_backups.py.bak b/handle_backups.py.bak new file mode 100644 index 0000000..9ac5d5c --- /dev/null +++ b/handle_backups.py.bak @@ -0,0 +1,184 @@ +import requests +import untangle +import socket +import sys +import time +import random +import json +import getopt +from urllib3.exceptions import InsecureRequestWarning +from urllib3 import disable_warnings +disable_warnings(InsecureRequestWarning) +from paho.mqtt import client as mqtt_client +import datetime + +jobId = "0ceadf5e-0b9e-11ed-9806-9a2cbecf0a5f" +try: + opts, args = getopt.getopt(sys.argv[1:], "cT:", ["command=", "help", "output="]) +except getopt.GetoptError as err: + # print help information and exit: + print(str(err)) # will print something like "option -a not recognized" + #usage() + sys.exit(2) +output = None +# QJ : getopts +_ACTION = "default" +for o, a in opts: + if o == "-c": + _ACTION = "check" + elif o in ("-p", "--publish"): + _PUBLISH = True + elif o in ("-m", "--publish"): + _MESSAGE = a + elif o in ("-t", "--publish"): + _TOPIC = a + elif o in ("-S", "--setvar"): + _SETVAR = True + _THR_NAME = sys.argv[2] + _THR_VAL = sys.argv[3] + elif o in ("-T", "--task"): + if a == "task1": + jobId = "0ceadf5e-0b9e-11ed-9806-9a2cbecf0a5f" + elif a == "task2": + jobId = "1bba7e36-6ea9-11ed-91cb-d63dc5df381e" + else: + _WIZZARD = True +nasIp = "192.168.77.106" +nasPort = "4443" +user = "jaydee" +password = "l4c1j4yd33Du5lo" + +def get_sid(): + headers = {"Content-type": "application/x-www-form-urlencoded"} + params = { + "user": "jaydee", + "serviceKey": 1, + "pwd": "bDRjMWo0eWQzM0R1NWxv" + } + url = "https://{}:{}/cgi-bin/authLogin.cgi".format(nasIp, nasPort) + + response = requests.get(url, headers=headers, params=params, verify=False) + + #print("Status Code", response.status_code) + #print("JSON Response ", response.text) + obj = untangle.parse(response.text) + sid = (obj.QDocRoot.authSid.cdata) + return sid + +def check_status(): + sid = get_sid() + headers = {"X-QNAP-SID": sid} + params = {} + + url = "https://{}:{}/cc3/v1/users/system/jobs".format(nasIp, nasPort) + response = requests.get(url, headers=headers, params=params, verify=False) + + + + # print("JSON Response ", response.text) + data = json.loads(response.text) + wait_for_done = True + while wait_for_done: + for i in data["jobs"]: + + #print(i["_id"]) + #print(data["jobs"][i]["_id"]) + if i["_id"] == jobId: + # print(i) + print(i["statistics"]["progress"]) + time.sleep(3) + + + ''' + auth=$(curl --insecure "https://$nasIp/cgi-bin/authLogin.cgi" -H "Content-type: application/x-www-form-urlencoded" --data-urlencode "user=$user" --data-urlencode "serviceKey=1" --data-urlencode "pwd=$(echo -n $password | base64)" --silent) + echo $auth + sidXML=$(echo "$auth" | grep -Eo "(.+?)") + sidStrip="${sidXML/<\/authSid>/}" + curl "https://$nasIp/cc3/v1/users/system/jobs/$1?command=start" -H "X-QNAP-SID: $sid" --data-raw '{}' --silent --insecure + curl 'https://192.168.77.106:4443/cc3/v1/users/system/jobs' -H 'X-QNAP-SID: r299e6x3' --silent --insecure + ''' + + + +if _ACTION == "default": + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + service_online = False + broker = '192.168.77.106' + port = 1883 + topic = "sectorq/systems/hbs" + mqtt_username = 'jaydee' + mqtt_password = 'jaydee1' + + while not service_online: + result = sock.connect_ex(('192.168.77.189',873)) + if result == 0: + print("Port is open") + service_online = True + else: + print("Port is not open") + time.sleep(5) + sock.close() + + sid = get_sid() + + #print("-----------------") + #print(sid) + #print("-----------------") + + headers = {"X-QNAP-SID": sid} + params = {} + + url = "https://{}:{}/cc3/v1/users/system/jobs/{}?command=start".format(nasIp, nasPort, jobId) + #print(url) + response = requests.post(url, headers=headers, params=params, verify=False) + + + #print("Status Code", response.status_code) + #print("JSON Response ", response.text) + client = mqtt_client.Client() + client.username_pw_set(mqtt_username, mqtt_password) + client.connect(broker,1883,60) + msg = {"status":"initializing","start_time":"now","progress":0} + client.publish(topic, json.dumps(msg)); + client.disconnect(); + + wait_for_done = True + task1_done = False + task2_done = False + url = "https://{}:{}/cc3/v1/users/system/jobs".format(nasIp, nasPort) + client = mqtt_client.Client() + client.username_pw_set(mqtt_username, mqtt_password) + client.connect(broker,1883,60) + + while wait_for_done: + response = requests.get(url, headers=headers, params=params, verify=False) + print("Status Code", response.status_code) + #print("JSON Response ", response.text) + data = json.loads(response.text) + # print(data["jobs"]) + for i in data["jobs"]: + time.sleep(3) + #print(i["_id"]) + #print(data["jobs"][i]["_id"]) + if i["_id"] == jobId: + # print(i) + # print(i["statistics"]) + + try: + msg = {"status":i["statistics"]["status"],"name":i["name"],"start_time":i["statistics"]["start_time"],"stop_time":i["statistics"]["stop_time"],"elapsed_time":str(datetime.timedelta(seconds=round(i["statistics"]["elapse_time"],0))),"progress":i["statistics"]["progress"]} + + except: + msg = {"status":i["statistics"]["status"],"name":i["name"],"start_time": i["statistics"]["start_time"]} + client.publish(topic, json.dumps(msg)); + if i["statistics"]["status"] == "Finished": + wait_for_done = False + + client.disconnect(); + #curl "https://$nasIp/cc3/v1/users/system/jobs/$1?command=start" -H "X-QNAP-SID: $sid" --data-raw '{}' --silent --insecure + + + + +if _ACTION == "check": + check_status() \ No newline at end of file diff --git a/hello_world.py b/hello_world.py new file mode 100644 index 0000000..3fdf82d --- /dev/null +++ b/hello_world.py @@ -0,0 +1,5 @@ +name = data.get("name", "world") +logger.info("Hello %s", name) +logger.error("Hello %s", name) +logger.warning("Hello %s", name) +hass.bus.fire(name, {"wow": "from a Python script!"}) \ No newline at end of file diff --git a/lala b/lala new file mode 100644 index 0000000..e69de29 diff --git a/mqtt_srv-wrt.py b/mqtt_srv-wrt.py new file mode 100644 index 0000000..23d6722 --- /dev/null +++ b/mqtt_srv-wrt.py @@ -0,0 +1,911 @@ +#!/usr/bin/env python3 + +from asyncio.log import logger +import paho.mqtt.client as mqtt +from getmac import get_mac_address +import platform +import socket +import re +import subprocess +import os +import json +import sys +import time +import json +import datetime +import ctypes +import getopt +import random +import requests + +stats = {} +VERSION = "1.0.8" +curos = platform.system() +host = platform.node().lower() +print(host) +if curos == "Windows": + import python_aida64 + +def writeLog(msg, svr="INFO"): + ts = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + if curos == "Windows": + log_path = "c:\Program Files\jaydee\jaydee.log" + else: + log_path = "/tmp/mqtt_srv.log" + f = open(log_path, "a") + f.write(ts + " | " + svr + " | " + str(msg) + "\n") + f.close() + +if host != "router" and host != "nas": + import psutil + + processes = list(p.name() for p in psutil.process_iter()) + # print(processes) + count = processes.count("mqtt_srv.exe") + if int(count) >= 3: + writeLog("script exist") + sys.exit() +else: + cmnd = "ps |grep mqtt_srv.py|grep -v grep |wc -l" + status, output = subprocess.getstatusoutput(cmnd) + count = output + if int(count) >= 2: + writeLog("script exist") + sys.exit() +# Stops duplicate instance from running + +writeLog(count) + +writeLog("Starting : " + str(VERSION)) +writeLog("Getting running proccesses", "DEBUG") + + +writeLog("done", "DEBUG") + +FILE_TIMESTAMP = os.path.getmtime(sys.argv[0]) +def get_sys_env(name): + key = winreg.CreateKey(winreg.HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\Session Manager\Environment") + return winreg.QueryValueEx(key, name)[0] + +def get_user_env(name): + key = winreg.CreateKey(winreg.HKEY_CURRENT_USER, r"Environment") + return winreg.QueryValueEx(key, name)[0] + + +_PUBLISH = _SETVAR = False +try: + opts, args = getopt.getopt(sys.argv[1:], "Sspmt:", ["command=", "help", "output="]) +except getopt.GetoptError as err: + # print help information and exit: + print(str(err)) # will print something like "option -a not recognized" + #usage() + sys.exit(2) +output = None +# QJ : getopts + +for o, a in opts: + if o == "-d": + _ACTION = True + elif o in ("-p", "--publish"): + _PUBLISH = True + elif o in ("-m", "--publish"): + _MESSAGE = a + elif o in ("-t", "--publish"): + _TOPIC = a + elif o in ("-S", "--setvar"): + _SETVAR = True + _THR_NAME = sys.argv[2] + _THR_VAL = sys.argv[3] + else: + _WIZZARD = True +MQTT_HOST = "192.168.77.106" +MQTT_PORT = 1883 + +if _PUBLISH: + # generate client ID with pub prefix randomly + #client_id = f'python-mqtt-{random.randint(0, 1000)}' + client_id = 'python-mqtt-1004' + username = 'jaydee' + password = 'jaydee1' + + def connect_mqtt(): + def on_connect(client, userdata, flags, rc): + if rc == 0: + print("Connected to MQTT Broker!") + else: + print("Failed to connect, return code %d\n", rc) + + client = mqtt.Client(client_id) + client.username_pw_set(username, password) + client.on_connect = on_connect + client.connect(MQTT_HOST, MQTT_PORT) + return client + + + def publish(client): + result = client.publish(_TOPIC, _MESSAGE) + # result: [0, 1] + status = result[0] + if status == 0: + print(f"Send `{_MESSAGE}` to topic `{_TOPIC}`") + else: + print(f"Failed to send message to topic {_TOPIC}") + + client = connect_mqtt() + publish(client) + sys.exit() + +if _SETVAR: + #myCmd = "setx " + _THR_NAME + " " + _THR_VAL + " -m" + myCmd = "setx " + _THR_NAME + " " + _THR_VAL + subprocess.Popen(myCmd.split(), shell=True) + sys.exit() + +from ping3 import ping, verbose_ping + + + + +''' +curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +python get-pip.py +pip3 install getmac +pip3 install paho.mqttdasdas +""" + +''' + +writeLog("Starting daemon in versin : " + VERSION) + +VERS = '1.3' +''' +print("pinging") +lala = ping(MQTT_HOST) + +connected = 0 +while connected == 0: + if type(lala) == float: + print("Oleee connected") + writeLog("Mqtt connected", "INFO") + connected = 1 + else: + print("blaaah not connected, waiting...(5)") + writeLog("blaaah not connected, waiting...(5)") + time.sleep(5) + lala = ping(MQTT_HOST) +''' + +# Function to display hostname and +# IP address +def get_ip(): + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + try: + # doesn't even have to be reachable + s.connect(('192.168.77.1', 1)) + IP = s.getsockname()[0] + except ValueError: + IP = '127.0.0.1' + finally: + s.close() + return IP + + +IP = get_ip() + + +print("OS : " + curos) +writeLog("OS : " + curos) +if curos != "Windows": + import autorandr +else: + import winreg + + +if host == "raspberrypi": + mac = str(get_mac_address("eth0")) +elif host == "SERVER": + mac = str(get_mac_address("enp2s0")) +elif host == "ASUS" and curos != "Windows": + mac = str(get_mac_address("enp3s0f1")) +else: + mac = str(get_mac_address("Ethernet")) + + +print("MAC : " + mac) +writeLog("MAC : " + mac) +print("SYSTEM : " + host) +writeLog("SYSTEM : " + host) +print("IP : " + IP) +writeLog("IP : " + IP) + +flag_connected = 0 +# The callback for when the client receives a CONNACK response from the server. +def on_connect(client, userdata, flags, rc): + print("Connected with result code " + str(rc)) + writeLog("Connected with result code " + str(rc)) + global flag_connected + flag_connected = 1 + # Subscribing in on_connect() means that if we lose the connection and + # reconnect then subscriptions will be renewed. + topic = "sectorq/systems/" + host.lower() + print(topic) + writeLog(topic) + time.sleep(1) + client.publish("sectorq/status", payload="{'action':'connect', 'system':'" + host.lower() + "', 'ip': '" + IP + "', 'mac':'" + mac + "', 'ver':'" + VERS + "'}", qos=0, retain=False) + client.publish("sectorq/systems/" + host.lower() + "/stat", payload="on", qos=0, retain=True) + if host.lower() == "router": + print("Getting fw info") + cmnd = "/etc/init.d/banip running" + status, output = subprocess.getstatusoutput(cmnd) + if status == 0: + stats["banip"] = "running" + else: + stats["banip"] = "stopped" + + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -m get" + #out = subprocess.Popen(cmnd.split()) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + if output == 1: + stats["fw"] = 1 + else: + stats["fw"] = 0 + print("Getting wifi info") + cmnd = "/root/router_cmd.sh -t wireless -m get" + #out = subprocess.Popen(cmnd.split()) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + if output == "allow": + stats["macfilter"] = "allow" + else: + stats["macfilter"] = "off" + client.publish("sectorq/systems/router/stats", json.dumps(stats), qos=0, retain=True) + if host.lower() == "nas": + print("Getting VM info") + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh list --all" + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + l = 1 + lines = output.splitlines() + VMS = {} + for i in lines: + l = l + 1 + if l < 4: + continue + line = re.split(r" {2,}", i) + print(str(line[0].strip()) + " " + str(line[1].strip()) + " " + str(line[2].strip())) + VMS[str(line[1].strip())] = str(line[2].strip()) + + + + for m in VMS: + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + m + #out = subprocess.Popen(cmnd.split()) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + if output.strip() == "running": + client.publish("sectorq/systems/nas/" + m, payload=1, qos=0, retain=True) + else: + client.publish("sectorq/systems/nas/" + m, payload=0, qos=0, retain=True) + + + client.subscribe(topic) + +def on_disconnect(client, userdata, rc): + print("disconnecting reason " +str(rc)) + writeLog("disconnecting reason " +str(rc)) + client.connected_flag=False + client.disconnect_flag=True + global flag_connected + flag_connected = 0 + + +# The callback for when a PUBLISH message is received from the server. +def on_message(client, userdata, msg): + print(msg.topic) + print(msg.payload) + myObj = msg.payload.decode('utf-8') + # command = re.sub(r"^b\'|\'$", "", str(msg.payload)) + # command = json.loads(msg.payload.decode("utf-8")) + try: + myObj = json.loads(msg.payload) + try: + writeLog(myObj["action"]) + print(myObj["action"]) + except: + print("Action not set") + writeLog("Action not set", "WARNING") + + try: + print(myObj["cmd"]) + writeLog(myObj["cmd"]) + except: + print("Cmd not set") + writeLog("Cmd not set", "WARNING") + + try: + print(myObj["target"]) + writeLog(myObj["target"]) + except: + print("Target Not Set") + writeLog("Target Not Set", "WARNING") + try: + print(myObj["status"]) + writeLog(myObj["status"]) + except: + print("Status Not Set") + writeLog("Status Not Set") + + try: + print(myObj["command"]) + writeLog(myObj["command"]) + except: + print("Command Not Set") + writeLog("Command Not Set") + + try: + print(myObj["cmd_line"]) + writeLog(myObj["cmd_line"]) + except: + print("Cmd_line Not Set") + writeLog("Cmd_line Not Set") + + + if myObj["cmd"] == "command": + + print("Executing " + myObj["cmd_line"]) + writeLog("Executing " + myObj["cmd_line"]) + #os.system('start /b "' + myObj["cmd_line"] + '"') + try: + subprocess.Popen(myObj["cmd_line"].split(), shell=True) + #subprocess.Popen(myObj["cmd_line"].split()) + # ctypes.windll.user32.MessageBoxW(0, myObj["cmd_line"], "Executed", 64) + except: + ctypes.windll.user32.MessageBoxW(0, "Your text", "Your title", 16) + print("Executed " + myObj["cmd_line"]) + writeLog("Executed " + myObj["cmd_line"]) + + if myObj["cmd"] == "nas_cmd": + print("Executing NAS") + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + str(myObj["target"]) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + cmd_type = myObj["command"] + if myObj["command"] == "start": + if output.strip() == "paused": + print("System suspended") + cmd_type = "resume" + else: + print("System Off") + cmd_type = "start" + if myObj["command"] == "suspend": + cmd_type = "shutdown" + + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh " + cmd_type + " " + str(myObj["target"]) + subprocess.Popen(cmnd.split()) + print(cmnd) + if myObj["command"] == "start": + try: + print("sending") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload=1, qos=0, retain=False) + except: + print("failed to execute!") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload="failed", qos=0, retain=False) + else: + try: + print("sending") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload=0, qos=0, retain=False) + except: + print("failed to execute!") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload="failed", qos=0, retain=False) + + + if myObj["cmd"] == "distrib": + print("distributin313g") + # os.startfile(sys.argv[0]) + #sys.exit() + subprocess.Popen(['/bin/systemctl', 'restart', 'mqtt']) + + if myObj["cmd"] == "uci": + print("uci1") + print("Executing " + myObj["cmd_line"]) + writeLog("Executing " + myObj["cmd_line"]) + + if myObj["cmd_line"] == "wireless1": + cmnd = "/root/router_cmd.sh -t wireless -v 1 -m set" + try: + subprocess.Popen(cmnd.split()) + print("sending") + stats["macfilter"] = "allow" + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + + elif myObj["cmd_line"] == "wireless0": + cmnd = "/root/router_cmd.sh -t wireless -v 0 -m set" + try: + subprocess.Popen(cmnd.split()) + print("sending") + stats["macfilter"] = "off" + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + elif myObj["cmd_line"] == "fw0": + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -p enabled -v 0 -m set" + try: + subprocess.Popen(cmnd.split()) + print("sending") + stats["fw"] = 0 + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + elif myObj["cmd_line"] == "fw1": + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -p enabled -v 1 -m set" + try: + #subprocess.Popen(myObj["cmd_line"].split(), shell=True) + subprocess.Popen(cmnd.split()) + # ctypes.windll.user32.MessageBoxW(0, myObj["cmd_line"], "Executed", 64) + print("sending") + stats["fw"] = 1 + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + elif myObj["cmd_line"] == "serv_dest": + writeLog("Payload111111 : " + myObj["target"].lower()) + + if myObj["target"].lower() == "192.168.77.246": + dest_ip = "192.168.77.246" + elif myObj["target"].lower() == "192.168.77.106": + dest_ip = "192.168.77.106" + + RULES = ["EMAIL993", "EMAIL995", "EMAIL143", "EMAIL25", "EMAIL993", "EMAIL465", "HTTPS", "HTTP"] + for i in RULES: + cmnd = "uci set firewall.{}.dest_ip={}".format(i,dest_ip) + writeLog(cmnd) + subprocess.Popen(cmnd.split()) + + #cmnd = "uci set dhcp.@dnsmasq[0].address=/mqtt_broker/" + dest_ip + #writeLog(cmnd) + #subprocess.Popen(cmnd.split()) + time.sleep(1) + cmnd = "uci commit" + + subprocess.Popen(cmnd.split()) + + writeLog("Starting " + myObj["target"].lower()) + if myObj["target"].lower() == "192.168.77.246": + dest_ip = "192.168.77.246" + + + cmnd = "ssh root@192.168.77.246 'docker start mailu_resolver_1 mailu_redis_1 mailu_front_1 mailu_antispam_1 mailu_imap_1 mailu_admin_1 mailu_smtp_1 mailu_webmail_1 watchtower_watchtower_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 HomeAssistant webhub_client_1 dockermon_docker_mon_1 mosquitto_mosquitto_1 node-red_node-red_1 nextcloud_db_1 nextcloud_app_1'" + status, output = subprocess.getstatusoutput(cmnd) + elif myObj["target"].lower() == "192.168.77.106": + dest_ip = "192.168.77.106" + cmnd = "ssh root@192.168.77.246 'docker stop mailu_resolver_1 mailu_redis_1 mailu_front_1 mailu_antispam_1 mailu_imap_1 mailu_admin_1 mailu_smtp_1 mailu_webmail_1 watchtower_watchtower_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 HomeAssistant webhub_client_1 dockermon_docker_mon_1 mosquitto_mosquitto_1 node-red_node-red_1 nextcloud_db_1 nextcloud_app_1'" + status, output = subprocess.getstatusoutput(cmnd) + time.sleep(1) + cmnd = "/etc/init.d/firewall restart" + subprocess.Popen(cmnd.split()) + #cmnd = "/etc/init.d/dnsmasq restart" + #subprocess.Popen(cmnd.split()) + writeLog("reconfigure iot") + MQTT_BROKER = dest_ip + MQTT_USER = "jaydee" + MQTT_PASS = "jaydee1" + + cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\"" + #print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + # print(output) + + ips = output.splitlines() + tasm_data = {} + for sys_ip in ips: + # print("Thsis is ip : " + sys_ip) + cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\"" + status, output = subprocess.getstatusoutput(cmnd) + # print("status of 80 : " + str(status)) + if status == 0: + try: + # url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5" + + url = "http://" + sys_ip + "/cm?cmnd=Backlog%20MqttHost%20" + MQTT_BROKER + "%3BMqttUser%20" + MQTT_USER + "%3BMqttPassword%20" + MQTT_PASS + print(url) + requests.get(url) + + except: + #print(sys_ip + " : Not a tasmota!") + pass + else: + #print(sys_ip + " : Not a listening") + pass + + + + time.sleep(1) + cmnd = "sed -i 's/^MQTT_HOST = .*/MQTT_HOST = \"" + dest_ip + "\"/' /root/mqtt_srv.py" + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + #for i in ;do uci set firewall.${i}.dest_ip=192.168.77.246;done;uci set firewall.HTTPS.dest_port='443';uci set firewall.HTTP.dest_port='80' ;uci commit;/etc/init.d/firewall restart + else: + pass + #cmnd = "/root/router_cmd.sh -t wireless -v 0" + + + print("Executed " + cmnd) + writeLog("Executed " + cmnd) + + + if myObj["cmd"] == "banip": + if myObj["status"] == "ban": + cmnd = "echo " + str(myObj["target"]) + " >> /etc/banip/banip.blacklist; /etc/init.d/banip refresh" + elif myObj["status"] == "enable": + cmnd = "/etc/init.d/banip resume" + stats["banip"] = "enabled" + elif myObj["status"] == "disable": + cmnd = "/etc/init.d/banip suspend" + stats["banip"] = "paused" + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=True) + + if myObj["cmd"] == "vnc": + print(myObj["target"]) + writeLog(myObj["target"]) + + # os.startfile(sys.argv[0]) + #sys.exit() + myCmd = 'c:\\Program Files\\RealVNC\\VNC Viewer\\vncviewer.exe C:\\Users\\jaydee\\' + myObj["target"].upper() + '.vnc' + print(myCmd) + writeLog(myCmd) + subprocess.Popen(myCmd.split()) + if myObj["cmd"] == "getstats": + print("lalaa1") + try: + client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":" + get_user_env('mb_temp') + ",\"mem_usage\":" + get_user_env('mem_usage') + ",\"cpu_temp\":" + get_user_env('cpu_temp') + ",\"cpu_usage\":" + get_user_env('cpu_usage') + ",\"gpu_temp\":" + get_user_env('gpu_temp') + ",\"gpu_usage\":" + get_user_env('gpu_usage') + "}", qos=0, retain=False) + print("ok") + except: + print("failed") + client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":0,\"mem_usage\":0,\"cpu_temp\":0,\"cpu_usage\":0,\"gpu_temp\":0,\"gpu_usage\":0}", qos=0, retain=False) + + print("lalaa2") + + if myObj["cmd"] == "display": + if curos == "Windows1": + # os.startfile(sys.argv[0]) + #sys.exit() + #print("reconfigure") + myCmd = 'MonitorSwitcher.exe -load:' + myObj["target"] + '.xml' + writeLog(myCmd) + #writeLog(os.path.realpath(__file__)) + print("lalaa2") + #subprocess.Popen(r'"{}"'.format(myCmd), shell=True) + print("lalaa3") + subprocess.Popen(myCmd.split(), shell=True,cwd=r'c:\Progra~1\jaydee') + else: + ''' + myCmd = "" + if myObj["target"] == "mid": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --off --output eDP-1 --off" + elif myObj["target"] == "all": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080" + elif myObj["target"] == "midleft": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --off" + elif myObj["target"] == "midtop": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --off --output eDP-1 --off" + elif myObj["target"] == "midleftbuild": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080" + elif myObj["target"] == "midbuild": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --off --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080" + elif myObj["target"] == "midlefttop": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --off" + else: + pass + + if myCmd != "": + print(myCmd) + subprocess.Popen(myCmd.split()) + ''' + myCmd = "" + writeLog(myObj["target"]) + if curos == "Windows": + if myObj["target"] == "mid": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile mid" + elif myObj["target"] == "all": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile all" + elif myObj["target"] == "midleft": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midleft" + elif myObj["target"] == "midtop": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midtop" + elif myObj["target"] == "midleftbuild": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midleftbuild" + elif myObj["target"] == "midbuild": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midbuild" + elif myObj["target"] == "midlefttop": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midlefttop" + elif myObj["target"] == "build": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile build" + elif myObj["target"] == "midtopbuild": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midtopbuild" + else: + pass + else: + if myObj["target"] == "mid": + myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1-1 --off --output eDP-1-1 --off" + elif myObj["target"] == "all": + myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-1-2 --mode 1920x1080 --output HDMI-1-1 --auto --left-of HDMI-1-2 --mode 1920x1080 --output eDP-1-1 --auto --right-of HDMI-1-2 --mode 1920x1080" + elif myObj["target"] == "midleft": + myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1-1 --auto --left-of HDMI-1-2 --mode 1920x1080 --output eDP-1-1 --off" + elif myObj["target"] == "midtop": + myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-1-2 --mode 1920x1080 --output HDMI-1-1 --off --output eDP-1-1 --off" + elif myObj["target"] == "midleftbuild": + myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1-1 --auto --left-of HDMI-1-2 --mode 1920x1080 --output eDP-1-1 --auto --right-of HDMI-1-2 --mode 1920x1080" + elif myObj["target"] == "midbuild": + myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1-1 --off --output eDP-1-1 --auto --right-of HDMI-1-2 --mode 1920x1080" + elif myObj["target"] == "midlefttop": + myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-1-2 --mode 1920x1080 --output HDMI-1-1 --auto --left-of HDMI-1-2 --mode 1920x1080 --output eDP-1-1 --off" + elif myObj["target"] == "build": + myCmd = "xrandr --output HDMI-1-2 --off --output DVI-I-2-1 --off --output HDMI-1-1 --off --output eDP-1-1 --auto --mode 1920x1080" + else: + pass + + writeLog(myCmd) + if myCmd != "": + print(myCmd) + subprocess.Popen(myCmd.split()) + + if myObj["cmd"] == "display2": + # os.startfile(sys.argv[0]) + #sys.exit() + #print("reconfigure") + subprocess.Popen(['MultiMonitorTool.exe', '/SaveConfig', 'c:\\Program Files\\jaydee\\switcher.cfg']) + myCmd = "powershell switcher.ps1 " + str(myObj["target"]) + " " + str(myObj["status"]) + writeLog(myCmd) + subprocess.Popen(myCmd.split()) + time.sleep(1) + subprocess.Popen(['MultiMonitorTool.exe', '/LoadConfig', 'c:\\Program Files\\jaydee\\switcher.cfg']) + client.publish("sectorq/feedback", payload='{"action":"resp", "source":"ASUS", "dev":{"display' + str(myObj["target"]) + '":'+ str(myObj["status"]) +'} }' , qos=0, retain=False) + if myObj["cmd"] == "displ": + print("Display") + # os.startfile(sys.argv[0]) + #sys.exit() + subprocess.Popen(['/usr/bin/xrandr', '--output', 'HDMI-1-1', '--off']) + + if myObj["cmd"] == "xrandr": + if curos == "Windows": + subprocess.Popen(['MultiMonitorTool.exe', '/LoadConfig', 'c:\\Program Files\\jaydee\\all_on.cfg']) + else: + print("Display") + # os.startfile(sys.argv[0]) + #sys.exit() + os.system("export DISPLAY=:0") + subprocess.Popen(['/usr/bin/xrandr']) + + if myObj["cmd"] == "suspend": + print("suspending") + if curos == "Windows": + os.system("rundll32.exe powrprof.dll,SetSuspendState 0,1,0") + #cmnd = "psshutdown -d -t 1" + writeLog(cmnd) + #status, output = subprocess.getstatusoutput(cmnd) + #subprocess.Popen(["psshutdown", "-d", "-t", "1"]) + #writeLog(output) + else: + if host == "nas" or host == "octopi": + subprocess.Popen(["/sbin/poweroff"]) + else: + #subprocess.Popen(["/bin/systemctl", "suspend", "-i"]) + subprocess.Popen(["sudo", "pm-suspend"]) + if myObj["cmd"] == "stats": + grep = subprocess.Popen(['grep', 'cpu', '/proc/stat'], + stdout=subprocess.PIPE, + ) + + awk = subprocess.Popen(['awk', '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}'], + stdin=grep.stdout, + stdout=subprocess.PIPE, + ) + + # cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}' + + end_of_pipe = awk.stdout + + for line in end_of_pipe: + # print(line.strip()) + # usage = re.sub(r"^b\'|\'$", "", (line.strip())) + cpu = round(float(line.strip().decode("utf-8"))) + free = subprocess.Popen(['free'], + stdout=subprocess.PIPE, + ) + + grep = subprocess.Popen(['grep', 'Mem'], + stdout=subprocess.PIPE, + stdin=free.stdout, + ) + + awk = subprocess.Popen(['awk', '{print $3/$2 * 100.0}'], + stdin=grep.stdout, + stdout=subprocess.PIPE, + ) + + end_of_pipe = awk.stdout + + for line in end_of_pipe: + # print(line.strip()) + # mem = re.sub(r"^b\'|\'$", "", (line.strip())) + mem = round(float(line.strip().decode("utf-8"))) + # mem = re.sub(r"^b\'|\'$", "", mem) + # cpu = re.sub(r"^b\'|\'$", "", cpu) + # print(mem) + jn = {"cpu": cpu, "mem": mem} + jn = json.dumps(jn) + client.publish("sectorq/status/" + host, payload=jn, qos=0, retain=False) + except: + print("not a json!") + +client = mqtt.Client() +payload = "off" +client.username_pw_set("jaydee", password="jaydee1") +client.will_set("sectorq/systems/" + host.lower() + "/stat", payload=payload, qos=0, retain=False) +client.on_connect = on_connect +client.on_message = on_message +writeLog(MQTT_HOST) +client.connect(MQTT_HOST, MQTT_PORT, 5) + +# client.publish("sectorq/status", payload="{'action':'connect', 'system':'" + host + "', 'ip': '" + IP + "', 'mac':'" + mac + "', 'ver':'?'}", qos=0, retain=False) + + +# Blocking call that processes network traffic, dispatches callbacks and +# handles reconnecting. +# Other loop*() functions are available that give a threaded interface and a +# manual interface. + +if curos == "Windows": + #client.loop_forever() + client.loop_start() + NEXT_CHECK = 0 + while True: + print(VERSION) + time.sleep(5) + try: + mtime = os.path.getmtime(sys.argv[0]) + except OSError: + mtime = 0 + print(mtime) + if NEXT_CHECK < int(time.time()): + NEXT_CHECK = int(time.time()) + 10 + writeLog("Blalala : Next : " + str(NEXT_CHECK)) + if curos == "Windows": + data = python_aida64.getData() + #print(json.dumps(data)) + stats = {} + for i in data: + for j in data[i]: + stats[j["id"]] = j["value"] + + + jn = json.dumps(stats) + client.publish("home-assistant/" + host + "/hwstats", payload=jn, qos=0, retain=False) + #print(json.dumps(stats)) + #writeLog(json.dumps(stats)) +else: + + + client.loop_start() + + NEXT_CHECK = 0 + while True: + print(VERSION) + time.sleep(5) + try: + mtime = os.path.getmtime(sys.argv[0]) + except OSError: + mtime = 0 + print(mtime) + if NEXT_CHECK < int(time.time()): + NEXT_CHECK = int(time.time()) + 60 + writeLog("Blalala : Next : " + str(NEXT_CHECK)) + + + if host.lower() == "router": + cmnd = "/etc/init.d/banip status|grep \"+ status\"|awk '{ print $4 }'" + status, output = subprocess.getstatusoutput(cmnd) + writeLog("BanIP Status : " + str(status)) + stats["banip"] = output + + cmnd = "ncat -z 192.168.77.106 25" + status, output = subprocess.getstatusoutput(cmnd) + if status == 0: + stats["mail_nas"] = "available" + else: + stats["mail_nas"] = "unavailable" + cmnd = "ncat -z 192.168.77.246 25" + status, output = subprocess.getstatusoutput(cmnd) + if status == 0: + stats["mail_rasp"] = "available" + else: + stats["mail_rasp"] = "unavailable" + cmnd = "/root/router_cmd.sh -t serv_dest -m get" + status, output = subprocess.getstatusoutput(cmnd) + stats["serv_dest"] = output + #out = subprocess.Popen(cmnd.split()) + status, output = subprocess.getstatusoutput(cmnd) + print("Getting fw info") + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -m get" + #out = subprocess.Popen(cmnd.split()) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + stats["fw"] = output + #client.publish("sectorq/systems/router/fw", payload=str(output), qos=0, retain=True) + print("Getting wifi info") + cmnd = "/root/router_cmd.sh -t wireless -m get" + #out = subprocess.Popen(cmnd.split()) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + if output != 'allow': + output = 'off' + stats["macfilter"] = output + # if output == "allow":\ + writeLog("Payload : " + str(json.dumps(stats))) + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=True) + #else: + # client.publish("sectorq/systems/router/macfilter", payload=0, qos=0, retain=True) + if host.lower() == "nas": + print("Getting VM info") + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh list --all" + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + l = 1 + lines = output.splitlines() + VMS = {} + for i in lines: + l = l + 1 + if l < 4: + continue + line = re.split(r" {2,}", i) + print(str(line[0].strip()) + " " + str(line[1].strip()) + " " + str(line[2].strip())) + VMS[str(line[1].strip())] = str(line[2].strip()) + + + + for m in VMS: + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + m + #out = subprocess.Popen(cmnd.split()) + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + writeLog(output) + if output.strip() == "running": + client.publish("sectorq/systems/nas/" + m, payload=1, qos=0, retain=True) + else: + client.publish("sectorq/systems/nas/" + m, payload=0, qos=0, retain=True) + + + if FILE_TIMESTAMP != mtime: + writeLog("Script updated ! restarting...") + #os.execv(sys.executable, ['python'] + sys.argv) + #os.system("/share/ZFS530_DATA/.qpkg/QPython39/bin/python3 mqtt_srv.py") + + if host.lower() == "nas": + sys.stdout.flush() + os.execv("/share/ZFS530_DATA/.qpkg/QPython39/bin/python3", sys.argv) + if host.lower() == "router": + #sys.stdout.flush() + sys.exit() + #os.execv("/usr/bin/python3", sys.argv) \ No newline at end of file diff --git a/mqtt_srv.py b/mqtt_srv.py new file mode 100644 index 0000000..8abaed0 --- /dev/null +++ b/mqtt_srv.py @@ -0,0 +1,1185 @@ +#!/usr/bin/env python3 + +from asyncio.log import logger +import paho.mqtt.client as mqtt +from getmac import get_mac_address +import platform +import socket +import re +import subprocess +import os +import json +import sys +import time +import json +import datetime +import ctypes +import getopt +import random +import requests +#import psutil + + +stats = {} +VERSION = "1.0.20" +curos = platform.system() +host = platform.node().lower() +print(host) +if curos == "Windows": + import winreg + + +def uptime(): + + try: + f = open( "/proc/uptime" ) + contents = f.read().split() + f.close() + except: + return "Cannot open uptime file: /proc/uptime" + + total_seconds = float(contents[0]) + + # Helper vars: + MINUTE = 60 + HOUR = MINUTE * 60 + DAY = HOUR * 24 + + # Get the days, hours, etc: + days = int( total_seconds / DAY ) + hours = int( ( total_seconds % DAY ) / HOUR ) + minutes = int( ( total_seconds % HOUR ) / MINUTE ) + seconds = int( total_seconds % MINUTE ) + + # Build up the pretty string (like this: "N days, N hours, N minutes, N seconds") + string = "" + # if days > 0: + # string += str(days) + " " + (days == 1 and "d" or "d" ) + ", " + # if len(string) > 0 or hours > 0: + # string += str(hours) + " " + (hours == 1 and "h" or "h" ) + ", " + # if len(string) > 0 or minutes > 0: + # string += str(minutes) + " " + (minutes == 1 and "m" or "m" ) + ", " + if days > 0: + string += str(days) + " " + (days == 1 and "d" or "d" ) + ", " + if len(string) > 0 or hours > 0: + string += str(hours) + ":" + if len(string) > 0 or minutes > 0: + string += str(minutes) + ":" + string += str(seconds) + + return string; + +def writeLog(msg, svr="INFO"): + ts = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + if curos == "Windows": + log_path = "c:\Program Files\jaydee\jaydee.log" + else: + log_path = "/tmp/mqtt_srv.log" + f = open(log_path, "a") + f.write(ts + " | " + svr + " | " + str(msg) + "\n") + f.close() + +def check_router(): + stats["uptime"] = uptime() + stats["version"] = VERSION + cmnd = "crontab -l" + status, output = subprocess.getstatusoutput(cmnd) + + if "#Skynet_banmalware#" in output: + stats["skynet"] = "on" + else: + stats["skynet"] = "off" + if "#Diversion_CountAds#" in output: + stats["diversion"] = "on" + else: + stats["diversion"] = "off" + + + cmnd = "nvram get vpn_client1_state" + status, output = subprocess.getstatusoutput(cmnd) + writeLog("Openvpn1 Status : " + str(output)) + stats["vpnclient1"] = output + cmnd = "nvram get vpn_client2_state" + status, output = subprocess.getstatusoutput(cmnd) + writeLog("Openvpn2 Status : " + str(output)) + stats["vpnclient2"] = output + cmnd = "ncat -z 192.168.77.106 25" + status, output = subprocess.getstatusoutput(cmnd) + if status == 0: + stats["mail_nas"] = "available" + else: + stats["mail_nas"] = "unavailable" + cmnd = "ncat -z 192.168.77.246 25" + status, output = subprocess.getstatusoutput(cmnd) + if status == 0: + stats["mail_rasp"] = "available" + else: + stats["mail_rasp"] = "unavailable" + cmnd = "nvram get vts_rulelist" + status, output = subprocess.getstatusoutput(cmnd) + rule_data = output.split("<") + serv_d = {} + for l in rule_data: + rul = l.split(">") + if len(rul) > 3: + if rul[0] == "HTTPS": + serv_d[rul[0]] = {"src_port":rul[1],"dest_ip":rul[2],"dest_port":rul[3],"prot":rul[4]} + stats["serv_dest"] = rul[2] + break + #stats["serv_dest"] = json.dumps(serv_d) + #stats["serv_dest"] = json.dumps(serv_d) + #out = subprocess.Popen(cmnd.split()) + #status, output = subprocess.getstatusoutput(cmnd) + + + ''' + + + print("Getting fw info") + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -m get" + #out = subprocess.Popen(cmnd.split()) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + stats["fw"] = output + #client.publish("sectorq/systems/router/fw", payload=str(output), qos=0, retain=True) + print("Getting wifi info") + cmnd = "/root/router_cmd.sh -t wireless -m get" + #out = subprocess.Popen(cmnd.split()) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + if output != 'allow': + output = 'off' + stats["macfilter"] = output + # if output == "allow":\ + writeLog("Payload : " + str(json.dumps(stats))) + ''' + client.publish("home-assistant/router/hwstats", json.dumps(stats), qos=0, retain=True) + #client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=True) + #else: + # client.publish("sectorq/systems/router/macfilter", payload=0, qos=0, retain=True) + +if host != "router" and host != "nas": + import psutil + + processes = list(p.name() for p in psutil.process_iter()) + # print(processes) + count = processes.count("mqtt_srv.exe") + if int(count) >= 3: + writeLog("script exist") + sys.exit() +else: + cmnd = "ps |grep mqtt_srv.py|grep -v grep |wc -l" + status, output = subprocess.getstatusoutput(cmnd) + count = output + if int(count) >= 2: + writeLog("script exist") + sys.exit() +# Stops duplicate instance from running + +writeLog(count) + +writeLog("Starting : " + str(VERSION)) +writeLog("Getting running proccesses", "DEBUG") + + +writeLog("done", "DEBUG") + +FILE_TIMESTAMP = os.path.getmtime(sys.argv[0]) +def get_sys_env(name): + key = winreg.CreateKey(winreg.HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\Session Manager\Environment") + return winreg.QueryValueEx(key, name)[0] + +def get_user_env(name): + key = winreg.CreateKey(winreg.HKEY_CURRENT_USER, r"Environment") + return winreg.QueryValueEx(key, name)[0] + + +_PUBLISH = _SETVAR = False +try: + opts, args = getopt.getopt(sys.argv[1:], "Sspmt:", ["command=", "help", "output="]) +except getopt.GetoptError as err: + # print help information and exit: + print(str(err)) # will print something like "option -a not recognized" + #usage() + sys.exit(2) +output = None +# QJ : getopts + +for o, a in opts: + if o == "-d": + _ACTION = True + elif o in ("-p", "--publish"): + _PUBLISH = True + elif o in ("-m", "--publish"): + _MESSAGE = a + elif o in ("-t", "--publish"): + _TOPIC = a + elif o in ("-S", "--setvar"): + _SETVAR = True + _THR_NAME = sys.argv[2] + _THR_VAL = sys.argv[3] + else: + _WIZZARD = True +MQTT_HOST = "192.168.77.106" +MQTT_PORT = 1883 + +if _PUBLISH: + # generate client ID with pub prefix randomly + #client_id = f'python-mqtt-{random.randint(0, 1000)}' + client_id = 'python-mqtt-1004' + username = 'jaydee' + password = 'jaydee1' + + def connect_mqtt(): + def on_connect(client, userdata, flags, rc): + if rc == 0: + print("Connected to MQTT Broker!") + else: + print("Failed to connect, return code %d\n", rc) + + client = mqtt.Client(client_id) + client.username_pw_set(username, password) + client.on_connect = on_connect + client.connect(MQTT_HOST, MQTT_PORT) + return client + + + def publish(client): + result = client.publish(_TOPIC, _MESSAGE) + # result: [0, 1] + status = result[0] + if status == 0: + print(f"Send `{_MESSAGE}` to topic `{_TOPIC}`") + else: + print(f"Failed to send message to topic {_TOPIC}") + + client = connect_mqtt() + publish(client) + sys.exit() + +if _SETVAR: + #myCmd = "setx " + _THR_NAME + " " + _THR_VAL + " -m" + myCmd = "setx " + _THR_NAME + " " + _THR_VAL + subprocess.Popen(myCmd.split(), shell=True) + sys.exit() + +from ping3 import ping, verbose_ping + + + + +''' +curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +python get-pip.py +pip3 install getmac +pip3 install paho.mqttdasdas +""" + +''' + +writeLog("Starting daemon in versin : " + VERSION) + +VERS = '1.3' +''' +print("pinging") +lala = ping(MQTT_HOST) + +connected = 0 +while connected == 0: + if type(lala) == float: + print("Oleee connected") + writeLog("Mqtt connected", "INFO") + connected = 1 + else: + print("blaaah not connected, waiting...(5)") + writeLog("blaaah not connected, waiting...(5)") + time.sleep(5) + lala = ping(MQTT_HOST) +''' + +# Function to display hostname and +# IP address +def get_ip(): + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + try: + # doesn't even have to be reachable + s.connect(('192.168.77.1', 1)) + IP = s.getsockname()[0] + except ValueError: + IP = '127.0.0.1' + finally: + s.close() + return IP + + +IP = get_ip() + + +print("OS : " + curos) +writeLog("OS : " + curos) +if curos != "Windows": + import autorandr +else: + import winreg + + +if host == "raspberrypi": + mac = str(get_mac_address("eth0")) +elif host == "SERVER": + mac = str(get_mac_address("enp2s0")) +elif host == "ASUS" and curos != "Windows": + mac = str(get_mac_address("enp3s0f1")) +else: + mac = str(get_mac_address("Ethernet")) + + +print("MAC : " + mac) +writeLog("MAC : " + mac) +print("SYSTEM : " + host) +writeLog("SYSTEM : " + host) +print("IP : " + IP) +writeLog("IP : " + IP) + +flag_connected = 0 +# The callback for when the client receives a CONNACK response from the server. +def on_connect(client, userdata, flags, rc): + print("Connected with result code " + str(rc)) + writeLog("Connected with result code " + str(rc)) + global flag_connected + flag_connected = 1 + # Subscribing in on_connect() means that if we lose the connection and + # reconnect then subscriptions will be renewed. + topic = "sectorq/systems/" + host.lower() + print(topic) + writeLog(topic) + time.sleep(1) + client.publish("sectorq/status", payload="{'action':'connect', 'system':'" + host.lower() + "', 'ip': '" + IP + "', 'mac':'" + mac + "', 'ver':'" + VERS + "'}", qos=0, retain=False) + client.publish("sectorq/systems/" + host.lower() + "/stat", payload="on", qos=0, retain=True) + if host.lower() == "router": + check_router() + + if host.lower() == "nas": + print("Getting VM info") + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh list --all" + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + l = 1 + lines = output.splitlines() + VMS = {} + for i in lines: + l = l + 1 + if l < 4: + continue + line = re.split(r" {2,}", i) + print(str(line[0].strip()) + " " + str(line[1].strip()) + " " + str(line[2].strip())) + VMS[str(line[1].strip())] = str(line[2].strip()) + + + + for m in VMS: + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + m + #out = subprocess.Popen(cmnd.split()) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + if output.strip() == "running": + client.publish("sectorq/systems/nas/" + m, payload=1, qos=0, retain=True) + else: + client.publish("sectorq/systems/nas/" + m, payload=0, qos=0, retain=True) + + + client.subscribe(topic) + +def on_disconnect(client, userdata, rc): + print("disconnecting reason " +str(rc)) + writeLog("disconnecting reason " +str(rc)) + client.connected_flag=False + client.disconnect_flag=True + global flag_connected + flag_connected = 0 + + +# The callback for when a PUBLISH message is received from the server. +def on_message(client, userdata, msg): + print(msg.topic) + print(msg.payload) + myObj = msg.payload.decode('utf-8') + # command = re.sub(r"^b\'|\'$", "", str(msg.payload)) + # command = json.loads(msg.payload.decode("utf-8")) + try: + myObj = json.loads(msg.payload) + try: + writeLog(myObj["action"]) + print(myObj["action"]) + except: + print("Action not set") + writeLog("Action not set", "WARNING") + + try: + print(myObj["cmd"]) + writeLog(myObj["cmd"]) + except: + print("Cmd not set") + writeLog("Cmd not set", "WARNING") + + try: + print(myObj["target"]) + writeLog(myObj["target"]) + except: + print("Target Not Set") + writeLog("Target Not Set", "WARNING") + try: + print(myObj["status"]) + writeLog(myObj["status"]) + except: + print("Status Not Set") + writeLog("Status Not Set") + + try: + print(myObj["command"]) + writeLog(myObj["command"]) + except: + print("Command Not Set") + writeLog("Command Not Set") + + try: + print(myObj["cmd_line"]) + writeLog(myObj["cmd_line"]) + except: + print("Cmd_line Not Set") + writeLog("Cmd_line Not Set") + + + if myObj["cmd"] == "command": + + print("Executing " + myObj["cmd_line"]) + writeLog("Executing " + myObj["cmd_line"]) + #os.system('start /b "' + myObj["cmd_line"] + '"') + try: + subprocess.Popen(myObj["cmd_line"].split(), shell=True) + #subprocess.Popen(myObj["cmd_line"].split()) + # ctypes.windll.user32.MessageBoxW(0, myObj["cmd_line"], "Executed", 64) + except: + ctypes.windll.user32.MessageBoxW(0, "Your text", "Your title", 16) + print("Executed " + myObj["cmd_line"]) + writeLog("Executed " + myObj["cmd_line"]) + + if myObj["cmd"] == "nas_cmd": + print("Executing NAS") + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + str(myObj["target"]) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + cmd_type = myObj["command"] + if myObj["command"] == "start": + if output.strip() == "paused": + print("System suspended") + cmd_type = "resume" + else: + print("System Off") + cmd_type = "start" + if myObj["command"] == "suspend": + cmd_type = "shutdown" + + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh " + cmd_type + " " + str(myObj["target"]) + subprocess.Popen(cmnd.split()) + print(cmnd) + if myObj["command"] == "start": + try: + print("sending") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload=1, qos=0, retain=False) + except: + print("failed to execute!") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload="failed", qos=0, retain=False) + else: + try: + print("sending") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload=0, qos=0, retain=False) + except: + print("failed to execute!") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload="failed", qos=0, retain=False) + + + if myObj["cmd"] == "distrib": + print("distributin313g") + # os.startfile(sys.argv[0]) + #sys.exit() + subprocess.Popen(['/bin/systemctl', 'restart', 'mqtt']) + + if myObj["cmd"] == "uci": + print("uci1") + print("Executing " + myObj["cmd_line"]) + writeLog("Executing " + myObj["cmd_line"]) + + if myObj["cmd_line"] == "wireless1": + cmnd = "/root/router_cmd.sh -t wireless -v 1 -m set" + try: + subprocess.Popen(cmnd.split()) + print("sending") + stats["macfilter"] = "allow" + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + + elif myObj["cmd_line"] == "wireless0": + cmnd = "/root/router_cmd.sh -t wireless -v 0 -m set" + try: + subprocess.Popen(cmnd.split()) + print("sending") + stats["macfilter"] = "off" + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + elif myObj["cmd_line"] == "fw0": + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -p enabled -v 0 -m set" + try: + subprocess.Popen(cmnd.split()) + print("sending") + stats["fw"] = 0 + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + elif myObj["cmd_line"] == "fw1": + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -p enabled -v 1 -m set" + try: + #subprocess.Popen(myObj["cmd_line"].split(), shell=True) + subprocess.Popen(cmnd.split()) + # ctypes.windll.user32.MessageBoxW(0, myObj["cmd_line"], "Executed", 64) + print("sending") + stats["fw"] = 1 + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + elif myObj["cmd_line"] == "openvpn": + cmnd = "service {}".format(myObj["target"]) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + elif myObj["cmd_line"] == "serv_dest": + writeLog("Payload111111 : " + myObj["target"].lower()) + + cmnd = "nvram get vts_rulelist" + status, output = subprocess.getstatusoutput(cmnd) + rule_data = output.split("<") + serv_d = {} + writeLog("Payload111112") + for l in rule_data: + rul = l.split(">") + if len(rul) > 3: + serv_d[rul[0]] = {"src_port":rul[1],"dest_ip":rul[2],"dest_port":rul[3],"prot":rul[4]} + stats["serv_dest"] = rul[2] + writeLog("Payload111113") + rules = {"HTTPS":{"dest_ip":"192.168.77.106","src_port":443,"dest_port":443,"prot":"TCP"}, + "HTTP":{"dest_ip":"192.168.77.106","src_port":80,"dest_port":80,"prot":"TCP"}, + "EMAIL_25":{"dest_ip":"192.168.77.106","src_port":25,"dest_port":25,"prot":"TCP"}, + "EMAIL_465":{"dest_ip":"192.168.77.106","src_port":465,"dest_port":465,"prot":"TCP"}, + "EMAIL_993":{"dest_ip":"192.168.77.106","src_port":993,"dest_port":993,"prot":"TCP"}, + "EMAIL_995":{"dest_ip":"192.168.77.106","src_port":995,"dest_port":995,"prot":"TCP"}, + "EMAIL_587":{"dest_ip":"192.168.77.106","src_port":587,"dest_port":587,"prot":"TCP"}, + "EMAIL_143":{"dest_ip":"192.168.77.106","src_port":143,"dest_port":143,"prot":"TCP"}} + writeLog("Payload1111135") + print(json.dumps(serv_d)) + for r in rules: + print(r) + try: + serv_d[r]["dest_ip"] = myObj["target"] + except: + serv_d[r] = rules[r] + + lala = [] + for sr in serv_d: + lala.append("{}>{}>{}>{}>{}>".format(sr,serv_d[sr]["src_port"],serv_d[sr]["dest_ip"],serv_d[sr]["dest_port"],serv_d[sr]["prot"])) + la = "<".join(lala) + la = "<{}".format(la) + print(la) + cmnd = "nvram set vts_rulelist=\"{}\"".format(la) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + cmnd = "nvram commit" + status, output = subprocess.getstatusoutput(cmnd) + cmnd = "service restart_firewall" + status, output = subprocess.getstatusoutput(cmnd) + writeLog("Payload111114") + writeLog(output) + print(json.dumps(serv_d)) + ''' + if myObj["target"].lower() == "192.168.77.246": + dest_ip = "192.168.77.246" + elif myObj["target"].lower() == "192.168.77.106": + dest_ip = "192.168.77.106" + + + + + RULES = ["EMAIL993", "EMAIL995", "EMAIL143", "EMAIL25", "EMAIL993", "EMAIL465", "HTTPS", "HTTP"] + for i in RULES: + cmnd = "uci set firewall.{}.dest_ip={}".format(i,dest_ip) + writeLog(cmnd) + subprocess.Popen(cmnd.split()) + + #cmnd = "uci set dhcp.@dnsmasq[0].address=/mqtt_broker/" + dest_ip + #writeLog(cmnd) + #subprocess.Popen(cmnd.split()) + time.sleep(1) + cmnd = "uci commit" + + subprocess.Popen(cmnd.split()) + + writeLog("Starting " + myObj["target"].lower()) + if myObj["target"].lower() == "192.168.77.246": + dest_ip = "192.168.77.246" + + + cmnd = "ssh root@192.168.77.246 'docker start mailu_resolver_1 mailu_redis_1 mailu_front_1 mailu_antispam_1 mailu_imap_1 mailu_admin_1 mailu_smtp_1 mailu_webmail_1 watchtower_watchtower_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 HomeAssistant webhub_client_1 dockermon_docker_mon_1 mosquitto_mosquitto_1 node-red_node-red_1 nextcloud_db_1 nextcloud_app_1'" + status, output = subprocess.getstatusoutput(cmnd) + elif myObj["target"].lower() == "192.168.77.106": + dest_ip = "192.168.77.106" + cmnd = "ssh root@192.168.77.246 'docker stop mailu_resolver_1 mailu_redis_1 mailu_front_1 mailu_antispam_1 mailu_imap_1 mailu_admin_1 mailu_smtp_1 mailu_webmail_1 watchtower_watchtower_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 HomeAssistant webhub_client_1 dockermon_docker_mon_1 mosquitto_mosquitto_1 node-red_node-red_1 nextcloud_db_1 nextcloud_app_1'" + status, output = subprocess.getstatusoutput(cmnd) + time.sleep(1) + cmnd = "/etc/init.d/firewall restart" + subprocess.Popen(cmnd.split()) + #cmnd = "/etc/init.d/dnsmasq restart" + #subprocess.Popen(cmnd.split()) + writeLog("reconfigure iot") + MQTT_BROKER = dest_ip + MQTT_USER = "jaydee" + MQTT_PASS = "jaydee1" + + cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\"" + #print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + # print(output) + + ips = output.splitlines() + tasm_data = {} + for sys_ip in ips: + # print("Thsis is ip : " + sys_ip) + cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\"" + status, output = subprocess.getstatusoutput(cmnd) + # print("status of 80 : " + str(status)) + if status == 0: + try: + # url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5" + + url = "http://" + sys_ip + "/cm?cmnd=Backlog%20MqttHost%20" + MQTT_BROKER + "%3BMqttUser%20" + MQTT_USER + "%3BMqttPassword%20" + MQTT_PASS + print(url) + requests.get(url) + + except: + #print(sys_ip + " : Not a tasmota!") + pass + else: + #print(sys_ip + " : Not a listening") + pass + + + + time.sleep(1) + cmnd = "sed -i 's/^MQTT_HOST = .*/MQTT_HOST = \"" + dest_ip + "\"/' /root/mqtt_srv.py" + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + #for i in ;do uci set firewall.${i}.dest_ip=192.168.77.246;done;uci set firewall.HTTPS.dest_port='443';uci set firewall.HTTP.dest_port='80' ;uci commit;/etc/init.d/firewall restart + else: + pass + #cmnd = "/root/router_cmd.sh -t wireless -v 0" + + + print("Executed " + cmnd) + writeLog("Executed " + cmnd) + ''' + + + if myObj["cmd"] == "banip": + if myObj["status"] == "ban": + cmnd = "echo " + str(myObj["target"]) + " >> /etc/banip/banip.blacklist; /etc/init.d/banip refresh" + elif myObj["status"] == "enable": + cmnd = "/etc/init.d/banip resume" + stats["banip"] = "enabled" + elif myObj["status"] == "disable": + cmnd = "/etc/init.d/banip suspend" + stats["banip"] = "paused" + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=True) + + if myObj["cmd"] == "vnc": + print(myObj["target"]) + writeLog(myObj["target"]) + + # os.startfile(sys.argv[0]) + #sys.exit() + myCmd = 'c:\\Program Files\\RealVNC\\VNC Viewer\\vncviewer.exe C:\\Users\\jaydee\\' + myObj["target"].upper() + '.vnc' + print(myCmd) + writeLog(myCmd) + subprocess.Popen(myCmd.split()) + if myObj["cmd"] == "getstats": + print("lalaa1") + try: + client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":" + get_user_env('mb_temp') + ",\"mem_usage\":" + get_user_env('mem_usage') + ",\"cpu_temp\":" + get_user_env('cpu_temp') + ",\"cpu_usage\":" + get_user_env('cpu_usage') + ",\"gpu_temp\":" + get_user_env('gpu_temp') + ",\"gpu_usage\":" + get_user_env('gpu_usage') + "}", qos=0, retain=False) + print("ok") + except: + print("failed") + client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":0,\"mem_usage\":0,\"cpu_temp\":0,\"cpu_usage\":0,\"gpu_temp\":0,\"gpu_usage\":0}", qos=0, retain=False) + + print("lalaa2") + + if myObj["cmd"] == "display": + if curos == "Windows1": + # os.startfile(sys.argv[0]) + #sys.exit() + #print("reconfigure") + myCmd = 'MonitorSwitcher.exe -load:' + myObj["target"] + '.xml' + writeLog(myCmd) + #writeLog(os.path.realpath(__file__)) + print("lalaa2") + #subprocess.Popen(r'"{}"'.format(myCmd), shell=True) + print("lalaa3") + subprocess.Popen(myCmd.split(), shell=True,cwd=r'c:\Progra~1\jaydee') + else: + ''' + myCmd = "" + if myObj["target"] == "mid": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --off --output eDP-1 --off" + elif myObj["target"] == "all": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080" + elif myObj["target"] == "midleft": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --off" + elif myObj["target"] == "midtop": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --off --output eDP-1 --off" + elif myObj["target"] == "midleftbuild": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080" + elif myObj["target"] == "midbuild": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --off --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080" + elif myObj["target"] == "midlefttop": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --off" + else: + pass + + if myCmd != "": + print(myCmd) + subprocess.Popen(myCmd.split()) + ''' + myCmd = "" + writeLog(myObj["target"]) + if curos == "Windows": + if myObj["target"] == "mid": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile mid" + elif myObj["target"] == "all": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile all" + elif myObj["target"] == "left": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile left" + elif myObj["target"] == "midleft": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midleft" + elif myObj["target"] == "midtop": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midtop" + elif myObj["target"] == "midleftbuild": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midleftbuild" + elif myObj["target"] == "midbuild": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midbuild" + elif myObj["target"] == "midlefttop": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midlefttop" + elif myObj["target"] == "build": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile build" + elif myObj["target"] == "midtopbuild": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midtopbuild" + else: + pass + else: + ''' + mon1 = "HDMI-1-1" + mon2 = "HDMI-1-2" + mon3 = "DVI-I-2-1" + mon4 = "eDP-1-1" + ''' + mon1 = "HDMI-1" + mon2 = "HDMI-2" + mon3 = "DVI-I-2-1" + mon4 = "eDP-1" + + if myObj["target"] == "mid": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " +mon1 + " --off --output " + mon4 + " --off" + elif myObj["target"] == "left": + myCmd = "xrandr --output " + mon1 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " +mon2 + " --off --output " + mon4 + " --off" + + elif myObj["target"] == "all": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --auto --right-of " + mon2 + " --mode 1920x1080 --output " + mon1 + " --auto --left-of " + mon2 + " --mode 1920x1080 --output " + mon4 + " --auto --right-of " + mon2 + " --mode 1920x1080" + elif myObj["target"] == "midleft": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " + mon1 + " --auto --left-of " + mon2 + " --mode 1920x1080 --output " + mon4 + " --off" + elif myObj["target"] == "midtop": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --auto --right-of " + mon2 + " --mode 1920x1080 --output " + mon1 + " --off --output " + mon4 + " --off" + elif myObj["target"] == "midleftbuild": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " + mon1 + " --auto --left-of " + mon2 + " --mode 1920x1080 --output " + mon4 + " --auto --right-of " + mon2 + " --mode 1920x1080" + elif myObj["target"] == "midbuild": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " + mon1 + " --off --output " + mon4 + " --auto --right-of " + mon2 + " --mode 1920x1080" + elif myObj["target"] == "midlefttop": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --auto --right-of " + mon2 + " --mode 1920x1080 --output " + mon1 + " --auto --left-of " + mon2 + " --mode 1920x1080 --output " + mon4 + " --off" + elif myObj["target"] == "build": + myCmd = "xrandr --output " + mon2 + " --off --output " + mon3 + " --off --output " + mon1 + " --off --output " + mon4 + " --auto --mode 1920x1080" + else: + pass + + writeLog(myCmd) + if myCmd != "": + print(myCmd) + subprocess.Popen(myCmd.split()) + + if myObj["cmd"] == "display2": + # os.startfile(sys.argv[0]) + #sys.exit() + #print("reconfigure") + subprocess.Popen(['MultiMonitorTool.exe', '/SaveConfig', 'c:\\Program Files\\jaydee\\switcher.cfg']) + myCmd = "powershell switcher.ps1 " + str(myObj["target"]) + " " + str(myObj["status"]) + writeLog(myCmd) + subprocess.Popen(myCmd.split()) + time.sleep(1) + subprocess.Popen(['MultiMonitorTool.exe', '/LoadConfig', 'c:\\Program Files\\jaydee\\switcher.cfg']) + client.publish("sectorq/feedback", payload='{"action":"resp", "source":"ASUS", "dev":{"display' + str(myObj["target"]) + '":'+ str(myObj["status"]) +'} }' , qos=0, retain=False) + if myObj["cmd"] == "displ": + print("Display") + # os.startfile(sys.argv[0]) + #sys.exit() + subprocess.Popen(['/usr/bin/xrandr', '--output', 'HDMI-1-1', '--off']) + + if myObj["cmd"] == "xrandr": + if curos == "Windows": + subprocess.Popen(['MultiMonitorTool.exe', '/LoadConfig', 'c:\\Program Files\\jaydee\\all_on.cfg']) + else: + print("Display") + # os.startfile(sys.argv[0]) + #sys.exit() + os.system("export DISPLAY=:0") + subprocess.Popen(['/usr/bin/xrandr']) + + if myObj["cmd"] == "suspend": + print("suspending") + if curos == "Windows": + if host == "amd" or host == "amd1": + os.system("shutdown /s /t 1") + else: + os.system("rundll32.exe powrprof.dll,SetSuspendState 0,1,0") + #cmnd = "psshutdown -d -t 1" + writeLog(cmnd) + #status, output = subprocess.getstatusoutput(cmnd) + #subprocess.Popen(["psshutdown", "-d", "-t", "1"]) + #writeLog(output) + else: + if host == "nas" or host == "octopi": + subprocess.Popen(["/sbin/poweroff"]) + elif host == "openmediavault" or host == "omv": + subprocess.Popen(["poweroff"]) + else: + #subprocess.Popen(["/bin/systemctl", "suspend", "-i"]) + #subprocess.Popen(["sudo", "pm-suspend"]) + cmnd = "pm-suspend" + status, output = subprocess.getstatusoutput(cmnd) + print(output) + print(status) + if myObj["cmd"] == "stats": + grep = subprocess.Popen(['grep', 'cpu', '/proc/stat'], + stdout=subprocess.PIPE, + ) + + awk = subprocess.Popen(['awk', '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}'], + stdin=grep.stdout, + stdout=subprocess.PIPE, + ) + + # cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}' + + end_of_pipe = awk.stdout + + for line in end_of_pipe: + # print(line.strip()) + # usage = re.sub(r"^b\'|\'$", "", (line.strip())) + cpu = round(float(line.strip().decode("utf-8"))) + free = subprocess.Popen(['free'], + stdout=subprocess.PIPE, + ) + + grep = subprocess.Popen(['grep', 'Mem'], + stdout=subprocess.PIPE, + stdin=free.stdout, + ) + + awk = subprocess.Popen(['awk', '{print $3/$2 * 100.0}'], + stdin=grep.stdout, + stdout=subprocess.PIPE, + ) + + end_of_pipe = awk.stdout + + for line in end_of_pipe: + # print(line.strip()) + # mem = re.sub(r"^b\'|\'$", "", (line.strip())) + mem = round(float(line.strip().decode("utf-8"))) + # mem = re.sub(r"^b\'|\'$", "", mem) + # cpu = re.sub(r"^b\'|\'$", "", cpu) + # print(mem) + jn = {"cpu": cpu, "mem": mem} + jn = json.dumps(jn) + client.publish("sectorq/status/" + host, payload=jn, qos=0, retain=False) + except: + print("not a json!") + +client = mqtt.Client() +payload = "off" +client.username_pw_set("jaydee", password="jaydee1") +client.will_set("sectorq/systems/" + host.lower() + "/stat", payload=payload, qos=0, retain=False) +client.on_connect = on_connect +client.on_message = on_message +writeLog(MQTT_HOST) +client.connect(MQTT_HOST, MQTT_PORT, 5) + +# client.publish("sectorq/status", payload="{'action':'connect', 'system':'" + host + "', 'ip': '" + IP + "', 'mac':'" + mac + "', 'ver':'?'}", qos=0, retain=False) + + +# Blocking call that processes network traffic, dispatches callbacks and +# handles reconnecting. +# Other loop*() functions are available that give a threaded interface and a +# manual interface. + +def checkIfProcessRunning(processName): + ''' + Check if there is any running process that contains the given name processName. + ''' + #Iterate over the all the running process + for proc in psutil.process_iter(): + try: + # Check if process name contains the given name string. + if processName.lower() in proc.name().lower(): + return True + except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess): + pass + return False; + + + +if curos == "Windows": + print("WINDOWS") + #client.loop_forever() + client.loop_start() + NEXT_CHECK = 0 + while True: + print("Version: {}".format(VERSION)) + time.sleep(5) + try: + mtime = os.path.getmtime(sys.argv[0]) + except OSError: + mtime = 0 + print(mtime) + if NEXT_CHECK < int(time.time()): + NEXT_CHECK = int(time.time()) + 10 + writeLog("Blalala : Next : " + str(NEXT_CHECK)) + if curos == "Windows": + if checkIfProcessRunning("aida64.exe"): + aide_refs = { + 'TPCHDIO':"MB_TEMP", + 'TCPU':'CPU_TEMP', + 'SMEMUTI': 'MEM_UTIL', + 'SVIRTMEMUTI': 'VMEM_UTIL', + 'SCPUUTI': 'CPU_UTIL', + 'FCPU': 'FAN_CPU', + 'TGPU1DIO': 'GPU_TEMP', + 'SGPU1BIUTI': 'GPU_UTIL', + 'TMOBO':'MB_TEMP' + } + #ks = ["TCPU", "TPCHDIO", "SMEMUTI", "SVIRTMEMUTI", "SCPUUTI", "FCPU", "TGPU1DIO", "SGPU1BIUTI"] + + + + + path = winreg.HKEY_CURRENT_USER + try: + key = winreg.OpenKeyEx(path, r"SOFTWARE\\FinalWire\\AIDA64\\SensorValues") + results = {} + for k in aide_refs: + k2 = "Value." + str(k) + try: + value = winreg.QueryValueEx(key,k2) + print("{} : {}".format(k, value[0])) + results[aide_refs[k]] = value[0] + except: + pass + except: + print("aida initializing...") + results = {} + + + else: + print("CPU Cnt : {}".format(psutil.cpu_count())) + print(psutil.virtual_memory()) + cpu_usage = psutil.cpu_percent(interval=None) + swap_data = psutil.swap_memory() + print("CPU : {}".format(cpu_usage)) + mem_data = psutil.virtual_memory() + print(mem_data) + print(swap_data) + print("MEM : {}".format(mem_data.percent)) + print(psutil.getloadavg()) + try: + print(psutil.sensors_temperatures()) + except: + pass + try: + print(psutil.sensors_fans()) + except: + pass + results = {"version":VERSION,"MB_TEMP":"NA", "MEM_UTIL":str(mem_data.percent), "CPU_TEMP":"NA", "FAN_CPU":"NA", "VMEM_UTIL":swap_data.percent, "CPU_UTIL":cpu_usage, "GPU_TEMP":"NA", "GPU_UTIL":"NA"} + print(json.dumps(results)) + r = json.dumps(results) + #client.publish("home-assistant/" + host + "/hwstats", payload='{"TPCHDIO":"' + str(results["TPCHDIO"]) + '", "SMEMUTI":"' + str(results["SMEMUTI"]) + '", "TCPU":"' + str(results["TCPU"]) + '", "TGPU1DIO":"' + str(results["TGPU1DIO"]) + '", "SGPU1BIUTI":"' + str(results["SGPU1BIUTI"]) + '", "FCPU":"' + str(results["FCPU"]) + '", "SVIRTMEMUTI":"' + str(results["SVIRTMEMUTI"]) + '", "SCPUUTI":"' + str(results["SCPUUTI"]) + '"}', qos=0, retain=False) + client.publish("home-assistant/" + host + "/hwstats", payload=r, qos=0, retain=False) + #print(json.dumps(stats)) + #writeLog(json.dumps(stats)) +else: + print("Linux") + client.loop_start() + + NEXT_CHECK = 0 + while True: + print(VERSION) + time.sleep(5) + try: + mtime = os.path.getmtime(sys.argv[0]) + except OSError: + mtime = 0 + print(mtime) + if NEXT_CHECK < int(time.time()): + NEXT_CHECK = int(time.time()) + 20 + writeLog("Blalala : Next : " + str(NEXT_CHECK)) + + if host.lower() == "asus": + print(psutil.sensors_temperatures()) + #print(psutil.sensors_fans()) + sences = psutil.sensors_temperatures() + cpu_data = sences["coretemp"][0] + mb_data = sences["acpitz"][0] + fan_data = psutil.sensors_fans()["asus"][0] + mem_data = psutil.virtual_memory() + swap_data = psutil.swap_memory() + #cpu_usage = psutil.cpu_percent(interval=1) + load1, load5, load15 = psutil.getloadavg() + cpu_usage = round((load1/os.cpu_count()) * 100, 1) + + print(mem_data) + print(mem_data.percent) + print(psutil.disk_usage('/')) + #print(psutil.virtual_memory()) + #print(dict(psutil.virtual_memory()._asdict())) + #cmnd = "sensors -j|grep -v \"Can't read\"" + #status, output = subprocess.getstatusoutput(cmnd) + #print(output) + #print(type(output)) + #jn1 = json.loads(output) + + #print(str(jn1["coretemp-isa-0000"]["Package id 0"]["temp1_input"])) + #print(str(jn1["asus-isa-0000"]["cpu_fan"]["fan1_input"])) + #client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":0,\"mem_usage\":0,\"cpu_temp\":0,\"cpu_usage\":0,\"gpu_temp\":0,\"gpu_usage\":0}", qos=0, retain=False) + client.publish("home-assistant/" + host + "/hwstats", payload='{"version":"' + VERSION + '","MB_TEMP":' + str(mb_data.current) + ', "MEM_UTIL":' + str(mem_data.percent) + ', "CPU_TEMP":' + str(cpu_data.current) + ', "GPU_TEMP":0, "GPU_UTIL":0, "FAN_CPU":' + str(fan_data.current) + ', "VMEM_UTIL":' + str(swap_data.percent) + ', "CPU_UTIL":' + str(cpu_usage) + '}', qos=0, retain=False) + elif host.lower() == "openmediavault" or host.lower() == "omv": + #print(psutil.sensors_temperatures()) + #print(psutil.sensors_fans()) + sences = psutil.sensors_temperatures() + #print(sences) + cpu_data = sences["coretemp"][0] + mb_data = sences["acpitz"][0] + mem_data = psutil.virtual_memory() + swap_data = psutil.swap_memory() + #cpu_usage = psutil.cpu_percent(interval=1) + load1, load5, load15 = psutil.getloadavg() + cpu_usage = round((load1/os.cpu_count()) * 100, 1) + print(psutil.getloadavg()) + print("CPU Util : {}".format(cpu_usage)) + print(mem_data) + print(mem_data.percent) + raid_data = psutil.disk_usage('/srv/dev-disk-by-uuid-02fbe97a-cd9a-4511-8bd5-21f8516353ee') + #print(psutil.virtual_memory()) + #print(dict(psutil.virtual_memory()._asdict())) + #cmnd = "sensors -j|grep -v \"Can't read\"" + #status, output = subprocess.getstatusoutput(cmnd) + #print(output) + #print(type(output)) + #jn1 = json.loads(output) + stat_rsync = subprocess.call(["systemctl", "is-active", "--quiet", "rsync"]) + if(stat_rsync == 0): # if 0 (active), print "Active" + stat_rsync = "on" + else: + stat_rsync = "off" + #sdiskusage = psutil.disk_partitions() + disk_usage = raid_data[3] + print(disk_usage) + sys_uptime = str(datetime.timedelta(seconds=round(time.time() - psutil.boot_time(), 0))) + reboot_pending = False + if os.path.exists("/var/run/reboot-required"): + reboot_pending = True + #str(datetime.timedelta(seconds=666)) + #print(str(jn1["coretemp-isa-0000"]["Package id 0"]["temp1_input"])) + #print(str(jn1["asus-isa-0000"]["cpu_fan"]["fan1_input"])) + #client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":0,\"mem_usage\":0,\"cpu_temp\":0,\"cpu_usage\":0,\"gpu_temp\":0,\"gpu_usage\":0}", qos=0, retain=False) + client.publish("home-assistant/" + host + "/hwstats", payload='{"version":"' + VERSION + '","reboot":"' + str(reboot_pending) + '", "uptime":"' + str(sys_uptime) + '", "raid_usage": ' + str(disk_usage) + ',"rsync":"' + str(stat_rsync) +'", "MB_TEMP":' + str(mb_data.current) + ', "MEM_UTIL":' + str(mem_data.percent) + ', "CPU_TEMP":' + str(cpu_data.current) + ', "GPU_TEMP":0, "GPU_UTIL":0, "FAN_CPU":0, "VMEM_UTIL":' + str(swap_data.percent) + ', "CPU_UTIL":' + str(cpu_usage) + '}', qos=0, retain=False) + elif host.lower() == "router": + check_router() + elif host.lower() == "nas": + print("Getting VM info") + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh list --all" + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + l = 1 + lines = output.splitlines() + VMS = {} + for i in lines: + l = l + 1 + if l < 4: + continue + line = re.split(r" {2,}", i) + print(str(line[0].strip()) + " " + str(line[1].strip()) + " " + str(line[2].strip())) + VMS[str(line[1].strip())] = str(line[2].strip()) + + + + for m in VMS: + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + m + #out = subprocess.Popen(cmnd.split()) + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + writeLog(output) + if output.strip() == "running": + client.publish("sectorq/systems/nas/" + m, payload=1, qos=0, retain=True) + else: + client.publish("sectorq/systems/nas/" + m, payload=0, qos=0, retain=True) + + + if FILE_TIMESTAMP != mtime: + writeLog("Script updated ! restarting...") + #os.execv(sys.executable, ['python'] + sys.argv) + #os.system("/share/ZFS530_DATA/.qpkg/QPython39/bin/python3 mqtt_srv.py") + + if host.lower() == "nas": + sys.stdout.flush() + os.execv("/share/ZFS530_DATA/.qpkg/QPython39/bin/python3", sys.argv) + if host.lower() == "router" or host.lower() == "omv": + #sys.stdout.flush() + #os.execv(sys.argv, "") + print("argv was",sys.argv) + print("sys.executable was", sys.executable) + print("restart now") + + os.execv(sys.executable, ['python3'] + sys.argv) + #os.startfile(sys.argv[0]) + sys.exit() \ No newline at end of file diff --git a/mqtt_srv.pyw b/mqtt_srv.pyw new file mode 100644 index 0000000..0863d3f --- /dev/null +++ b/mqtt_srv.pyw @@ -0,0 +1,1123 @@ +#!/usr/bin/env python3 + +from asyncio.log import logger +import paho.mqtt.client as mqtt +from getmac import get_mac_address +import platform +import socket +import re +import subprocess +import os +import json +import sys +import time +import json +import datetime +import ctypes +import getopt +import random +import requests +#import psutil + + +stats = {} +VERSION = "1.0.10" +curos = platform.system() +host = platform.node().lower() +print(host) +if curos == "Windows": + import winreg + +def writeLog(msg, svr="INFO"): + ts = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + if curos == "Windows": + log_path = "c:\Program Files\jaydee\jaydee.log" + else: + log_path = "/tmp/mqtt_srv.log" + f = open(log_path, "a") + f.write(ts + " | " + svr + " | " + str(msg) + "\n") + f.close() + +def check_router(): + cmnd = "nvram get vpn_client1_state" + status, output = subprocess.getstatusoutput(cmnd) + writeLog("Openvpn1 Status : " + str(output)) + stats["vpnclient1"] = output + cmnd = "nvram get vpn_client2_state" + status, output = subprocess.getstatusoutput(cmnd) + writeLog("Openvpn2 Status : " + str(output)) + stats["vpnclient2"] = output + cmnd = "ncat -z 192.168.77.106 25" + status, output = subprocess.getstatusoutput(cmnd) + if status == 0: + stats["mail_nas"] = "available" + else: + stats["mail_nas"] = "unavailable" + cmnd = "ncat -z 192.168.77.246 25" + status, output = subprocess.getstatusoutput(cmnd) + if status == 0: + stats["mail_rasp"] = "available" + else: + stats["mail_rasp"] = "unavailable" + cmnd = "nvram get vts_rulelist" + status, output = subprocess.getstatusoutput(cmnd) + rule_data = output.split("<") + serv_d = {} + for l in rule_data: + rul = l.split(">") + if len(rul) > 3: + if rul[0] == "HTTPS": + serv_d[rul[0]] = {"src_port":rul[1],"dest_ip":rul[2],"dest_port":rul[3],"prot":rul[4]} + stats["serv_dest"] = rul[2] + break + #stats["serv_dest"] = json.dumps(serv_d) + #stats["serv_dest"] = json.dumps(serv_d) + #out = subprocess.Popen(cmnd.split()) + #status, output = subprocess.getstatusoutput(cmnd) + + + ''' + + + print("Getting fw info") + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -m get" + #out = subprocess.Popen(cmnd.split()) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + stats["fw"] = output + #client.publish("sectorq/systems/router/fw", payload=str(output), qos=0, retain=True) + print("Getting wifi info") + cmnd = "/root/router_cmd.sh -t wireless -m get" + #out = subprocess.Popen(cmnd.split()) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + if output != 'allow': + output = 'off' + stats["macfilter"] = output + # if output == "allow":\ + writeLog("Payload : " + str(json.dumps(stats))) + ''' + client.publish("home-assistant/router/hwstats", json.dumps(stats), qos=0, retain=True) + #client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=True) + #else: + # client.publish("sectorq/systems/router/macfilter", payload=0, qos=0, retain=True) + +if host != "router" and host != "nas": + import psutil + + processes = list(p.name() for p in psutil.process_iter()) + # print(processes) + count = processes.count("mqtt_srv.exe") + if int(count) >= 3: + writeLog("script exist") + sys.exit() +else: + cmnd = "ps |grep mqtt_srv.py|grep -v grep |wc -l" + status, output = subprocess.getstatusoutput(cmnd) + count = output + if int(count) >= 2: + writeLog("script exist") + sys.exit() +# Stops duplicate instance from running + +writeLog(count) + +writeLog("Starting : " + str(VERSION)) +writeLog("Getting running proccesses", "DEBUG") + + +writeLog("done", "DEBUG") + +FILE_TIMESTAMP = os.path.getmtime(sys.argv[0]) +def get_sys_env(name): + key = winreg.CreateKey(winreg.HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\Session Manager\Environment") + return winreg.QueryValueEx(key, name)[0] + +def get_user_env(name): + key = winreg.CreateKey(winreg.HKEY_CURRENT_USER, r"Environment") + return winreg.QueryValueEx(key, name)[0] + + +_PUBLISH = _SETVAR = False +try: + opts, args = getopt.getopt(sys.argv[1:], "Sspmt:", ["command=", "help", "output="]) +except getopt.GetoptError as err: + # print help information and exit: + print(str(err)) # will print something like "option -a not recognized" + #usage() + sys.exit(2) +output = None +# QJ : getopts + +for o, a in opts: + if o == "-d": + _ACTION = True + elif o in ("-p", "--publish"): + _PUBLISH = True + elif o in ("-m", "--publish"): + _MESSAGE = a + elif o in ("-t", "--publish"): + _TOPIC = a + elif o in ("-S", "--setvar"): + _SETVAR = True + _THR_NAME = sys.argv[2] + _THR_VAL = sys.argv[3] + else: + _WIZZARD = True +MQTT_HOST = "192.168.77.106" +MQTT_PORT = 1883 + +if _PUBLISH: + # generate client ID with pub prefix randomly + #client_id = f'python-mqtt-{random.randint(0, 1000)}' + client_id = 'python-mqtt-1004' + username = 'jaydee' + password = 'jaydee1' + + def connect_mqtt(): + def on_connect(client, userdata, flags, rc): + if rc == 0: + print("Connected to MQTT Broker!") + else: + print("Failed to connect, return code %d\n", rc) + + client = mqtt.Client(client_id) + client.username_pw_set(username, password) + client.on_connect = on_connect + client.connect(MQTT_HOST, MQTT_PORT) + return client + + + def publish(client): + result = client.publish(_TOPIC, _MESSAGE) + # result: [0, 1] + status = result[0] + if status == 0: + print(f"Send `{_MESSAGE}` to topic `{_TOPIC}`") + else: + print(f"Failed to send message to topic {_TOPIC}") + + client = connect_mqtt() + publish(client) + sys.exit() + +if _SETVAR: + #myCmd = "setx " + _THR_NAME + " " + _THR_VAL + " -m" + myCmd = "setx " + _THR_NAME + " " + _THR_VAL + subprocess.Popen(myCmd.split(), shell=True) + sys.exit() + +from ping3 import ping, verbose_ping + + + + +''' +curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +python get-pip.py +pip3 install getmac +pip3 install paho.mqttdasdas +""" + +''' + +writeLog("Starting daemon in versin : " + VERSION) + +VERS = '1.3' +''' +print("pinging") +lala = ping(MQTT_HOST) + +connected = 0 +while connected == 0: + if type(lala) == float: + print("Oleee connected") + writeLog("Mqtt connected", "INFO") + connected = 1 + else: + print("blaaah not connected, waiting...(5)") + writeLog("blaaah not connected, waiting...(5)") + time.sleep(5) + lala = ping(MQTT_HOST) +''' + +# Function to display hostname and +# IP address +def get_ip(): + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + try: + # doesn't even have to be reachable + s.connect(('192.168.77.1', 1)) + IP = s.getsockname()[0] + except ValueError: + IP = '127.0.0.1' + finally: + s.close() + return IP + + +IP = get_ip() + + +print("OS : " + curos) +writeLog("OS : " + curos) +if curos != "Windows": + import autorandr +else: + import winreg + + +if host == "raspberrypi": + mac = str(get_mac_address("eth0")) +elif host == "SERVER": + mac = str(get_mac_address("enp2s0")) +elif host == "ASUS" and curos != "Windows": + mac = str(get_mac_address("enp3s0f1")) +else: + mac = str(get_mac_address("Ethernet")) + + +print("MAC : " + mac) +writeLog("MAC : " + mac) +print("SYSTEM : " + host) +writeLog("SYSTEM : " + host) +print("IP : " + IP) +writeLog("IP : " + IP) + +flag_connected = 0 +# The callback for when the client receives a CONNACK response from the server. +def on_connect(client, userdata, flags, rc): + print("Connected with result code " + str(rc)) + writeLog("Connected with result code " + str(rc)) + global flag_connected + flag_connected = 1 + # Subscribing in on_connect() means that if we lose the connection and + # reconnect then subscriptions will be renewed. + topic = "sectorq/systems/" + host.lower() + print(topic) + writeLog(topic) + time.sleep(1) + client.publish("sectorq/status", payload="{'action':'connect', 'system':'" + host.lower() + "', 'ip': '" + IP + "', 'mac':'" + mac + "', 'ver':'" + VERS + "'}", qos=0, retain=False) + client.publish("sectorq/systems/" + host.lower() + "/stat", payload="on", qos=0, retain=True) + if host.lower() == "router": + check_router() + + if host.lower() == "nas": + print("Getting VM info") + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh list --all" + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + l = 1 + lines = output.splitlines() + VMS = {} + for i in lines: + l = l + 1 + if l < 4: + continue + line = re.split(r" {2,}", i) + print(str(line[0].strip()) + " " + str(line[1].strip()) + " " + str(line[2].strip())) + VMS[str(line[1].strip())] = str(line[2].strip()) + + + + for m in VMS: + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + m + #out = subprocess.Popen(cmnd.split()) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + if output.strip() == "running": + client.publish("sectorq/systems/nas/" + m, payload=1, qos=0, retain=True) + else: + client.publish("sectorq/systems/nas/" + m, payload=0, qos=0, retain=True) + + + client.subscribe(topic) + +def on_disconnect(client, userdata, rc): + print("disconnecting reason " +str(rc)) + writeLog("disconnecting reason " +str(rc)) + client.connected_flag=False + client.disconnect_flag=True + global flag_connected + flag_connected = 0 + + +# The callback for when a PUBLISH message is received from the server. +def on_message(client, userdata, msg): + print(msg.topic) + print(msg.payload) + myObj = msg.payload.decode('utf-8') + # command = re.sub(r"^b\'|\'$", "", str(msg.payload)) + # command = json.loads(msg.payload.decode("utf-8")) + try: + myObj = json.loads(msg.payload) + try: + writeLog(myObj["action"]) + print(myObj["action"]) + except: + print("Action not set") + writeLog("Action not set", "WARNING") + + try: + print(myObj["cmd"]) + writeLog(myObj["cmd"]) + except: + print("Cmd not set") + writeLog("Cmd not set", "WARNING") + + try: + print(myObj["target"]) + writeLog(myObj["target"]) + except: + print("Target Not Set") + writeLog("Target Not Set", "WARNING") + try: + print(myObj["status"]) + writeLog(myObj["status"]) + except: + print("Status Not Set") + writeLog("Status Not Set") + + try: + print(myObj["command"]) + writeLog(myObj["command"]) + except: + print("Command Not Set") + writeLog("Command Not Set") + + try: + print(myObj["cmd_line"]) + writeLog(myObj["cmd_line"]) + except: + print("Cmd_line Not Set") + writeLog("Cmd_line Not Set") + + + if myObj["cmd"] == "command": + + print("Executing " + myObj["cmd_line"]) + writeLog("Executing " + myObj["cmd_line"]) + #os.system('start /b "' + myObj["cmd_line"] + '"') + try: + subprocess.Popen(myObj["cmd_line"].split(), shell=True) + #subprocess.Popen(myObj["cmd_line"].split()) + # ctypes.windll.user32.MessageBoxW(0, myObj["cmd_line"], "Executed", 64) + except: + ctypes.windll.user32.MessageBoxW(0, "Your text", "Your title", 16) + print("Executed " + myObj["cmd_line"]) + writeLog("Executed " + myObj["cmd_line"]) + + if myObj["cmd"] == "nas_cmd": + print("Executing NAS") + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + str(myObj["target"]) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + print(output) + cmd_type = myObj["command"] + if myObj["command"] == "start": + if output.strip() == "paused": + print("System suspended") + cmd_type = "resume" + else: + print("System Off") + cmd_type = "start" + if myObj["command"] == "suspend": + cmd_type = "shutdown" + + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh " + cmd_type + " " + str(myObj["target"]) + subprocess.Popen(cmnd.split()) + print(cmnd) + if myObj["command"] == "start": + try: + print("sending") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload=1, qos=0, retain=False) + except: + print("failed to execute!") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload="failed", qos=0, retain=False) + else: + try: + print("sending") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload=0, qos=0, retain=False) + except: + print("failed to execute!") + client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload="failed", qos=0, retain=False) + + + if myObj["cmd"] == "distrib": + print("distributin313g") + # os.startfile(sys.argv[0]) + #sys.exit() + subprocess.Popen(['/bin/systemctl', 'restart', 'mqtt']) + + if myObj["cmd"] == "uci": + print("uci1") + print("Executing " + myObj["cmd_line"]) + writeLog("Executing " + myObj["cmd_line"]) + + if myObj["cmd_line"] == "wireless1": + cmnd = "/root/router_cmd.sh -t wireless -v 1 -m set" + try: + subprocess.Popen(cmnd.split()) + print("sending") + stats["macfilter"] = "allow" + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + + elif myObj["cmd_line"] == "wireless0": + cmnd = "/root/router_cmd.sh -t wireless -v 0 -m set" + try: + subprocess.Popen(cmnd.split()) + print("sending") + stats["macfilter"] = "off" + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + elif myObj["cmd_line"] == "fw0": + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -p enabled -v 0 -m set" + try: + subprocess.Popen(cmnd.split()) + print("sending") + stats["fw"] = 0 + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + elif myObj["cmd_line"] == "fw1": + cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -p enabled -v 1 -m set" + try: + #subprocess.Popen(myObj["cmd_line"].split(), shell=True) + subprocess.Popen(cmnd.split()) + # ctypes.windll.user32.MessageBoxW(0, myObj["cmd_line"], "Executed", 64) + print("sending") + stats["fw"] = 1 + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False) + writeLog("Payload : " + json.dumps(stats)) + except: + print("failed to execute!") + client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False) + elif myObj["cmd_line"] == "openvpn": + cmnd = "service {}".format(myObj["target"]) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + elif myObj["cmd_line"] == "serv_dest": + writeLog("Payload111111 : " + myObj["target"].lower()) + + cmnd = "nvram get vts_rulelist" + status, output = subprocess.getstatusoutput(cmnd) + rule_data = output.split("<") + serv_d = {} + writeLog("Payload111112") + for l in rule_data: + rul = l.split(">") + if len(rul) > 3: + serv_d[rul[0]] = {"src_port":rul[1],"dest_ip":rul[2],"dest_port":rul[3],"prot":rul[4]} + stats["serv_dest"] = rul[2] + writeLog("Payload111113") + rules = {"HTTPS":{"dest_ip":"192.168.77.106","src_port":443,"dest_port":443,"prot":"TCP"}, + "HTTP":{"dest_ip":"192.168.77.106","src_port":80,"dest_port":80,"prot":"TCP"}, + "EMAIL_25":{"dest_ip":"192.168.77.106","src_port":25,"dest_port":25,"prot":"TCP"}, + "EMAIL_465":{"dest_ip":"192.168.77.106","src_port":465,"dest_port":465,"prot":"TCP"}, + "EMAIL_993":{"dest_ip":"192.168.77.106","src_port":993,"dest_port":993,"prot":"TCP"}, + "EMAIL_995":{"dest_ip":"192.168.77.106","src_port":995,"dest_port":995,"prot":"TCP"}, + "EMAIL_587":{"dest_ip":"192.168.77.106","src_port":587,"dest_port":587,"prot":"TCP"}, + "EMAIL_143":{"dest_ip":"192.168.77.106","src_port":143,"dest_port":143,"prot":"TCP"}} + writeLog("Payload1111135") + print(json.dumps(serv_d)) + for r in rules: + print(r) + try: + serv_d[r]["dest_ip"] = myObj["target"] + except: + serv_d[r] = rules[r] + + lala = [] + for sr in serv_d: + lala.append("{}>{}>{}>{}>{}>".format(sr,serv_d[sr]["src_port"],serv_d[sr]["dest_ip"],serv_d[sr]["dest_port"],serv_d[sr]["prot"])) + la = "<".join(lala) + la = "<{}".format(la) + print(la) + cmnd = "nvram set vts_rulelist=\"{}\"".format(la) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + cmnd = "nvram commit" + status, output = subprocess.getstatusoutput(cmnd) + cmnd = "service restart_firewall" + status, output = subprocess.getstatusoutput(cmnd) + writeLog("Payload111114") + writeLog(output) + print(json.dumps(serv_d)) + ''' + if myObj["target"].lower() == "192.168.77.246": + dest_ip = "192.168.77.246" + elif myObj["target"].lower() == "192.168.77.106": + dest_ip = "192.168.77.106" + + + + + RULES = ["EMAIL993", "EMAIL995", "EMAIL143", "EMAIL25", "EMAIL993", "EMAIL465", "HTTPS", "HTTP"] + for i in RULES: + cmnd = "uci set firewall.{}.dest_ip={}".format(i,dest_ip) + writeLog(cmnd) + subprocess.Popen(cmnd.split()) + + #cmnd = "uci set dhcp.@dnsmasq[0].address=/mqtt_broker/" + dest_ip + #writeLog(cmnd) + #subprocess.Popen(cmnd.split()) + time.sleep(1) + cmnd = "uci commit" + + subprocess.Popen(cmnd.split()) + + writeLog("Starting " + myObj["target"].lower()) + if myObj["target"].lower() == "192.168.77.246": + dest_ip = "192.168.77.246" + + + cmnd = "ssh root@192.168.77.246 'docker start mailu_resolver_1 mailu_redis_1 mailu_front_1 mailu_antispam_1 mailu_imap_1 mailu_admin_1 mailu_smtp_1 mailu_webmail_1 watchtower_watchtower_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 HomeAssistant webhub_client_1 dockermon_docker_mon_1 mosquitto_mosquitto_1 node-red_node-red_1 nextcloud_db_1 nextcloud_app_1'" + status, output = subprocess.getstatusoutput(cmnd) + elif myObj["target"].lower() == "192.168.77.106": + dest_ip = "192.168.77.106" + cmnd = "ssh root@192.168.77.246 'docker stop mailu_resolver_1 mailu_redis_1 mailu_front_1 mailu_antispam_1 mailu_imap_1 mailu_admin_1 mailu_smtp_1 mailu_webmail_1 watchtower_watchtower_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 HomeAssistant webhub_client_1 dockermon_docker_mon_1 mosquitto_mosquitto_1 node-red_node-red_1 nextcloud_db_1 nextcloud_app_1'" + status, output = subprocess.getstatusoutput(cmnd) + time.sleep(1) + cmnd = "/etc/init.d/firewall restart" + subprocess.Popen(cmnd.split()) + #cmnd = "/etc/init.d/dnsmasq restart" + #subprocess.Popen(cmnd.split()) + writeLog("reconfigure iot") + MQTT_BROKER = dest_ip + MQTT_USER = "jaydee" + MQTT_PASS = "jaydee1" + + cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\"" + #print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + # print(output) + + ips = output.splitlines() + tasm_data = {} + for sys_ip in ips: + # print("Thsis is ip : " + sys_ip) + cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\"" + status, output = subprocess.getstatusoutput(cmnd) + # print("status of 80 : " + str(status)) + if status == 0: + try: + # url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5" + + url = "http://" + sys_ip + "/cm?cmnd=Backlog%20MqttHost%20" + MQTT_BROKER + "%3BMqttUser%20" + MQTT_USER + "%3BMqttPassword%20" + MQTT_PASS + print(url) + requests.get(url) + + except: + #print(sys_ip + " : Not a tasmota!") + pass + else: + #print(sys_ip + " : Not a listening") + pass + + + + time.sleep(1) + cmnd = "sed -i 's/^MQTT_HOST = .*/MQTT_HOST = \"" + dest_ip + "\"/' /root/mqtt_srv.py" + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + #for i in ;do uci set firewall.${i}.dest_ip=192.168.77.246;done;uci set firewall.HTTPS.dest_port='443';uci set firewall.HTTP.dest_port='80' ;uci commit;/etc/init.d/firewall restart + else: + pass + #cmnd = "/root/router_cmd.sh -t wireless -v 0" + + + print("Executed " + cmnd) + writeLog("Executed " + cmnd) + ''' + + + if myObj["cmd"] == "banip": + if myObj["status"] == "ban": + cmnd = "echo " + str(myObj["target"]) + " >> /etc/banip/banip.blacklist; /etc/init.d/banip refresh" + elif myObj["status"] == "enable": + cmnd = "/etc/init.d/banip resume" + stats["banip"] = "enabled" + elif myObj["status"] == "disable": + cmnd = "/etc/init.d/banip suspend" + stats["banip"] = "paused" + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=True) + + if myObj["cmd"] == "vnc": + print(myObj["target"]) + writeLog(myObj["target"]) + + # os.startfile(sys.argv[0]) + #sys.exit() + myCmd = 'c:\\Program Files\\RealVNC\\VNC Viewer\\vncviewer.exe C:\\Users\\jaydee\\' + myObj["target"].upper() + '.vnc' + print(myCmd) + writeLog(myCmd) + subprocess.Popen(myCmd.split()) + if myObj["cmd"] == "getstats": + print("lalaa1") + try: + client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":" + get_user_env('mb_temp') + ",\"mem_usage\":" + get_user_env('mem_usage') + ",\"cpu_temp\":" + get_user_env('cpu_temp') + ",\"cpu_usage\":" + get_user_env('cpu_usage') + ",\"gpu_temp\":" + get_user_env('gpu_temp') + ",\"gpu_usage\":" + get_user_env('gpu_usage') + "}", qos=0, retain=False) + print("ok") + except: + print("failed") + client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":0,\"mem_usage\":0,\"cpu_temp\":0,\"cpu_usage\":0,\"gpu_temp\":0,\"gpu_usage\":0}", qos=0, retain=False) + + print("lalaa2") + + if myObj["cmd"] == "display": + if curos == "Windows1": + # os.startfile(sys.argv[0]) + #sys.exit() + #print("reconfigure") + myCmd = 'MonitorSwitcher.exe -load:' + myObj["target"] + '.xml' + writeLog(myCmd) + #writeLog(os.path.realpath(__file__)) + print("lalaa2") + #subprocess.Popen(r'"{}"'.format(myCmd), shell=True) + print("lalaa3") + subprocess.Popen(myCmd.split(), shell=True,cwd=r'c:\Progra~1\jaydee') + else: + ''' + myCmd = "" + if myObj["target"] == "mid": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --off --output eDP-1 --off" + elif myObj["target"] == "all": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080" + elif myObj["target"] == "midleft": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --off" + elif myObj["target"] == "midtop": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --off --output eDP-1 --off" + elif myObj["target"] == "midleftbuild": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080" + elif myObj["target"] == "midbuild": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --off --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080" + elif myObj["target"] == "midlefttop": + myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --off" + else: + pass + + if myCmd != "": + print(myCmd) + subprocess.Popen(myCmd.split()) + ''' + myCmd = "" + writeLog(myObj["target"]) + if curos == "Windows": + if myObj["target"] == "mid": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile mid" + elif myObj["target"] == "all": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile all" + elif myObj["target"] == "left": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile left" + elif myObj["target"] == "midleft": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midleft" + elif myObj["target"] == "midtop": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midtop" + elif myObj["target"] == "midleftbuild": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midleftbuild" + elif myObj["target"] == "midbuild": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midbuild" + elif myObj["target"] == "midlefttop": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midlefttop" + elif myObj["target"] == "build": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile build" + elif myObj["target"] == "midtopbuild": + myCmd = "DisplayFusionCommand.exe -monitorloadprofile midtopbuild" + else: + pass + else: + ''' + mon1 = "HDMI-1-1" + mon2 = "HDMI-1-2" + mon3 = "DVI-I-2-1" + mon4 = "eDP-1-1" + ''' + mon1 = "HDMI-1" + mon2 = "HDMI-2" + mon3 = "DVI-I-2-1" + mon4 = "eDP-1" + + if myObj["target"] == "mid": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " +mon1 + " --off --output " + mon4 + " --off" + elif myObj["target"] == "left": + myCmd = "xrandr --output " + mon1 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " +mon2 + " --off --output " + mon4 + " --off" + + elif myObj["target"] == "all": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --auto --right-of " + mon2 + " --mode 1920x1080 --output " + mon1 + " --auto --left-of " + mon2 + " --mode 1920x1080 --output " + mon4 + " --auto --right-of " + mon2 + " --mode 1920x1080" + elif myObj["target"] == "midleft": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " + mon1 + " --auto --left-of " + mon2 + " --mode 1920x1080 --output " + mon4 + " --off" + elif myObj["target"] == "midtop": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --auto --right-of " + mon2 + " --mode 1920x1080 --output " + mon1 + " --off --output " + mon4 + " --off" + elif myObj["target"] == "midleftbuild": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " + mon1 + " --auto --left-of " + mon2 + " --mode 1920x1080 --output " + mon4 + " --auto --right-of " + mon2 + " --mode 1920x1080" + elif myObj["target"] == "midbuild": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --off --output " + mon1 + " --off --output " + mon4 + " --auto --right-of " + mon2 + " --mode 1920x1080" + elif myObj["target"] == "midlefttop": + myCmd = "xrandr --output " + mon2 + " --primary --auto --mode 1920x1080 --output " + mon3 + " --auto --right-of " + mon2 + " --mode 1920x1080 --output " + mon1 + " --auto --left-of " + mon2 + " --mode 1920x1080 --output " + mon4 + " --off" + elif myObj["target"] == "build": + myCmd = "xrandr --output " + mon2 + " --off --output " + mon3 + " --off --output " + mon1 + " --off --output " + mon4 + " --auto --mode 1920x1080" + else: + pass + + writeLog(myCmd) + if myCmd != "": + print(myCmd) + subprocess.Popen(myCmd.split()) + + if myObj["cmd"] == "display2": + # os.startfile(sys.argv[0]) + #sys.exit() + #print("reconfigure") + subprocess.Popen(['MultiMonitorTool.exe', '/SaveConfig', 'c:\\Program Files\\jaydee\\switcher.cfg']) + myCmd = "powershell switcher.ps1 " + str(myObj["target"]) + " " + str(myObj["status"]) + writeLog(myCmd) + subprocess.Popen(myCmd.split()) + time.sleep(1) + subprocess.Popen(['MultiMonitorTool.exe', '/LoadConfig', 'c:\\Program Files\\jaydee\\switcher.cfg']) + client.publish("sectorq/feedback", payload='{"action":"resp", "source":"ASUS", "dev":{"display' + str(myObj["target"]) + '":'+ str(myObj["status"]) +'} }' , qos=0, retain=False) + if myObj["cmd"] == "displ": + print("Display") + # os.startfile(sys.argv[0]) + #sys.exit() + subprocess.Popen(['/usr/bin/xrandr', '--output', 'HDMI-1-1', '--off']) + + if myObj["cmd"] == "xrandr": + if curos == "Windows": + subprocess.Popen(['MultiMonitorTool.exe', '/LoadConfig', 'c:\\Program Files\\jaydee\\all_on.cfg']) + else: + print("Display") + # os.startfile(sys.argv[0]) + #sys.exit() + os.system("export DISPLAY=:0") + subprocess.Popen(['/usr/bin/xrandr']) + + if myObj["cmd"] == "suspend": + print("suspending") + if curos == "Windows": + if host == "amd" or host == "amd1": + os.system("shutdown /s /t 1") + else: + os.system("rundll32.exe powrprof.dll,SetSuspendState 0,1,0") + #cmnd = "psshutdown -d -t 1" + writeLog(cmnd) + #status, output = subprocess.getstatusoutput(cmnd) + #subprocess.Popen(["psshutdown", "-d", "-t", "1"]) + #writeLog(output) + else: + if host == "nas" or host == "octopi": + subprocess.Popen(["/sbin/poweroff"]) + elif host == "openmediavault" or host == "omv": + subprocess.Popen(["poweroff"]) + else: + #subprocess.Popen(["/bin/systemctl", "suspend", "-i"]) + #subprocess.Popen(["sudo", "pm-suspend"]) + cmnd = "pm-suspend" + status, output = subprocess.getstatusoutput(cmnd) + print(output) + print(status) + if myObj["cmd"] == "stats": + grep = subprocess.Popen(['grep', 'cpu', '/proc/stat'], + stdout=subprocess.PIPE, + ) + + awk = subprocess.Popen(['awk', '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}'], + stdin=grep.stdout, + stdout=subprocess.PIPE, + ) + + # cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}' + + end_of_pipe = awk.stdout + + for line in end_of_pipe: + # print(line.strip()) + # usage = re.sub(r"^b\'|\'$", "", (line.strip())) + cpu = round(float(line.strip().decode("utf-8"))) + free = subprocess.Popen(['free'], + stdout=subprocess.PIPE, + ) + + grep = subprocess.Popen(['grep', 'Mem'], + stdout=subprocess.PIPE, + stdin=free.stdout, + ) + + awk = subprocess.Popen(['awk', '{print $3/$2 * 100.0}'], + stdin=grep.stdout, + stdout=subprocess.PIPE, + ) + + end_of_pipe = awk.stdout + + for line in end_of_pipe: + # print(line.strip()) + # mem = re.sub(r"^b\'|\'$", "", (line.strip())) + mem = round(float(line.strip().decode("utf-8"))) + # mem = re.sub(r"^b\'|\'$", "", mem) + # cpu = re.sub(r"^b\'|\'$", "", cpu) + # print(mem) + jn = {"cpu": cpu, "mem": mem} + jn = json.dumps(jn) + client.publish("sectorq/status/" + host, payload=jn, qos=0, retain=False) + except: + print("not a json!") + +client = mqtt.Client() +payload = "off" +client.username_pw_set("jaydee", password="jaydee1") +client.will_set("sectorq/systems/" + host.lower() + "/stat", payload=payload, qos=0, retain=False) +client.on_connect = on_connect +client.on_message = on_message +writeLog(MQTT_HOST) +client.connect(MQTT_HOST, MQTT_PORT, 5) + +# client.publish("sectorq/status", payload="{'action':'connect', 'system':'" + host + "', 'ip': '" + IP + "', 'mac':'" + mac + "', 'ver':'?'}", qos=0, retain=False) + + +# Blocking call that processes network traffic, dispatches callbacks and +# handles reconnecting. +# Other loop*() functions are available that give a threaded interface and a +# manual interface. + +def checkIfProcessRunning(processName): + ''' + Check if there is any running process that contains the given name processName. + ''' + #Iterate over the all the running process + for proc in psutil.process_iter(): + try: + # Check if process name contains the given name string. + if processName.lower() in proc.name().lower(): + return True + except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess): + pass + return False; + + + +if curos == "Windows": + print("WINDOWS") + #client.loop_forever() + client.loop_start() + NEXT_CHECK = 0 + while True: + print("Version: {}".format(VERSION)) + time.sleep(5) + try: + mtime = os.path.getmtime(sys.argv[0]) + except OSError: + mtime = 0 + print(mtime) + if NEXT_CHECK < int(time.time()): + NEXT_CHECK = int(time.time()) + 10 + writeLog("Blalala : Next : " + str(NEXT_CHECK)) + if curos == "Windows": + if checkIfProcessRunning("aida64.exe"): + aide_refs = { + 'TPCHDIO':"MB_TEMP", + 'TCPU':'CPU_TEMP', + 'SMEMUTI': 'MEM_UTIL', + 'SVIRTMEMUTI': 'VMEM_UTIL', + 'SCPUUTI': 'CPU_UTIL', + 'FCPU': 'FAN_CPU', + 'TGPU1DIO': 'GPU_TEMP', + 'SGPU1BIUTI': 'GPU_UTIL', + 'TMOBO':'MB_TEMP' + } + #ks = ["TCPU", "TPCHDIO", "SMEMUTI", "SVIRTMEMUTI", "SCPUUTI", "FCPU", "TGPU1DIO", "SGPU1BIUTI"] + + + + + path = winreg.HKEY_CURRENT_USER + try: + key = winreg.OpenKeyEx(path, r"SOFTWARE\\FinalWire\\AIDA64\\SensorValues") + results = {} + for k in aide_refs: + k2 = "Value." + str(k) + try: + value = winreg.QueryValueEx(key,k2) + print("{} : {}".format(k, value[0])) + results[aide_refs[k]] = value[0] + except: + pass + except: + print("aida initializing...") + results = {} + + + else: + print("CPU Cnt : {}".format(psutil.cpu_count())) + print(psutil.virtual_memory()) + cpu_usage = psutil.cpu_percent(interval=None) + swap_data = psutil.swap_memory() + print("CPU : {}".format(cpu_usage)) + mem_data = psutil.virtual_memory() + print(mem_data) + print(swap_data) + print("MEM : {}".format(mem_data.percent)) + print(psutil.getloadavg()) + try: + print(psutil.sensors_temperatures()) + except: + pass + try: + print(psutil.sensors_fans()) + except: + pass + results = {"MB_TEMP":"NA", "MEM_UTIL":str(mem_data.percent), "CPU_TEMP":"NA", "FAN_CPU":"NA", "VMEM_UTIL":swap_data.percent, "CPU_UTIL":cpu_usage, "GPU_TEMP":"NA", "GPU_UTIL":"NA"} + print(json.dumps(results)) + r = json.dumps(results) + #client.publish("home-assistant/" + host + "/hwstats", payload='{"TPCHDIO":"' + str(results["TPCHDIO"]) + '", "SMEMUTI":"' + str(results["SMEMUTI"]) + '", "TCPU":"' + str(results["TCPU"]) + '", "TGPU1DIO":"' + str(results["TGPU1DIO"]) + '", "SGPU1BIUTI":"' + str(results["SGPU1BIUTI"]) + '", "FCPU":"' + str(results["FCPU"]) + '", "SVIRTMEMUTI":"' + str(results["SVIRTMEMUTI"]) + '", "SCPUUTI":"' + str(results["SCPUUTI"]) + '"}', qos=0, retain=False) + client.publish("home-assistant/" + host + "/hwstats", payload=r, qos=0, retain=False) + #print(json.dumps(stats)) + #writeLog(json.dumps(stats)) +else: + print("Linux") + client.loop_start() + + NEXT_CHECK = 0 + while True: + print(VERSION) + time.sleep(5) + try: + mtime = os.path.getmtime(sys.argv[0]) + except OSError: + mtime = 0 + print(mtime) + if NEXT_CHECK < int(time.time()): + NEXT_CHECK = int(time.time()) + 20 + writeLog("Blalala : Next : " + str(NEXT_CHECK)) + + if host.lower() == "asus": + print(psutil.sensors_temperatures()) + #print(psutil.sensors_fans()) + sences = psutil.sensors_temperatures() + cpu_data = sences["coretemp"][0] + mb_data = sences["acpitz"][0] + fan_data = psutil.sensors_fans()["asus"][0] + mem_data = psutil.virtual_memory() + swap_data = psutil.swap_memory() + #cpu_usage = psutil.cpu_percent(interval=1) + load1, load5, load15 = psutil.getloadavg() + cpu_usage = round((load1/os.cpu_count()) * 100, 1) + + print(mem_data) + print(mem_data.percent) + print(psutil.disk_usage('/')) + #print(psutil.virtual_memory()) + #print(dict(psutil.virtual_memory()._asdict())) + #cmnd = "sensors -j|grep -v \"Can't read\"" + #status, output = subprocess.getstatusoutput(cmnd) + #print(output) + #print(type(output)) + #jn1 = json.loads(output) + + #print(str(jn1["coretemp-isa-0000"]["Package id 0"]["temp1_input"])) + #print(str(jn1["asus-isa-0000"]["cpu_fan"]["fan1_input"])) + #client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":0,\"mem_usage\":0,\"cpu_temp\":0,\"cpu_usage\":0,\"gpu_temp\":0,\"gpu_usage\":0}", qos=0, retain=False) + client.publish("home-assistant/" + host + "/hwstats", payload='{"MB_TEMP":' + str(mb_data.current) + ', "MEM_UTIL":' + str(mem_data.percent) + ', "CPU_TEMP":' + str(cpu_data.current) + ', "GPU_TEMP":0, "GPU_UTIL":0, "FAN_CPU":' + str(fan_data.current) + ', "VMEM_UTIL":' + str(swap_data.percent) + ', "CPU_UTIL":' + str(cpu_usage) + '}', qos=0, retain=False) + elif host.lower() == "openmediavault" or host.lower() == "omv": + #print(psutil.sensors_temperatures()) + #print(psutil.sensors_fans()) + sences = psutil.sensors_temperatures() + #print(sences) + cpu_data = sences["coretemp"][0] + mb_data = sences["acpitz"][0] + mem_data = psutil.virtual_memory() + swap_data = psutil.swap_memory() + #cpu_usage = psutil.cpu_percent(interval=1) + load1, load5, load15 = psutil.getloadavg() + cpu_usage = round((load1/os.cpu_count()) * 100, 1) + print(psutil.getloadavg()) + print("CPU Util : {}".format(cpu_usage)) + print(mem_data) + print(mem_data.percent) + raid_data = psutil.disk_usage('/srv/dev-disk-by-uuid-02fbe97a-cd9a-4511-8bd5-21f8516353ee') + #print(psutil.virtual_memory()) + #print(dict(psutil.virtual_memory()._asdict())) + #cmnd = "sensors -j|grep -v \"Can't read\"" + #status, output = subprocess.getstatusoutput(cmnd) + #print(output) + #print(type(output)) + #jn1 = json.loads(output) + stat_rsync = subprocess.call(["systemctl", "is-active", "--quiet", "rsync"]) + if(stat_rsync == 0): # if 0 (active), print "Active" + stat_rsync = "on" + else: + stat_rsync = "off" + #sdiskusage = psutil.disk_partitions() + disk_usage = raid_data[3] + print(disk_usage) + sys_uptime = str(datetime.timedelta(seconds=round(time.time() - psutil.boot_time(), 0))) + reboot_pending = False + if os.path.exists("/var/run/reboot-required"): + reboot_pending = True + #str(datetime.timedelta(seconds=666)) + #print(str(jn1["coretemp-isa-0000"]["Package id 0"]["temp1_input"])) + #print(str(jn1["asus-isa-0000"]["cpu_fan"]["fan1_input"])) + #client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":0,\"mem_usage\":0,\"cpu_temp\":0,\"cpu_usage\":0,\"gpu_temp\":0,\"gpu_usage\":0}", qos=0, retain=False) + client.publish("home-assistant/" + host + "/hwstats", payload='{"reboot":"' + str(reboot_pending) + '", "uptime":"' + str(sys_uptime) + '", "raid_usage": ' + str(disk_usage) + ',"rsync":"' + str(stat_rsync) +'", "MB_TEMP":' + str(mb_data.current) + ', "MEM_UTIL":' + str(mem_data.percent) + ', "CPU_TEMP":' + str(cpu_data.current) + ', "GPU_TEMP":0, "GPU_UTIL":0, "FAN_CPU":0, "VMEM_UTIL":' + str(swap_data.percent) + ', "CPU_UTIL":' + str(cpu_usage) + '}', qos=0, retain=False) + elif host.lower() == "router": + check_router() + elif host.lower() == "nas": + print("Getting VM info") + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh list --all" + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + l = 1 + lines = output.splitlines() + VMS = {} + for i in lines: + l = l + 1 + if l < 4: + continue + line = re.split(r" {2,}", i) + print(str(line[0].strip()) + " " + str(line[1].strip()) + " " + str(line[2].strip())) + VMS[str(line[1].strip())] = str(line[2].strip()) + + + + for m in VMS: + + cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + m + #out = subprocess.Popen(cmnd.split()) + writeLog(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + writeLog(output) + if output.strip() == "running": + client.publish("sectorq/systems/nas/" + m, payload=1, qos=0, retain=True) + else: + client.publish("sectorq/systems/nas/" + m, payload=0, qos=0, retain=True) + + + if FILE_TIMESTAMP != mtime: + writeLog("Script updated ! restarting...") + #os.execv(sys.executable, ['python'] + sys.argv) + #os.system("/share/ZFS530_DATA/.qpkg/QPython39/bin/python3 mqtt_srv.py") + + if host.lower() == "nas": + sys.stdout.flush() + os.execv("/share/ZFS530_DATA/.qpkg/QPython39/bin/python3", sys.argv) + if host.lower() == "router": + #sys.stdout.flush() + sys.exit() + #os.execv("/usr/bin/python3", sys.argv) diff --git a/mqtt_srv.spec b/mqtt_srv.spec new file mode 100644 index 0000000..e938e66 --- /dev/null +++ b/mqtt_srv.spec @@ -0,0 +1,44 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis( + ['mqtt_srv.pyw'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, +) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='mqtt_srv', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) diff --git a/mqtt_srv.version b/mqtt_srv.version new file mode 100644 index 0000000..17216fe --- /dev/null +++ b/mqtt_srv.version @@ -0,0 +1,43 @@ +# UTF-8 +# +# For more details about fixed file info 'ffi' see: +# http://msdn.microsoft.com/en-us/library/ms646997.aspx +VSVersionInfo( + ffi=FixedFileInfo( +# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) +# Set not needed items to zero 0. +filevers=(1, 0, 0, 0), +prodvers=(1, 0, 0, 0), +# Contains a bitmask that specifies the valid bits 'flags'r +mask=0x3f, +# Contains a bitmask that specifies the Boolean attributes of the file. +flags=0x0, +# The operating system for which this file was designed. +# 0x4 - NT and there is no need to change it. +OS=0x4, +# The general type of file. +# 0x1 - the file is an application. +fileType=0x1, +# The function of the file. +# 0x0 - the function is not defined for this fileType +subtype=0x0, +# Creation date and time stamp. +date=(0, 0) +), + kids=[ +StringFileInfo( + [ + StringTable( + u'040904B0', + [StringStruct(u'CompanyName', u'Jaydee'), + StringStruct(u'FileDescription', u'Jaydee'), + StringStruct(u'FileVersion', u'1.0.0'), + StringStruct(u'InternalName', u'SVN'), + StringStruct(u'LegalCopyright', u'Copyright (c) Jaydee'), + StringStruct(u'OriginalFilename', u'mqtt_srv.exe'), + StringStruct(u'ProductName', u'Subversion'), + StringStruct(u'ProductVersion', u'1.0.0 (r0)')]) + ]), +VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) + ] +) \ No newline at end of file diff --git a/omv_backups copy.py b/omv_backups copy.py new file mode 100644 index 0000000..258bcc0 --- /dev/null +++ b/omv_backups copy.py @@ -0,0 +1,73 @@ +import subprocess +import time +import datetime + +backups = { + "__GITHUB":"admin@192.168.77.106:/share/Data/__GITHUB", + "Photo":"admin@192.168.77.106:/share/Photo/Years" +} + +for b in backups: + SOURCE_DIR=backups[b] + now = datetime.datetime.now() + BACKUP_DIR="/srv/dev-disk-by-uuid-02fbe97a-cd9a-4511-8bd5-21f8516353ee/{}".format(b) + DATETIME = now.strftime("%Y-%m-%d_%H:%M:%S") + BACKUP_PATH="{}/{}".format(BACKUP_DIR, DATETIME) + LATEST_LINK="{}/latest".format(BACKUP_DIR) + + + cmnd = "mkdir -p {}".format(BACKUP_DIR) + status, output = subprocess.getstatusoutput(cmnd) + print(cmnd) + + #cmnd = "rsync -av --delete {}/ --link-dest {} --exclude=\".cache\" {}".format(SOURCE_DIR, LATEST_LINK, BACKUP_PATH) + cmnd = ["rsync", '--info=progress2', "-avz", "--delete", SOURCE_DIR, "--link-dest", LATEST_LINK, "--exclude=\".cache\"", BACKUP_PATH] + print(cmnd) + + #run_list = ['rsync', '--info=progress2', '-a', 'src/', 'dest/'] + # with subprocess.Popen( + # cmnd, stdout=subprocess.PIPE, bufsize=1, text=True + # ) as process: + # for line in iter(p.stdout.readline, b''): + # print(line.strip()) + + + + process = subprocess.Popen(cmnd, + stdout=subprocess.PIPE) + + while process.poll() is None: + line = process.stdout.readline() + l = line.splitlines() + i = -1 + a = len(l) + #print(l[-1]) + time.sleep(3) + print(len(l)) + while True: + for line in reversed(l): + print(len(line.split())) + e = str(line).split() + if len(e) > 4: + print(e[2]) + print(line) + break + break + + # print(l[-1]) + # #print(str(line)) + # time.sleep(3) + #print(cmnd) + #status, output = subprocess.getstatusoutput(cmnd) + # rsync -av --delete \ + # "${SOURCE_DIR}/" \ + # --link-dest "${LATEST_LINK}" \ + # --exclude=".cache" \ + # "${BACKUP_PATH}" + cmnd = "rm -rf {}".format(LATEST_LINK) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + cmnd = "ln -s {} {}".format(BACKUP_PATH, LATEST_LINK) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) \ No newline at end of file diff --git a/omv_backups.py b/omv_backups.py new file mode 100644 index 0000000..3bcb8c8 --- /dev/null +++ b/omv_backups.py @@ -0,0 +1,138 @@ +import datetime +import logging +from paho.mqtt import client as mqtt_client +import getopt +import json +import time +import subprocess +import sys +import os +pid = os.getpid() + + +cmnd = "ps -ef|grep omv_backups.py|grep -v grep |grep -v {}|wc -l".format(pid) +status, output = subprocess.getstatusoutput(cmnd) + +print(output) +if int(output) > 0: + print("Running already!") + sys.exit() +broker = '192.168.77.106' +port = 1883 +topic_sum = "sectorq/omv/backups" +mqtt_username = 'jaydee' +mqtt_password = 'jaydee1' + +try: + opts, args = getopt.getopt(sys.argv[1:], "am", ["command=", "help", "output="]) +except getopt.GetoptError as err: + #usage() + sys.exit(2) +output = None +# QJ : getopts +_MODE = "manual" +for o, a in opts: + if o == "-a": + _MODE = "auto" + elif o in ("-m", "--manual"): + _MODE = "manual" + + +client = mqtt_client.Client() +client.username_pw_set(mqtt_username, mqtt_password) +client.connect(broker,1883,60) +now = datetime.datetime.now() +STARTTIME = now.strftime("%Y-%m-%d_%H:%M:%S") +msg = {"mode":_MODE, "status":"started","bak_name":"complete","start_time":STARTTIME,"end_time":"in progress","progress":0} +client.publish(topic_sum, json.dumps(msg)); +client.disconnect() + +backups = { + "github": + {"source":"admin@192.168.77.106:/share/Data/__GITHUB", + "exclude":"", + "active": True + }, + "photo": { + "source":"admin@192.168.77.106:/share/Photo/Years", + "exclude":"", + "active":True + }, + "docker_data":{ + "source":"admin@192.168.77.106:/share/docker_data/", + "exclude":"", + "active":True + } +} +BACKUP_FS = "/srv/dev-disk-by-uuid-02fbe97a-cd9a-4511-8bd5-21f8516353ee" +for b in backups: + topic = "sectorq/omv/backups/{}".format(b.lower()) + if not backups[b]["active"]: + print("Backup {} is not active!".format(b)) + client.connect(broker,1883,60) + msg = {"status":"inactive","bak_name":b,"start_time":"inactive","end_time":"inactive","progress":0} + + client.publish(topic, json.dumps(msg)) + client.disconnect() + continue + + SOURCE_DIR = backups[b]["source"] + now = datetime.datetime.now() + BACKUP_DIR="/srv/dev-disk-by-uuid-02fbe97a-cd9a-4511-8bd5-21f8516353ee/{}".format(b) + DATETIME = now.strftime("%Y-%m-%d_%H:%M:%S") + BACKUP_PATH="{}/{}".format(BACKUP_DIR, DATETIME) + LATEST_LINK="{}/latest".format(BACKUP_DIR) + msg = {"status":"started","bak_name":b,"start_time":DATETIME,"end_time":"in progress", "progress":0} + client.connect(broker,1883,60) + client.publish(topic, json.dumps(msg)); + client.disconnect() + + cmnd = "mkdir -p {}".format(BACKUP_DIR) + status, output = subprocess.getstatusoutput(cmnd) + print(cmnd) + + + #cmnd = "rsync -av --delete {}/ --link-dest {} --exclude=\".cache\" {}".format(SOURCE_DIR, LATEST_LINK, BACKUP_PATH) + cmnd = "rsync --info=progress2 -avz --delete {} --link-dest {} --exclude=\".cache\" --exclude=\".git\" --exclude=\"var_lib_motioneye\" {}".format(SOURCE_DIR, LATEST_LINK, BACKUP_PATH) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + cmnd = "rm -rf {}".format(LATEST_LINK) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + cmnd = "ln -s {} {}".format(BACKUP_PATH, LATEST_LINK) + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + + #Remove old + print("Removing old dirs") + + #cmnd = "find {} -maxdepth 1 -type d -mtime +30 -exec rm -rf {{}} \;".format(BACKUP_DIR) + cmnd = "find {} -maxdepth 1 -type d -mmin +30 -exec rm -rf {{}} \;".format(BACKUP_DIR) + print(cmnd) + #status, output = subprocess.getstatusoutput(cmnd) + now = datetime.datetime.now() + ENDTIME = now.strftime("%Y-%m-%d_%H:%M:%S") + msg = {"status":"finished","bak_name":b,"start_time":DATETIME,"end_time":ENDTIME,"progress":0} + client.connect(broker,1883,10) + client.publish(topic, json.dumps(msg)) + client.disconnect() + +print("Getting size of FS") +cmnd = "du -h --max-depth=0 {}".format(BACKUP_FS) +status, output = subprocess.getstatusoutput(cmnd) +used_space = (output.split())[0] +now = datetime.datetime.now() +ENDJOB = now.strftime("%Y-%m-%d_%H:%M:%S") +print("Size : {}".format(used_space)) +print("Sending finished status") +msg = {"mode":_MODE,"status":"finished","bak_name":"complete","start_time":STARTTIME,"end_time":ENDJOB,"progress":0,"used_space":used_space} +print(msg) +client.connect(broker,1883,10) +client.publish(topic_sum, json.dumps(msg)) +client.disconnect() + +if _MODE == "auto": + cmnd = "systemctl suspend" + status, output = subprocess.getstatusoutput(cmnd) \ No newline at end of file diff --git a/python_aida64/__init__.py b/python_aida64/__init__.py new file mode 100644 index 0000000..5bd9a2a --- /dev/null +++ b/python_aida64/__init__.py @@ -0,0 +1,60 @@ +import mmap +from xml.etree import ElementTree as ET +import sys + + +def _readRawData(length): + with mmap.mmap( + -1, length, # anonymous file + tagname='AIDA64_SensorValues', + access=mmap.ACCESS_READ) as mm: + return mm.read() + + +def _decode(b): + for encoding in (sys.getdefaultencoding(), 'utf-8', 'gbk'): + try: + return b.decode(encoding=encoding) + except UnicodeDecodeError: + continue + return b.decode() + + +def getXmlRawData() -> str: + options = [100 * i for i in range(20, 100)] # ranges in [2k, 10k] + low = 0 + high = len(options) - 1 + while low < high: # [low, high], stops at [low, low] + mid = (low + high) // 2 # legit + try: + length = options[mid] + raw = _readRawData(length) + if raw[-1] == 0: # legit ending + decoded = _decode(raw.rstrip(b'\x00')) + return '{}'.format(decoded) + else: # not long enough + low = mid + continue + except PermissionError: # illegal length (too long) + high = mid + continue + + +def getData() -> dict: + data = {} + tree = ET.fromstring(getXmlRawData()) + + for item in tree: + if item.tag not in data: + data[item.tag] = [] + data[item.tag].append({ + key: item.find(key).text + for key in ('id', 'label', 'value') + }) + return data + + +__all__ = [ + 'getXmlRawData', + 'getData' +] diff --git a/python_aida64/__pycache__/__init__.cpython-310.pyc b/python_aida64/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..860782a Binary files /dev/null and b/python_aida64/__pycache__/__init__.cpython-310.pyc differ diff --git a/python_aida64/__pycache__/__init__.cpython-38.pyc b/python_aida64/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..b73768f Binary files /dev/null and b/python_aida64/__pycache__/__init__.cpython-38.pyc differ diff --git a/rhasspy_led.py b/rhasspy_led.py new file mode 100644 index 0000000..db4603e --- /dev/null +++ b/rhasspy_led.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python +from apa102_pi.driver import apa102 +from time import sleep +import paho.mqtt.client as mqtt +import RPi.GPIO as GPIO +import json +import os + +rhasspyConfig = '/home/jd/.config/rhasspy/profiles/en/profile.json' + +counter = 0 +LED = "on" +mute = "off" +siteId = "" +MQTThost = "" + +GPIO.setmode(GPIO.BCM) +GPIO.setup(5, GPIO.OUT) +GPIO.output(5, GPIO.HIGH) + + + + +with open(rhasspyConfig,'r', encoding='UTF-8') as file: + obj = json.loads(file.read()) + MQTTconfig = json.dumps(obj["mqtt"]) + MQTTconfig = MQTTconfig.replace("\"mqtt\": ","") + MQTTconfig = json.loads(MQTTconfig) + siteId = MQTTconfig["site_id"] + MQTThost = MQTTconfig["host"] + MQTThost = MQTThost.strip('"') + if "port" in json.dumps(MQTTconfig): + MQTTport = MQTTconfig["port"] + MQTTport = MQTTport.strip('"') + MQTTport = int(MQTTport) + else: + MQTTport = 1883 + +strip = apa102.APA102(num_led=12) +strip.clear_strip() + +def on_connect(client, userdata, flags, rc): + print("Connected with result code " + str(rc)) + client.subscribe("hermes/dialogueManager/sessionEnded/#") + client.subscribe("hermes/hotword/toggleOff/#") + client.subscribe("hermes/asr/stopListening") + for i in range(0,12): + strip.set_pixel(i,0,127,0,7) + strip.show() + sleep(2) + for i in range(0,12): + strip.set_pixel(i,0,255,0,0) + strip.show() +def on_message(client, userdata, msg): + jsonData = json.loads(msg.payload) + if msg.topic == "hermes/hotword/toggleOff" and jsonData["siteId"] == siteId and LED == "on": + for i in range(0,12): + strip.set_pixel(i,0,127,0,7) + strip.show() + elif msg.topic == "hermes/dialogueManager/sessionEnded" and jsonData["siteId"] == siteId: + for i in range(0,12): + strip.set_pixel(i,0,255,0,0) + strip.show() + + elif msg.topic == "hermes/asr/stopListening": + for i in range(0,12): + strip.set_pixel(i,0,255,0,0) + strip.show() + +for i in range(0,12): + strip.set_pixel(i,0,127,255,7) + sleep(0.1) + strip.show() + +sleep(3) + + +client = mqtt.Client() +client.username_pw_set("jaydee", password="jaydee1") +client.on_connect = on_connect +client.on_message = on_message +client.connect(MQTThost, MQTTport, 60) + +client.loop_forever() diff --git a/scan_tasmotas.py b/scan_tasmotas.py new file mode 100644 index 0000000..50e024f --- /dev/null +++ b/scan_tasmotas.py @@ -0,0 +1,172 @@ +import paho.mqtt.client as mqtt +from getmac import get_mac_address +import platform +import socket +import re +import subprocess +import os +import json +import sys +import time +import json +import datetime +import ctypes +import getopt +import requests +CHECK_MARK = "\033[0;32m\xE2\x9C\x94\033[0m" +_MQTT_SETUP = _BACKUP = _APPLY = _WIFI_SETUP = False +try: + opts, args = getopt.getopt(sys.argv[1:], "wh:bm", ["command=", "help", "output=", "backup"]) +except getopt.GetoptError as err: + # print help information and exit: + print(str(err)) # will print something like "option -a not recognized" + #usage() + sys.exit(2) +output = None +# QJ : getopts + +for o, a in opts: + if o == "-h": + _ACTION = True + elif o in ("-b", "--backup"): + _BACKUP = True + elif o in ("-m", "--mqtt"): + _MQTT_SETUP = True + elif o in ("-w", "--wifi"): + _WIFI_SETUP = True + elif o in ("-a", "--apply"): + _APPLY = True + else: + _WIZZARD = True + + + + +def create_backup(): + cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\"" + print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + print(output) + ips = output.splitlines() + tasm_data = {} + for sys_ip in ips: + # print("Thsis is ip : " + sys_ip) + cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\"" + status, output = subprocess.getstatusoutput(cmnd) + # print("status of 80 : " + str(status)) + if status == 0: + try: + url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5" + resp = requests.get(url) + json_str = resp.content.decode('utf-8') + tasm_data["StatusNET"] = json.loads(json_str)["StatusNET"] + # print(tasm_data) + url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+2" + resp = requests.get(url) + json_str = resp.content.decode('utf-8') + tasm_data["StatusFWR"] = json.loads(json_str)["StatusFWR"] + url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+4" + resp = requests.get(url) + json_str = resp.content.decode('utf-8') + tasm_data["StatusMEM"] = json.loads(json_str)["StatusMEM"] + print(sys_ip + " : Hostname : " + tasm_data['StatusNET']['Hostname'] + " : Version : " + tasm_data['StatusFWR']["Version"] + " : Memory : " + str(tasm_data["StatusMEM"]["ProgramFlashSize"])) + + # cmnd = "curl \"http://" + sys_ip + "/dl?user=admin&password=l4c1j4yd33Du5l0\" -o ~/tasm_back/" + tasm_data['StatusNET']['Hostname'] + ".bin" + #cmnd = "curl \"http://" + sys_ip + "/dl\" -o /media/server/nas-docker-data/_BACKUP/tasmota/" + tasm_data['StatusNET']['Hostname'] + ".bin" + # print(cmnd) + # status, output = subprocess.getstatusoutput(cmnd) + + url = "http://" + sys_ip + "/dl?user=admin&password=l4c1j4yd33Du5l0" + resp = requests.get(url) + file = open("/media/nas/nas-data/_BACKUP/tasmota/" + tasm_data['StatusNET']['Hostname'] + "_" + tasm_data['StatusFWR']["Version"] + ".bin", "wb") + file.write(resp.content) + file.close() + print(CHECK_MARK) + except: + #print(sys_ip + " : Not a tasmota!") + pass + else: + #print(sys_ip + " : Not a listening") + pass + + +def wifi_setup(): + SSID1 = input(">> SID1 ? (default=jaydee) : ") or "jaydee" + PASS1 = input(">> PASS1 ? (default=) : ") or "" + SSID2 = input(">> SID2 ? (default=smart_home) : ") or "smart_home" + PASS2 = input(">> PASS2 ? (default=) : ") or "" + cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\"" + #print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + # print(output) + + ips = output.splitlines() + for sys_ip in ips: + + print("Thsis is ip : " + sys_ip) + cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\"" + status, output = subprocess.getstatusoutput(cmnd) + # print("status of 80 : " + str(status)) + if status == 0: + try: + # url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5" + url = "http://" + sys_ip + "/wi?s1=" + SSID1 + "&p1=" + PASS1 + "&s2=" + SSID2 + "&p2=" + PASS2 + "&h=work_lights&save=" + print(url) + if _APPLY: + requests.get(url) + else: + print("Test mode") + + except: + #print(sys_ip + " : Not a tasmota!") + pass + else: + #print(sys_ip + " : Not a listening") + pass + +def mqtt_setup(): + MQTT_BROKER = input(">> MQTT Broker ? (default=192.168.77.106) : ") or "192.168.77.106" + MQTT_USER = input(">> MQTT User ? (default=jaydee) : ") or "jaydee" + MQTT_PASS = input(">> MQTT Password ? (default=jaydee1) : ") or "jaydee1" + + cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\"" + #print(cmnd) + status, output = subprocess.getstatusoutput(cmnd) + + # print(output) + + ips = output.splitlines() + tasm_data = {} + for sys_ip in ips: + print("Thsis is ip : " + sys_ip) + cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\"" + status, output = subprocess.getstatusoutput(cmnd) + # print("status of 80 : " + str(status)) + if status == 0: + try: + # url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5" + + url = "http://" + sys_ip + "/cm?cmnd=Backlog%20MqttHost%20" + MQTT_BROKER + "%3BMqttUser%20" + MQTT_USER + "%3BMqttPassword%20" + MQTT_PASS + print(url) + if _APPLY: + requests.get(url) + + except: + #print(sys_ip + " : Not a tasmota!") + pass + else: + #print(sys_ip + " : Not a listening") + pass + + +if _BACKUP: + create_backup() + + +if _MQTT_SETUP: + mqtt_setup() + +if _WIFI_SETUP: + wifi_setup() \ No newline at end of file diff --git a/spotify copy.py b/spotify copy.py new file mode 100644 index 0000000..8e003d5 --- /dev/null +++ b/spotify copy.py @@ -0,0 +1,38 @@ +import spotipy +from spotipy.oauth2 import SpotifyOAuth +import time + +USERNAME = '...' +CLIENT_ID = '...' +CLIENT_SECRET = '...' +SCOPE = 'user-read-currently-playing' + +def create_spotify(): + auth_manager = SpotifyOAuth( + scope='user-read-playback-state', + username='jaydee', + redirect_uri='https://ha.sectorq.eu/auth/external/callback', + client_id='6a37229fc9a04878a608d519ea4b1d22', + client_secret='6569f6f876234093983920de2966ff84') + + spotify = spotipy.Spotify(auth_manager=auth_manager) + + return auth_manager, spotify + +def refresh_spotify(auth_manager, spotify): + token_info = auth_manager.cache_handler.get_cached_token() + if auth_manager.is_token_expired(token_info): + auth_manager, spotify = create_spotify() + return auth_manager, spotify + +if __name__ == '__main__': + auth_manager, spotify = create_spotify() + + while True: + auth_manager, spotify = refresh_spotify(auth_manager, spotify) + playing = spotify.currently_playing() + if playing: + print(playing['item']['name']) + else: + print('Nothing is playing.') + time.sleep(30) \ No newline at end of file diff --git a/spotify.py b/spotify.py new file mode 100644 index 0000000..b5e2029 --- /dev/null +++ b/spotify.py @@ -0,0 +1,153 @@ +#!/usr/bin/env python +# coding: utf-8 + +import base64 +import datetime +from urllib.parse import urlencode + +import requests + + + +class SpotifyAPI(object): + access_token = None + access_token_expires = datetime.datetime.now() + access_token_did_expire = True + client_id = None + client_secret = None + token_url = "https://accounts.spotify.com/api/token" + + def __init__(self, client_id, client_secret, *args, **kwargs): + super().__init__(*args, **kwargs) + self.client_id = client_id + self.client_secret = client_secret + + def get_client_credentials(self): + """ + Returns a base64 encoded string + """ + client_id = self.client_id + client_secret = self.client_secret + if client_secret == None or client_id == None: + raise Exception("You must set client_id and client_secret") + client_creds = f"{client_id}:{client_secret}" + client_creds_b64 = base64.b64encode(client_creds.encode()) + return client_creds_b64.decode() + + def get_token_headers(self): + client_creds_b64 = self.get_client_credentials() + return { + "Authorization": f"Basic {client_creds_b64}" + } + + def get_token_data(self): + return { + "grant_type": "client_credentials" + } + + def perform_auth(self): + token_url = self.token_url + token_data = self.get_token_data() + token_headers = self.get_token_headers() + print(token_url) + print(token_data) + print(token_headers) + r = requests.post(token_url, data=token_data, headers=token_headers) + if r.status_code not in range(200, 299): + raise Exception("Could not authenticate client.") + # return False + data = r.json() + now = datetime.datetime.now() + access_token = data['access_token'] + expires_in = data['expires_in'] # seconds + expires = now + datetime.timedelta(seconds=expires_in) + self.access_token = access_token + self.access_token_expires = expires + self.access_token_did_expire = expires < now + return True + + def get_access_token(self): + token = self.access_token + expires = self.access_token_expires + now = datetime.datetime.now() + if expires < now: + self.perform_auth() + return self.get_access_token() + elif token == None: + self.perform_auth() + return self.get_access_token() + return token + + def get_resource_header(self): + access_token = self.get_access_token() + headers = { + "Authorization": f"Bearer {access_token}", + "Accept": "application/json", + "Content-Type": "application/json" + } + return headers + + + def get_resource(self, lookup_id, resource_type='albums', version='v1'): + endpoint = f"https://api.spotify.com/{version}/{resource_type}/{lookup_id}" + headers = self.get_resource_header() + r = requests.get(endpoint, headers=headers) + if r.status_code not in range(200, 299): + return {} + return r.json() + + def get_album(self, _id): + return self.get_resource(_id, resource_type='albums') + + def get_artist(self, _id): + return self.get_resource(_id, resource_type='artists') + + def base_search(self, query_params): # type + headers = self.get_resource_header() + endpoint = "https://api.spotify.com/v1/search" + lookup_url = f"{endpoint}?{query_params}" + r = requests.get(lookup_url, headers=headers) + if r.status_code not in range(200, 299): + return {} + return r.json() + + def get_devices(self): # type + headers = self.get_resource_header() + endpoint = "https://api.spotify.com/v1/me/player/devices" + lookup_url = f"{endpoint}" + print(lookup_url) + print(headers) + r = requests.get(lookup_url, headers=headers) + print(r.status_code) + if r.status_code not in range(200, 299): + return {} + return r.json() + + def search(self, query=None, operator=None, operator_query=None, search_type='artist' ): + if query == None: + raise Exception("A query is required") + if isinstance(query, dict): + query = " ".join([f"{k}:{v}" for k,v in query.items()]) + if operator != None and operator_query != None: + if operator.lower() == "or" or operator.lower() == "not": + operator = operator.upper() + if isinstance(operator_query, str): + query = f"{query} {operator} {operator_query}" + query_params = urlencode({"q": query, "type": search_type.lower()}) + print(query_params) + return self.base_search(query_params) + + +spotify = SpotifyAPI("6a37229fc9a04878a608d519ea4b1d22","6569f6f876234093983920de2966ff84" ) + + +spotify.perform_auth() + +print(spotify.access_token) +print(spotify.access_token_expires) + +print(spotify.get_resource_header()) + + + +print(spotify.get_devices()) \ No newline at end of file diff --git a/sync_nas_rasp.py b/sync_nas_rasp.py new file mode 100644 index 0000000..81c3f7e --- /dev/null +++ b/sync_nas_rasp.py @@ -0,0 +1,4 @@ +rsync -rP ha/* root@192.168.77.246:/share/docker_data/ha + + +192.168.77.106 \ No newline at end of file diff --git a/test.py b/test.py new file mode 100644 index 0000000..8eab3f9 --- /dev/null +++ b/test.py @@ -0,0 +1,47 @@ +# Import LCD library +from RPLCD import i2c +import psutil + +# Import sleep library +from time import sleep + +# constants to initialise the LCD +lcdmode = 'i2c' +cols = 20 +rows = 4 +charmap = 'A00' +i2c_expander = 'PCF8574' + +# Generally 27 is the address;Find yours using: i2cdetect -y 1 +address = 0x27 +port = 0 # 0 on an older Raspberry Pi + +# Initialise the LCD +lcd = i2c.CharLCD(i2c_expander, address, port=port, charmap=charmap, + cols=cols, rows=rows) + + +while True: + myCmd = "" + # Write a string on first line and move to next line + mem_data = psutil.virtual_memory() + net_sum = psutil.net_if_addrs()["eth0"] + eth0_ip = (net_sum[0][1]) + cpu_load = round(psutil.getloadavg(),2) + print(cpu_load[0]) + lcd.backlight_enabled = True + lcd.cursor_pos = (0, 0) + lcd.write_string('Memory : ' + str(mem_data.percent)) + lcd.crlf() + lcd.write_string('IP : ' + str(eth0_ip)) + lcd.crlf() + lcd.write_string('Phppot') + lcd.crlf() + lcd.write_string("CPU: " + str(cpu_load)) + sleep(5) + #lcd.clear() + # Switch off backlight + #lcd.backlight_enabled = False + #sleep(3) + # Clear the LCD screen + #lcd.close(clear=True) \ No newline at end of file