Advertisement
Guest User

Untitled

a guest
Oct 29th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. mport datetime
  2. import time as ti
  3. import random as r
  4. num_lines = sum(1 for line in open('T.txt'))
  5. logincounter=0
  6. connection_counter=0
  7. logged_port=r.randint(21,36)
  8. today=datetime.date.today()
  9. def telnet():
  10. tclient=input("Host: ")
  11. if tclient in netstat:
  12. time.sleep(1)
  13. print ("-"*20)
  14. time.sleep(0.5)
  15. print ("Connected to "+(str(tclient)))
  16. time.sleep(0.5)
  17. print ("-"*20)
  18. usern=input("USERNAME: ")
  19. time.sleep(0.5)
  20. passw=input("PASSWORD: ")
  21. if usern == account_user:
  22. if passw ==account_pass:
  23. print ("connected to "+(str(tclient)))
  24. time.sleep(0.5)
  25. print("-"*20)
  26. time.sleep(1)
  27. #enter here the text file in the pycache of the selected host
  28. else:
  29. print ("Wrong ")
  30. else:
  31. print ("2")
  32. else:
  33. print ("Host not in netstat, please try again")
  34. def command_lst():
  35. print("""? advent areacode basic bf cal
  36. calc ching clear clock cowsay date
  37. echo eliza factor figlet finger fnord
  38. geoip help hosts ipaddr joke login
  39. mac md5 morse newuser notes octopus
  40. phoon pig ping primes privacy qr
  41. rain rand rfc rig roll rot13
  42. sleep starwars traceroute units uptime usenet
  43. users uumap uupath uuplot weather when
  44. zipcode zork zrun""")
  45. def call():
  46. global at
  47. if connection_counter==0:
  48. print("Connected to TELEHACK port",logged_port)
  49. print("")
  50. print("It is",today)
  51. print("There are 1 local users. There are",num_lines,"hosts on the network.")
  52. print("")
  53. print(" Type HELP for a detailed command list.")
  54. print(" Type NEWUSER to create an account.")
  55. print("")
  56. print("May the command line live forever.")
  57. print("")
  58. command_lst()
  59. connection_counter+=1
  60. at=input("@ ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement