Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/library/prank/Full-ScreenBannerJoke/script.py
2968 views
1
try:
2
import pygame
3
except:
4
import os
5
os.system("pip install pygame")
6
import pygame
7
import random
8
9
10
pygame.init()
11
12
infoObject = pygame.display.Info()
13
screen_width = infoObject.current_w
14
screen_height = infoObject.current_h
15
screen = pygame.display.set_mode((screen_width, screen_height))
16
pygame.display.set_caption("Python Prank!")
17
18
font = pygame.font.SysFont("Arial", 64)
19
20
while True:
21
22
text_color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
23
text = font.render(":-) RUBBER DUCKS WILL TAKE OVER THE OCEANS! (-: )", True, text_color)
24
25
x_offset = random.randint(-50, 50)
26
y_offset = random.randint(-50, 50)
27
text_rect = text.get_rect()
28
text_rect.center = (screen_width//2 + x_offset, screen_height//2 + y_offset)
29
30
screen.fill((0, 0, 0))
31
screen.blit(text, text_rect)
32
pygame.display.flip()
33