Exemple #1
0
def connect_to_debugger():
    global _debugger_connected

    setup_signal_dumper()
    PYDEVD_CONTACT = "PYDEVD_CONTACT"
    if PYDEVD_CONTACT in os.environ and not _debugger_connected:
        pydev_contact = os.environ[PYDEVD_CONTACT]
        host, port = pydev_contact.split(":", 1)
        utils.setup_remote_pydev(host, int(port))
        _debugger_connected = True
Exemple #2
0
def connect_to_debugger():
    global _debugger_connected

    setup_signal_dumper()
    PYDEVD_CONTACT = "PYDEVD_CONTACT"
    if PYDEVD_CONTACT in os.environ and not _debugger_connected:
        pydev_contact = os.environ[PYDEVD_CONTACT]
        host, port = pydev_contact.split(":", 1)
        utils.setup_remote_pydev(host, int(port))
        _debugger_connected = True
Exemple #3
0
    def pre_threads(self):
        signal.signal(signal.SIGINT, self.kill_handler)
        signal.signal(signal.SIGTERM, self.kill_handler)
        signal.signal(signal.SIGUSR2, self.stack_trace_handler)

        if self.conf.pydev_host:
            utils.setup_remote_pydev(self.conf.pydev_host, self.conf.pydev_port)

        if "PYDEVD_DEBUG_HOST" in os.environ:
            pydev = os.environ["PYDEVD_DEBUG_HOST"]
            h, p = pydev.split(":")
            utils.setup_remote_pydev(h, int(p))

        if self.conf.intrusion_detection_ossec:
            self.g_logger.info("Setting up intrusion detection.")
            if not utils.ossec_installed(self.conf):
                utils.install_ossec(self.conf)
            rc = utils.start_ossec()
            if not rc:
                self.g_logger.warn("Ossec failed to start")
Exemple #4
0
    def pre_threads(self):
        signal.signal(signal.SIGINT, self.kill_handler)
        signal.signal(signal.SIGTERM, self.kill_handler)
        signal.signal(signal.SIGUSR2, self.stack_trace_handler)

        if self.conf.pydev_host:
            utils.setup_remote_pydev(self.conf.pydev_host,
                                     self.conf.pydev_port)

        if 'PYDEVD_DEBUG_HOST' in os.environ:
            pydev = os.environ['PYDEVD_DEBUG_HOST']
            h, p = pydev.split(":")
            utils.setup_remote_pydev(h, int(p))

        if self.conf.intrusion_detection_ossec:
            self.g_logger.info("Setting up intrusion detection.")
            if not utils.ossec_installed(self.conf):
                utils.install_ossec(self.conf)
            rc = utils.start_ossec()
            if not rc:
                self.g_logger.warn("Ossec failed to start")