mirror of
https://github.com/TotalFreedomMC/TotalFreedomBot.git
synced 2024-12-31 20:02:12 +00:00
Update telnet.py
This commit is contained in:
parent
d320148612
commit
2d2bde604d
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ class telnet:
|
||||||
self.port = port
|
self.port = port
|
||||||
self.username = username
|
self.username = username
|
||||||
self.password = password
|
self.password = password
|
||||||
|
|
||||||
def connect(self, *username):
|
def connect(self, *username):
|
||||||
self.session = Telnet(self.ip, self.port)
|
self.session = Telnet(self.ip, self.port)
|
||||||
for x in username:
|
for x in username:
|
||||||
|
@ -16,7 +16,7 @@ class telnet:
|
||||||
|
|
||||||
if b'Username:' in self.session.read_until(b'Username:', timeout = 3):
|
if b'Username:' in self.session.read_until(b'Username:', timeout = 3):
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
self.session.write(bytes(self.username, 'ascii') + b"\r\n")
|
self.session.write(bytes(self.username, 'ascii') + b"\r\n")
|
||||||
if b'Password:' in self.session.read_until(b'Password:', timeout = 3):
|
if b'Password:' in self.session.read_until(b'Password:', timeout = 3):
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
self.session.write(bytes(self.password, 'ascii') + b"\r\n")
|
self.session.write(bytes(self.password, 'ascii') + b"\r\n")
|
||||||
|
|
Loading…
Reference in a new issue