flopz

Contents:

  • Introduction
  • Features
    • Implemented Architectures
  • Tutorials
    • Overview
      • Ghidra Plugin
      • Targets and Gadgets
        • Patching The Firmware
        • Listeners and Protocols
    • The Ghidra Plugin
    • Targets & Gadgets
    • Listeners & Protocols
  • flopz
    • flopz package
      • Subpackages
        • flopz.arch package
          • Subpackages
            • flopz.arch.arm package
              • Subpackages
                • flopz.arch.arm.thumb package
                  • Submodules
                  • flopz.arch.arm.thumb.auto_instructions module
                  • flopz.arch.arm.thumb.instructions module
                  • flopz.arch.arm.thumb.stm32F407 module
                  • Module contents
              • Submodules
              • flopz.arch.arm.arm_generic_arch module
              • Module contents
            • flopz.arch.ia32 package
              • Submodules
              • flopz.arch.ia32.addressing module
              • flopz.arch.ia32.auto_instructions module
              • flopz.arch.ia32.conditionals module
              • flopz.arch.ia32.ia32_generic_arch module
              • flopz.arch.ia32.instruction_components module
              • flopz.arch.ia32.instructions module
              • flopz.arch.ia32.modes module
              • Module contents
            • flopz.arch.ppc package
              • Subpackages
                • flopz.arch.ppc.vle package
                  • Submodules
                  • flopz.arch.ppc.vle.auto_instructions module
                  • flopz.arch.ppc.vle.e200z0 module
                  • flopz.arch.ppc.vle.instructions module
                  • flopz.arch.ppc.vle.registers module
                  • flopz.arch.ppc.vle.vle module
                  • Module contents
              • Submodules
              • flopz.arch.ppc.ppc_generic_arch module
              • Module contents
            • flopz.arch.riscv package
              • Subpackages
                • flopz.arch.riscv.rv32c package
                  • Submodules
                  • flopz.arch.riscv.rv32c.instructions module
                  • Module contents
                • flopz.arch.riscv.rv32i package
                  • Submodules
                  • flopz.arch.riscv.rv32i.instructions module
                  • flopz.arch.riscv.rv32i.rv32i_arch module
                  • Module contents
              • Submodules
              • flopz.arch.riscv.registers module
              • flopz.arch.riscv.riscv_generic_arch module
              • Module contents
          • Submodules
          • flopz.arch.architecture module
          • flopz.arch.auto_instruction module
          • flopz.arch.exceptions module
          • flopz.arch.instruction module
          • flopz.arch.operands module
          • flopz.arch.register module
          • Module contents
        • flopz.core package
          • Submodules
          • flopz.core.addressable_object module
          • flopz.core.assembler module
          • flopz.core.function module
          • flopz.core.label module
          • flopz.core.module module
          • flopz.core.shellcode module
          • flopz.core.target module
          • Module contents
        • flopz.listener package
          • Subpackages
            • flopz.listener.events package
              • Submodules
              • flopz.listener.events.function_trace_event module
              • Module contents
            • flopz.listener.links package
              • Submodules
              • flopz.listener.links.all_links module
              • flopz.listener.links.socketcan_link module
              • Module contents
            • flopz.listener.loggers package
              • Submodules
              • flopz.listener.loggers.all_loggers module
              • flopz.listener.loggers.chrome_trace_logger module
              • flopz.listener.loggers.console_logger module
              • flopz.listener.loggers.json_file_logger module
              • Module contents
          • Submodules
          • flopz.listener.event module
          • flopz.listener.flopz_logger module
          • flopz.listener.link module
          • flopz.listener.protocol module
          • Module contents
        • flopz.target package
          • Subpackages
            • flopz.target.bolero package
              • Submodules
              • flopz.target.bolero.bolero_protocol module
              • flopz.target.bolero.bolero_target module
              • Module contents
            • flopz.target.stm32 package
              • Submodules
              • flopz.target.stm32.stm32F407_target module
              • Module contents
          • Submodules
          • flopz.target.all_targets module
          • Module contents
        • flopz.util package
          • Submodules
          • flopz.util.integer_representation module
          • flopz.util.parsing module
          • Module contents
      • Module contents
flopz
  • »
  • flopz »
  • flopz package »
  • flopz.listener package »
  • flopz.listener.links package
  • View page source

flopz.listener.links package

Submodules

flopz.listener.links.all_links module

get_all_links()
get_link_by_name(name)
Parameters

name (str) –

flopz.listener.links.socketcan_link module

class SocketCanRxProcess(bound_socket, rx_queue, stop_event)

Bases: multiprocessing.context.Process

Use a separate process to handle reading from the raw socket

Parameters
  • rx_queue (Queue) –

  • stop_event (Event) –

run()

Method to be run in sub-process; can be overridden in sub-class

class SocketcanLink(flopz_config, arg_parser)

Bases: flopz.listener.link.Link

Parameters
  • flopz_config (dict) –

  • arg_parser (Namespace) –

static add_argparse(parser)

Add a Link-specific argument group and arguments :type parser: ArgumentParser :param parser: :return: nothing

get()

No matter if FD or not, the return value of this will always be the same binary format Protocols need to handle decoding the ID, length etc. :rtype: bytes :return: [4 byte id][1 byte lenght][$length bytes payload]

static name()

override this to return a unique name for your link :rtype: str :return: a string containing a unique name for this link class

put(payload)

Send some data over CAN. Make sure to format extended IDs correctly (needs arb_id |= 0x80000000) :type payload: bytes :param payload: bytes in the same binary format as get() returns :rtype: int :return: number of bytes transferred

start()

A non-blocking call that tells the Link to start listening and sending. Once the link has been started, it is ready to be used. :rtype: None :return: nothing

stop()

A non-blocking call that tells the Link to stop Note that only when ‘state’ != RUNNING, the link can be considered fully stopped. :rtype: None :return: nothing

exception SocketcanLinkException

Bases: Exception

Module contents

Previous Next

© Copyright 2022, Noelscher Consulting GmbH, H. F. Noelscher, L. Dubies.

Built with Sphinx using a theme provided by Read the Docs.