mirror of
https://github.com/SantaSpeen/winConnect.git
synced 2025-07-02 16:07:09 +00:00
28 lines
601 B
Python
28 lines
601 B
Python
import sys
|
|
|
|
from loguru import logger
|
|
|
|
from winConnect import WinConnectClient, crypto
|
|
|
|
logger.remove()
|
|
logger.add(sys.stdout, level="DEBUG")
|
|
|
|
crypt_mode = crypto.WinConnectCryptoPassword("test_password")
|
|
|
|
connector = WinConnectClient('test')
|
|
connector.set_logger(logger)
|
|
connector.set_crypto(crypt_mode)
|
|
|
|
def console():
|
|
with connector as conn:
|
|
while True:
|
|
i = input(":> ")
|
|
if i == "exit":
|
|
break
|
|
conn.send_data(i)
|
|
data = conn.read_pipe()
|
|
print(f"({type(data)}) {data=}")
|
|
|
|
if __name__ == '__main__':
|
|
console()
|