1
nowheremanx 255 天前 ![]() 换个思路,考虑下 subprocess 召唤 unrar
|
![]() |
2
monkeyWie 255 天前
这种问题问 chatGPT 就行了
|
![]() |
3
nuk 254 天前 ![]() tar 格式根本就不支持加密。。。
|
![]() |
4
Kirscheis 254 天前
|
![]() |
5
Maysec 254 天前
tar 是类似 iso 的格式 不支持加密吧
|
![]() |
6
netsys 252 天前
import tarfile
tar = tarfile.open("a.tar", "r:") try: tar.extractall(path=".", members=tar) # 无密码解压 print("文件解压成功") except tarfile.ReadError: passwd = "password" # 此处填写解压密码 tar.extractall(path=".", members=tar, pwd=passwd.encode('utf-8')) print("使用密码解压成功") |