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

Hydradancer fixes for Facedancer #92

Merged

Conversation

kauwua
Copy link
Contributor

@kauwua kauwua commented Jun 6, 2024

No description provided.

Copy link
Member

@antoinevg antoinevg left a comment

Choose a reason for hiding this comment

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

.

Copy link
Member

@antoinevg antoinevg left a comment

Choose a reason for hiding this comment

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

Great PR, thank you!

@@ -230,8 +230,6 @@ def emulate(self, *coroutines: Iterable[Coroutine]):

try:
self.run_with(*coroutines)
Copy link
Member

Choose a reason for hiding this comment

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

I suspect the original reasoning for this was to allow keyboard emulations to forward user-inputted ctrl+c to the target but I agree this would be better handled in user code.

@@ -67,7 +67,8 @@ def filter_control_out(self, req, data):
# handle it ourself, and absorb it.
if req.get_recipient() == self.RECIPIENT_DEVICE and \
req.request == self.SET_ADDRESS_REQUEST:
self.device.handle_set_address_request(req)
req.acknowledge(blocking=True)
self.device.set_address(req.value)
return None, None
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch. Filters should also work with variants of USBDevice.

@@ -210,7 +210,7 @@ def from_integer(cls, value):
""" Special factory that correctly handles reserved values. """

# If we have one of the reserved values; indicate so.
if 4 <= value < 16:
if 4 <= value < 32:
Copy link
Member

Choose a reason for hiding this comment

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

Nicely spotted.

@antoinevg antoinevg merged commit a538c44 into greatscottgadgets:main Jun 14, 2024
1 check passed
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