Exemplo n.º 1
0
def main():
    follower = TCPStreamFollower(data_callback)
    s = BlockingSniffer("en0", read_timeout=5000, snapshot_length=65000)
    s.filter = "tcp and port 3128"
    with s.iterator(lambda p: EthernetII(buf=p), -1) as i:
        list_of_pdu = (pdu for _, _, _, pdu in i)
        follower.feed(list_of_pdu)
Exemplo n.º 2
0
def main():
    follower = TCPStreamFollower(data_callback)
    s = BlockingSniffer("en0", read_timeout=5000, snapshot_length=65000)
    s.filter = "tcp and port 3128"
    with s.iterator(lambda p: EthernetII(buf=p), -1) as i:
        list_of_pdu = (pdu for _, _, _, pdu in i)
        follower.feed(list_of_pdu)
Exemplo n.º 3
0
def handle_int(signum, frame):
    print('global handle SIGINT')
    BlockingSniffer.stop_all()
Exemplo n.º 4
0
    def run(self):

        print("start of listen DNS")
        s = BlockingSniffer("en0", read_timeout=5000)
        s.filter = "udp and port 53"
        s.sniff_callback(self.callbackDNS)
Exemplo n.º 5
0
 def run(self):
     print("start of listen HTTP")
     s = BlockingSniffer("en0", read_timeout=5000, snapshot_length=65000)
     s.filter = "tcp and port 3128"
     #s.sniff_and_store(queue)
     s.sniff_callback(self.callbackHTTP)
Exemplo n.º 6
0
def handle_int(signum, frame):
    print('global handle SIGINT')
    BlockingSniffer.stop_all()
Exemplo n.º 7
0
    def run(self):

        print("start of listen DNS")
        s = BlockingSniffer("en0", read_timeout=5000)
        s.filter = "udp and port 53"
        s.sniff_callback(self.callbackDNS)
Exemplo n.º 8
0
 def run(self):
     print("start of listen HTTP")
     s = BlockingSniffer("en0", read_timeout=5000, snapshot_length=65000)
     s.filter = "tcp and port 3128"
     #s.sniff_and_store(queue)
     s.sniff_callback(self.callbackHTTP)