Skip to content

Commit

Permalink
docs: simplify facedancer example
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinevg committed Mar 8, 2024
1 parent 3f5e489 commit 6c15f92
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions docs/source/facedancer_getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,15 @@ Create a new Python file called `rubber-ducky.py` with the following content:
device = USBKeyboardDevice()
async def type_letters():
logging.info("Beginning message typing demo...")
# Type ls.
await asyncio.sleep(5)
await device.type_letters('l', 's', '\n')
# Echo hi.
# Wait for device to connect
await asyncio.sleep(2)
await device.type_string("echo hi, user\n")
# Finally, try to pop calc, just for fun.
logging.info("Bonus: trying to pop calc.")
await device.type_string('r', modifiers=KeyboardModifiers.MOD_LEFT_META)
await asyncio.sleep(0.5)
await device.type_string('calc\n')
logging.info("Typing complete. Idly handling USB requests.")
# Type a string with the device
await device.type_string("echo hello, facedancer\n")
main(device, type_letters())
TODO replace platform-specific actions from rubber ducky example with better ones


Open a terminal and run:

.. code-block :: sh
Expand Down

0 comments on commit 6c15f92

Please sign in to comment.