telnetlib for python, how telnetlib can help me to figure out who is the person sending a tell to my BOT?

88 views Asked by At

I am trying to create a bot for a telnet site called freechess.org, but I can't figure out how to determine the user who is sending a tell to my bots. I am using telnetlib for python.

Here is my current code:

import getpass 
import sys import telnetlib 
HOST = "freechess.org"
user = raw_input("Enter your remote account: ")
password = "animal"  
tn = telnetlib.Telnet(HOST) 
tn.read_until("login: ") 
tn.write(user + "\n") 
tn.read_until("password: ") 
tn.write(password + "\n") 
tn.read_until("tells you:")  
tn.write(". Hi! I ama chatting bot sorry\n")
print tn.read_all()

How do I determine who has sent my bot a tell?

0

There are 0 answers