Beispiel #1
0
def find_keyword_from_blacklist(string):
    if string:
        sql = 'select * from blacklist where keyword = %s'
        param = (string)
        result = sqlMg.get_all(sql, param)
        if result:
            return True
        else:
            return False
    else:
        raise DarkException, _('Error string give from find keyword from blacklist function! Please check it!')
    return False
Beispiel #2
0
def find_domain_from_whitelist(string):
    if string:
        sql = 'select * from whitelist where domain = %s'
        param = (string)
        result = sqlMg.get_all(sql, param)
        if result:
            return True
        else:
            return False
    else:
        raise DarkException, _('Error string give from find domain from whitelist function! Please check it!')
    return False
Beispiel #3
0
def find_keyword_from_blacklist(string):
    if string:
        sql = 'select * from blacklist where keyword = %s'
        param = (string)
        result = sqlMg.get_all(sql, param)
        if result:
            return True
        else:
            return False
    else:
        raise DarkException, _(
            'Error string give from find keyword from blacklist function! Please check it!'
        )
    return False
Beispiel #4
0
def find_domain_from_whitelist(string):
    if string:
        sql = 'select * from whitelist where domain = %s'
        param = (string)
        result = sqlMg.get_all(sql, param)
        if result:
            return True
        else:
            return False
    else:
        raise DarkException, _(
            'Error string give from find domain from whitelist function! Please check it!'
        )
    return False