예제 #1
0
파일: actionModule.py 프로젝트: zpaav/apt2
    def pktCap(self, filter="", packetcount=10, timeout=60, srcip="", dstip=""):
        pool = ThreadPool(processes=1)
        p = pktcap()

        # create new thread/process for the packet capture
        async_result = pool.apply_async(p.capture, (filter, timeout, packetcount, srcip, dstip,))

        # slepp for a second to allow everything to get set up
        time.sleep(1)

        return async_result
예제 #2
0
    def pktCap(self, filter="", packetcount=10, timeout=60, srcip="", dstip=""):
        pool = ThreadPool(processes=1)
        p = pktcap()

        # create new thread/process for the packet capture
        async_result = pool.apply_async(p.capture, (filter, timeout, packetcount, srcip, dstip,))

        # slepp for a second to allow everything to get set up
        time.sleep(1)

        return async_result