Advertisement
15wdubbini-poole

TO PRINT

Nov 23rd, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 13.32 KB | None | 0 0
  1. ###########################################################################
  2. # William Dubbini 09.11.18                                                #
  3. # Modify this program to reflect your Cyber Security learning             #
  4. # Remember to user corrct vairable names                                  #
  5. # add the correct annotations                                             #
  6. # create a document to document your testing                              #
  7. ###########################################################################
  8.  
  9.  
  10.  
  11. print ('WELCOME TO THE MULTIPLE CHOICE TEST\n')
  12. first_name = input('WHAT IS YOUR FIRST NAME? ')
  13. last_name = input("WHAT IS YOUR LAST NAME? ")
  14. ###########################################################################
  15. #                                                                         #
  16. #                               Validation                                #
  17. #                                                                         #
  18. ###########################################################################
  19. username = input("Please enter your username: ")
  20. password = input("Please enter your password: ")
  21. validate_password = input("Please confirm your password: ")
  22. if password == validate_password:
  23.     print("Thanks you are now validated")
  24. else:
  25.     print ("INCORRECT PASSWORD!")
  26.     print ("please try agian later!")
  27.     quit()
  28.  
  29. ###########################################################################
  30. #                               Welcome                                   #
  31. ###########################################################################
  32. #.capitalize capitalizes the first letter of a sentance
  33. print ('\nHI THERE ' + first_name.capitalize() + " " + last_name.capitalize() + '! LETS PLAY A GAME!\n')
  34. 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')
  35. print ('Important : Please keep your CAPS LOCK on')
  36. print ('\n-----------------------------------------------------------\n')
  37. #opens and or creates a file for the user if they have played before their results will be added to this file
  38. MyFile = open(first_name + last_name +".txt", "a")
  39.  
  40. ###########################################################################
  41. #                          SET THE SCORE TO ZERO                          #
  42. ###########################################################################
  43.  
  44. score = 0
  45. score = int(score)  #Convert the 0 into a number so we can add scores
  46.  
  47.  
  48. ###########################################################################
  49. #                           QUESTION 1                                    #
  50. ###########################################################################
  51.  
  52. print ('QUESTION 1: What is the definition of cyber security? \n')
  53. print ('A. Protecting networks, computers, programs and data from attack, damage or unauthorised access through the use of technologies, processes and practices.')
  54. print ('B. Unprotecting networks, computers, programs and data from attack, damage or unauthorised access through the use of technologies, processes and practices.')
  55. print ('C. Protecting networks, computers, programs and data from attack, damage or authorised acceess through malicous technologies.')
  56. print ('')
  57.  
  58. Q1answer = "A"
  59. Q1response = input('Your answer : ')
  60.  
  61. if (Q1response != Q1answer):
  62.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  63.  
  64. else:
  65.     print ('Well done! ' + Q1response + ' is correct!')
  66.     score = score + 1
  67.  
  68. print ('Your current score is ' + str(score) + ' out of 10')
  69. print ('\n-----------------------------------------------------------\n')
  70. MyFile.write(Q1response + "\n")
  71. MyFile.close()
  72. ###########################################################################
  73. #                           QUESTION 2                                    #
  74. ###########################################################################
  75. MyFile = open(first_name + last_name +".txt", "a")
  76.  
  77. print ('QUESTION 2: What is phishing? \n')
  78. print ('A. To hack into the CIAs servers.')
  79. print ('B. To fraudulenntly attempt to obtain sensitive info such as usernames, passwords and credit card details disquising yourself as a trustworthy site')
  80. print ('C. To gain access to someones data by watching over their shoulder.')
  81. print ('')
  82.  
  83. Q2answer = "B"
  84. Q2response= input('Your answer : ')
  85.  
  86. if (Q2response != Q2answer):
  87.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  88.  
  89. else:
  90.     print ('Well done! ' + Q2response + ' is correct!')
  91.     score = score + 1
  92.  
  93. print ('Your current score is ' + str(score) + ' out of 10')
  94. print ('\n-----------------------------------------------------------\n')
  95. MyFile.write(Q2response +"\n")
  96. MyFile.close()
  97.  
  98. # continue in the same format to produce a quiz of 10 questions
  99. # Thank you message the end with TOTAL score
  100. # modify the program, to identify users input if caps lock in not on
  101.  
  102. ###########################################################################
  103. #                           QUESTION 3                                    #
  104. ###########################################################################
  105. MyFile = open(first_name + last_name +".txt", "a")
  106.  
  107. print ('QUESTION 3: What is shouldering? \n')
  108. print ('A. A type of social engineering to gain access to your pins or passwords')
  109. print ('B. A type of social engineering to steal your shoulder')
  110. print ('C. A type of social engineering to sell you to the NSA')
  111. print ('')
  112.  
  113. Q3answer = "A"
  114. Q3response= input('Your answer : ')
  115.  
  116. if (Q3response != Q3answer):
  117.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  118.  
  119. else:
  120.     print ('Well done! ' + Q3response + ' is correct!')
  121.     score = score + 1
  122.  
  123. print ('Your current score is ' + str(score) + ' out of 10')
  124. print ('\n-----------------------------------------------------------\n')
  125. MyFile.write(Q3response + "\n")
  126. MyFile.close()
  127.  
  128. ###########################################################################
  129. #                           QUESTION 4                                    #
  130. ###########################################################################
  131. MyFile = open(first_name + last_name +".txt", "a")
  132.  
  133. print ('QUESTION 4: What type of cyber crime is this? "stealing infomation that you shouldnt have access to" ? \n')
  134. print ('A. Phishing')
  135. print ('B. Pretexting')
  136. print ('C. Blagging')
  137. print ('')
  138.  
  139. Q4answer = "C"
  140. Q4response= input('Your answer : ')
  141.  
  142. if (Q4response != Q4answer):
  143.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  144.  
  145. else:
  146.     print ('Well done! ' + Q4response + ' is correct!')
  147.     score = score + 1
  148.  
  149. print ('Your current score is ' + str(score) + ' out of 10')
  150. print ('\n-----------------------------------------------------------\n')
  151. MyFile.write(Q4response + "\n")
  152. MyFile.close()
  153.  
  154. ###########################################################################
  155. #                           QUESTION 5                                    #
  156. ###########################################################################
  157. MyFile = open(first_name + last_name +"awnsers.txt", "a")
  158.  
  159. print ('QUESTION 5: What is pretexting? \n')
  160. print ('A. A scam where someone manipulates you into giving your details up')
  161. print ('B. A scam where you just give your details to someone who you trust')
  162. print ('C. A scam where someone stickes a microphone in your bag and listens to your every move')
  163. print ('')
  164.  
  165. Q5answer = "A"
  166. Q5response= input('Your answer : ')
  167.  
  168. if (Q5response != Q5answer):
  169.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  170.    
  171. else:
  172.     print ('Well done! ' + Q5response + ' is correct!')
  173.     score = score + 1
  174.  
  175. print ('Your current score is ' + str(score) + ' out of 10')
  176. print ('\n-----------------------------------------------------------\n')
  177. MyFile.write(Q5response + "\n")
  178. MyFile.close()
  179.  
  180. ###########################################################################
  181. #                           QUESTION 6                                    #
  182. ###########################################################################
  183. MyFile = open(first_name + last_name +".txt", "a")
  184.  
  185. print ('QUESTION 6: What is white box penetraion testeing? \n')
  186. print ('A. They are given the servers access codes.')
  187. print ('B. They determine how much damage a disgruntled employee or dishonest could cause')
  188. print ('C. They hack the server steal all the info and then destroy the compamy')
  189. print ('')
  190.  
  191. Q6answer = "B"
  192. Q6response= input('Your answer : ')
  193.  
  194. if (Q6response != Q6answer):
  195.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  196.    
  197. else:
  198.     print ('Well done! ' + Q6response + ' is correct!')
  199.     score = score + 1
  200.  
  201. print ('Your current score is ' + str(score) + ' out of 10')
  202. print ('\n-----------------------------------------------------------\n')
  203. MyFile.write(Q6response + "\n")
  204. MyFile.close()
  205.  
  206. ###########################################################################
  207. #                           QUESTION 7                                    #
  208. ###########################################################################
  209. MyFile = open(first_name + last_name +".txt", "a")
  210.  
  211. print ('QUESTION 7: What is Black box penetraion testeing? \n')
  212. print ('A. The hacker obtains as much info as possible and sells it to fellow hackers.')
  213. print ('B. The Tester pretends to be a good guy but ends up selling your companies secrets!')
  214. 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')
  215. print ('')
  216.  
  217. Q7answer = "C"
  218. Q7response= input('Your answer : ')
  219.  
  220. if (Q7response != Q7answer):
  221.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  222.    
  223. else:
  224.     print ('Well done! ' + Q7response + ' is correct!')
  225.     score = score + 1
  226.  
  227. print ('Your current score is ' + str(score) + ' out of 10')
  228. print ('\n-----------------------------------------------------------\n')
  229. MyFile.write(Q7response + "\n")
  230. MyFile.close()
  231.  
  232. ###########################################################################
  233. #                           QUESTION 8                                    #
  234. ###########################################################################
  235. MyFile = open(first_name + last_name +".txt", "a")
  236.  
  237. print ('QUESTION 8: What is pharming? \n')
  238. 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')
  239. print ('B. Pharming is a technique used to give your info to unwanted people')
  240. print ('C. Pharming is a danger to the human race What if a nuke got set off?')
  241. print ('')
  242.  
  243. Q8answer = "A"
  244. Q8response= input('Your answer : ')
  245.  
  246. if (Q8response != Q8answer):
  247.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  248.    
  249. else:
  250.     print ('Well done! ' + Q8response + ' is correct!')
  251.     score = score + 1
  252.  
  253. print ('Your current score is ' + str(score) + ' out of 10')
  254. print ('\n-----------------------------------------------------------\n')
  255. MyFile.write(Q8response + "\n")
  256. MyFile.close()
  257.  
  258. ###########################################################################
  259. #                           QUESTION 9                                    #
  260. ###########################################################################
  261. MyFile = open(first_name + last_name +".txt", "a")
  262.  
  263. print ('QUESTION 9: What threat does a weak or default password pose? \n')
  264. print ('A. You wont forget it')
  265. print ('B. Passwords are safe cause only you know them')
  266. print ('C. A default password could be easy for an attacket to guess and steal your info')
  267. print ('')
  268.  
  269. Q9answer = "C"
  270. Q9response= input('Your answer : ')
  271.  
  272. if (Q9response != Q9answer):
  273.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  274.    
  275. else:
  276.     print ('Well done! ' + Q9response + ' is correct!')
  277.     score = score + 1
  278.  
  279. print ('Your current score is ' + str(score) + ' out of 10')
  280. print ('\n-----------------------------------------------------------\n')
  281. MyFile.write(Q9response + "\n")
  282. MyFile.close()
  283.  
  284. ###########################################################################
  285. #                           QUESTION 10                                   #
  286. ###########################################################################
  287. MyFile = open(first_name + last_name +".txt", "a")
  288.  
  289. print ('QUESTION 10: What threat does removable media pose? \n')
  290. print ('A. A virus could be injected onto the remvoable media and planted onto another system unsuspectingly')
  291. print ('B. There is no risk?, what are you talking about')
  292. print ('C. A usb has built in Antivirus')
  293. print ('')
  294.  
  295. Q10answer = "A"
  296. Q10response= input('Your answer : ')
  297.  
  298. if (Q10response != Q10answer):
  299.     print ('Sorry, that is incorrect! Go and revise you lazy person!')
  300.    
  301. else:
  302.     print ('Well done! ' + Q10response + ' is correct!')
  303.     score = score + 1
  304.  
  305. print ('Your current score is ' + str(score) + ' out of 10')
  306. print ('\n-----------------------------------------------------------\n')
  307. MyFile.write(Q10response + "\n")
  308. MyFile.close()
  309.  
  310. ###########################################################################
  311. #                           end of test                                   #
  312. ###########################################################################
  313.  
  314. 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