2020-07-28 22:30:55 +02:00
|
|
|
from mouse import move
|
2020-07-28 15:31:55 +02:00
|
|
|
from secrets import randbelow
|
2020-07-28 12:42:19 +02:00
|
|
|
from time import sleep
|
|
|
|
|
|
|
|
|
2022-06-10 20:12:02 +02:00
|
|
|
def erratic_movement(screen_width=800, screen_height=600):
|
2020-07-28 22:30:55 +02:00
|
|
|
"""
|
|
|
|
Moves the cursor to a random position with the screen's width and height as an upper bound
|
|
|
|
"""
|
2020-07-28 13:24:50 +02:00
|
|
|
move(
|
2022-06-10 20:12:02 +02:00
|
|
|
randbelow(screen_width),
|
|
|
|
randbelow(screen_height),
|
2020-07-28 13:24:50 +02:00
|
|
|
)
|
2020-07-28 12:42:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2020-07-28 22:30:55 +02:00
|
|
|
"""
|
|
|
|
Calls the movement function in an infinite loop, with a random delay between each call
|
|
|
|
"""
|
2020-07-28 12:42:19 +02:00
|
|
|
while True:
|
2022-06-10 20:12:02 +02:00
|
|
|
erratic_movement()
|
2020-07-28 15:45:59 +02:00
|
|
|
sleep(randbelow(90))
|
2020-07-28 12:42:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|