s = socket.socket(socket.PF_PACKET,socket.SOCK_RAW,socket.ntohs(0x0800))AttributeError: module 'socket' has no attribute 'PF_PACKET'
Hello bro,plaese anyone help me,i dont understand why run this Error with module socket,i update my Pycharm at 2022 version,what s the problem?thx so much for all
Please sign in to leave a comment.
Hi,
More info about the issue needed. Steps to reproduce and a code sample would help greatly.
hi bro thx for your answer i copy this my code and the output from pycharm ok let s go:
C:\Users\baccioalex\PycharmProjects\pythonProject7\venv\Scripts\python.exe C:/Users/baccioalex/PycharmProjects/pythonProject7/main.py
Traceback (most recent call last):
File "C:\Users\baccioalex\PycharmProjects\pythonProject7\main.py", line 2, in <module>
s= socket.socket(socket.PF_PACKET,socket.SOCK_RAW,socket.ntohs(0*800))
AttributeError: module 'socket' has no attribute 'PF_PACKET'
Process finished with exit code 1
i don t understand bro the code is good but pycharm give this output
thx much for your care
Seems to be a coding issue. I would suggest googling it, for example https://stackoverflow.com/questions/23348293/error-while-capturing-packets-from-raw-socket
humm true bro,thx,i put this code in google page and now runs good,but sorry this coding problem comes from where in your opinion?