如何优雅地找回SVN密码

2016-11-19

大家用SVN时间长了,必然会忘记svn的密码,但又不想重置密码,这时候我就有一个秘密武器推荐给大家~ 其中 TSvnPwd 是我用过最直接的取回svn密码的工具。

打开 http://www.leapbeyond.com/ric/TSvnPD/
下载后运行 TSvnPwd.exe,在命令行窗口就会显示当前连接svn的账号和密码。

TSvnPwd是一个开源项目,下面附上源码~

How it Works

By default, TortoiseSVN stores your cached credentials inside files in the %APPDATA%\Subversion\auth\svn.simple directory. The passwords are encrypted using the Windows Data Protection API, with a key tied to your user account. This tool reads the files and uses the API to decrypt your passwords.

The fact that this tool can decrypt your passwords is not a security vulnerability in TortoiseSVN. The passwords are only accessible when you are logged in and authenticated under the same Windows user account which originally encrypted the files.

The algorithm has fairly naive expectations in terms of file formats and locations. It was programmed based on a single, default environment and cannot parse the full spectrum of permitted configuration syntax in Subversion. No doubt there are many environments out there where this tool will not work. No support is provided.

If you want to run this program from a script, you can specify the -s switch to avoid the "Press any key" prompt on completion.

Comments
Write a Comment