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

feat(sa_dump_seeds): Add sleep parameter and output seed length #573

Merged
merged 5 commits into from
Aug 19, 2024

Conversation

emedav
Copy link
Contributor

@emedav emedav commented Aug 5, 2024

Adds a sleep parameter as an additional way to attempt fooling brute-force protections. Also outputs the received key length.

@@ -209,6 +219,10 @@ async def main(self, args: Namespace) -> None:
# Re-enter session. Checking/logging will be done at the beginning of next iteration
await self.ecu.set_session(session)

if args.sleep > 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So above and then:

Suggested change
if args.sleep > 0:
if args.sleep is not None:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The most elegant solution might be this one: Leave the default=0 thing and just remove the if. I think await asyncio.sleep(0) is a noop. Choose your favorite. :)

@@ -84,6 +85,13 @@ def configure_parser(self) -> None:
default=b"",
help="Append an optional data record to each seed request",
)
self.parser.add_argument(
"--sleep",
default=0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Remove this, then you can do a not None check below. Would also work better for gallia 2.0 with stricter typing.

Suggested change
default=0,

@rumpelsepp rumpelsepp merged commit 8b5720a into master Aug 19, 2024
12 checks passed
@rumpelsepp rumpelsepp deleted the dump-seeds-sleep branch August 19, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants