Skip to content

Commit

Permalink
docs: update facedancer and usbproxy guides
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinevg committed Jun 26, 2024
1 parent 30f3a9c commit 52b46f3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
32 changes: 11 additions & 21 deletions docs/source/getting_started_facedancer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,36 +76,26 @@ Connect Hardware
:width: 800
:alt: Connection diagram for using Cynthion with Facedancer.

Make sure that the target device is running a program that can receive keyboard input such as a terminal or text editor and that it has focus.

Run a Facedancer example
------------------------

Create a new Python file called ``rubber-ducky.py`` with the following content:

.. code-block :: python
import asyncio
import logging
from facedancer import main
from facedancer.devices.keyboard import USBKeyboardDevice
from facedancer.classes.hid.keyboard import KeyboardModifiers
device = USBKeyboardDevice()
async def type_letters():
# Wait for device to connect
await asyncio.sleep(2)
# Type a string with the device
await device.type_string("echo hello, facedancer\n")
main(device, type_letters())
.. literalinclude:: ../../cynthion/python/examples/facedancer-rubber-ducky.py
:language: python
:linenos:

Open a terminal and run:

.. code-block :: sh
cd facedancer/examples
python ./rubber-ducky.py
If all goes well, you should see the string ``hello, facedancer`` typed into the target device.

More Information
----------------

For further information, see the `Facedancer documentation <https://facedancer.readthedocs.io/>`_.
20 changes: 19 additions & 1 deletion docs/source/getting_started_usbproxy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,25 @@ Connect Hardware
:alt: Connection diagram for using Cynthion with Facedancer.



Run a USBProxy example
----------------------

TODO
Create a new Python file called ``usbproxy.py`` with the following content:

.. literalinclude:: ../../cynthion/python/examples/facedancer-usbproxy.py
:language: python
:linenos:

Open a terminal and run:

.. code-block :: sh
python ./usbproxy.py
If all goes well you should see the output from device enumeration in your terminal and the proxied USB device should be detected by the target computer.

More Information
----------------

For further information, see the `Facedancer USB Proxy documentation <https://facedancer.readthedocs.io/en/latest/using_usb_proxy.html>`_.

0 comments on commit 52b46f3

Please sign in to comment.