public void getShellInfo(String srdir){
String result = "";
ArrayList<String> shells = getShells(srdir);
if(shells.size() == 0){
result = "此应用未加壳!";
}else{
for(int i = 0;i < shells.size();i++){
result = result + shells.get(i) + "\n";
}
}
Toast.makeText(getAppListActivity.this, result, 0).show();
}
public static ArrayList<String> getShells(String filePath) {
// ArrayList<String> result = new ArrayList<>();
ArrayList<String> result = new ArrayList<>();
File apkFile = new File(filePath);
if(apkFile.getAbsolutePath().endsWith(".apk")){
ArrayList<String> soNames = GetSoNameInJar(apkFile.getAbsolutePath());
for (String soName : soNames) {
String factory = parseSoName(soName);
if (!result.contains(factory) && factory != null) {
result.add(factory);
}
}
}
return result;
}
public static String parseSoName(String soName) {
if (soName.equals("libchaosvmp.so")) {
return "娜迦";
}
if (soName.equals("libddog.so")) {
return "娜迦";
}
if (soName.equals("libfdog.so")) {
return "娜迦";
}
if (soName.equals("libexec.so")) {
return "爱加密";
}
if (soName.equals("libexecmain.so")) {
return "愛加密";
}
if (soName.equals("libsecexe.so")) {
return "梆梆";
}
if (soName.equals("libsecmain.so")) {
return "梆梆";
}
if (soName.equals("libSecShell.so")) {
return "梆梆";
}
if (soName.equals("libDexHelper.so")) {
return "梆梆企业版";
}
if (soName.equals("libprotectClass.so")) {
return "360";
}
if (soName.equals("libjiagu.so")) {
return "360";
}
if (soName.equals("libjiagu_art.so")) {
return "360";
}
if (soName.equals("libegis.so")) {
return "通付盾";
}
if (soName.equals("libNSaferOnly.so")) {
return "通付盾";
}
if (soName.equals("libnqshield.so")) {
return "网秦";
}
if (soName.equals("libbaiduprotect.so")) {
return "百度";
}
if (soName.equals("libsgmain.so")) {
return "阿里聚安全";
}
if (soName.equals("libsgsecuritybody.so")) {
return "阿里聚安全";
}
if (soName.equals("libtup.so")) {
return "腾讯";
}
if (soName.startsWith("libshella-")) {
return "腾讯";
}
if (soName.equals("liblegu.so")) {
return "腾讯";
}
if (soName.equals("libtosprotection.armeabi.so")) {
return "腾讯御安全";
}
if (soName.equals("libtosprotection.armeabi-v7a.so")) {
return "腾讯御安全";
}
if (soName.equals("libnesec.so")) {
return "网易易盾";
}
if (soName.equals("libAPKProtect.so")) {
return "APKProtect";
}
if (soName.equals("libkwscmm.so")) {
return "几维安全";
}
if (soName.equals("libkwscr.so")) {
return "几维安全";
}
if (soName.equals("libkwslinker.so")) {
return "几维安全";
}
if (soName.equals("libx3g.so")) {
return "顶像科技";
}
return null;
}
public static ArrayList<String> GetSoNameInJar(String ApkPath) {
ArrayList<String> result = new ArrayList<>();
JarFile jarFile;
try {
jarFile = new JarFile(ApkPath);
Enumeration<JarEntry> jarEntrys = jarFile.entries();
while (jarEntrys.hasMoreElements()) {
JarEntry elEntry = jarEntrys.nextElement();
String name = elEntry.getName();
if (name.indexOf("lib/armeabi") != -1 && name.endsWith(".so")) {
String soName = name.split("/")[2];
if (soName.startsWith("lib") && soName.endsWith(".so")) {
if (!result.contains(soName)) {
result.add(soName);
}
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
查看apk的壳属于哪个公司
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...