I am trying to capture the output of a scapy function (traceroute) to a string in a python script. I understand I need to pipe this function to stdout (as you do with subproces.call() but unsure how to do this using scapy, is anybody able to provide any assistance? I am new to Python.
Relevent code below.
#!/usr/bin/env python
from scapy.all import traceroute
traceroute('www.google.com')