(self, get)
return public.returnMsg(True, 'DEL_SUCCESS')
get 里面 有  protocol type port  address ps   五个参数
        protocol == ['tcp','udp']
        type==['reject','accept'] # 放行和禁止
        port = 端口
        address  地址
        :param get:
        :return:
get 里面 有  protocol type port  address ps   五个参数
        protocol == ['tcp','udp']
        type==['reject','accept'] # 放行和禁止
        port = 端口
        address  地址
        :param get:
        :return:
get 里面 有 protocol type port address ps 五个参数 protocol == [ tcp udp ] type == [ reject accept ] # 放行和禁止 port = 端口 address 地址 : param get : : return :
def DelSpecifiesIp(self, get):
        '''
        get 里面 有  protocol type port  address ps   五个参数
        protocol == ['tcp','udp']
        type==['reject','accept'] # 放行和禁止
        port = 端口
        address  地址
        :param get:
        :return:
        '''
        ports = get.port
        types = get.type
        protocol=get.protocol
        address_ip=get.address
        protocol_list = ['tcp', 'udp']
        id = get.id
        if protocol not in protocol_list: return public.returnMsg(False, 'DESIGNATED_POROTOCOL_NOT_EXIST')
        if self.__isUfw:
            if type=='accept':
                public.ExecShell('ufw delete allow proto ' + protocol + ' from ' + address_ip + ' to any port ' + ports + '')
            else:
                public.ExecShell('ufw delete deny proto ' + protocol + ' from ' + address_ip + ' to any port ' + ports + '')
        else:
            if self.__isFirewalld:
                self.__Obj.Del_Port_IP(port=ports,address=address_ip,pool=protocol,type=types)

            else:
                if type == 'accept':
                    public.ExecShell('iptables -D INPUT -s ' + address_ip + ' -p ' + protocol + ' --dport ' + ports + ' -j ACCEPT')
                else:
                    public.ExecShell('iptables -D INPUT -s ' + address_ip + ' -p ' + protocol + ' --dport ' + ports + ' -j DROP')
        public.WriteLog("TYPE_FIREWALL", 'FIREWALL_DROP_PORT', (ports,))
        public.M('firewall').where("id=?", (id,)).delete()

        self.FirewallReload()
        return public.returnMsg(True, 'DEL_SUCCESS')
def DelSpecifiesIp ( self , get ) : ports = get . port types = get . type protocol = get . protocol address_ip = get . address protocol_list = [ 'tcp' , 'udp' ] id = get . id if protocol not in protocol_list : return public . returnMsg ( False , 'DESIGNATED_POROTOCOL_NOT_EXIST' ) if self . __isUfw : if type == 'accept' : public . ExecShell ( 'ufw delete allow proto ' + protocol + ' from ' + address_ip + ' to any port ' + ports + '' ) else : public . ExecShell ( 'ufw delete deny proto ' + protocol + ' from ' + address_ip + ' to any port ' + ports + '' ) else : if self . __isFirewalld : self . __Obj . Del_Port_IP ( port = ports , address = address_ip , pool = protocol , type = types ) else : if type == 'accept' : public . ExecShell ( 'iptables -D INPUT -s ' + address_ip + ' -p ' + protocol + ' --dport ' + ports + ' -j ACCEPT' ) else : public . ExecShell ( 'iptables -D INPUT -s ' + address_ip + ' -p ' + protocol + ' --dport ' + ports + ' -j DROP' ) public . WriteLog ( "TYPE_FIREWALL" , 'FIREWALL_DROP_PORT' , ( ports , ) ) public . M ( 'firewall' ) . where ( "id=?" , ( id , ) ) . delete ( ) self . FirewallReload ( ) return public . returnMsg ( True , 'DEL_SUCCESS' )