Skip to content

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

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions