Exemplo n.º 1
0
def test():
    apk_path = "wan.ke.ji-V1.5-1500.apk"
    apkf = APK(apk_path)
    print apkf.cert_text
    print apkf.file_md5
    print apkf.cert_md5
    print apkf.file_size
    print apkf.androidversion
    print apkf.package
    print apkf.get_android_manifest_xml()
    print apkf.get_android_manifest_axml()
    print apkf.is_valid_APK()
    print apkf.get_filename()
    print apkf.get_package()
    print apkf.get_androidversion_code()
    print apkf.get_androidversion_name()
    print apkf.get_max_sdk_version()
    print apkf.get_min_sdk_version()
    print apkf.get_target_sdk_version()
    print apkf.get_libraries()
    print apkf.get_files()
    # pip install python-magic
    print apkf.get_files_types()
    # print apkf.get_dex()
    print apkf.get_main_activity()
    print apkf.get_activities()
    print apkf.get_services()
    print apkf.get_receivers()
    print apkf.get_providers()
    print apkf.get_permissions()

    print apkf.show()
    apkf.parse_icon(icon_path='.')
Exemplo n.º 2
0
def test():
    apk_path = "/home/tdoly/com.android.vending_090150.apk"
    apkf = APK(apk_path)
    print apkf.cert_text
    print apkf.file_md5
    print apkf.cert_md5
    print apkf.file_size
    print apkf.androidversion
    print apkf.package
    print apkf.get_android_manifest_xml()
    print apkf.get_android_manifest_axml()
    print apkf.is_valid_APK()
    print apkf.get_filename()
    print apkf.get_package()
    print apkf.get_androidversion_code()
    print apkf.get_androidversion_name()
    print apkf.get_max_sdk_version()
    print apkf.get_min_sdk_version()
    print apkf.get_target_sdk_version()
    print apkf.get_libraries()
    print apkf.get_files()
    # pip install python-magic
    print apkf.get_files_types()
    # print apkf.get_dex()
    print apkf.get_main_activity()
    print apkf.get_activities()
    print apkf.get_services()
    print apkf.get_receivers()
    print apkf.get_providers()
    print apkf.get_permissions()
Exemplo n.º 3
0
def test():
    apk_path = "/home/sym/Downloads/share/11/davm/app/com.thecarousell.Carousell.apk"
    #apk_path = "/home/sym/Downloads/share/11/davm/app/com.tmob.AveaOIM.apk"
    apkf = APK(apk_path)
    # print apkf.cert_text
    # print apkf.file_md5
    # print apkf.cert_md5
    print apkf.file_size
    # print apkf.androidversion
    print apkf.package
    # print apkf.get_android_manifest_xml()
    # print apkf.get_android_manifest_axml()
    print apkf.is_valid_APK()
    # print apkf.get_filename()
    # print apkf.get_package()
    # print apkf.get_androidversion_code()
    print apkf.get_androidversion_name()
    # print apkf.get_max_sdk_version()
    # print apkf.get_min_sdk_version()
    # print apkf.get_target_sdk_version()
    print apkf.get_libraries()
    #print apkf.get_files()
    # # pip install python-magic
    # print apkf.get_files_types()
    # # print apkf.get_dex()
    print apkf.get_main_activity()
Exemplo n.º 4
0
def test():
    apk_path = "/users/ozgumusy/AndroidStudioProjects/RijksClient/app/app-release.apk"
    apkf = APK(apk_path)
    print apkf.cert_text
    print apkf.file_md5
    print apkf.cert_md5
    print apkf.file_size
    print apkf.androidversion
    print apkf.package
    print apkf.get_android_manifest_xml()
    print apkf.get_android_manifest_axml()
    print apkf.is_valid_APK()
    print apkf.get_filename()
    print apkf.get_package()
    print apkf.get_androidversion_code()
    print apkf.get_androidversion_name()
    print apkf.get_max_sdk_version()
    print apkf.get_min_sdk_version()
    print apkf.get_target_sdk_version()
    print apkf.get_libraries()
    print apkf.get_files()
    print apkf.get_files_types()
    #print apkf.get_dex()
    print apkf.get_main_activity()
    print apkf.get_activities()
    print apkf.get_services()
    print apkf.get_receivers()
    print apkf.get_providers()
    print apkf.get_permissions()
Exemplo n.º 5
0
def test():
    apk_path = r"C:\Users\heguofeng\Downloads\com.tencent.mm_6.7.3_liqucn.com.apk"
    apkf = APK(apk_path)
    print(apkf.cert_text)
    print( apkf.file_md5)
    print( apkf.cert_md5)
    print( apkf.file_size)
    print( apkf.androidversion)
    print( apkf.package)
    print( apkf.get_android_manifest_xml())
    print( apkf.get_android_manifest_axml())
    print( apkf.is_valid_APK())
    print( apkf.get_filename())
    print( apkf.get_package())
    print( apkf.get_androidversion_code())
    print( apkf.get_androidversion_name())
    print( apkf.get_max_sdk_version())
    print( apkf.get_min_sdk_version())
    print( apkf.get_target_sdk_version())
    print( apkf.get_libraries())
    print( apkf.get_files())
    # pip install python-magic
    print( apkf.get_files_types())
    # print( apkf.get_dex()
    print( apkf.get_main_activity())
    print( apkf.get_activities())
    print( apkf.get_services())
    print( apkf.get_receivers())
    print( apkf.get_providers())
    print( apkf.get_permissions())
Exemplo n.º 6
0
    added = ",".join(t2)
    removed = ",".join(t1)
    same = ",".join(t3)

    cur.execute(
        'Update apps set providers_added = ?, providers_removed=?, same_providers=? where app1_name=? and app2_name = ?',
        (added, removed, same, app1, app2))

    # ----------size-------------------
    f1 = size(apk1.file_size)
    f2 = size(apk2.file_size)

    cur.execute('Update apps set app1_size = ?, app2_size=? where app1_name=? and app2_name = ?', (f1, f2, app1, app2))

    # ----------main_activity-------------------
    a1 = apk1.get_main_activity()
    a2 = apk2.get_main_activity()

    if a1 == a2:
        same = "same"
    else:
        same = "diff"

    cur.execute(
        'Update apps set app1_main_activity = ?, app2_main_activity = ?, main_activity_diff = ?, '
        'perm_analysis=1 where app1_name=? and app2_name = ?'
        , (a1, a2, same, app1, app2))

    print("----------------")
    print("Done")
    print("----------------")
Exemplo n.º 7
0
    finaldict[i] = [0, 0]
    gooddict[i] = 0
    maldict[i] = 0

count = 0
good_count = 0
for filepath in glob.iglob(
        '/home/aman/ANDROID_GOODWARE/*'
):  # copy all goodware apps to Documents/apks and then run this
    # print filepath

    currentlist = []
    apk_path = filepath
    try:
        apkf = APK(apk_path)
        currentlist = apkf.get_main_activity()
        if (isinstance(currentlist, basestring)):
            currentlist = [str(currentlist)]
        currentlist = list(set(currentlist))

        for i in currentlist:
            key = i
            if key in gooddict:
                gooddict[key] += 1

        good_count += 1
        print good_count
    except:
        continue
    # now for intents
    actions = []