Skip to content

Commit 1ddaf94

Browse files
authored
Merge pull request #78 from antoinevg/antoinevg/facedancer-v3
Facedancer v3.0.0
2 parents 664c865 + c33b5aa commit 1ddaf94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1393
-5208
lines changed

README.md

+34-22
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,43 @@
1-
# Facedancer 2.9
1+
# Facedancer 3.0
22

33
This repository houses the next generation of Facedancer software. Descended from
44
the original GoodFET-based Facedancer, this repository provides a python module
5-
that provides expanded Facedancer support-- including support for multiple boards
5+
that provides expanded Facedancer support -- including support for multiple boards
66
and some pretty significant new features.
77

8+
89
## Installation
10+
911
Install this package with the following command:
10-
```
11-
pip install .
12-
```
12+
13+
pip install .
14+
1315
After that you can import the facedancer package as usual:
14-
```
15-
$ python
16-
>>> import facedancer
17-
```
16+
17+
$ python
18+
>>> import facedancer
19+
1820

1921
## Where are my scripts?
2022

21-
In preparation for the 3.0 release of Facedancer, scripts in the "old" style have
22-
been moved to `legacy-applets`. Their functionality should be unchanged.
23+
The Facedancer 3.0 core features a ground-up rewrite of the original
24+
emulation core which does not support legacy scripts.
25+
26+
If you're using scripts or training materials that depend on features
27+
or APIs deprecated in `v3.0.x` you can install the latest `v2.9.x`
28+
release of Facedancer with:
29+
30+
pip install "facedancer<=3"
31+
32+
Legacy applets and examples can be found in the [`v2.9.x`](https://github.com/greatscottgadgets/facedancer/tree/v2.9.x)
33+
branch.
34+
2335

2436
## What is a Facedancer?
2537

2638
Facedancer boards are simple hardware devices that act as "remote-controlled" USB
2739
controllers. With the proper software, you can use these boards to quickly and
28-
easily emulate USB devices-- and to fuzz USB host controllers!
40+
easily emulate USB devices -- and to fuzz USB host controllers!
2941

3042
This particular software repository currently allows you to easily create emulations
3143
of USB devices in Python. Control is fine-grained enough that you can cause all
@@ -39,9 +51,9 @@ For more information, see:
3951
## USBProxy 'Nouveau' and Protocol Analysis
4052

4153
A major new feature of the newer Facedancer codebase is the ability to man-in-the
42-
middle USB connections-- replacing one of the authors' original [USBProxy](https://github.com/dominicgs/usbproxy)
43-
project. This opens up a whole new realm of applications-- including protocol analysis
44-
and live manipulation of USB packets-- and is especially useful when you don't control
54+
middle USB connections -- replacing one of the authors' original [USBProxy](https://github.com/dominicgs/usbproxy)
55+
project. This opens up a whole new realm of applications -- including protocol analysis
56+
and live manipulation of USB packets -- and is especially useful when you don't control
4557
the software running on the target device (e.g. on embedded systems or games consoles).
4658

4759
```
@@ -82,33 +94,33 @@ export BACKEND=greatfet
8294

8395
## What boards are currently supported?
8496

85-
* All GoodFET-based Facedancers, including the common Facedancer21 (```BACKEND=goodfet```)
97+
* The [Cynthion USB Test Instrument](http://greatscottgadgets.com/cyntion/) (```BACKEND=cynthion```)
8698
* The [GreatFET One](http://greatscottgadgets.com/greatfet/) (```BACKEND=greatfet```)
8799
* The NXP LPC4330 Xplorer board. (```BACKEND=greatfet```)
88100
* The CCCamp 2015 rad1o badge with GreatFET l0adable (```BACKEND=greatfet```)
101+
* All GoodFET-based Facedancers, including the common Facedancer21 (```BACKEND=goodfet```)
89102
* RPi + Max3241 Raspdancer boards (```BACKEND=raspdancer```)
90103

91104
Note that hardware restrictions prevent the MAX3420/MAX3421 boards from emulating
92-
more complex devices-- there's limitation on the number/type of endpoints that can be
93-
set up. The LPC4330 boards-- such as the GreatFET-- have fewer limitations.
105+
more complex devices -- there's limitation on the number/type of endpoints that can be
106+
set up. The LPC4330 boards -- such as the GreatFET -- have fewer limitations.
94107

95108
For a similar reason, the MAX3420/MAX3421 boards (`BACKEND=goodfet` or `BACKEND=raspdancer`)
96109
currently cannot be used as USBProxy-nv MITM devices. All modern boards (`BACKEND=greatfet`)
97110
should be fully functional.
98111

99112
## What boards could be supported soon?
100113

101-
* The [LUNA USB multitool](https://github.com/greatscottgadgets/luna).
102114
* Any Linux computer with gadgetfs support (e.g. the Pi Zero or Beaglebone Black)
103115
* Anything supporting USB-over-IP.
104116

105117
## What features do you plan on adding?
106118

107-
The roadmap is hazy, but in addition to multi-board support, this repository
108-
eventually will be home to some cool new features, such as:
119+
The roadmap is under development, but in addition to multi-board support, this repository
120+
will eventually be home to some cool new features, including:
109121

110122
* High-speed ("USB 2.0") device emulation on devices with USB 2.0 PHYs.
111-
* On-the-fly
123+
* On-the-fly generation of USB device controllers in gateware.
112124

113125
## Whose fault _is_ this?
114126

SPIFlash.py

-113
This file was deleted.

docs/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
sphinx==7.2.6
2-
sphinx_rtd_theme==1.3.0
2+
sphinx_rtd_theme==2.0.0
33
readthedocs-sphinx-search==0.3.2
44
jinja2==3.1.3

docs/source/conf.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
# -- Project information -----------------------------------------------------
88

9-
project = 'Project name'
10-
copyright = '2023, Person writing this'
11-
author = 'Person writing this'
9+
project = 'Facedancer'
10+
copyright = '2023, Great Scott Gadgets'
11+
author = 'Great Scott Gadget'
1212

1313
version = ''
1414
release = ''
@@ -24,7 +24,7 @@
2424
exclude_patterns = ['_build']
2525
source_suffix = '.rst'
2626
master_doc = 'index'
27-
language = None
27+
language = "en"
2828
exclude_patterns = []
2929
pygments_style = None
3030

docs/source/documentation_intro.rst

-3
This file was deleted.

docs/source/getting_started.rst

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
================================================
2+
Getting started with Facedancer
3+
================================================
4+
5+
6+
Install the Facedancer library
7+
------------------------------
8+
9+
You can install the Facedancer library from the `Python Package Index (PyPI) <https://pypi.org/project/facedancer/>`__, a `release archive <https://github.com/greatscottgadgets/Facedancer/releases>`__ or directly from `source <https://github.com/greatscottgadgets/Facedancer/>`__.
10+
11+
12+
Install From PyPI
13+
^^^^^^^^^^^^^^^^^
14+
15+
You can use the `pip <https://pypi.org/project/pip/>`__ tool to install the Facedancer library from PyPI using the following command:
16+
17+
.. code-block :: sh
18+
19+
pip install facedancer
20+
21+
For more information on installing Python packages from PyPI please refer to the `"Installing Packages" <https://packaging.python.org/en/latest/tutorials/installing-packages/>`__ section of the Python Packaging User Guide.
22+
23+
24+
Install From Source
25+
^^^^^^^^^^^^^^^^^^^
26+
27+
.. code-block :: sh
28+
29+
git clone https://github.com/greatscottgadgets/facedancer.git
30+
cd facedancer/
31+
32+
Once you have the source code downloaded you can install the Facedancer library with:
33+
34+
.. code-block :: sh
35+
36+
pip install .
37+
38+
39+
40+
Run a Facedancer example
41+
------------------------
42+
43+
Create a new Python file called `rubber-ducky.py` with the following content:
44+
45+
.. code-block :: python
46+
47+
import asyncio
48+
import logging
49+
50+
from facedancer import main
51+
from facedancer.devices.keyboard import USBKeyboardDevice
52+
from facedancer.classes.hid.keyboard import KeyboardModifiers
53+
54+
device = USBKeyboardDevice()
55+
56+
async def type_letters():
57+
await asyncio.sleep(2)
58+
await device.type_string("echo hello, facedancer\n")
59+
60+
main(device, type_letters())
61+
62+
63+
64+
Open a terminal and run:
65+
66+
.. code-block :: sh
67+
68+
python ./rubber-ducky.py

0 commit comments

Comments
 (0)