Exemplo n.º 1
0
    def __init__(self, pid, passive, active, background) :
        self.passive = passive
        self.active = active
        self.background = background
        self.pid = pid

        '''
          If there is a "help_*" function available, run it
          and capture the resulting docstring and store it
          in the API's docstring
        '''
        for name, func in inspect.getmembers(self) :
            if func is not None and inspect.isroutine(func) and not name.count("__"):
                fake_stdout.switch()
                try :
                    help(func.__name__)
                    func.__func__.__doc__ = fake_stdout.capture_msg 
                    True
                except Exception, obj:
                    pass
                fake_stdout.unswitch()
Exemplo n.º 2
0
    def __init__(self, pid, passive, active, port, debug) :
        self.passive = passive
        self.active = active
        self.pid = pid
        self.port = port
        self.debug = debug

        from lib.auxiliary.cli import help 
        '''
          If there is a "help_*" function available, run it
          and capture the resulting docstring and store it
          in the API's docstring
        '''
        for name, func in inspect.getmembers(self) :
            if func is not None and inspect.isroutine(func) and not name.count("__"):
                fake_stdout.switch()
                try :
                    if help(func.__name__) :
                        func.__func__.__doc__ = fake_stdout.capture_msg 
                except Exception:
                    pass
                fake_stdout.unswitch()
Exemplo n.º 3
0
    def __init__(self, pid, passive, active, port, debug) :
        self.passive = passive
        self.active = active
        self.pid = pid
        self.port = port
        self.debug = debug

        from lib.auxiliary.cli import help 
        '''
          If there is a "help_*" function available, run it
          and capture the resulting docstring and store it
          in the API's docstring
        '''
        for name, func in inspect.getmembers(self) :
            if func is not None and inspect.isroutine(func) and not name.count("__"):
                fake_stdout.switch()
                try :
                    if help(func.__name__) :
                        func.__func__.__doc__ = fake_stdout.capture_msg 
                except Exception:
                    pass
                fake_stdout.unswitch()