Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [62]: import logging
- ...: from telnetlib import Telnet
- ...:
- ...: tn = Telnet('127.0.0.1', 6024, timeout=10)
- ...: tn.set_debuglevel(logging.DEBUG)
- ...:
- ...: tn.write(b'settings.attributes["BOT_NAME"]n')
- ...: tn.read_until(b'n>>>', timeout=10)
- Telnet(127.0.0.1,6024): send b'settings.attributes["BOT_NAME"]n'
- Telnet(127.0.0.1,6024): recv b'xffxfd"xffxfdx1fxffxfdx03xffxfbx01x1bc>>> x1b[4hsettings.attributes["BOT_NAM'
- Telnet(127.0.0.1,6024): IAC DO 34
- Telnet(127.0.0.1,6024): IAC DO 31
- Telnet(127.0.0.1,6024): IAC DO 3
- Telnet(127.0.0.1,6024): IAC WILL 1
- Telnet(127.0.0.1,6024): recv b'E"]rrrn<SettingsAttribute value='demo' priority=20'
- Telnet(127.0.0.1,6024): recv b'>rrrn>>> '
- Out[62]: b'x1bc>>> x1b[4hsettings.attributes["BOT_NAME"]rrrn<SettingsAttribute value='demo' priority=20>rrrn>>>'
- In [15]: import logging
- ...: from telnetlib import Telnet
- ...:
- ...: tn = Telnet('127.0.0.1', 6024, timeout=10)
- ...: tn.set_debuglevel(logging.DEBUG)
- In [16]: tn.read_until(b'Username: ', timeout=10)
- Telnet(127.0.0.1,6024): recv b'Username: '
- Out[16]: b'Username: '
- In [17]: tn.write(b'scrapyn')
- Telnet(127.0.0.1,6024): send b'scrapyn'
- In [18]: tn.read_until(b'Password: ', timeout=10)
- Telnet(127.0.0.1,6024): recv b'xffxfbx01Password: '
- Telnet(127.0.0.1,6024): IAC WILL 1
- Unhandled error in Deferred:
- 2019-03-14 21:31:12 [twisted] CRITICAL: Unhandled error in Deferred:
- Traceback (most recent call last):
- Failure: twisted.conch.telnet.OptionRefused: twisted.conch.telnet.OptionRefused:b'x01'
- Ou2019-03-14 21:31:12 [twisted] CRITICAL:
- twisted.conch.telnet.OptionRefused: twisted.conch.telnet.OptionRefused:b'x01't
- [18]: b'Password: '
- In [19]: tn.write(b'f5e435eb420c32cdn')
- Telnet(127.0.0.1,6024): send b'f5e435eb420c32cdn'
- Unhandled error in Deferred:
- 2019-03-14 21:31:27 [twisted] CRITICAL: Unhandled error in Deferred:
- Traceback (most recent call last):
- Failure: twisted.conch.telnet.AlreadyDisabled: twisted.conch.telnet.AlreadyDisabled:b'x01'
- 2019-03-14 21:31:27 [twisted] CRITICAL:
- twisted.conch.telnet.AlreadyDisabled: twisted.conch.telnet.AlreadyDisabled:b'x01'
- In [20]: tn.read_until(b'n>>>', timeout=10)
- Out[20]: b''
- In [21]: tn.write(b'settings.attributes["BOT_NAME"]n')
- Telnet(127.0.0.1,6024): send b'settings.attributes["BOT_NAME"]n'
- In [22]: tn.read_until(b'n>>>', timeout=10)
- Out[22]: b''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement