

def _spawn_burp(self):
    'Launch the burp client process'
    cmd = [self.burpbin, '-c', self.burpconfcli, '-a', 'm']
    self.proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, universal_newlines=True, bufsize=0)
    time.sleep(0.5)
    if (not self._proc_is_alive()):
        raise Exception('Unable to spawn burp process')
    (_, w, _) = select([], [self.proc.stdin], [], self.timeout)
    if (self.proc.stdin not in w):
        self._kill_burp()
        raise OSError('Unable to setup burp client')
    self.proc.stdin.write('j:pretty-print-off\n')
    js = self._read_proc_stdout()
    if self._is_warning(js):
        self._logger('info', js['warning'])

dataset/ETHPy150Open ziirish/burp-ui/burpui/misc/backend/burp2.py Burp._spawn_burp/original