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

WIP: Add flexray support via vector xllib #546

Closed
wants to merge 218 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
b97ba7d
WIP: Add flexray support via vector xllib
rumpelsepp Jun 26, 2024
247eb74
chore: Add windows support as tier2
rumpelsepp Jun 26, 2024
3a7d9b2
Add ctypes for vector xl library
rumpelsepp Jul 3, 2024
5117a66
finish datatypes
rumpelsepp Jul 4, 2024
467b8cd
wip
rumpelsepp Jul 4, 2024
24bf687
make fmt
rumpelsepp Jul 5, 2024
7a70665
add receive; ready to test this
rumpelsepp Jul 5, 2024
df5a9dc
wip
rumpelsepp Jul 8, 2024
a65b6bc
fixup! chore: Add windows support as tier2
rumpelsepp Jul 8, 2024
a1a5276
wip
rumpelsepp Jul 8, 2024
77ef109
wip
rumpelsepp Jul 8, 2024
03c62b0
wip
rumpelsepp Jul 8, 2024
c3b02c5
wip
rumpelsepp Jul 8, 2024
583711a
wip
rumpelsepp Jul 8, 2024
5f8c78b
wip
rumpelsepp Jul 8, 2024
0a684de
wip
rumpelsepp Jul 8, 2024
23964d5
wip
rumpelsepp Jul 8, 2024
808846e
wip
rumpelsepp Jul 8, 2024
9b7071a
wip
rumpelsepp Jul 8, 2024
1d8cc4c
wip
rumpelsepp Jul 8, 2024
e29f40d
wip
rumpelsepp Jul 8, 2024
dd3245a
wip
rumpelsepp Jul 8, 2024
a28a34c
wip
rumpelsepp Jul 8, 2024
4ec30e5
wip
rumpelsepp Jul 8, 2024
f6da340
wip
rumpelsepp Jul 8, 2024
63508ef
wip
rumpelsepp Jul 8, 2024
b33b751
wip
rumpelsepp Jul 8, 2024
9f3bd96
wip
rumpelsepp Jul 8, 2024
cad7890
wip
rumpelsepp Jul 8, 2024
01b4a0f
wip
rumpelsepp Jul 8, 2024
a4baa73
wip
rumpelsepp Jul 8, 2024
fb89354
wip
rumpelsepp Jul 8, 2024
f02581c
wip
rumpelsepp Jul 8, 2024
d57390c
wip
rumpelsepp Jul 8, 2024
81292d7
wip
rumpelsepp Jul 8, 2024
71533c0
wip
rumpelsepp Jul 8, 2024
63aff05
wip
rumpelsepp Jul 8, 2024
8abf8bd
wip
rumpelsepp Jul 8, 2024
4af1b21
wip
rumpelsepp Jul 8, 2024
1378fd3
wip
rumpelsepp Jul 8, 2024
67065af
wip
rumpelsepp Jul 8, 2024
416b35f
wip
rumpelsepp Jul 8, 2024
bdcdcd0
WIP windows support
rumpelsepp Jul 9, 2024
eca7a91
wip
rumpelsepp Jul 9, 2024
2e487a2
wip
rumpelsepp Jul 9, 2024
d937518
wip
rumpelsepp Jul 9, 2024
bf0df76
wip
rumpelsepp Jul 10, 2024
abf2911
wip
rumpelsepp Jul 10, 2024
6b8e4ee
wip
rumpelsepp Jul 10, 2024
2bc55ce
wip
rumpelsepp Jul 10, 2024
ed07a0d
wip
rumpelsepp Jul 10, 2024
dfb83ef
wip
rumpelsepp Jul 10, 2024
2c8e727
wip
rumpelsepp Jul 10, 2024
7357aad
wip
rumpelsepp Jul 10, 2024
0356900
wip
rumpelsepp Jul 10, 2024
6389d1a
wip
rumpelsepp Jul 10, 2024
6f85475
wip
rumpelsepp Jul 10, 2024
7b2cd1b
wip
rumpelsepp Jul 10, 2024
3286687
wip
rumpelsepp Jul 10, 2024
efc7faa
wip
rumpelsepp Jul 10, 2024
9ef7bff
wip
rumpelsepp Jul 10, 2024
be34f93
wip
rumpelsepp Jul 10, 2024
1916b6b
wip
rumpelsepp Jul 10, 2024
9f8cfc8
wip
rumpelsepp Jul 10, 2024
2a60804
wip
rumpelsepp Jul 10, 2024
e1f6f2f
wip
rumpelsepp Jul 10, 2024
72490e4
wip
rumpelsepp Jul 10, 2024
4030892
wip
rumpelsepp Jul 10, 2024
efe2811
wip
rumpelsepp Jul 10, 2024
f11bf79
wip
rumpelsepp Jul 10, 2024
efca289
wip
rumpelsepp Jul 10, 2024
63f7fd4
wip
rumpelsepp Jul 10, 2024
261626e
wip
rumpelsepp Jul 10, 2024
1da5822
wip
rumpelsepp Jul 10, 2024
dea6de7
wip
rumpelsepp Jul 10, 2024
195e65d
wip
rumpelsepp Jul 10, 2024
c966341
wip
rumpelsepp Jul 10, 2024
c9576ae
wip
rumpelsepp Jul 10, 2024
0dc2db8
wip
rumpelsepp Jul 10, 2024
1e73add
wip
rumpelsepp Jul 10, 2024
b566e5c
wip
rumpelsepp Jul 10, 2024
5184749
wip
rumpelsepp Jul 10, 2024
6870848
wip
rumpelsepp Jul 10, 2024
efc0689
wip
rumpelsepp Jul 10, 2024
7bd8aa2
wip
rumpelsepp Jul 10, 2024
947c21b
wip
rumpelsepp Jul 10, 2024
080b080
wip
rumpelsepp Jul 10, 2024
ccba438
wip
rumpelsepp Jul 11, 2024
29708f1
wip
rumpelsepp Jul 11, 2024
da3030d
wip
rumpelsepp Jul 11, 2024
699e789
wip
rumpelsepp Jul 11, 2024
37900f3
wip
rumpelsepp Jul 11, 2024
2fb5aeb
Merge branch 'vector2' into vector
rumpelsepp Jul 11, 2024
14acd44
wip
rumpelsepp Jul 11, 2024
59c12ab
wip
rumpelsepp Jul 11, 2024
3147ada
wip
rumpelsepp Jul 11, 2024
8ee810a
wip
rumpelsepp Jul 11, 2024
a295557
wip
rumpelsepp Jul 11, 2024
9dbe203
wip
rumpelsepp Jul 11, 2024
d3b4c5f
wip
rumpelsepp Jul 11, 2024
6d30f63
wip
rumpelsepp Jul 11, 2024
fd94d28
wip
rumpelsepp Jul 11, 2024
72d3833
wip
rumpelsepp Jul 11, 2024
e6cd871
wip
rumpelsepp Jul 11, 2024
c141215
wip
rumpelsepp Jul 11, 2024
d92c087
wip
rumpelsepp Jul 11, 2024
b2be6e2
wip
rumpelsepp Jul 11, 2024
c8d24e7
wip
rumpelsepp Jul 11, 2024
6e8c455
wip
rumpelsepp Jul 11, 2024
1c5c31f
wip
rumpelsepp Jul 11, 2024
2542624
wip
rumpelsepp Jul 11, 2024
af3daef
wip
rumpelsepp Jul 11, 2024
72359bb
wip
rumpelsepp Jul 11, 2024
0fb5ca0
wip
rumpelsepp Jul 11, 2024
a128f0a
wip
rumpelsepp Jul 11, 2024
6250efd
wip
rumpelsepp Jul 11, 2024
1c8cef2
wip
rumpelsepp Jul 11, 2024
73cab2b
wip
rumpelsepp Jul 11, 2024
2fa0a33
wip
rumpelsepp Jul 11, 2024
b8bc8bb
wip
rumpelsepp Jul 11, 2024
8810c14
wip
rumpelsepp Jul 11, 2024
0cc7f30
wip
rumpelsepp Jul 11, 2024
04d52a5
wip
rumpelsepp Jul 11, 2024
a24023d
wip
rumpelsepp Jul 11, 2024
2cdb738
wip
rumpelsepp Jul 11, 2024
34e46c9
wip
rumpelsepp Jul 11, 2024
f70452c
wip
rumpelsepp Jul 11, 2024
b42b8be
wip
rumpelsepp Jul 11, 2024
e0b4831
wip
rumpelsepp Jul 11, 2024
c4587ff
wip
rumpelsepp Jul 11, 2024
1b21efc
wip
rumpelsepp Jul 11, 2024
c4fa020
wip
rumpelsepp Jul 11, 2024
abd394c
wip
rumpelsepp Jul 11, 2024
3f1d618
wip
rumpelsepp Jul 11, 2024
5ab1758
wip
rumpelsepp Jul 11, 2024
73813e3
wip
rumpelsepp Jul 11, 2024
a98501a
wip
rumpelsepp Jul 11, 2024
6282b2c
wip
rumpelsepp Jul 11, 2024
39e8631
wip
rumpelsepp Jul 11, 2024
de923dd
wip
rumpelsepp Jul 11, 2024
7a7a222
wip
rumpelsepp Jul 11, 2024
9310758
wip
rumpelsepp Jul 11, 2024
91d49fc
wip
rumpelsepp Jul 11, 2024
4af3794
wip
rumpelsepp Jul 11, 2024
3eedb6c
wip
rumpelsepp Jul 11, 2024
b6b2e0c
wip
rumpelsepp Jul 11, 2024
d24c8bd
wip
rumpelsepp Jul 11, 2024
cda85b4
wip
rumpelsepp Jul 11, 2024
ab99c67
wip
rumpelsepp Jul 11, 2024
876e5a7
Add very untested code for flexray tp single frames
rumpelsepp Jul 15, 2024
03eba57
wip
rumpelsepp Jul 16, 2024
720ee67
Implement fragmentation
rumpelsepp Jul 16, 2024
8d05b8b
wip
rumpelsepp Jul 16, 2024
6c0315e
wip
rumpelsepp Jul 16, 2024
3472396
wip
rumpelsepp Jul 16, 2024
79ada00
wip
rumpelsepp Jul 16, 2024
d896237
wip
rumpelsepp Jul 16, 2024
7df8333
wip
rumpelsepp Jul 16, 2024
d7fc48a
wip
rumpelsepp Jul 16, 2024
d8ca100
wip
rumpelsepp Jul 16, 2024
d2133f4
wip
rumpelsepp Jul 16, 2024
0b4e9ad
wip
rumpelsepp Jul 16, 2024
b2ba53f
wip
rumpelsepp Jul 16, 2024
e867565
wip
rumpelsepp Jul 16, 2024
c598a96
wip
rumpelsepp Jul 16, 2024
1b6e33e
wip
rumpelsepp Jul 16, 2024
773d046
wip
rumpelsepp Jul 16, 2024
07709c3
wip
rumpelsepp Jul 16, 2024
a3d41b7
wip
rumpelsepp Jul 16, 2024
318808f
wip
rumpelsepp Jul 16, 2024
2db963a
wip
rumpelsepp Jul 16, 2024
0fcf256
wip
rumpelsepp Jul 16, 2024
e8f99b1
wip
rumpelsepp Jul 16, 2024
6642c71
wip
rumpelsepp Jul 16, 2024
2fb45cb
wip
rumpelsepp Jul 16, 2024
059b5cb
wip
rumpelsepp Jul 16, 2024
b50ca22
wip
rumpelsepp Jul 16, 2024
5c5f61d
wip
rumpelsepp Jul 16, 2024
8da569f
wip
rumpelsepp Jul 16, 2024
dd0f9fe
wip
rumpelsepp Jul 16, 2024
e19e0aa
wip
rumpelsepp Jul 16, 2024
2ec9d05
wip
rumpelsepp Jul 16, 2024
07a5559
wip
rumpelsepp Jul 16, 2024
40925af
wip
rumpelsepp Jul 16, 2024
60637b8
wip
rumpelsepp Jul 16, 2024
43c1525
wip
rumpelsepp Jul 16, 2024
044057b
wip
rumpelsepp Jul 16, 2024
5141d97
wip
rumpelsepp Jul 16, 2024
80373e5
wip
rumpelsepp Jul 16, 2024
dd46650
wip
rumpelsepp Jul 16, 2024
51a1156
wip
rumpelsepp Jul 16, 2024
87b28ca
wip
rumpelsepp Jul 16, 2024
a35cadc
wip
rumpelsepp Jul 16, 2024
0c8cb5c
wip
rumpelsepp Jul 16, 2024
23d60dd
wip
rumpelsepp Jul 16, 2024
ab88a73
wip
rumpelsepp Jul 16, 2024
13d7625
wip
rumpelsepp Jul 16, 2024
03b652f
wip
rumpelsepp Jul 16, 2024
8de65fa
wip
rumpelsepp Jul 16, 2024
0e7deb1
wip
rumpelsepp Jul 16, 2024
23a723a
wip
rumpelsepp Jul 16, 2024
6851466
wip
rumpelsepp Jul 16, 2024
d40cc5f
wip
rumpelsepp Jul 16, 2024
391c814
wip
rumpelsepp Jul 16, 2024
fa4ba85
wip
rumpelsepp Jul 16, 2024
e97d249
wip
rumpelsepp Jul 16, 2024
0d5caf7
wip
rumpelsepp Jul 16, 2024
71d6569
wip
rumpelsepp Jul 16, 2024
c8f389a
wip
rumpelsepp Jul 16, 2024
3ee771c
wip
rumpelsepp Jul 16, 2024
0f9e42e
wip
rumpelsepp Jul 16, 2024
384be3b
wip
rumpelsepp Jul 16, 2024
958a936
wip
rumpelsepp Jul 16, 2024
d50406f
wip
rumpelsepp Jul 16, 2024
73e33aa
wip
rumpelsepp Jul 16, 2024
78c8dd9
wip
rumpelsepp Jul 16, 2024
5f9dc76
wip
rumpelsepp Jul 16, 2024
85320cc
wip
rumpelsepp Jul 16, 2024
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
46 changes: 46 additions & 0 deletions .github/workflows/linters-win32.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SPDX-FileCopyrightText: AISEC Pentesting Team
#
# SPDX-License-Identifier: CC0-1.0

# https://github.com/actions/setup-python/issues/374

name: linters-win32

on:
push:
branches:
- master
pull_request:
paths:
- 'pyproject.toml'
- 'poetry.lock'
- '.github/**'
- 'src/**'
- 'tests/**'

jobs:
linters:
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v9
- uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}-${{ hashFiles('pyproject.toml') }}

- name: Install Dependencies
run: |
poetry install
- name: Run mypy
run: |
poetry run make lint-win32
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ lint:
ruff format --check src tests
reuse lint

.PHONY: lint-win32
lint-win32:
mypy --platform win32 --exclude "gallia\/log\.py" --exclude "hr" src tests
ruff check src tests

.PHONY: fmt
fmt:
ruff check --fix-only src tests
Expand Down
33 changes: 33 additions & 0 deletions fr_dump.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import asyncio
import sys

assert sys.platform == "win32"

from gallia.transports import RawFlexrayTransport, TargetURI


async def main() -> None:
url = TargetURI("flexray-raw:")
tp = await RawFlexrayTransport.connect(url, None)
tp.add_block_all_filter()
tp.set_acceptance_filter(33, 33)
tp.set_acceptance_filter(59, 59)
tp.activate_channel()

while True:
frame = await tp.read_frame()
# Filter out null frames. :)
if frame.data[0] == 0x00:
continue

# print(f"raw event: {frame.raw}")
print(f" -> slot_id: {frame.slot_id}; data: {frame.data.hex()}")


if __name__ == "__main__":
try:
asyncio.run(main())
except TimeoutError:
pass
except KeyboardInterrupt:
pass
29 changes: 29 additions & 0 deletions fr_send.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import asyncio
import sys

assert sys.platform == "win32"

from gallia.log import Loglevel, setup_logging
from gallia.transports import FlexRayTPLegacyTransport, TargetURI


async def main() -> None:
setup_logging(level=Loglevel.TRACE, no_volatile_info=True)

# TODO: rename dst->target
url = TargetURI(
"flexray-tp-legacy://?dst_slot_id=59&src_slot_id=33&dst_address=0x307c&src_address=0x6100&payload_rx_start_index=0&payload_rx_end_index=12"
)
tp = await FlexRayTPLegacyTransport.connect(url, None)

await tp.write(bytes.fromhex("3e 00"))

data = await tp.read()
print(data.hex())


if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
pass
13 changes: 12 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ platformdirs = ">=2.6,<5.0"
exitcode = "^0.1.0"
psutil = ">=5.9.4,<7.0.0"
httpx = {extras = ["http2"], version = ">=0.26,<0.28"}
more-itertools = "^10.3.0"

[tool.poetry.group.dev.dependencies]
Sphinx = ">=5.2,<8.0"
Expand Down Expand Up @@ -104,6 +105,7 @@ select = [
"UP", # pyupgrade
]
ignore = [
"E402", # Module level import not at top of file
"E501", # line length
"PLR2004", # magic value used in comparison
"PLR0911", # too many return statements
Expand Down
85 changes: 60 additions & 25 deletions src/gallia/command/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import argparse
import asyncio
import fcntl
import os
import os.path
import shutil
Expand All @@ -18,7 +17,7 @@
from pathlib import Path
from subprocess import CalledProcessError, run
from tempfile import gettempdir
from typing import cast
from typing import Protocol, cast

import exitcode
import msgspec
Expand Down Expand Up @@ -72,7 +71,54 @@ def json(self) -> str:
logger = get_logger("gallia.base")


class BaseCommand(ABC):
if sys.platform.startswith("linux") or sys.platform == "darwin":
import fcntl

class Flockable(Protocol):
@property
def _lock_file_fd(self) -> int | None: ...

class FlockMixin:
def _open_lockfile(self, path: Path) -> int | None:
if not path.exists():
path.touch()

logger.notice("opening lockfile…")
return os.open(path, os.O_RDONLY)

def _aquire_flock(self: Flockable) -> None:
assert self._lock_file_fd is not None

try:
# First do a non blocking flock. If waiting is required,
# log a message and do a blocking wait afterwards.
fcntl.flock(self._lock_file_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
except BlockingIOError:
logger.notice("waiting for flock…")
fcntl.flock(self._lock_file_fd, fcntl.LOCK_EX)
logger.info("Acquired lock. Continuing…")

def _release_flock(self: Flockable) -> None:
assert self._lock_file_fd is not None
fcntl.flock(self._lock_file_fd, fcntl.LOCK_UN)
os.close(self._lock_file_fd)


if sys.platform == "win32":

class FlockMixin:
def _open_lockfile(self, path: Path) -> int | None:
logger.warn("lockfile in windows is not supported")
return None

def _aquire_flock(self) -> None:
pass

def _release_flock(self) -> None:
pass


class BaseCommand(FlockMixin, ABC):
"""BaseCommand is the baseclass for all gallia commands.
This class can be used in standalone scripts via the
gallia command line interface facility.
Expand Down Expand Up @@ -304,7 +350,10 @@ def _add_latest_link(self, path: Path) -> None:

symlink = path.joinpath("LATEST")
symlink.unlink(missing_ok=True)
symlink.symlink_to(latest_dir)
try:
symlink.symlink_to(latest_dir)
except (OSError, NotADirectoryError) as e:
logger.warn(f"symlink error: {e}")

def prepare_artifactsdir(
self,
Expand Down Expand Up @@ -350,28 +399,11 @@ def prepare_artifactsdir(

raise ValueError("base_dir or force_path must be different from None")

def _aquire_flock(self, path: Path) -> None:
if not path.exists():
path.touch()
self._lock_file_fd = os.open(path, os.O_RDONLY)
try:
# First do a non blocking flock. If waiting is required,
# log a message and do a blocking wait afterwards.
fcntl.flock(self._lock_file_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
except BlockingIOError:
logger.notice(f"Waiting for flock: {path}")
fcntl.flock(self._lock_file_fd, fcntl.LOCK_EX)
logger.info("Acquired lock. Continuing.")

def _release_flock(self) -> None:
assert self._lock_file_fd
fcntl.flock(self._lock_file_fd, fcntl.LOCK_UN)
os.close(self._lock_file_fd)

def entry_point(self, args: Namespace) -> int:
if (p := args.lock_file) is not None:
try:
self._aquire_flock(p)
self._lock_file_fd = self._open_lockfile(p)
self._aquire_flock()
except OSError as e:
logger.critical(f"Unable to lock {p}: {e}")
return exitcode.OSFILE
Expand Down Expand Up @@ -542,7 +574,7 @@ async def setup(self, args: Namespace) -> None:
self.parser.error("--dumpcap specified but `dumpcap` is not available")
self.dumpcap = await Dumpcap.start(args.target, self.artifacts_dir)
if self.dumpcap is None:
logger.error("Dumpcap could not be started!")
logger.error("`dumpcap` could not be started!")
else:
await self.dumpcap.sync()

Expand All @@ -561,7 +593,10 @@ def configure_class_parser(self) -> None:
group.add_argument(
"--dumpcap",
action=argparse.BooleanOptionalAction,
default=self.config.get_value("gallia.scanner.dumpcap", default=True),
default=self.config.get_value(
"gallia.scanner.dumpcap",
default=sys.platform == "linux",
),
help="Enable/Disable creating a pcap file",
)

Expand Down
59 changes: 47 additions & 12 deletions src/gallia/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
#
# SPDX-License-Identifier: Apache-2.0

import sys

from gallia.command.base import BaseCommand
from gallia.commands.discover.doip import DoIPDiscoverer
from gallia.commands.discover.find_xcp import FindXCP
from gallia.commands.discover.uds.isotp import IsotpDiscoverer
from gallia.commands.fuzz.uds.pdu import PDUFuzzer
from gallia.commands.primitive.generic.pdu import GenericPDUPrimitive
from gallia.commands.primitive.uds.dtc import DTCPrimitive
from gallia.commands.primitive.uds.ecu_reset import ECUResetPrimitive
Expand All @@ -19,21 +18,15 @@
from gallia.commands.primitive.uds.vin import VINPrimitive
from gallia.commands.primitive.uds.wdbi import WriteByIdentifierPrimitive
from gallia.commands.primitive.uds.wmba import WMBAPrimitive
from gallia.commands.primitive.uds.xcp import SimpleTestXCP
from gallia.commands.scan.uds.identifiers import ScanIdentifiers
from gallia.commands.scan.uds.memory import MemoryFunctionsScanner
from gallia.commands.scan.uds.reset import ResetScanner
from gallia.commands.scan.uds.sa_dump_seeds import SASeedsDumper
from gallia.commands.scan.uds.services import ServicesScanner
from gallia.commands.scan.uds.sessions import SessionsScanner
from gallia.commands.script.vecu import VirtualECU

registry: list[type[BaseCommand]] = [
# SimpleTestXCP,
DoIPDiscoverer,
IsotpDiscoverer,
FindXCP,
PDUFuzzer,
MemoryFunctionsScanner,
ReadByIdentifierPrimitive,
ResetScanner,
Expand All @@ -51,9 +44,51 @@
GenericPDUPrimitive,
SendPDUPrimitive,
WMBAPrimitive,
VirtualECU,
WriteByIdentifierPrimitive,
SimpleTestXCP,
]

__all__ = [x.__name__ for x in registry]
__all__ = [
"DoIPDiscoverer",
"DMemoryFunctionsScanner",
"DReadByIdentifierPrimitive",
"DResetScanner",
"DSASeedsDumper",
"DScanIdentifiers",
"DSessionsScanner",
"DServicesScanner",
"DDTCPrimitive",
"DECUResetPrimitive",
"DVINPrimitive",
"DIOCBIPrimitive",
"DPingPrimitive",
"DRMBAPrimitive",
"DRTCLPrimitive",
"DGenericPDUPrimitive",
"DSendPDUPrimitive",
"DWMBAPrimitive",
"DWriteByIdentifierPrimitive",
]


if sys.platform.startswith("linux"):
from gallia.commands.discover.find_xcp import FindXCP
from gallia.commands.discover.uds.isotp import IsotpDiscoverer
from gallia.commands.fuzz.uds.pdu import PDUFuzzer
from gallia.commands.primitive.uds.xcp import SimpleTestXCP
from gallia.commands.script.vecu import VirtualECU

registry += [
FindXCP,
IsotpDiscoverer,
PDUFuzzer,
SimpleTestXCP,
VirtualECU,
]

__all__ += [
"FindXCP",
"IsotpDiscoverer",
"PDUFuzzer",
"SimpleTestXCP",
"VirtualECU",
]
Loading
Loading