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

Unable to run tcp_fingerprint.py due to insufficient permissions #13

Closed
JohnnyRacer opened this issue Sep 19, 2022 · 3 comments
Closed

Comments

@JohnnyRacer
Copy link

Hello,
I am trying to get this library working but am having trouble with libpcap requiring root permissions. I've seen another issue that was closed with 'just run it as sudo', but this is dangerous as it breaks file permissions with pip and defaults to using the Python binary inside /usr/bin/python which does not working with using any environment managers like conda or pipenv. Is there a fix to get around this problem?

This is the message that pops up when I try to run tcp_fingerprint.py

[2022-09-19 01:40:41.545098] - INFO - tcp_fingerprint - Loaded 2916 fingerprints from the database

[2022-09-19 01:40:41.545304] - INFO - tcp_fingerprint - listening on interface enp6s0

enp6s0: You don't have permission to capture on that device (socket: Operation not permitted)
@jja67
Copy link

jja67 commented Jan 24, 2023

i face the same issue . if I add sudo to run the python file, then it would still fail as said the module is missing

@newedgex
Copy link

newedgex commented Jan 25, 2023

I'm having the same problem.. Tried also sudo setcap cap_net_admin,cap_net_raw=ep tcp_fingerprint.py but it didn't work

Of course I tried with sudo, but it get's out of the env....
`
sudo python tcp_fingerprint.py -i enp0s3
[2023-01-25 22:05:26.588635] - INFO - tcp_fingerprint - Loaded 11482 fingerprints from the database

Traceback (most recent call last):
File "/home/qacicd/zardaxt/tcp_fingerprint.py", line 16, in
from api import run_api
File "/home/qacicd/zardaxt/api.py", line 14, in
raise Exception('InvalidAPIKeyException')
Exception: InvalidAPIKeyException

`

@NikolaiT
Copy link
Owner

Guys you need to set the correct environment variables.

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

4 participants