Exemple #1
0
def parse_apks(base_path):
    sqlhelper = MySQLHelper()
    sqlhelper.init()
    local_path = base_path
    files = os.listdir(local_path)

    apk_paths = []
    for f in files:
        if f.endswith('.apk'):
            apk_paths.append(local_path + '/' + f)

    print "----------------------------------共" + len(apk_paths).__str__() + "个待解析APK------------------------------"
    for i, path in enumerate(apk_paths):
        print "-----------------开始解析第" + str(i + 1) + "个APK:" + path + "----------------------"
        parse_apk(path, sqlhelper)
        print "-----------------结束解析第" + str(i + 1) + "个APK:" + path + "----------------------\n"
    sqlhelper.close()
Exemple #2
0
def parse_apks(base_path):
    sqlhelper = MySQLHelper()
    sqlhelper.init()
    local_path = base_path
    files = os.listdir(local_path)

    apk_paths = []
    for f in files:
        if f.endswith('.apk'):
            apk_paths.append(local_path + '/' + f)

    print "----------------------------------共" + len(
        apk_paths).__str__() + "个待解析APK------------------------------"
    for i, path in enumerate(apk_paths):
        print "-----------------开始解析第" + str(
            i + 1) + "个APK:" + path + "----------------------"
        parse_apk(path, sqlhelper)
        print "-----------------结束解析第" + str(
            i + 1) + "个APK:" + path + "----------------------\n"
    sqlhelper.close()
Exemple #3
0
 def select_targets(self):
     sqlhelper = MySQLHelper()
     targets = sqlhelper.query_targets_by_type('image/png')
     sqlhelper.close()
     return targets