如何解密Jenkins 8mha值

时间:2014-10-29 16:12:35

标签: java encryption jenkins jenkins-plugins

如果我们查看Jenkins作业日志,我们可以看到其中包含的文本与浏览器中显示的内容完全相同,当您查看URL的输出 EXCEPT 时在日志文件中使用标签[8mha:

有谁知道我们怎样才能解密"它?

已经尝试过一个简单的base64,但它不起作用。

这是其中一个字符串

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

2 个答案:

答案 0 :(得分:1)

该字符串是ansi- /颜色编码的日志输出。要查看纯文本版本,您可以使用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

答案 1 :(得分:0)

https://github.com/LarrysGIT/Extract-Jenkins-Raw-Log/blob/master/README.md

此处简短回答

它没有加密,仍然是BASE64字符串,

示例

  

由用户启动   [8mha://// 4H + + H6gi + RzqRXgbuxDkiDNvJYq3pMCu17 + YXxGOB + mHbAAAAlx + LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT + vOD8nVc83PyU1x6OyILUoJzMv2y / JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ + sxLJE / ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAzWEgZu / dLi1CL9xJTczDwAj6GcLcAAAAA = [0madmin

可以分为以下部分,

A string由用户启动

Preamber \ u001B [8mha:

Base64 string:的 //// 4H + + H6gi + RzqRXgbuxDkiDNvJYq3pMCu17 + YXxGOB + mHbAAAAlx + LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT + vOD8nVc83PyU1x6OyILUoJzMv2y / JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ + sxLJE / ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAzWEgZu / dLi1CL9xJTczDwAj6GcLcAAAAA =

Postamber \ u001B [0m

A string管理员

将base64字符串转换为字节,修剪前40个字节(https://github.com/LarrysGIT/Extract-Jenkins-Raw-Log/issues/1)并另存为.gz文件。现在,您可以从.gz文件中提取真实内容。

在这种情况下,内容的类型为Java serialization data, version 5

  

¬ísr!hudson.console.ModelHyperlinkNote xr   hudson.console.HyperlinkNote6 =«±=’pÅI lengthL urlt   Ljava / lang / String; xr hudson.console.ConsoleNote xp t   / user / admin