예제 #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
예제 #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
예제 #3
0
파일: mysqlExec.py 프로젝트: cash2one/dark
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
예제 #4
0
파일: mysqlExec.py 프로젝트: cash2one/dark
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