好友
阅读权限10
听众
最后登录1970-1-1
|
注意到xshell6.0密码是与主机账户名和uuid绑定的,
导入到其他计算机密码失效,
另外有注意到github上有软件,
ssmmtt/Xpass: Decrypt Xshell session file password.
但不能显示用户id和使用6.0,
参照HyperSine/how-does-Xmanager-encrypt-password: This is a repo to tell you how Xmanager (XFtp, XShell) encrypt password.uid和username获取python代码
def GetCurrentUserName():
import win32api
return win32api.GetUserName()
def GetCurrentSID():
import win32api, win32security
Sid = win32security.LookupAccountName(win32api.GetComputerName(), win32api.GetUserName())[0]
return win32security.ConvertSidToStringSid(Sid)
how-does-Xmanager-encrypt-password-master\python3\XmanagerCrypto.py 63
self._Version = float(SessionFileVersion)
if 0 < self._Version and self._Version < 5.1:
self._Key = MD5.new(b'!X@s#c$e%l^l&').digest() # key is different with the one in XShellCrypto
elif 5.1 <= self._Version and self._Version <= 5.2:
self._Key = SHA256.new(kwargs['SID'].encode()).digest()
elif 5.2 < self._Version:
if kwargs.get('MasterPassword') == None:
print(kwargs['UserName'] + kwargs['SID'])
self._Key = SHA256.new((kwargs['UserName'] + kwargs['SID']).encode()).digest()
else:
self._Key = SHA256.new(kwargs['MasterPassword'].encode()).digest()
Xshell 6的文件目录为C:\Users\xxx\Documents\NetSarang Computer\6\Xshell\Sessions\
运行效果:
直接运行
输入用户名/uid效果
这里我通过xshell自带的导入导出到另一台电脑,
使用过重新保存密码的能正常解密,没使用过的需要使用以前电脑的这两个值,
默认值已经显示到窗口了,直接原电脑复制,粘贴到新电脑、勾选就好了。
我修改的源码Missyouag/Xpass: Decrypt Xshell session file password.
通过网盘分享的文件:Xpass链接: https://pan.baidu.com/s/1qsPXXZp_cjeHTUfxdiREVw?pwd=52pj 提取码: 52pj |
免费评分
-
查看全部评分
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|
|