Error creating raw sockets

Viewed 1048

I'm trying to create a packet sniffer and in order to do that I need to first create a raw socket. I run the code to see if I can create a raw socket first.

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_RAW)

However upon running the code my interpreter hits an error.

Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    s = socket.socket(socket.AF_INET, socket.SOCK_RAW)
  File "C:\Python\Python35\lib\socket.py", line 134, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

So apparently my operating system which is a windows 10 wont allow me to create raw sockets.How do I fix this without using another type of operating system?Note: I'm using python 3.6.0

1 Answers
Related