Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs & cli to help prevent folk from trying to run Facedancer on Windows. #173

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cynthion/python/src/commands/cynthion_flash.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

""" Cynthion 'flash' command. """

import logging
import logging, platform, sys

from .util import find_cynthion_asset, find_cynthion_bitstream
from .util import flash_bitstream, flash_mcu_firmware, flash_soc_firmware
Expand All @@ -23,6 +23,14 @@ def cynthion_flash(device, args):
elif args.target == "analyzer":
flash_bitstream(device, find_cynthion_bitstream(device, "analyzer.bit"))
elif args.target == "facedancer":
if platform.system() == "Windows":
logging.error("\nFacedancer and USBProxy are not currently supported on Windows.")
logging.error("Attempting to use Facedancer or USBProxy on Windows may cause")
logging.error("USB analysis to stop working.\n")
logging.error("For more information please see the tracking issue:\n")
logging.error(" https://github.com/greatscottgadgets/cynthion/issues/170\n")
logging.error("Command aborted.")
sys.exit(1)
flash_soc_firmware(device, find_cynthion_asset("moondancer.bin"))
flash_bitstream(device, find_cynthion_bitstream(device, "facedancer.bit"))
elif args.target == "selftest":
Expand Down
10 changes: 9 additions & 1 deletion cynthion/python/src/commands/cynthion_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

""" Cynthion 'run' command. """

import logging, os, subprocess, sys, tempfile
import logging, os, platform, subprocess, sys, tempfile

from .util import find_cynthion_asset, find_cynthion_bitstream
from .util import flash_soc_firmware, run_bitstream
Expand All @@ -21,6 +21,14 @@ def cynthion_run(device, args):
run_bitstream(device, find_cynthion_bitstream(device, f"analyzer.bit"))

elif args.target == "facedancer":
if platform.system() == "Windows":
logging.error("\nFacedancer and USBProxy are not currently supported on Windows.")
logging.error("Attempting to use Facedancer or USBProxy on Windows may cause")
logging.error("USB analysis to stop working.\n")
logging.error("For more information please see the tracking issue:\n")
logging.error(" https://github.com/greatscottgadgets/cynthion/issues/170\n")
logging.error("Command aborted.")
sys.exit(1)
flash_soc_firmware(device, find_cynthion_asset("moondancer.bin"))
run_bitstream(device, find_cynthion_bitstream(device, f"facedancer.bit"))

Expand Down
6 changes: 6 additions & 0 deletions docs/source/getting_started_facedancer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Using Cynthion with Facedancer
==============================

.. warning::

Facedancer is not currently supported on Windows. Attempting to use Facedancer on Windows may cause USB analysis to stop working.

For more information please see the tracking issue: `#170 <https://github.com/greatscottgadgets/cynthion/issues/170>`__

Before proceeding, please ensure you have completed all steps in the :doc:`getting_started` section.


Expand Down
6 changes: 6 additions & 0 deletions docs/source/getting_started_usbproxy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Using Cynthion with USB Proxy
=============================

.. warning::

USBProxy is not currently supported on Windows. Attempting to use USB Proxy on Windows may cause USB analysis to stop working.

For more information please see the tracking issue: `#170 <https://github.com/greatscottgadgets/cynthion/issues/170>`__

Before proceeding, please ensure you have completed all steps in the :doc:`getting_started` and :doc:`getting_started_facedancer` sections.


Expand Down
Loading