Advertisement
Guest User

Untitled

a guest
Mar 14th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. In [62]: import logging
  2. ...: from telnetlib import Telnet
  3. ...:
  4. ...: tn = Telnet('127.0.0.1', 6024, timeout=10)
  5. ...: tn.set_debuglevel(logging.DEBUG)
  6. ...:
  7. ...: tn.write(b'settings.attributes["BOT_NAME"]n')
  8. ...: tn.read_until(b'n>>>', timeout=10)
  9. Telnet(127.0.0.1,6024): send b'settings.attributes["BOT_NAME"]n'
  10. Telnet(127.0.0.1,6024): recv b'xffxfd"xffxfdx1fxffxfdx03xffxfbx01x1bc>>> x1b[4hsettings.attributes["BOT_NAM'
  11. Telnet(127.0.0.1,6024): IAC DO 34
  12. Telnet(127.0.0.1,6024): IAC DO 31
  13. Telnet(127.0.0.1,6024): IAC DO 3
  14. Telnet(127.0.0.1,6024): IAC WILL 1
  15. Telnet(127.0.0.1,6024): recv b'E"]rrrn<SettingsAttribute value='demo' priority=20'
  16. Telnet(127.0.0.1,6024): recv b'>rrrn>>> '
  17. Out[62]: b'x1bc>>> x1b[4hsettings.attributes["BOT_NAME"]rrrn<SettingsAttribute value='demo' priority=20>rrrn>>>'
  18.  
  19. In [15]: import logging
  20. ...: from telnetlib import Telnet
  21. ...:
  22. ...: tn = Telnet('127.0.0.1', 6024, timeout=10)
  23. ...: tn.set_debuglevel(logging.DEBUG)
  24.  
  25. In [16]: tn.read_until(b'Username: ', timeout=10)
  26. Telnet(127.0.0.1,6024): recv b'Username: '
  27. Out[16]: b'Username: '
  28.  
  29. In [17]: tn.write(b'scrapyn')
  30. Telnet(127.0.0.1,6024): send b'scrapyn'
  31.  
  32. In [18]: tn.read_until(b'Password: ', timeout=10)
  33. Telnet(127.0.0.1,6024): recv b'xffxfbx01Password: '
  34. Telnet(127.0.0.1,6024): IAC WILL 1
  35. Unhandled error in Deferred:
  36. 2019-03-14 21:31:12 [twisted] CRITICAL: Unhandled error in Deferred:
  37.  
  38. Traceback (most recent call last):
  39. Failure: twisted.conch.telnet.OptionRefused: twisted.conch.telnet.OptionRefused:b'x01'
  40.  
  41. Ou2019-03-14 21:31:12 [twisted] CRITICAL:
  42. twisted.conch.telnet.OptionRefused: twisted.conch.telnet.OptionRefused:b'x01't
  43. [18]: b'Password: '
  44.  
  45. In [19]: tn.write(b'f5e435eb420c32cdn')
  46. Telnet(127.0.0.1,6024): send b'f5e435eb420c32cdn'
  47.  
  48. Unhandled error in Deferred:
  49. 2019-03-14 21:31:27 [twisted] CRITICAL: Unhandled error in Deferred:
  50.  
  51. Traceback (most recent call last):
  52. Failure: twisted.conch.telnet.AlreadyDisabled: twisted.conch.telnet.AlreadyDisabled:b'x01'
  53.  
  54. 2019-03-14 21:31:27 [twisted] CRITICAL:
  55. twisted.conch.telnet.AlreadyDisabled: twisted.conch.telnet.AlreadyDisabled:b'x01'
  56. In [20]: tn.read_until(b'n>>>', timeout=10)
  57. Out[20]: b''
  58.  
  59. In [21]: tn.write(b'settings.attributes["BOT_NAME"]n')
  60. Telnet(127.0.0.1,6024): send b'settings.attributes["BOT_NAME"]n'
  61.  
  62. In [22]: tn.read_until(b'n>>>', timeout=10)
  63. Out[22]: b''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement