Ejemplo n.º 1
0
def store_url_hidden_report_in_monitor_statistic(id, ref_id, threat_name, threat_level, threat_sum, stat_time,
                                                 report_part_path):
    sql = 'insert into monitor_statistic(ID, RefSiteId, ThreatName, ThreatLevel, ThreatSum, StatisticTime, ReportName) ' \
          'values(%s, %s, %s, %s, %s, %s, %s)'
    param = (id, ref_id, threat_name, threat_level, threat_sum, stat_time, report_part_path)
    sqlMg.insert_one(sql, param)
    sqlMg.end()
Ejemplo n.º 2
0
def store_url_hidden_type_to_detect_info(url, hidden, content, level, type):
    if url:
        sql = 'replace into detectInfo(url, hiddenUrl, hiddenContent, hiddenLevel, hiddenType) values(%s, %s, %s, %s, %s)'
        param = (url, hidden, content, level, type)
        sqlMg.insert_one(sql, param)
        sqlMg.end()
    else:
        raise DarkException, _('Error string give from store url hidden type to detect info function! Please check it!')