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

pyric.error: [Errno 98] Address already in use #44

Open
ghost opened this issue Aug 14, 2018 · 2 comments
Open

pyric.error: [Errno 98] Address already in use #44

ghost opened this issue Aug 14, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 14, 2018

when I try to set up card to monitor mode:
Ubuntu 18:
wlan1: TL-WN722N
wlan1 is not blocked by software...

on my kali linux all works fine!

>>>self._iwface
Card(phy=0,dev=wlan0,ifindex=3)
>>> newcard = pyw.devset(self._iwface, f'{self._iwface.dev}mon')
this line raise error:

newcard = pyw.devset(self._iwface, f'{self._iwface.dev}mon')
  File "..../lib/python3.6/site-packages/pyric/pyw.py", line 1380, in devset
    if nlsock is None: return _nlstub_(devset, card, ndev)
  File "..../lib/python3.6/site-packages/pyric/pyw.py", line 2236, in _nlstub_
    return fct(*argv)
  File "..../lib/python3.6/site-packages/pyric/pyw.py", line 1395, in devset
    if not validcard(card):
  File "..../lib/python3.6/site-packages/pyric/pyw.py", line 279, in validcard
    if nlsock is None: return _nlstub_(validcard, card)
  File "..../lib/python3.6/site-packages/pyric/pyw.py", line 2238, in _nlstub_
    raise pyric.error(e.errno, pyric.strerror(e.errno))
pyric.error: [Errno 98] Address already in use

:update


>>>'monitor' in pyw.devmodes(w1)
True
>>>m1 = pyw.devadd(w1, 'mon1', 'monitor')

Traceback (most recent call last):
  File ".../lib/python3.6/site-packages/pyric/pyw.py", line 1448, in devadd
    rmsg = nl.nl_recvmsg(nlsock) # success returns new device attributes
  File ".../lib/python3.6/site-packages/pyric/lib/libnl.py", line 244, in nl_recvmsg
    msg = nlmsg_fromstream(sock.recv())
  File ".../lib/python3.6/site-packages/pyric/lib/libnl.py", line 444, in nlmsg_fromstream
    raise error(abs(e),strerror(abs(e)))
libnl.error: [Errno 1] Operation not permitted
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File ".../lib/python3.6/site-packages/pyric/pyw.py", line 1428, in devadd
    if nlsock is None: return _nlstub_(devadd, card, vdev, mode, flags)
  File ".../lib/python3.6/site-packages/pyric/pyw.py", line 2236, in _nlstub_
    return fct(*argv)
  File ".../lib/python3.6/site-packages/pyric/pyw.py", line 1452, in devadd
    raise pyric.error(e.errno, e.strerror)
pyric.error: [Errno 1] Operation not permitted

@blackHatMonkey
Copy link
Contributor

@kojibhy Just curious are running python with sudo or not?

@ghost
Copy link
Author

ghost commented Aug 15, 2018

yes as root, I test in raspberry pi kali iso same problem

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

1 participant