This repository has been archived on 2025-09-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
agent/agent_example.py

22 lines
405 B
Python
Raw Permalink Normal View History

2024-07-01 20:41:57 +02:00
#!/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"))