Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mport datetime
- import time as ti
- import random as r
- num_lines = sum(1 for line in open('T.txt'))
- logincounter=0
- connection_counter=0
- logged_port=r.randint(21,36)
- today=datetime.date.today()
- def telnet():
- tclient=input("Host: ")
- if tclient in netstat:
- time.sleep(1)
- print ("-"*20)
- time.sleep(0.5)
- print ("Connected to "+(str(tclient)))
- time.sleep(0.5)
- print ("-"*20)
- usern=input("USERNAME: ")
- time.sleep(0.5)
- passw=input("PASSWORD: ")
- if usern == account_user:
- if passw ==account_pass:
- print ("connected to "+(str(tclient)))
- time.sleep(0.5)
- print("-"*20)
- time.sleep(1)
- #enter here the text file in the pycache of the selected host
- else:
- print ("Wrong ")
- else:
- print ("2")
- else:
- print ("Host not in netstat, please try again")
- def command_lst():
- print("""? advent areacode basic bf cal
- calc ching clear clock cowsay date
- echo eliza factor figlet finger fnord
- geoip help hosts ipaddr joke login
- mac md5 morse newuser notes octopus
- phoon pig ping primes privacy qr
- rain rand rfc rig roll rot13
- sleep starwars traceroute units uptime usenet
- users uumap uupath uuplot weather when
- zipcode zork zrun""")
- def call():
- global at
- if connection_counter==0:
- print("Connected to TELEHACK port",logged_port)
- print("")
- print("It is",today)
- print("There are 1 local users. There are",num_lines,"hosts on the network.")
- print("")
- print(" Type HELP for a detailed command list.")
- print(" Type NEWUSER to create an account.")
- print("")
- print("May the command line live forever.")
- print("")
- command_lst()
- connection_counter+=1
- at=input("@ ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement