Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.54 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. #----------------------------------------------------------
  4. #The script starts in non-interactive mode (aka bot mode).
  5. #Press ctrl-c to get into interactive mode and 'ctrl ^]' to
  6. #get back into non-interactive mode.
  7. #
  8. #And now a few comments...
  9. #
  10. #a)The script only works on the Linux Operating System.
  11. #  This is because the program relies on the concept of a
  12. #  "pseudo terminal". As far as I know, the closest you
  13. #  can get to a "pseudo terminal" in Windows is using something
  14. #  like cygwin.
  15. #
  16. #b)Using something like 'ctrl ^]' to get back into non-interactive
  17. #  mode is something that is mentioned python pexpect module,
  18. #  but not in the actual pexpect document itself.
  19. #
  20. #---------------------------------------------------------
  21.  
  22. import pexpect, time, signal, getpass
  23.  
  24. #I need a large list of profanity because the computer doesn't always
  25. #follow the Gaussian Probability curve.
  26.  
  27. profanity = ["mart is a fag", "mart is a homo", "mart is dumb",
  28.              "mart is a retard", "mart is a moron", "mart is stupid",
  29.              "mart is a virgin", "mart is gay", "mart isnt witty",
  30.              "mart sucks dans dick", "mart sucks his moms dick",
  31.              "mart can go fuck off", "mart likes little boys",
  32.              "mart isnt bright", "mart is a homosexual",
  33.              "mart takes it up the ass from cross", "mart can go fuck off"]
  34.  
  35. x = 1
  36.  
  37. def mode(sig, data):
  38.     global x
  39.     x = x + 1
  40.    
  41. def get_name():
  42.     user = raw_input("Username: ")
  43.     password = getpass.getpass("Password: ")
  44.     idle(user,password)
  45.    
  46. def idle(user,password):
  47.     y = 1
  48.     max = len(profanity)
  49.     count = 0
  50.    
  51.     bbs = pexpect.spawn('telnet arbornet.org')
  52.     bbs.expect('login:')
  53.     bbs.sendline(user)
  54.     print bbs.before,bbs.after,
  55.     bbs.expect('[Pp]assword:')
  56.     bbs.sendline(password)
  57.     bbs.sendline('\n')
  58.     bbs.sendline('bbs')
  59.  
  60.     while bbs.isalive():
  61.         if ((y % x ) == 0):
  62.             bbs.expect('Ok: ')
  63.             bbs.sendline('r noresp 125')
  64.             bbs.expect('Respond or pass?')
  65.             bbs.sendline('r')
  66.             bbs.expect('>')
  67.             if count < max:
  68.                 bbs.sendline(profanity[count])
  69.                 count = count + 1
  70.             else:
  71.                 count = 0
  72.                 bbs.sendline('mart is a queer ass virgin')
  73.             bbs.sendline('.')
  74.             time.sleep(5)
  75.         else:
  76.             bbs.interact()
  77.             y = y + 1
  78.        
  79. if __name__ == "__main__":
  80.     signal.signal(signal.SIGINT, mode)
  81.     get_name()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement