Closed Klutton closed 1 year ago
I am trying to make a authenticating program via python to identify the device and then connect the devices through n2n in a more easy way
However, I have tried serveral ways to run the system command but all failed
The connection wnt well as the server showed that the edge had been assigned, and no retries showed that the connection was stable.
But when using
ping 10.134.100.x
the requests were all rejected.
I was wondering if there are permissions in my program, please tell me the solution if possible( even changing another programming language)
I using this to ask for administrator permission
def is_admin(): try: return ctypes.windll.shell32.IsUserAnAdmin() except: return False if not is_admin(): ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 1) exit()
I have tried the following methods to start edge.exe
os.system(f'powershell.exe -c ".\edge.exe -c NETWORKS -l {orserver}:{res["port"]} -k {randkey()}"') subprocess.run([f'.\edge.exe', '-c', group, '-l', f'{orserver}:{res["port"]}', '-k', randkey()],shell=True, stdout=1) os.system(f'.\edge.exe -c NETWORKS -l {orserver}:{res["port"]} -k {randkey()}')
After figuring the problem, I found that the -k parameter should be a specific string, I used this in a wrong way which caused the problem. Now this comment should be closed.
I am trying to make a authenticating program via python to identify the device and then connect the devices through n2n in a more easy way
However, I have tried serveral ways to run the system command but all failed
The connection wnt well as the server showed that the edge had been assigned, and no retries showed that the connection was stable.
But when using
ping 10.134.100.x
the requests were all rejected.
I was wondering if there are permissions in my program, please tell me the solution if possible( even changing another programming language)
codes
I using this to ask for administrator permission
I have tried the following methods to start edge.exe