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

Running gopktsniffer with assigned interface returns "failed to open interface: route ip+net: no such network interface"? #1

Open
lostpackets opened this issue Aug 16, 2024 · 1 comment

Comments

@lostpackets
Copy link

Hello,
Thank you for taking the time to make this project.
However, I have been having trouble with using my own interface for this packet sniffer.
I am not sure how to workaround this issue, as it seems to be giving me an error such as "failed to open interface"
Here is the error message:
"sudo go run main.go -i enx3 -site www.example.com
{"level":"info","time":1723829802,"message":"93.184.215.14"}
{"level":"info","time":1723829802,"message":"Capturing packets on enx3 interface"}

======== PACKET 1 =========

======== LAYER 1 (Physical/Over the Wire) =========
[BYTES OVER WIRE]: [176 93 212 219 231 96 52 41 143 114 28 180 8 0 69 0 0 52 112 49 64 0 64 6 211 227 192 168 1 64 93 184 215 14 158 62 0 80 0 10 48 166 29 122 34 127 128 16 1 245 136 75 0 0 1 1 8 10 82 87 253 134 6 166 144 17]
[TOTAL PACKET BYTES]: 66 bytes
2024/08/16 13:36:47 failed to open interface: route ip+net: no such network interface
exit status 1
"
(For reference, I am using debian bookworm)

@ZER-0-NE
Copy link
Owner

thanks for using this!

the error is probably coming from - https://github.com/ZER-0-NE/gopktsniffer/blob/main/pkg/frame/frame.go#L41, where I have hardcoded "en0". Can you replace it with your interface, try it, and let me know?

In the meantime, I have a few things I need to fix here.

ZER-0-NE pushed a commit that referenced this issue Aug 17, 2024
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