-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprank.py
58 lines (47 loc) · 1.75 KB
/
prank.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import time
import webbrowser
import platform
import pyautogui
OS = platform.system()
if OS == "macOS":
safari_path="/Applications/Safari.app"
webbrowser.register("safari", None, webbrowser.BackgroundBrowser(safari_path))
webbrowser.get("safari").open("https://updatefaker.com/osx/index.html")
elif OS == "Windows":
ver = platform.release()
if ver == "10":
edge_path="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
webbrowser.register("edge", None, webbrowser.BackgroundBrowser(edge_path))
webbrowser.get("edge").open("https://updatefaker.com/windows10/index.html")
time.sleep(5)
pyautogui.press("f11")
time.sleep(0.5)
pyautogui.press("tab")
time.sleep(0.5)
pyautogui.press("tab")
time.sleep(0.5)
pyautogui.press("tab")
time.sleep(0.5)
pyautogui.press("enter")
pyautogui.keyDown("alt")
pyautogui.keyDown("right")
pyautogui.keyUp("alt")
pyautogui.keyUp("right")
elif ver == "11":
edge_path="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
webbrowser.register("edge", None, webbrowser.BackgroundBrowser(edge_path))
webbrowser.get("edge").open("https://updatefaker.com/windows11/index.html")
time.sleep(5)
pyautogui.press("f11")
time.sleep(0.5)
pyautogui.press("tab")
time.sleep(0.5)
pyautogui.press("tab")
time.sleep(0.5)
pyautogui.press("tab")
time.sleep(0.5)
pyautogui.press("enter")
pyautogui.keyDown("alt")
pyautogui.keyDown("right")
pyautogui.keyUp("alt")
pyautogui.keyUp("right")