Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Scapy Warning Message IPv6

I tried multiple times to hide, but no success. Any help?

I already tried -

from scapy.all import *
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)

Still get the same warning on console.

WARNING: No route found for IPv6 destination :: (no default route?)

FYI, I'm using Scapy with Python 2.7 on OS Mavericks.

like image 906
pwn.star Avatar asked Dec 14 '22 21:12

pwn.star


1 Answers

You need to import logging and adjust the settings for the logging message first.

What's happening is you import scapy into your namespace, trigger the error - and then change the logging settings.

import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
like image 97
RyPeck Avatar answered Dec 27 '22 17:12

RyPeck