Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import time #Reseached online: http://stackoverflow.com/questions/510348/how-can-i-make-a-time-delay-in-python
- #It is an import for time
- openpro = 0 # This will set the variable used in task manager to negative for a program being open now
- def cashcow():
- global openpro # This makes open pro usable outside this function
- openpro = 1 # When this aplication is opened or called, it will set this to 1
- print "=" * 50
- print 'Welcome to Cash Cow'
- print "="*50
- print''
- print "Loading",
- time.sleep(1) # Learned in http://stackoverflow.com/questions/510348/how-can-i-make-a-time-delay-in-python
- print '.',
- time.sleep(1) # What this does is make the program wait for the amount of time of seconds in the paranthese
- print '.',
- time.sleep(1)
- print '.'
- time.sleep(1)
- print ''
- print "Type 'yes' to randomly generate credit card numbers that work!"
- print''
- cashchoice = raw_input("(yes/no)") # Asks if you want to start
- print''
- time.sleep(2)
- codes = random.choice([5,7,4,3]) # This will set codes to one of these numbers
- if cashchoice == "yes":
- while codes <= 10: # This is a while loop that will what is inside it until x is greater than 10
- codes = codes + 1 # This keeps adding 1 to the orginal number that was randomly choosen so that it will be a random number of codes
- d1 = random.choice(range(1,9)) # This variable choose a random digit between 1 and 9
- d2 = random.choice(range(1,9))
- d3 = random.choice(range(1,9))
- d4 = random.choice(range(1,9))
- d5 = random.choice(range(1,9))
- d6 = random.choice(range(1,9))
- d7 = random.choice(range(1,9))
- d8 = random.choice(range(1,9))
- d9 = random.choice(range(1,9))
- d10 = random.choice(range(1,9))
- d11 = random.choice(range(1,9))
- d12 = random.choice(range(1,9))
- d13 = random.choice(range(1,9))
- d14 = random.choice(range(1,9))
- d15 = random.choice(range(1,9))
- d16 = random.choice(range(1,9))
- print "%d%d%d%d %d%d%d%d %d%d%d%d %d%d%d%d" %(d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16)
- print'' # Above: This will print the random numbers in groups of four
- time.sleep(1)
- quitcash = raw_input("Quit? (yes/no)") # Asks to quit
- if quitcash == "yes":
- time.sleep(1)
- print''
- computer() # Goes back to computer
- elif quitcash == "no":
- time.sleep(3)
- print "That's enought time!!!"
- print''
- computer() #Goes back no matter what
- else:
- print "Invalid input"
- print''
- computer()
- else:
- time.sleep(1) # What this does is that it makes a waitime or it makes time "sleep" for the amount of seconds in the paranthese
- computer()
- def diag():
- three = "This could take a few seconds...\n" # These variables are different for each time
- one = "This could take a second...\n"
- five = "This could take a couple of seconds...\n"
- waittime = random.choice([three,one,five]) # Chooses one of the times
- if waittime == three:
- print three # The the waiting time
- time.sleep(1)
- print "Loading..."
- print''
- time.sleep(3) # The amount of time depends on the number randomyl chosen and it will say the percent that corresponds to that number
- print "System preforming at 75%"
- print''
- systemcheck()
- elif waittime == one:
- print one
- time.sleep(1)
- print "Loading..."
- print''
- time.sleep(1)
- print "System preforming at 99%"
- print''
- systemcheck()
- elif waittime == five:
- print five
- time.sleep(1)
- print "Loading..."
- print''
- time.sleep(5)
- print "System preforming at 42%"
- print''
- time.sleep(1)
- systemcheck()
- else:
- print "Somethings not right"
- def scan():
- trojan = "The file: Trojan.exe has been found" #These are the possible outcomes of the scan.
- hacked = "User: 'anonymous' is trying to gain acess to computer"
- hal = "I'm sorry %s, I'm affraid I can't do that." %username
- troll = """
- ░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄
- ░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄
- ░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█
- ░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░█
- ░▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░█
- █▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒█
- █▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█
- ░█▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█
- ░░█░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█
- ░░░█░░██░░▀█▄▄▄█▄▄█▄████░█
- ░░░░█░░░▀▀▄░█░░░█░███████░█
- ░░░░░▀▄░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█
- ░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░█
- ░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░█
- ░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░█
- """
- safe = "Your computer is all clear!"
- print "Scanning",
- print''
- time.sleep(1)
- print ".",
- time.sleep(1)
- print ".",
- time.sleep(1)
- print "."
- time.sleep(1)
- virus = random.choice([trojan,hacked,hal,troll,safe]) # Randomly chooses one of the possible outcomes
- if virus == trojan:
- print "-"*50
- print trojan # Prints the outcome...
- print "-"*50
- print ""
- print'+' * 50
- print "Emergency Shutdown" # And this is the result
- print'+' * 50
- print''
- elif virus == hacked:
- print "-"*50
- print hacked
- print "-"*50
- print''
- print'+' * 50
- print "Emergency Shutdown"
- print'+' * 50
- print''
- elif virus == hal:
- print "-"*50
- print hal
- print "-"*50
- print''
- print'+' * 50
- print "Emergency Shutdown"
- print'+' * 50
- print''
- elif virus == troll:
- print troll
- time.sleep(3)
- computer()
- elif virus == safe:
- print "-"*50
- print safe
- print "-"*50
- print''
- time.sleep(2)
- systemcheck() #Goes back
- else:
- print "Somethings not right" # This should not happen but it was more of a test.
- def taskm():
- global openpro
- if openpro == 1: # If the cash cow program was even opened, then openpro would have been set to 1
- print''
- print "Aplications open:\n\n\t*Cash Cow" # This will say that it is open
- print''
- closprog = raw_input("Close program? (yes/no)")
- if closprog == "yes":
- openpro = 0 # If you close the program it will set openpro to 0 making it closed
- print".",
- time.sleep(1)
- print "."
- time.sleep(1)
- computer()
- elif closprog == "no":
- computer()
- else:
- print "Please enter 'yes' or 'no'"
- else:
- print "-No programs open-" # If it was never opened, or it was closed then it will say this.
- print''
- print "Now closing"
- time.sleep(2)
- computer()
- def systemcheck():
- print "+"*50
- print "Please choose and option"
- print "+"*50
- global c_a_d
- c_a_d = int(raw_input("\t1. Run Diagnostic\n\t2. Scan Computer\n\t3. Task Manager\n\t4. Go Back\n"))
- if c_a_d == 1: # This is just a menu or port to the three options above for system check
- diag()
- elif c_a_d == 2:
- scan()
- elif c_a_d == 3:
- taskm()
- elif c_a_d == 4:
- time.sleep(1)
- computer()
- else:
- print "Enter a valid number"
- systemcheck()
- def computer():
- print "="*50
- print "Welcome Back %s" %username # User user name to show your name
- print "="*50
- print''
- print'-'* 35
- print "What do you want to do?"
- print'-'* 35
- global mainmenu
- mainmenu= int(raw_input("\t1. Open Cash Cow\n\t2. System Check\n\t3. Log off\n\t4. Reboot\n\t5. Shut Down\n"))
- if mainmenu == 1:
- cashcow() # goes to cash cow if number is choosen
- elif mainmenu == 2:
- systemcheck() # goes to system check
- elif mainmenu == 3:
- time.sleep(1)
- logon() # Logon below
- elif mainmenu == 4:
- time.sleep(1)
- startup() # reboot will call the very first function which is the start of the program
- elif mainmenu == 5:
- exit(0) # Exit 0 should end the program or kill it
- else:
- print "Please enter a valid numer"
- def logon(): # Logging in
- print "="*50
- print "Please Log In"
- print "="*50
- users = int(raw_input("1. Jason\n2. Jesepi\n\n")) # Two users I made
- if users == 1:
- print"-"*23
- global username # did this so it could be called later on
- username = raw_input("What is your user name?") # Asks for name and it can be anything
- print''
- password = raw_input("Please enter password")
- if password == "password": # This is the password and the correct one must be entered
- print""
- computer() # It will go to the main menu
- else:
- print""
- print "Incorrect, please try again"
- logon()
- elif users == 2: # This was just for fun
- print"-"*23
- name2 = raw_input("What is your user name?")
- password2 = raw_input("Please enter password")
- if password2 == "anything": # This is correct password but...
- print "Incorrect!!!" # No matter what you do it will say incorrect because Jesepi is very personal magical being
- logon()
- else:
- time.sleep(1)
- print""
- print "Incorrect!!!" # Anything else will be wrong
- print''
- time.sleep(1)
- logon()
- #Start Up MAIN # Beginning
- def startup():# This makes it available out side of this function # This variable is for the task manager
- print"="*50
- print "Starting up, this could take a second!"
- print''
- time.sleep(1)
- print "Monitor Working"
- time.sleep(1) # Learned in http://stackoverflow.com/questions/510348/how-can-i-make-a-time-delay-in-python
- print"..."
- time.sleep(1)
- print"..."
- time.sleep(1)
- print"..."
- time.sleep(1)
- print "_"*18
- print "Checking for Mouse" #Mouse Check
- print "_"*18
- time.sleep(1)
- print ".",
- time.sleep(1)
- print ".",
- time.sleep(1)
- print "."
- time.sleep(1)
- print ''
- yesmouse = "Mouse detected" # Setting Variables for random
- nomouse = "No mouse detected"
- mouse = random.choice([yesmouse,yesmouse,yesmouse,nomouse]) # 25% chance detecting no mouse
- if mouse == yesmouse:
- print mouse # It will say it is detected if found
- print''
- print'+'*15
- time.sleep(1)
- print''
- elif mouse == nomouse: # If it is not detected:
- print mouse
- print''
- print'+' * 50
- print "Emergency Restart in 3 seconds"
- print'+' * 50
- print""
- time.sleep(3) # Wait 3 sec then,
- startup() # Starts the process over
- else:
- print"Somethings not right"
- print "_"*21
- print "Checking for Keyboard" # Key board Check
- print "_"*21
- time.sleep(1)
- print ".",
- time.sleep(1)
- print ".",
- time.sleep(1)
- print "."
- time.sleep(1)
- print''
- yeskey = "Keyboard detected"
- nokey = "No keyboard detected"
- keyboard = random.choice([yeskey,yeskey,yeskey,yeskey,nokey]) # The keyboard works better hence the extra yeskey
- if keyboard == yeskey:
- print keyboard
- print''
- elif keyboard == nokey:
- print keyboard
- print''
- print'+' * 50
- print "Emergency Restart in 3 seconds"
- print'+' * 50
- print""
- time.sleep(3)
- startup()
- else:
- print"Somethings not right"
- logon()
- startup() # This is the only call outside a function because every other function can be called from a function so this is the only one called
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement