I\'m writing a small script, that gathers some information using scapy and then returns some xml code, that I\'ll pass on to the xmlrpc interface of metasploit. I\'d like it tha
With Python3, redefining sys.stderr to None threw an exception AttributeError: 'NoneType' object has no attribute 'write'. Instead, defining it to os.devnull
does the job:
import os
import sys
sys.stderr = os.devnull # suppress stderr
from scapy.all import *
sys.stderr = sys.__stderr__ # restore stderr