java 如何解密Jenkins8mha值

wfsdck30  于 2023-01-16  发布在  Java
关注(0)|答案(2)|浏览(178)

如果我们查看Jenkins作业日志,我们可以看到其中包含的文本与浏览器中显示的内容完全相同(当您查看控制台输出时除外),因为日志文件中的URL编码为带有标记[8mha:
有人知道我们如何“解密”它吗?
已经尝试了一个简单的base64,但它不工作。
这是其中的一根

[8mha:AAAAqR+LCAAAAAAAAP9b85aBtbiIQSajNKU4P08vOT+vOD8nVc+jsiC1KCczL9svvyTVzHb1RttJBUeZGJg8GdhyUvPSSzJ8GJhLi3JKGIR8shLLEvVzEvPS9YNLijLz0q0rihik0IxzhtAgwxgggJGJgaGiAMiQL2HQ0c/KT9J3zkhNzs4vLVE1MtAFYpfEkkQg5ZuYl5ieWgRkBbgF65sa6QMAtVXQDbEAAAA=[0m
2vuwiymt

2vuwiymt1#

https://github.com/LarrysGIT/Extract-Jenkins-Raw-Log/blob/master/README.md
简短的回答,
它没有加密,仍然是BASE64字符串,
例如,
由用户启动[8mha:////4H + H6gi + RzqRXgbuxDkiDNvJYq3pMCu17 + YXxGOB + mHbAAAAlx + LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT + vOD8nVc83PyU1x6OyILUoJzMv2y +/JJUBAhiZGBgqihk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ + sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUdHsLgAzWEgZu/dLi1CL9xJczDwAj6GcLcAAAAA =[0madmin
可分为以下部分,
A string由用户启动
x一米一英寸:\u001B [8百万公顷:

  • *///4H+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢+氢

Postamble\u001B [0m
A string管理员
将base64字符串转换为字节,修剪前40字节(https://github.com/LarrysGIT/Extract-Jenkins-Raw-Log/issues/1)并保存为.gz文件。现在您可以从.gz文件中提取实际内容。
在本例中,内容类型为Java serialization data, version 5,如下所示
超级链接注解xr hudson.console.HyperlinkNote6 =字符串长度L urlt Ljava/lang/字符串;xr hudson。控制台。控制台注解xp t/user/admin

2o7dmzc5

2o7dmzc52#

该字符串是ansi -/color-coded日志输出。要查看纯文本版本,可以使用https://github.com/mmalecki/ansispan

[8mha:AAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA[0m[Pipeline] { (prepare)
    [8mha:AAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA[0m[Pipeline] }
    [8mha:AAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA[0m[Pipeline] // stage
    [8mha:AAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA[0m[Pipeline] stage
    [8mha:AAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA[0m[Pipeline] { (deployApplication)
    [8mha:AAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA[0m[Pipeline] }
    [8mha:AAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA[0m[Pipeline] // stage

将导致

[Pipeline] { (prepare)
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] stage
    [Pipeline] { (deployApplication)
    [Pipeline] }
    [Pipeline] // stage

相关问题