Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###########################################################################
- # William Dubbini 09.11.18 #
- # Modify this program to reflect your Cyber Security learning #
- # Remember to user corrct vairable names #
- # add the correct annotations #
- # create a document to document your testing #
- ###########################################################################
- print ('WELCOME TO THE MULTIPLE CHOICE TEST\n')
- first_name = input('WHAT IS YOUR FIRST NAME? ')
- last_name = input("WHAT IS YOUR LAST NAME? ")
- ###########################################################################
- # #
- # Validation #
- # #
- ###########################################################################
- username = input("Please enter your username: ")
- password = input("Please enter your password: ")
- validate_password = input("Please confirm your password: ")
- if password == validate_password:
- print("Thanks you are now validated")
- else:
- print ("INCORRECT PASSWORD!")
- print ("please try agian later!")
- quit()
- ###########################################################################
- # Welcome #
- ###########################################################################
- #.capitalize capitalizes the first letter of a sentance
- print ('\nHI THERE ' + first_name.capitalize() + " " + last_name.capitalize() + '! LETS PLAY A GAME!\n')
- print ('I will ask you 10 questions and give you three choices for each question.\n\nYou select which choice is the correct answer. Eg. A, B or C\n')
- print ('Important : Please keep your CAPS LOCK on')
- print ('\n-----------------------------------------------------------\n')
- #opens and or creates a file for the user if they have played before their results will be added to this file
- MyFile = open(first_name + last_name +".txt", "a")
- ###########################################################################
- # SET THE SCORE TO ZERO #
- ###########################################################################
- score = 0
- score = int(score) #Convert the 0 into a number so we can add scores
- ###########################################################################
- # QUESTION 1 #
- ###########################################################################
- print ('QUESTION 1: What is the definition of cyber security? \n')
- print ('A. Protecting networks, computers, programs and data from attack, damage or unauthorised access through the use of technologies, processes and practices.')
- print ('B. Unprotecting networks, computers, programs and data from attack, damage or unauthorised access through the use of technologies, processes and practices.')
- print ('C. Protecting networks, computers, programs and data from attack, damage or authorised acceess through malicous technologies.')
- print ('')
- Q1answer = "A"
- Q1response = input('Your answer : ')
- if (Q1response != Q1answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q1response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q1response + "\n")
- MyFile.close()
- ###########################################################################
- # QUESTION 2 #
- ###########################################################################
- MyFile = open(first_name + last_name +".txt", "a")
- print ('QUESTION 2: What is phishing? \n')
- print ('A. To hack into the CIAs servers.')
- print ('B. To fraudulenntly attempt to obtain sensitive info such as usernames, passwords and credit card details disquising yourself as a trustworthy site')
- print ('C. To gain access to someones data by watching over their shoulder.')
- print ('')
- Q2answer = "B"
- Q2response= input('Your answer : ')
- if (Q2response != Q2answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q2response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q2response +"\n")
- MyFile.close()
- # continue in the same format to produce a quiz of 10 questions
- # Thank you message the end with TOTAL score
- # modify the program, to identify users input if caps lock in not on
- ###########################################################################
- # QUESTION 3 #
- ###########################################################################
- MyFile = open(first_name + last_name +".txt", "a")
- print ('QUESTION 3: What is shouldering? \n')
- print ('A. A type of social engineering to gain access to your pins or passwords')
- print ('B. A type of social engineering to steal your shoulder')
- print ('C. A type of social engineering to sell you to the NSA')
- print ('')
- Q3answer = "A"
- Q3response= input('Your answer : ')
- if (Q3response != Q3answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q3response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q3response + "\n")
- MyFile.close()
- ###########################################################################
- # QUESTION 4 #
- ###########################################################################
- MyFile = open(first_name + last_name +".txt", "a")
- print ('QUESTION 4: What type of cyber crime is this? "stealing infomation that you shouldnt have access to" ? \n')
- print ('A. Phishing')
- print ('B. Pretexting')
- print ('C. Blagging')
- print ('')
- Q4answer = "C"
- Q4response= input('Your answer : ')
- if (Q4response != Q4answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q4response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q4response + "\n")
- MyFile.close()
- ###########################################################################
- # QUESTION 5 #
- ###########################################################################
- MyFile = open(first_name + last_name +"awnsers.txt", "a")
- print ('QUESTION 5: What is pretexting? \n')
- print ('A. A scam where someone manipulates you into giving your details up')
- print ('B. A scam where you just give your details to someone who you trust')
- print ('C. A scam where someone stickes a microphone in your bag and listens to your every move')
- print ('')
- Q5answer = "A"
- Q5response= input('Your answer : ')
- if (Q5response != Q5answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q5response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q5response + "\n")
- MyFile.close()
- ###########################################################################
- # QUESTION 6 #
- ###########################################################################
- MyFile = open(first_name + last_name +".txt", "a")
- print ('QUESTION 6: What is white box penetraion testeing? \n')
- print ('A. They are given the servers access codes.')
- print ('B. They determine how much damage a disgruntled employee or dishonest could cause')
- print ('C. They hack the server steal all the info and then destroy the compamy')
- print ('')
- Q6answer = "B"
- Q6response= input('Your answer : ')
- if (Q6response != Q6answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q6response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q6response + "\n")
- MyFile.close()
- ###########################################################################
- # QUESTION 7 #
- ###########################################################################
- MyFile = open(first_name + last_name +".txt", "a")
- print ('QUESTION 7: What is Black box penetraion testeing? \n')
- print ('A. The hacker obtains as much info as possible and sells it to fellow hackers.')
- print ('B. The Tester pretends to be a good guy but ends up selling your companies secrets!')
- print ('C. The tester hacks the sever with no infomation and sees what they can do to the system and how far they get in')
- print ('')
- Q7answer = "C"
- Q7response= input('Your answer : ')
- if (Q7response != Q7answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q7response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q7response + "\n")
- MyFile.close()
- ###########################################################################
- # QUESTION 8 #
- ###########################################################################
- MyFile = open(first_name + last_name +".txt", "a")
- print ('QUESTION 8: What is pharming? \n')
- print ('A. Pharming is a technique intended to redirect a websites traffic to another. fake site the attacker will use to put code on your hard drive')
- print ('B. Pharming is a technique used to give your info to unwanted people')
- print ('C. Pharming is a danger to the human race What if a nuke got set off?')
- print ('')
- Q8answer = "A"
- Q8response= input('Your answer : ')
- if (Q8response != Q8answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q8response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q8response + "\n")
- MyFile.close()
- ###########################################################################
- # QUESTION 9 #
- ###########################################################################
- MyFile = open(first_name + last_name +".txt", "a")
- print ('QUESTION 9: What threat does a weak or default password pose? \n')
- print ('A. You wont forget it')
- print ('B. Passwords are safe cause only you know them')
- print ('C. A default password could be easy for an attacket to guess and steal your info')
- print ('')
- Q9answer = "C"
- Q9response= input('Your answer : ')
- if (Q9response != Q9answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q9response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q9response + "\n")
- MyFile.close()
- ###########################################################################
- # QUESTION 10 #
- ###########################################################################
- MyFile = open(first_name + last_name +".txt", "a")
- print ('QUESTION 10: What threat does removable media pose? \n')
- print ('A. A virus could be injected onto the remvoable media and planted onto another system unsuspectingly')
- print ('B. There is no risk?, what are you talking about')
- print ('C. A usb has built in Antivirus')
- print ('')
- Q10answer = "A"
- Q10response= input('Your answer : ')
- if (Q10response != Q10answer):
- print ('Sorry, that is incorrect! Go and revise you lazy person!')
- else:
- print ('Well done! ' + Q10response + ' is correct!')
- score = score + 1
- print ('Your current score is ' + str(score) + ' out of 10')
- print ('\n-----------------------------------------------------------\n')
- MyFile.write(Q10response + "\n")
- MyFile.close()
- ###########################################################################
- # end of test #
- ###########################################################################
- print("Thank you ",first_name.capitalize()," ", last_name.capitalize(), " for completing the test, Your score was", score, "out of 10")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement