ScoutSuite icon indicating copy to clipboard operation
ScoutSuite copied to clipboard

doesn't manage_object function cause infinite loop?

Open superboy-zjc opened this issue 1 year ago • 0 comments

Code at here: https://github.com/nccgroup/ScoutSuite/blob/7909f2fc6186063e5c9e7ddef8c4d7d1072c8f3d/ScoutSuite/providers/base/provider.py#L193

    def manage_object(self, object, attr, init, callback=None):
        """
        This is a quick-fix copy of Opinel's manage_dictionary in order to support the new ScoutSuite object which isn't
        a dict
        """
        if type(object) == dict:
            if not str(attr) in object:
                object[str(attr)] = init
                self.manage_object(object, attr, init)
        else:
            if not hasattr(object, attr):
                setattr(object, attr, init)
                self.manage_object(object, attr, init)
        if callback:
            callback(getattr(object, attr))
        return object

superboy-zjc avatar Jan 31 '25 21:01 superboy-zjc