facedancer.backends.raspdancer module

class facedancer.backends.raspdancer.Raspdancer(verbose=0)[source]

Bases: object

Extended version of the Facedancer class that accepts a direct SPI connection to the MAX324x chip, as used by the Raspdancer.

__init__(verbose=0)[source]

Initializes our connection to the MAXUSB device.

reset()[source]

Resets the connected MAXUSB chip.

set_up_comms()[source]

Sets up the Raspdancer to communicate with the MAX324x.

transfer(data)[source]

Emulate the facedancer’s write command, which blasts data directly over to the SPI bus.

class facedancer.backends.raspdancer.RaspdancerMaxUSBApp(device=None, verbose=0, quirks=None)[source]

Bases: MAXUSBApp

ack_status_stage(blocking=False)[source]

Handles the status stage of a correctly completed control request, by priming the appropriate endpoint to handle the status phase.

Parameters:
  • direction – Determines if we’re ACK’ing an IN or OUT vendor request. (This should match the direction of the DATA stage.)

  • endpoint_number – The endpoint number on which the control request occurred.

  • blocking – True if we should wait for the ACK to be fully issued before returning.

app_name = 'MAXUSB'
app_num = 0
classmethod appropriate_for_environment(backend_name)[source]

Determines if the current environment seems appropriate for using the GoodFET::MaxUSB backend.

enable()[source]
init_commands()[source]
read_bytes(reg, n)[source]
read_register(reg_num, ack=False)[source]
write_bytes(reg, data)[source]
write_register(reg_num, value, ack=False)[source]