From 10f8c78a8c76c1b2045ee90a70af566c01ac98ee Mon Sep 17 00:00:00 2001 From: santosomar Date: Sun, 31 Mar 2019 00:42:14 -0400 Subject: [PATCH] Create pyshark_example.py --- python_ruby_and_bash/pyshark_example.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 python_ruby_and_bash/pyshark_example.py diff --git a/python_ruby_and_bash/pyshark_example.py b/python_ruby_and_bash/pyshark_example.py new file mode 100644 index 0000000..ee409f5 --- /dev/null +++ b/python_ruby_and_bash/pyshark_example.py @@ -0,0 +1,15 @@ +#!/usr/bin/python +# Author: Omar Santos @santosomar +# version 1.0 +# This is a quick demonstration on how to use the python pyshark library +# * Pre-requisite: pyshark python library. +# * Install it with pip install pyshark +# PyShark is a Python wrapper for tshark, +# allowing python packet parsing using wireshark dissectors. +##################################################################### + +import pyshark + +# Sniff from interface +capture = pyshark.LiveCapture(interface='eth0') +capture.sniff(timeout=10)