# uncompyle6 version 3.9.3 # Python bytecode version base 2.6 (62161) # Decompiled from: Python 3.9.25 (main, Oct 31 2025, 23:16:49) # [GCC 14.2.0] # Embedded file name: d_keepalive.pyc # Compiled at: 2022-04-20 07:09:01 import socket, collections, mytime, threading, sys, copy, struct, types, d_protocol, os.path, traceback, main, one_unit, wx mac_names = 'posix' class Keepalive: def __init__(self, parent): self.thread = threading.Thread(name='AllDSP Server Bootloader Detection', target=self.process) self.thread.daemon = True self.parent = parent return def process(self): PORT = 57383 while one_unit.app.application_stopping == False: try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) except: print mytime.displayTime() + ' Keepalive Thread Failed' traceback.print_exc(file=sys.stdout) reported_error = True return else: print mytime.displayTime() + ' Keepalive Thread Started' while one_unit.app.application_stopping == False: mytime.sleep(0.1) cmd = chr(0) + chr(2) + 'hgzd.dam' + chr(0) + 'netascii' + chr(0) ip = '' addr = (ip, PORT) try: s.sendto(cmd, addr) except: pass try: s.close() except: pass return def start(self): """Start the updating thread""" self.stopping = False self.thread.start() return # okay decompiling pycode/d_keepalive.pyc