Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_39073359
jadx
提交
7c53b985
J
jadx
项目概览
qq_39073359
/
jadx
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jadx
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7c53b985
编写于
7月 19, 2019
作者:
S
Skylot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(gui): remove JCertificate node
上级
c8df26f2
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
1 addition
and
107 deletion
+1
-107
jadx-gui/src/main/java/jadx/gui/treemodel/JCertificate.java
jadx-gui/src/main/java/jadx/gui/treemodel/JCertificate.java
+0
-77
jadx-gui/src/main/java/jadx/gui/treemodel/JRoot.java
jadx-gui/src/main/java/jadx/gui/treemodel/JRoot.java
+0
-21
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
+1
-2
jadx-gui/src/main/java/jadx/gui/ui/TabbedPane.java
jadx-gui/src/main/java/jadx/gui/ui/TabbedPane.java
+0
-4
jadx-gui/src/main/resources/i18n/Messages_en_US.properties
jadx-gui/src/main/resources/i18n/Messages_en_US.properties
+0
-1
jadx-gui/src/main/resources/i18n/Messages_es_ES.properties
jadx-gui/src/main/resources/i18n/Messages_es_ES.properties
+0
-1
jadx-gui/src/main/resources/i18n/Messages_zh_CN.properties
jadx-gui/src/main/resources/i18n/Messages_zh_CN.properties
+0
-1
未找到文件。
jadx-gui/src/main/java/jadx/gui/treemodel/JCertificate.java
已删除
100644 → 0
浏览文件 @
c8df26f2
package
jadx.gui.treemodel
;
import
java.io.BufferedInputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipFile
;
import
javax.swing.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
jadx.api.ResourceFile
;
import
jadx.core.utils.files.ZipSecurity
;
import
jadx.gui.utils.CertificateManager
;
import
jadx.gui.utils.NLS
;
import
jadx.gui.utils.UiUtils
;
public
class
JCertificate
extends
JNode
{
private
static
final
long
serialVersionUID
=
4308696770188518731L
;
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
JCertificate
.
class
);
private
static
final
ImageIcon
CERTIFICATE_ICON
=
UiUtils
.
openIcon
(
"certificate_obj"
);
private
final
transient
ResourceFile
rf
;
public
JCertificate
(
ResourceFile
resFile
)
{
this
.
rf
=
resFile
;
}
@Override
public
JClass
getJParent
()
{
return
null
;
}
@Override
public
Icon
getIcon
()
{
return
CERTIFICATE_ICON
;
}
@Override
public
String
makeString
()
{
return
NLS
.
str
(
"certificate.title"
);
}
@Override
public
String
getContent
()
{
try
{
ResourceFile
.
ZipRef
zipRef
=
rf
.
getZipRef
();
if
(
zipRef
==
null
)
{
File
file
=
new
File
(
rf
.
getName
());
try
(
InputStream
inputStream
=
new
BufferedInputStream
(
new
FileInputStream
(
file
)))
{
return
CertificateManager
.
decode
(
inputStream
);
}
}
else
{
try
(
ZipFile
zipFile
=
new
ZipFile
(
zipRef
.
getZipFile
()))
{
ZipEntry
entry
=
zipFile
.
getEntry
(
zipRef
.
getEntryName
());
if
(
entry
==
null
)
{
throw
new
IOException
(
"Zip entry not found: "
+
zipRef
);
}
if
(!
ZipSecurity
.
isValidZipEntry
(
entry
))
{
return
null
;
}
try
(
InputStream
inputStream
=
new
BufferedInputStream
(
zipFile
.
getInputStream
(
entry
)))
{
return
CertificateManager
.
decode
(
inputStream
);
}
}
}
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Certificate decode error: {}"
,
rf
.
getName
(),
e
);
return
"Decode error: "
+
e
.
getMessage
();
}
}
}
jadx-gui/src/main/java/jadx/gui/treemodel/JRoot.java
浏览文件 @
7c53b985
...
...
@@ -42,11 +42,6 @@ public class JRoot extends JNode {
if
(
signature
!=
null
)
{
add
(
signature
);
}
JCertificate
certificate
=
getCertificate
(
wrapper
.
getResources
());
if
(
certificate
!=
null
)
{
add
(
certificate
);
}
}
private
List
<
JResource
>
getHierarchyResources
(
List
<
ResourceFile
>
resources
)
{
...
...
@@ -82,22 +77,6 @@ public class JRoot extends JNode {
return
Collections
.
singletonList
(
root
);
}
private
JCertificate
getCertificate
(
List
<
ResourceFile
>
resources
)
{
if
(
resources
.
isEmpty
())
{
return
null
;
}
for
(
ResourceFile
rf
:
resources
)
{
if
(
rf
.
getZipRef
()
!=
null
)
{
String
rfName
=
rf
.
getName
().
toUpperCase
();
if
(
rfName
.
endsWith
(
".DSA"
)
||
rfName
.
endsWith
(
".RSA"
))
{
return
new
JCertificate
(
rf
);
}
}
}
return
null
;
}
private
JResource
getResourceByName
(
JResource
rf
,
String
name
)
{
for
(
JResource
sub
:
rf
.
getFiles
())
{
if
(
sub
.
getName
().
equals
(
name
))
{
...
...
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
浏览文件 @
7c53b985
...
...
@@ -51,7 +51,6 @@ import jadx.gui.settings.JadxProject;
import
jadx.gui.settings.JadxSettings
;
import
jadx.gui.settings.JadxSettingsWindow
;
import
jadx.gui.treemodel.ApkSignature
;
import
jadx.gui.treemodel.JCertificate
;
import
jadx.gui.treemodel.JClass
;
import
jadx.gui.treemodel.JLoadableNode
;
import
jadx.gui.treemodel.JNode
;
...
...
@@ -492,7 +491,7 @@ public class MainWindow extends JFrame {
if
(
resFile
!=
null
&&
JResource
.
isSupportedForView
(
resFile
.
getType
()))
{
tabbedPane
.
showResource
(
res
);
}
}
else
if
(
obj
instanceof
JCertificate
||
obj
instanceof
ApkSignature
)
{
}
else
if
(
obj
instanceof
ApkSignature
)
{
tabbedPane
.
showSimpleNode
((
JNode
)
obj
);
}
else
if
(
obj
instanceof
JNode
)
{
JNode
node
=
(
JNode
)
obj
;
...
...
jadx-gui/src/main/java/jadx/gui/ui/TabbedPane.java
浏览文件 @
7c53b985
...
...
@@ -19,7 +19,6 @@ import org.slf4j.LoggerFactory;
import
jadx.api.ResourceFile
;
import
jadx.api.ResourceType
;
import
jadx.gui.treemodel.ApkSignature
;
import
jadx.gui.treemodel.JCertificate
;
import
jadx.gui.treemodel.JClass
;
import
jadx.gui.treemodel.JNode
;
import
jadx.gui.treemodel.JResource
;
...
...
@@ -178,9 +177,6 @@ public class TabbedPane extends JTabbedPane {
if
(
node
instanceof
ApkSignature
)
{
return
new
HtmlPanel
(
this
,
node
);
}
if
(
node
instanceof
JCertificate
)
{
return
new
CertificatePanel
(
this
,
node
);
}
return
new
ClassCodeContentPanel
(
this
,
node
);
}
...
...
jadx-gui/src/main/resources/i18n/Messages_en_US.properties
浏览文件 @
7c53b985
...
...
@@ -151,7 +151,6 @@ confirm.save_as_message=%s already exists.\nDo you want to replace it?
confirm.not_saved_title
=
Save project
confirm.not_saved_message
=
Save the current project before proceeding?
certificate.title
=
Certificate
certificate.cert_type
=
Type
certificate.serialSigVer
=
Version
certificate.serialNumber
=
Serial number
...
...
jadx-gui/src/main/resources/i18n/Messages_es_ES.properties
浏览文件 @
7c53b985
...
...
@@ -151,7 +151,6 @@ popup.select_all=Seleccionar todo
#confirm.not_saved_title=
#confirm.not_saved_message=
certificate.title
=
Certificado
certificate.cert_type
=
Tipo
certificate.serialSigVer
=
Versión
certificate.serialNumber
=
Número de serial
...
...
jadx-gui/src/main/resources/i18n/Messages_zh_CN.properties
浏览文件 @
7c53b985
...
...
@@ -151,7 +151,6 @@ confirm.save_as_message=%s 已存在。\n你想替换它吗?
confirm.not_saved_title
=
保存项目
confirm.not_saved_message
=
在继续之前保存当前项目?
certificate.title
=
证书
certificate.cert_type
=
类型
certificate.serialSigVer
=
版本
certificate.serialNumber
=
序列号
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录