我想使用Python来解密使用cryptmethod=blowfish2方法加密的Vim加密的文件。我还没有在任何地方看到加密方法的文档,希望能在弄清楚如何做到这一点方面得到帮助。
这是Python的标准功能吗,还是已经实现了库,或者其他功能?
发布于 2016-09-25 16:04:47
查看此模块:https://github.com/nlitsme/vimdecrypt。您可以使用它来解密您的文件,或者研究代码以了解如何自己实现它。示例用法:
from collections import namedtuple
from vimdecrypt import decryptfile
args = namedtuple('Args', ('verbose', 'test'))(False, False)
password = 'password'
with open('somefile', 'rb') as somefile:
decrypted = decryptfile(somefile.read(), password, args)https://stackoverflow.com/questions/39682512
复制相似问题