Exemple #1
0
    def filter_accounts(self, *args, **kwargs):
        """
        Filter all accounts if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_accounts(4,6,8,...)
            
        Return accounts with specific values :
            filter_accounts(keyword="arg", keword2="arg2",....)
        keywords available :
        - uid
        - name
        - group_id
        - group_name
        example : filter_accounts(uid="12")
        
        Black list some users
        keyword :
        - hide_uid
        - hide_name
        - hide_group_id
        - hide_group_name
        example 1 : filter_accounts(hide_uid="1")
        """
        list_filtered = AccountList()

        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_account(elem)

        return list_filtered
Exemple #2
0
    def filter_route(self,*args, **kwargs):
        """
        Filter all route if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_route(4,6,8,...)
            
        Return accounts with specific values :
            filter_route(keyword="arg", keword2="arg2",....)
        keywords available :
        - destination
        - mask
        - interface
        
        example : filter_route(mask="255.255.254.0", interface="10.10.1.42")
        
        Black list some users
        keyword :
        - hide_destination
        - hide_mask
        - hide_interface
        example 1 : filter_route(hide_interface="192.168.1.42")
        """
        list_filtered = RouteList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_route(elem)

        return list_filtered
    def filter_connections(self,*args, **kwargs):
        """
        Filter all connections if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return connections with identification numbers : 
            filter_connections(4,6,8,...)
            
        Return connections with specific values :
            filter_connections(keyword="arg", keword2="arg2",....)
        keywords available :
        - protocol
        - src_ip
        - src_port
        - dst_ip
        - dst_port
        - state
        - pid
        - program
        example : filter_connections(protocol="tcp", state="ESTABLISHED")
        """
        list_filtered = ConnectionList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_connection(elem)

        return list_filtered
Exemple #4
0
    def filter_vlan(self,*args, **kwargs):
        """
        Filter all vlan if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_vlan(4,6,8,...)
            
        Return accounts with specific values :
            filter_vlan(keyword="arg", keword2="arg2",....)
        keywords available :
        - number
        - name
        
        example : filter_vlan(name="admin42")
        
        Black list some users
        keyword :
        - hide_number
        - hide_name
        
        example 1 : filter_vlan(hide_number="12, 9")
        """
        list_filtered = VlanList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_vlan(elem)

        return list_filtered
    def filter_connections(self, *args, **kwargs):
        """
        Filter all connections if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return connections with identification numbers : 
            filter_connections(4,6,8,...)
            
        Return connections with specific values :
            filter_connections(keyword="arg", keword2="arg2",....)
        keywords available :
        - protocol
        - src_ip
        - src_port
        - dst_ip
        - dst_port
        - state
        - pid
        - program
        example : filter_connections(protocol="tcp", state="ESTABLISHED")
        """
        list_filtered = ConnectionList()

        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_connection(elem)

        return list_filtered
    def filter_services(self,*args, **kwargs):
        """
        Filter all services if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return services with identification numbers : 
            filter_services(4,6,8,...)
            
        Return groups with specific values :
            filter_services(keyword="arg", keword2="arg2",....)
        keywords available :
        - name
        - status
        - service_type
        - account
        example : filter_services(status="Running", service_type="Win32")
        
        keywords availables for black list:
        - hide_name
        - hide_status
        - hide_service_type
        - hide_account
        example : filter_services(status="Running", hide_service_type="Win32")
        """

        list_filtered = ServiceWindowsList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_service(elem)

        return list_filtered
Exemple #7
0
    def filter_services(self, *args, **kwargs):
        """
        Filter all services if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return services with identification numbers : 
            filter_services(4,6,8,...)
            
        Return groups with specific values :
            filter_services(keyword="arg", keword2="arg2",....)
        keywords available :
        - name
        - status
        - service_type
        - account
        example : filter_services(status="Running", service_type="Win32")
        
        keywords availables for black list:
        - hide_name
        - hide_status
        - hide_service_type
        - hide_account
        example : filter_services(status="Running", hide_service_type="Win32")
        """

        list_filtered = ServiceWindowsList()

        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_service(elem)

        return list_filtered
Exemple #8
0
    def filter_accounts(self,*args, **kwargs):
        """
        Filter all accounts if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_accounts(4,6,8,...)
            
        Return accounts with specific values :
            filter_accounts(keyword="arg", keword2="arg2",....)
        keywords available :
        - uid
        - name
        - group_id
        - group_name
        example : filter_accounts(uid="12")
        
        Black list some users
        keyword :
        - hide_uid
        - hide_name
        - hide_group_id
        - hide_group_name
        example 1 : filter_accounts(hide_uid="1")
        """
        list_filtered = AccountList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_account(elem)

        return list_filtered
Exemple #9
0
    def filter_route(self, *args, **kwargs):
        """
        Filter all route if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_route(4,6,8,...)
            
        Return accounts with specific values :
            filter_route(keyword="arg", keword2="arg2",....)
        keywords available :
        - destination
        - mask
        - interface
        
        example : filter_route(mask="255.255.254.0", interface="10.10.1.42")
        
        Black list some users
        keyword :
        - hide_destination
        - hide_mask
        - hide_interface
        example 1 : filter_route(hide_interface="192.168.1.42")
        """
        list_filtered = RouteList()

        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_route(elem)

        return list_filtered
Exemple #10
0
    def filter_acl(self,*args, **kwargs):
        """
        Filter all ACL if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_acl(4,6,8,...)
            
        Return accounts with specific values :
            filter_acl(keyword="arg", keword2="arg2",....)
        keywords available :
        - type : warning, integer value : idle(0), standard(1) and extended(2)
        - filter
        - protocol
        - comment
        - host : warning True of False
        - src_ip
        - src_port
        - src_mask
        - dst_ip
        - dst_port
        - dst_mask
        - active : warning True of False
        
        example : filter_acl(filter="deny", active=True)
        
        Black list some users
        keyword :
        - hide_type : warning, integer value : idle(0), standard(1) and extended(2)
        - hide_filter
        - hide_protocol
        - hide_comment
        - hide_host : warning True of False
        - hide_src_ip
        - hide_src_port
        - hide_src_mask
        - hide_dst_ip
        - hide_dst_port
        - hide_dst_mask
        - hide_active : warning True of False
        example 1 : filter_acl(hide_src_ip="192.168.1.42")
        """
        list_filtered = ACLlist()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_acl(elem)

        return list_filtered
Exemple #11
0
    def filter_interface(self,*args, **kwargs):
        """
        Filter all interfaces if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_interface(4,6,8,...)
            
        Return accounts with specific values :
            filter_interface(keyword="arg", keword2="arg2",....)
        keywords available :
        - interface
        - name
        - active : warning True of False
        - ip
        - mask 
        - urpf : warning True of False
        - acl_list_in
        - acl_list_out
        
        example : filter_interface(mask="255.255.0.0", active=True)
        
        Black list some users
        keyword :
        - hide_interface
        - hide_name
        - hide_active : warning True of False
        - hide_ip
        - hide_mask 
        - hide_urpf : warning True of False
        - hide_acl_list_in
        - hide_acl_list_out
        example 1 : filter_interface(hide_mask="255.255.0.0")
        """
        list_filtered = InterfaceList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_interface(elem)

        return list_filtered
Exemple #12
0
    def filter_interface(self, *args, **kwargs):
        """
        Filter all interfaces if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_interface(4,6,8,...)
            
        Return accounts with specific values :
            filter_interface(keyword="arg", keword2="arg2",....)
        keywords available :
        - interface
        - name
        - active : warning True of False
        - ip
        - mask 
        - urpf : warning True of False
        - acl_list_in
        - acl_list_out
        
        example : filter_interface(mask="255.255.0.0", active=True)
        
        Black list some users
        keyword :
        - hide_interface
        - hide_name
        - hide_active : warning True of False
        - hide_ip
        - hide_mask 
        - hide_urpf : warning True of False
        - hide_acl_list_in
        - hide_acl_list_out
        example 1 : filter_interface(hide_mask="255.255.0.0")
        """
        list_filtered = InterfaceList()

        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_interface(elem)

        return list_filtered
Exemple #13
0
    def filter_switchport(self,*args, **kwargs):
        """
        Filter all switchport if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_switchport(4,6,8,...)
            
        Return accounts with specific values :
            filter_switchport(keyword="arg", keword2="arg2",....)
        keywords available :
        - interface
        - active : warning, integer value : idle(0), standard(1) and extended(2)
        - description
        - vlan
        - vlan_allowed
        - mode
        
        example : filter_switchport(interface="GigabitEthernet3/0/24", active=True)
        
        Black list some users
        keyword :
        - hide_interface
        - hide_active : warning, integer value : idle(0), standard(1) and extended(2)
        - hide_description
        - hide_vlan
        - hide_vlan_allowed
        - hide_mode
        example 1 : filter_switchport(hide_vlan="12")
        """
        list_filtered = SwitchportList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_switchport(elem)

        return list_filtered
Exemple #14
0
    def filter_switchport(self, *args, **kwargs):
        """
        Filter all switchport if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return accounts with identification numbers : 
            filter_switchport(4,6,8,...)
            
        Return accounts with specific values :
            filter_switchport(keyword="arg", keword2="arg2",....)
        keywords available :
        - interface
        - active : warning, integer value : idle(0), standard(1) and extended(2)
        - description
        - vlan
        - vlan_allowed
        - mode
        
        example : filter_switchport(interface="GigabitEthernet3/0/24", active=True)
        
        Black list some users
        keyword :
        - hide_interface
        - hide_active : warning, integer value : idle(0), standard(1) and extended(2)
        - hide_description
        - hide_vlan
        - hide_vlan_allowed
        - hide_mode
        example 1 : filter_switchport(hide_vlan="12")
        """
        list_filtered = SwitchportList()

        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_switchport(elem)

        return list_filtered
    def filter_groups(self,*args, **kwargs):
        """
        Filter all groups if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return groups with identification numbers : 
            filter_groups(4,6,8,...)
            
        Return groups with specific values :
            filter_groups(keyword="arg", keword2="arg2",....)
        keywords available :
        - group
        - group_type
        - group_member
        - member_type
        - comment
        example : filter_groups(group_type="Global", member_type="User")
        
        keywords availables for black list:
        - hide_group
        - hide_group_type
        - hide_group_member
        - hide_member_type
        - hide_comment
        example : filter_groups(hide_group_type="Global", member_type="User")
        """

        list_filtered = GroupWindowsList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_group(elem)

        return list_filtered
    def filter_groups(self, *args, **kwargs):
        """
        Filter all groups if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return groups with identification numbers : 
            filter_groups(4,6,8,...)
            
        Return groups with specific values :
            filter_groups(keyword="arg", keword2="arg2",....)
        keywords available :
        - group
        - group_type
        - group_member
        - member_type
        - comment
        example : filter_groups(group_type="Global", member_type="User")
        
        keywords availables for black list:
        - hide_group
        - hide_group_type
        - hide_group_member
        - hide_member_type
        - hide_comment
        example : filter_groups(hide_group_type="Global", member_type="User")
        """

        list_filtered = GroupWindowsList()

        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_group(elem)

        return list_filtered
Exemple #17
0
    def filter_processes(self, *args, **kwargs):
        """
        Filter all processes if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return processes with identification numbers : 
            filter_processes(4,6,8,...)
            
        Return processes with specific values :
            filter_groups(keyword="arg", keword2="arg2",....)
        keywords available :
        - pid
        - name
        - username
        - session
        
        example : filter_processes(session="services", username="******")
        
        keywords availables for black list:
        - hide_pid
        - hide_name
        - hide_username
        - hide_session
        example : filter_processes(hide_session="services", username="******")
        """

        list_filtered = ProcessWindowsList()

        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_process(elem)

        return list_filtered
Exemple #18
0
    def filter_process(self, *args, **kwargs):
        """
        Filter all processes if any arguments or apply filter with this standard
        
        No arguments : no filtering       
        
        Filter processes with identification numbers : 
        filter_process(4,6,8,42,...)
        
        Filter process with specific values :
        filter_process(keyword="arg", keword2="arg2",....)
        keywords available :
        - pid
        - ppid
        - user
        - command
        example : filter_process(user ="******", ppid="2")
        
        Black list some users
        keyword :
        - hide_user
        - hide_pid
        - hide_ppid
        - hide_command
        example 1 : filter_process(hide_user="******")
        example 2 : filter_process(hide_user="******")
        """
        list_filtered = ProcessList()

        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_process(elem)

        return list_filtered
    def filter_processes(self,*args, **kwargs):
        """
        Filter all processes if any arguments or apply filter with this standard

        No arguments : no filtering       
        
        Return processes with identification numbers : 
            filter_processes(4,6,8,...)
            
        Return processes with specific values :
            filter_groups(keyword="arg", keword2="arg2",....)
        keywords available :
        - pid
        - name
        - username
        - session
        
        example : filter_processes(session="services", username="******")
        
        keywords availables for black list:
        - hide_pid
        - hide_name
        - hide_username
        - hide_session
        example : filter_processes(hide_session="services", username="******")
        """

        list_filtered = ProcessWindowsList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_process(elem)

        return list_filtered
Exemple #20
0
    def filter_process(self,*args, **kwargs):
        """
        Filter all processes if any arguments or apply filter with this standard
        
        No arguments : no filtering       
        
        Filter processes with identification numbers : 
        filter_process(4,6,8,42,...)
        
        Filter process with specific values :
        filter_process(keyword="arg", keword2="arg2",....)
        keywords available :
        - pid
        - ppid
        - user
        - command
        example : filter_process(user ="******", ppid="2")
        
        Black list some users
        keyword :
        - hide_user
        - hide_pid
        - hide_ppid
        - hide_command
        example 1 : filter_process(hide_user="******")
        example 2 : filter_process(hide_user="******")
        """
        list_filtered = ProcessList()
        
        object_list_in = self.dict.values()
        object_list_out = tools.filter_objects(object_list_in, *args, **kwargs)
        if object_list_out is not False:
            for elem in object_list_out:
                list_filtered.add_process(elem)

        return list_filtered