Skip to content

OSError #1

@ghost

Description

Hello. It looks awesome but when I try to execute the code with python3 it throws exception like that

Traceback (most recent call last):
  File "./snif.py", line 215, in <module>
    main()
  File "./snif.py", line 190, in main
    socket.IPPROTO_IP
  File "/usr/lib/python3.5/socket.py", line 134, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 93] Protocol not supported

Then I edited the statement where you create the socket to
socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(0x0003))
and now i get

  1. sudo
[-] Error: [Errno 19] No such device
Traceback (most recent call last):
  File "./snif.py", line 211, in <module>
    main()
  File "./snif.py", line 206, in main
    s.ioctl(socket.SIO_RCVALL, socket.RCVALL_OFF)
AttributeError: 'socket' object has no attribute 'ioctl'
  1. no sudo
Traceback (most recent call last):
  File "./snif.py", line 211, in <module>
    main()
  File "./snif.py", line 187, in main
    s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(0x0003))
  File "/usr/lib/python3.5/socket.py", line 134, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
PermissionError: [Errno 1] Operation not permitted

Could you say how to solve the problem?

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