-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
Co-authored-by: Stefan Tatschner <[email protected]>
Co-authored-by: Stefan Tatschner <[email protected]>
@@ -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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So above and then:
if args.sleep > 0: | |
if args.sleep is not None: |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
default=0, |
Adds a sleep parameter as an additional way to attempt fooling brute-force protections. Also outputs the received key length.