-
Notifications
You must be signed in to change notification settings - Fork 120
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
Hydradancer fixes for Facedancer #92
Conversation
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.
.
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.
Great PR, thank you!
@@ -230,8 +230,6 @@ def emulate(self, *coroutines: Iterable[Coroutine]): | |||
|
|||
try: | |||
self.run_with(*coroutines) |
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.
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 |
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.
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: |
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.
Nicely spotted.
No description provided.