Exemplo n.º 1
0
    def InsertMonitorInfor(monitorInfor):
        """
        函数功能:将静态数据插入表中
        参数:manifestInfor manifest文件中的静态数据
        注:改为多个检测引擎,多条扫描任务
        """

        sql = (
            "INSERT INTO app_dynamic_monitor_action (file_md5 , action_id, time , micro_second,serial,"
            "thread, function, fun_args, fun_ret, is_native)"
            "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"
        )

        time = monitorInfor["time"]
        timeData = time.split(",")

        values = []
        values.append(monitorInfor["md5"])
        values.append(monitorInfor["action_id"])
        values.append(timeData[0])
        values.append(int(timeData[1]))
        values.append(monitorInfor["order"])

        values.append(monitorInfor["thread"])
        values.append(monitorInfor["function"])
        values.append(monitorInfor["args"])
        values.append(monitorInfor["ret"])
        values.append(monitorInfor["isNative"])

        data.iexecute(config.g_curDatabaseName, sql, values)
Exemplo n.º 2
0
    def InsertMonitorInfor(monitorInfor):
        '''
        函数功能:将静态数据插入表中
        参数:manifestInfor manifest文件中的静态数据
        注:改为多个检测引擎,多条扫描任务
        '''

 
        sql = ("INSERT INTO app_dynamic_monitor_action (file_md5 , action_id, time , micro_second,serial,"
               "thread, function, fun_args, fun_ret, is_native)"
            "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)")

      
        time = monitorInfor["time"]
        timeData = time.split(",")
                 
        values = []
        values.append(monitorInfor["md5"])
        values.append(monitorInfor["action_id"])
        values.append(timeData[0])
        values.append(int(timeData[1]))
        values.append(monitorInfor["order"])
        
        values.append(monitorInfor["thread"])
        values.append(monitorInfor["function"])
        values.append(monitorInfor["args"])
        values.append(monitorInfor["ret"])
        values.append(monitorInfor["isNative"])
      
        data.iexecute(config.g_curDatabaseName, sql, values)
Exemplo n.º 3
0
    def InsertAppStaticInfor(manifestInfor, apkInfor):
        '''
        函数功能:将静态数据插入表中
        参数:manifestInfor manifest文件中的静态数据
        注:改为多个检测引擎,多条扫描任务
        '''

 
        sql = ("INSERT INTO app_static_infor (file_md5, package_name, launcher_activity, uses_permission_infor,"
               "activity_infor, service_infor, receiver_infor, provider_infor, metaDataDict)"
            "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)")

                             
        values = []
        values.append(apkInfor["md5"])
        values.append(manifestInfor.packageName)
        values.append(manifestInfor.launcherActivity)
        
        usesPermissionJsonInfor =  json.dumps(manifestInfor.usesPermission)
        values.append(usesPermissionJsonInfor)
        
        activityJsonInfor = json.dumps(manifestInfor.activityInfor)
        values.append(activityJsonInfor)
        
        serviceJsonInfor = json.dumps(manifestInfor.serviceInfor)
        values.append(serviceJsonInfor)
        
        reveiverJsonInfor = json.dumps(manifestInfor.receiverInfor)
        values.append(reveiverJsonInfor)
        
        providerJsonInfor = json.dumps(manifestInfor.providerInfor)
        values.append(providerJsonInfor)
        
        metaDataDictJsonInfor = json.dumps(manifestInfor.metaDataDict)
        values.append(metaDataDictJsonInfor )        
        

        
        #adJsonInfor = json.dumps(manifestInfor.adInfor) #广告信息
        #values.append("")
        
        data.iexecute(config.g_curDatabaseName, sql, values)
Exemplo n.º 4
0
    def InsertAppStaticInfor(manifestInfor, apkInfor):
        """
        函数功能:将静态数据插入表中
        参数:manifestInfor manifest文件中的静态数据
        注:改为多个检测引擎,多条扫描任务
        """

        sql = (
            "INSERT INTO app_static_infor (file_md5, package_name, launcher_activity, uses_permission_infor,"
            "activity_infor, service_infor, receiver_infor, provider_infor, metaDataDict)"
            "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)"
        )

        values = []
        values.append(apkInfor["md5"])
        values.append(manifestInfor.packageName)
        values.append(manifestInfor.launcherActivity)

        usesPermissionJsonInfor = json.dumps(manifestInfor.usesPermission)
        values.append(usesPermissionJsonInfor)

        activityJsonInfor = json.dumps(manifestInfor.activityInfor)
        values.append(activityJsonInfor)

        serviceJsonInfor = json.dumps(manifestInfor.serviceInfor)
        values.append(serviceJsonInfor)

        reveiverJsonInfor = json.dumps(manifestInfor.receiverInfor)
        values.append(reveiverJsonInfor)

        providerJsonInfor = json.dumps(manifestInfor.providerInfor)
        values.append(providerJsonInfor)

        metaDataDictJsonInfor = json.dumps(manifestInfor.metaDataDict)
        values.append(metaDataDictJsonInfor)

        # adJsonInfor = json.dumps(manifestInfor.adInfor) #广告信息
        # values.append("")

        data.iexecute(config.g_curDatabaseName, sql, values)