2020-07-28 12:42:19 +02:00
|
|
|
from pynput.mouse import Controller
|
|
|
|
from secrets import randbits
|
|
|
|
from time import sleep
|
|
|
|
|
|
|
|
|
|
|
|
def initialize_mouse():
|
|
|
|
mouse = Controller()
|
|
|
|
return mouse
|
|
|
|
|
|
|
|
|
|
|
|
def erratic_movement(mouse):
|
|
|
|
x, y = mouse.position
|
|
|
|
mouse.move(x + randbits(2), y + randbits(2))
|
|
|
|
sleep(randbits(2))
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
mouse = initialize_mouse()
|
|
|
|
while True:
|
|
|
|
erratic_movement(mouse)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|