阿里巴巴 Arthas 3.5.0 版本发布,支持反编译打印行号和统一鉴权

栏目: 软件资讯 · 发布时间: 3年前

内容简介:Arthas是Alibaba开源的Java诊断工具,深受开发者喜爱。 •Github:https://github.com/alibaba/arthas •文档:https://arthas.aliyun.com/doc/ Arthas 最新发布了 3.5.0 版本,最近几个release 版本带来下面两个...

阿里巴巴 Arthas 3.5.0 版本发布,支持反编译打印行号和统一鉴权

Arthas是Alibaba开源的 Java 诊断工具,深受开发者喜爱。

•Github:https://github.com/alibaba/arthas

•文档:https://arthas.aliyun.com/doc/

Arthas 最新发布了 3.5.0 版本,最近几个release 版本带来下面两个主要特性:

•反编译支持行号

•Telnet/Websocket/HTTP API统一支持全面的鉴权

反编译支持行号

Arthas开源之后的第一个 issue 就是jad命令能否支持显示行号:

阿里巴巴 Arthas 3.5.0 版本发布,支持反编译打印行号和统一鉴权

jad命令多年以后终于支持行号了,“不忘初心”????,效果如下:

阿里巴巴 Arthas 3.5.0 版本发布,支持反编译打印行号和统一鉴权阿里巴巴 Arthas 3.5.0 版本发布,支持反编译打印行号和统一鉴权

如果想不显示行号,使用--lineNumber false参数即可。

鉴权支持

鉴权主要通过两方面来支持:

as.sh/arthas-boot命令行参数支持配置用户名和密码•增加auth命令

配置用户名和密码

在Arthas attach时,可以在命令行指定密码。比如:

java -jar arthas-boot.jar --password ppp

     •可以通过 --username 选项来指定用户,默认值是arthas

    •也可以在 arthas.properties 里中配置 username/password。命令行的优先级大于配置文件。

    •如果只配置username,没有配置password,则会生成随机密码,打印在~/logs/arthas/arthas.log

Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh

在telnet console里鉴权

连接到arthas后,直接执行命令会提示需要鉴权:

[arthas@37430]$ help
Error! command not permitted, try to use 'auth' command to authenticates.

使用auth命令来鉴权,成功之后可以执行其它命令。

[arthas@37430]$ auth ppp
Authentication result: true

•可以通过 --username 选项来指定用户,默认值是arthas

Web console密码验证

打开浏览器,会有弹窗提示需要输入 用户名 和 密码。

成功之后,则可以直接连接上 web console。

HTTP API 验证

Arthas 采用的是 HTTP 标准的 Basic Authorization,客户端请求时增加对应的 Authorization header即可。

•参考:https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication

例如,用户名是:admin,密码是 admin

则组合为字符串: admin:admin

base64结果是: YWRtaW46YWRtaW4=

则HTTP 请求增加Authorization header:

curl 'http://localhost:8563/api' \
  -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
  --data-raw '{"action":"exec","command":"version"}' 

总结

•Jad wiki: https://arthas.aliyun.com/doc/jad.html

•Auth wiki: https://arthas.aliyun.com/doc/auth.html

•Release 日志: https://github.com/alibaba/arthas/releases/tag/arthas-all-3.5.0


以上所述就是小编给大家介绍的《阿里巴巴 Arthas 3.5.0 版本发布,支持反编译打印行号和统一鉴权》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Linux Device Drivers

Linux Device Drivers

Jonathan Corbet、Alessandro Rubini、Greg Kroah-Hartman / O'Reilly Media / 2005-2-17 / USD 39.95

Device drivers literally drive everything you're interested in--disks, monitors, keyboards, modems--everything outside the computer chip and memory. And writing device drivers is one of the few areas ......一起来看看 《Linux Device Drivers》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具