Add project files

This commit is contained in:
ChaoticByte 2024-07-01 20:41:57 +02:00
parent 5849bd98b4
commit 4f8419fb51
No known key found for this signature in database
4 changed files with 162 additions and 1 deletions

21
agent_example.py Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env python3
import agent
from pathlib import Path
agent.VERSION = 1
def echo(t: agent.Task):
agent.writer_queue.put(f"{t.user}: {t.args}")
agent.commands.update({
"echo": echo
})
if __name__ == "__main__":
agent.main(
server_host= "localhost",
server_port = 8022,
user = "example1",
key = Path("../ex1"),
known_hosts = Path("../known"))