diff --git a/traceflow/socket_handler.py b/traceflow/socket_handler.py index 91acca4..96ea626 100644 --- a/traceflow/socket_handler.py +++ b/traceflow/socket_handler.py @@ -19,9 +19,10 @@ def __init__(self, daddr): self.ip_daddr = daddr os_release = platform.system() if os_release == "Darwin": - # Boned. TODO: Work on fixing this. - print("Detected Mac OS - Cannot support writing of raw IP packets, exiting") - exit(1) + # Use pypcap on osx to send raw packets + import pcap + self.raw_socket = pcap.pcap() + logging.debug("Detected Linux") if os_release.endswith("BSD"): # BSD - Need to explicit set IP_HDRINCL. # BSD - Need to explicitly calculate IP total length