程序分析
2025-06-11
1.分析鸿蒙手机检材中“笔记.hap”文件,该软件应用名称是?【标准格式:ABCD】
PGSDSW
将.hap改成.zip解压,查看module.json文件,看到"label": "$string:app_name"
,现在寻找$string:app_name
中的app_name
字段,通常是在resources/base/strings/zh-CN/string.json
中,由于没有这个文件,因此爆搜一下
在resources.index中找到,并且能看到PGSDSW
app_name
,用https://github.com/Yricky/abcde解析一下
java.exe -jar .\kra-ui-linux-x64-0.1.0-main-1207df8-release.jar --cli --dump-index .\resources.index --out=out.json
{
"16777216": [
{
"type": "STRING",
"param": "base",
"name": "app_name",
"data": "PGSDBW"
}
],
"16777217": [
{
"type": "MEDIA",
"param": "base",
"name": "background",
"data": "entry/resources/base/media/background.png"
}
],
"16777218": [
{
"type": "MEDIA",
"param": "base",
"name": "foreground",
"data": "entry/resources/base/media/foreground.png"
}
],
"16777219": [
{
"type": "MEDIA",
"param": "base",
"name": "layered_image",
"data": "entry/resources/base/media/layered_image.json"
}
],
"16777220": [
{
"type": "STRING",
"param": "base",
"name": "EntryAbility_desc",
"data": "description"
}
],
"16777221": [
{
"type": "STRING",
"param": "base",
"name": "EntryAbility_label",
"data": "PGSDBW"
}
],
"16777222": [
{
"type": "STRING",
"param": "base",
"name": "module_desc",
"data": "module description"
}
],
"16777223": [
{
"type": "COLOR",
"param": "base",
"name": "start_window_background",
"data": "#FFFFFF"
},
{
"type": "COLOR",
"param": "dark",
"name": "start_window_background",
"data": "#000000"
}
],
"16777224": [
{
"type": "FLOAT",
"param": "base",
"name": "page_text_font_size",
"data": "50fp"
}
],
"16777225": [
{
"type": "MEDIA",
"param": "base",
"name": "startIcon",
"data": "entry/resources/base/media/startIcon.png"
}
],
"16777226": [
{
"type": "PROF",
"param": "base",
"name": "backup_config",
"data": "entry/resources/base/profile/backup_config.json"
}
],
"16777227": [
{
"type": "PROF",
"param": "base",
"name": "main_pages",
"data": "entry/resources/base/profile/main_pages.json"
}
]
}
2.分析hap检材,软件的包名是?【标准格式:com.pgs.main】
com.example.pgsdsj
在module.json
中能看到包名是com.example.pgsdsj
还有其他信息:
版本名称:
1.0.0
编译环境:HarmonyOS 5.0.5.160
构建模式:debug
3.分析hap检材,软件图标md5的后六是?【标准格式:a48b31】
448b23
第一题查看module.json之后可以确定"icon": "$media:foreground"
然后又由resources.index
解析出entry/resources/base/media/foreground.png
因此找到resources/base/media/foreground.png
计算得到448b23
4.分析hap检材,软件代码保存的文件名称是?【标准格式:class.dex】
modules.abc
hap的代码保存在.abc文件中,因此是modules.abc