ExamV1

Harmless Browser Closer

Sep 27th, 2021 (edited)
1,023
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #simple code which will close any instances of a browser application, this is very harmless just some fun I was making.
  2. import os
  3. import time
  4.  
  5. print("Welcome to Exam's Application Exit Program")
  6.  
  7.  
  8. while True:
  9.    answer = input('Do you want to close your current browsers? y/n:')
  10.    if answer.lower().startswith("y"):
  11.     print("ok, exiting browser applications in \n3")
  12.     time.sleep(1)
  13.     print("2")
  14.     time.sleep(1)
  15.     print("1")
  16.     time.sleep(1)
  17.     os.system("taskkill /im chrome.exe /f")
  18.     os.system("taskkill /im msedge.exe /f")
  19.     os.system("taskkill /im MicrosoftEdge.exe /f")
  20.     os.system("taskkill /im firefox.exe /f")
  21.     os.system("taskkill /im opera.exe /f")
  22.     os.system("taskkill /im iexplore.exe /f")
  23.     os.system("taskkill /im safari.exe /f")
  24.     time.sleep(5)
  25.     print("done!")
  26.     exit()
  27.    elif answer.lower().startswith("n"):
  28.     print("Action Cancelled!")
  29.     time.sleep(1)
  30.     print("Closing in\n3")
  31.     time.sleep(1)
  32.     print("2")
  33.     time.sleep(1)
  34.     print("1")
  35.     exit()
  36.  
RAW Paste Data