Using Python to output keyboard strokes and mouse movement

Status
Not open for further replies.

Atreyo Bhattacharjee

Commendable
Feb 7, 2017
42
0
1,580
I don't know how to word this concept as a question, but simply I want to make a rubber ducky out of raspberry pi, and I was wondering if it is possible to output keyboard strokes and/or mouse movement from USB female connections on the RPi, using some kind of Python library or API that runs on Raspbian?
 
Idea being that if you press the "L" key the ducky goes left, "R" goes right, "F" goes forward, and "B" (or "R") goes backward (reverse)…. Correct?

You will need a keyboard listener: e.g.:

https://pythonhosted.org/pynput/keyboard.html

As for USP output to the rubber ducky, that is more complicated.

Basically the ducky is a robot so:

https://learn.adafruit.com/hello-world-of-robotics-with-crickit/use-circuitpython

https://media.readthedocs.org/pdf/robotpy/stable/robotpy.pdf

Google "python USB output to robot" for more information and ideas. Narrow the search criteria as necessary to match your idea and requirements.



 

Atreyo Bhattacharjee

Commendable
Feb 7, 2017
42
0
1,580

Sorry, I'm trying to have the ducky OUTPUT keystrokes from the Raspberry Pis usb port, to a victim computer. I want to be able to just plug it into a computer, and the ducky, acting like a keyboard, can send keystrokes to the victim computer.
 

Atreyo Bhattacharjee

Commendable
Feb 7, 2017
42
0
1,580

I'm just doing this to learn about the RPi, if I wanted to do anything malicious, I would just buy a rubber ducky, which is a lot cheaper and easier to use.
 
Unless there is some ban or other restrictions involved with where you live or work that prohibit having a "rubber ducky".

I just looked into the product and its' potential for nefarious use.

Agreeing with Alabalcho - no more assistance should be provided.

Closing thread accordingly.


Closing thread.
 
Status
Not open for further replies.