コード例 #1
0
 def stop_capture(self):
     ut.kill_all_children(self.p0.pid)  # self.p0.pid is the shell pid
     os.kill(self.p0.pid, signal.SIGINT)
     #self.p0.kill()
     if os.path.isfile(self.logpath):
         wl_log.info('Onionperf killed. Capture size: %s Bytes %s' %
                     (os.path.getsize(self.logpath), self.logpath))
     else:
         wl_log.warning('Onionperf killed but cannot find capture file: %s'
                        % self.logpath)
コード例 #2
0
 def stop_capture(self):
     """Kill the dumpcap process."""
     ut.kill_all_children(self.p0.pid)  # self.p0.pid is the shell pid
     self.p0.kill()
     self.is_recording = False
     if os.path.isfile(self.pcap_file):
         wl_log.info('Dumpcap killed. Capture size: %s Bytes %s' %
                     (os.path.getsize(self.pcap_file), self.pcap_file))
     else:
         wl_log.warning('Dumpcap killed but cannot find capture file: %s' %
                        self.pcap_file)
コード例 #3
0
 def stop_capture(self):
     """Kill the dumpcap process."""
     ut.kill_all_children(self.p0.pid)  # self.p0.pid is the shell pid
     self.p0.kill()
     self.is_recording = False
     if os.path.isfile(self.pcap_file):
         wl_log.info('Dumpcap killed. Capture size: %s Bytes %s' %
                     (os.path.getsize(self.pcap_file), self.pcap_file))
     else:
         wl_log.warning('Dumpcap killed but cannot find capture file: %s'
                        % self.pcap_file)
コード例 #4
0
 def stop_capture(self):
     """Kill the dumpcap process."""
     ut.kill_all_children(self.p0.pid)  # self.p0.pid is the shell pid
     self.p0.kill()
     self.is_recording = False
     captcha_filepath = ut.capture_filepath_to_captcha(self.pcap_file)
     if os.path.isfile(self.pcap_file):
         wl_log.info('Sniffer killed. Capture size: %s Bytes %s' %
                     (os.path.getsize(self.pcap_file), self.pcap_file))
     elif os.path.isfile(captcha_filepath):
         wl_log.info(
             'Sniffer killed, file renamed to captcha_*. Capture size: %s Bytes %s'
             % (os.path.getsize(captcha_filepath), captcha_filepath))
     else:
         wl_log.warning(
             'Sniffer killed but cannot find capture file: %s or %s' %
             (self.pcap_file, captcha_filepath))