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

Questions about proxy.py #142

Open
mwuhang opened this issue Dec 12, 2024 · 4 comments
Open

Questions about proxy.py #142

mwuhang opened this issue Dec 12, 2024 · 4 comments

Comments

@mwuhang
Copy link

mwuhang commented Dec 12, 2024

Hardware: facedancer
Software: kali, python3.8.9

After I downloaded the file from the library, I tried to run the facedancer\proxy.py file, but it always reported a dependency library problem

I am a newbie, can you please give me some guidance?

If this hardware/software doesn't work, is there any other way to enable the proxy? What I want is to capture the USB data packets fed back by the device under test

@antoinevg
Copy link
Member

Hi, thank you for your questions!

Can you please copy and paste the error message that's being reported?

@mwuhang
Copy link
Author

mwuhang commented Dec 12, 2024

At first, I downloaded version 3.0.6 of the library locally and tried to run the proxy.py file. I encountered the first problem as follows:
Traceback (most recent call last):
File "/xxx/facedancer/facedancer/proxy.py", line 11, in
from . import DeviceSpeed, USBConfiguration, USBDirection
ImportError: attempted relative import with no known parent package

For example, the import command from .request import USBControlRequest in the file, I deleted all the "." in the import command, renamed the error-prone types.py and logging.py files, and updated them to the various files in the facedancer folder.
Later, because the configuration.py file and the device.py file were imported in a loop, an error occurred. I merged the previous two files into con_device.py and made appropriate modifications after the merger. The current error content is:

Traceback (most recent call last):
File "/xxx/facedancer/facedancer/proxy.py", line 13, in
from con_device import USBBaseDevice, USBConfiguration
File "/xxx/facedancer/facedancer/con_device.py", line 33, in
@DataClass
NameError: name 'dataclass' is not defined

That's my question. Thank you for your patience.

@antoinevg
Copy link
Member

The main problems you're running into are:

  1. You need to first install the Facedancer library into your local Python environment. See https://facedancer.readthedocs.io/en/latest/getting_started.html for more information.
  2. If you want to run library files directly you'll want to specify the module rather than the path. i.e. python -m facedancer.proxy
  3. There's also a standalone example in the examples/ directory you can run with python ./examples/usbproxy.py.

Can you please also tell me more about the hardware you're using, you said it is 'facedancer' but there are many different Facedancer devices such as the GoodFET, Cynthion, Hydradancer etc.

@mwuhang
Copy link
Author

mwuhang commented Dec 13, 2024

Thank you very much for your help. My facedancer is a GoodFET device. I found my problem, when I called python ./examples/usbproxy.py, my python could not recognize the device. I also tried many methods (for example: export BACKEND=goodfet; tried to change the facedancer library file, etc.). I also referred to the web tutorial you mentioned. Finally I found that there was a problem with my hardware device. When I ran python ./examples/usbproxy.py, my kali could not recognize the facedancer of GoodFET. However, when I tried to run the file https://github.com/travisgoodspeed/goodfet, there was a client/ under its directory. When I tried to call python facedancer-keyboard.py, there was no problem of not being able to recognize the facedaner. It has been running normally. It may be that my way of opening is different. I think I may need to try a new device again. Thank you again. Thank you very much.

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

No branches or pull requests

2 participants