{"id":1074926,"date":"2025-01-08T11:39:08","date_gmt":"2025-01-08T03:39:08","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1074926.html"},"modified":"2025-01-08T11:39:10","modified_gmt":"2025-01-08T03:39:10","slug":"python%e5%a6%82%e4%bd%95%e7%a1%ac%e8%a7%a3%e5%8a%a0%e5%af%86%e5%8e%8b%e7%bc%a9%e5%8c%85-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1074926.html","title":{"rendered":"python\u5982\u4f55\u786c\u89e3\u52a0\u5bc6\u538b\u7f29\u5305"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25104429\/29ec8452-908d-451b-9baf-66e65e7b72f9.webp\" alt=\"python\u5982\u4f55\u786c\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\" \/><\/p>\n<p><p> <strong>\u5f00\u5934\u6bb5\u843d\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u7834\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u662f\u4e00\u9879\u590d\u6742\u4e14\u6709\u4e00\u5b9a\u96be\u5ea6\u7684\u4efb\u52a1\uff0c\u901a\u5e38\u6d89\u53ca\u5230\u5bc6\u7801\u5b66\u548c\u8ba1\u7b97\u673a\u5b89\u5168\u7684\u77e5\u8bc6\u3002\u5bf9\u4e8ePython\u6765\u8bf4\uff0c<strong>\u53ef\u4ee5\u4f7f\u7528\u66b4\u529b\u7834\u89e3\u3001\u5b57\u5178\u653b\u51fb\u3001\u7ec4\u5408\u653b\u51fb<\/strong>\u7b49\u65b9\u6cd5\u8fdb\u884c\u7834\u89e3\u3002\u5728\u8fd9\u4e9b\u65b9\u6cd5\u4e2d\uff0c\u66b4\u529b\u7834\u89e3\u662f\u6700\u76f4\u63a5\u4e5f\u662f\u6700\u8017\u65f6\u7684\u65b9\u6cd5\uff0c\u5b83\u5c1d\u8bd5\u6240\u6709\u53ef\u80fd\u7684\u5bc6\u7801\u7ec4\u5408\uff0c\u76f4\u5230\u627e\u5230\u6b63\u786e\u7684\u5bc6\u7801\u3002\u5b57\u5178\u653b\u51fb\u5219\u4f7f\u7528\u4e00\u4e2a\u9884\u5148\u51c6\u5907\u597d\u7684\u5bc6\u7801\u5217\u8868\u8fdb\u884c\u5c1d\u8bd5\uff0c\u800c\u7ec4\u5408\u653b\u51fb\u5219\u7ed3\u5408\u4e86\u66b4\u529b\u7834\u89e3\u548c\u5b57\u5178\u653b\u51fb\u7684\u7279\u70b9\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u8fd9\u4e9b\u65b9\u6cd5\u6765\u7834\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e00\u3001\u66b4\u529b\u7834\u89e3<\/strong><\/p>\n<\/p>\n<p><p>\u66b4\u529b\u7834\u89e3\u662f\u4e00\u79cd\u5c1d\u8bd5\u6240\u6709\u53ef\u80fd\u7684\u5bc6\u7801\u7ec4\u5408\u7684\u65b9\u6cd5\uff0c\u76f4\u5230\u627e\u5230\u6b63\u786e\u7684\u5bc6\u7801\u3002\u8fd9\u79cd\u65b9\u6cd5\u867d\u7136\u65f6\u95f4\u590d\u6742\u5ea6\u9ad8\uff0c\u4f46\u5728\u6ca1\u6709\u5176\u4ed6\u4fe1\u606f\u7684\u60c5\u51b5\u4e0b\uff0c\u5b83\u662f\u6700\u53ef\u9760\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002<\/p>\n<\/p>\n<p><h3>\u5b89\u88c5\u5fc5\u8981\u7684\u5e93<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528Python\u8fdb\u884c\u66b4\u529b\u7834\u89e3\u65f6\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u5e93\uff0c\u5982<code>zipfile<\/code>\u548c<code>itertools<\/code>\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u8fd9\u4e9b\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install zipfile<\/p>\n<p>pip install itertools<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u5b9e\u73b0\u66b4\u529b\u7834\u89e3<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528Python\u8fdb\u884c\u66b4\u529b\u7834\u89e3\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import zipfile<\/p>\n<p>import itertools<\/p>\n<p>import string<\/p>\n<p>def brute_force_zip(zip_file_path):<\/p>\n<p>    zip_file = zipfile.ZipFile(zip_file_path)<\/p>\n<p>    characters = string.ascii_letters + string.digits<\/p>\n<p>    max_length = 6  # \u5047\u8bbe\u5bc6\u7801\u957f\u5ea6\u4e0d\u8d85\u8fc76\u4f4d<\/p>\n<p>    for length in range(1, max_length + 1):<\/p>\n<p>        for password in itertools.product(characters, repeat=length):<\/p>\n<p>            password = &#39;&#39;.join(password)<\/p>\n<p>            try:<\/p>\n<p>                zip_file.extractall(pwd=password.encode())<\/p>\n<p>                print(f&quot;Password found: {password}&quot;)<\/p>\n<p>                return password<\/p>\n<p>            except (RuntimeError, zipfile.BadZipFile):<\/p>\n<p>                continue<\/p>\n<p>    print(&quot;Password not found&quot;)<\/p>\n<p>    return None<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>zip_file_path = &#39;encrypted.zip&#39;<\/p>\n<p>brute_force_zip(zip_file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>itertools.product<\/code>\u751f\u6210\u6240\u6709\u53ef\u80fd\u7684\u5bc6\u7801\u7ec4\u5408\uff0c\u5e76\u5c1d\u8bd5\u89e3\u538b\u7f29\u6587\u4ef6\u3002\u5982\u679c\u89e3\u538b\u6210\u529f\uff0c\u6253\u5370\u51fa\u627e\u5230\u7684\u5bc6\u7801\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e8c\u3001\u5b57\u5178\u653b\u51fb<\/strong><\/p>\n<\/p>\n<p><p>\u5b57\u5178\u653b\u51fb\u4f7f\u7528\u4e00\u4e2a\u9884\u5148\u51c6\u5907\u597d\u7684\u5bc6\u7801\u5217\u8868\u8fdb\u884c\u5c1d\u8bd5\u3002\u8fd9\u79cd\u65b9\u6cd5\u6bd4\u66b4\u529b\u7834\u89e3\u66f4\u5feb\uff0c\u4f46\u524d\u63d0\u662f\u5bc6\u7801\u5728\u5b57\u5178\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u521b\u5efa\u5bc6\u7801\u5b57\u5178<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u51c6\u5907\u4e00\u4e2a\u5bc6\u7801\u5b57\u5178\u6587\u4ef6\uff08\u4f8b\u5982<code>passwords.txt<\/code>\uff09\uff0c\u5176\u4e2d\u5305\u542b\u5e38\u89c1\u7684\u5bc6\u7801\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-text\">123456<\/p>\n<p>password<\/p>\n<p>123456789<\/p>\n<p>12345678<\/p>\n<p>12345<\/p>\n<p>1234567<\/p>\n<p>1234567890<\/p>\n<p>qwerty<\/p>\n<p>abc123<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u5b9e\u73b0\u5b57\u5178\u653b\u51fb<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528Python\u8fdb\u884c\u5b57\u5178\u653b\u51fb\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import zipfile<\/p>\n<p>def dictionary_attack_zip(zip_file_path, dictionary_path):<\/p>\n<p>    zip_file = zipfile.ZipFile(zip_file_path)<\/p>\n<p>    with open(dictionary_path, &#39;r&#39;) as file:<\/p>\n<p>        passwords = file.readlines()<\/p>\n<p>    for password in passwords:<\/p>\n<p>        password = password.strip()<\/p>\n<p>        try:<\/p>\n<p>            zip_file.extractall(pwd=password.encode())<\/p>\n<p>            print(f&quot;Password found: {password}&quot;)<\/p>\n<p>            return password<\/p>\n<p>        except (RuntimeError, zipfile.BadZipFile):<\/p>\n<p>            continue<\/p>\n<p>    print(&quot;Password not found&quot;)<\/p>\n<p>    return None<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>zip_file_path = &#39;encrypted.zip&#39;<\/p>\n<p>dictionary_path = &#39;passwords.txt&#39;<\/p>\n<p>dictionary_attack_zip(zip_file_path, dictionary_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u8bfb\u53d6\u5bc6\u7801\u5b57\u5178\u6587\u4ef6\uff0c\u5e76\u5c1d\u8bd5\u6bcf\u4e2a\u5bc6\u7801\u8fdb\u884c\u89e3\u538b\u7f29\u3002\u5982\u679c\u89e3\u538b\u6210\u529f\uff0c\u6253\u5370\u51fa\u627e\u5230\u7684\u5bc6\u7801\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e09\u3001\u7ec4\u5408\u653b\u51fb<\/strong><\/p>\n<\/p>\n<p><p>\u7ec4\u5408\u653b\u51fb\u7ed3\u5408\u4e86\u66b4\u529b\u7834\u89e3\u548c\u5b57\u5178\u653b\u51fb\u7684\u7279\u70b9\uff0c\u53ef\u4ee5\u66f4\u6709\u6548\u5730\u7834\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u3002<\/p>\n<\/p>\n<p><h3>\u5b9e\u73b0\u7ec4\u5408\u653b\u51fb<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528Python\u8fdb\u884c\u7ec4\u5408\u653b\u51fb\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import zipfile<\/p>\n<p>import itertools<\/p>\n<p>import string<\/p>\n<p>def combined_attack_zip(zip_file_path, dictionary_path):<\/p>\n<p>    zip_file = zipfile.ZipFile(zip_file_path)<\/p>\n<p>    characters = string.ascii_letters + string.digits<\/p>\n<p>    max_length = 3  # \u5047\u8bbe\u5b57\u5178\u4e2d\u7684\u5bc6\u7801\u524d\u7f00\u957f\u5ea6\u4e0d\u8d85\u8fc73\u4f4d<\/p>\n<p>    with open(dictionary_path, &#39;r&#39;) as file:<\/p>\n<p>        passwords = file.readlines()<\/p>\n<p>    for password in passwords:<\/p>\n<p>        password = password.strip()<\/p>\n<p>        for length in range(1, max_length + 1):<\/p>\n<p>            for prefix in itertools.product(characters, repeat=length):<\/p>\n<p>                prefix = &#39;&#39;.join(prefix)<\/p>\n<p>                full_password = prefix + password<\/p>\n<p>                try:<\/p>\n<p>                    zip_file.extractall(pwd=full_password.encode())<\/p>\n<p>                    print(f&quot;Password found: {full_password}&quot;)<\/p>\n<p>                    return full_password<\/p>\n<p>                except (RuntimeError, zipfile.BadZipFile):<\/p>\n<p>                    continue<\/p>\n<p>    print(&quot;Password not found&quot;)<\/p>\n<p>    return None<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>zip_file_path = &#39;encrypted.zip&#39;<\/p>\n<p>dictionary_path = &#39;passwords.txt&#39;<\/p>\n<p>combined_attack_zip(zip_file_path, dictionary_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u8bfb\u53d6\u5bc6\u7801\u5b57\u5178\u6587\u4ef6\uff0c\u7136\u540e\u751f\u6210\u53ef\u80fd\u7684\u524d\u7f00\uff0c\u5e76\u5c1d\u8bd5\u6bcf\u4e2a\u524d\u7f00\u52a0\u5b57\u5178\u5bc6\u7801\u7ec4\u5408\u8fdb\u884c\u89e3\u538b\u7f29\u3002\u5982\u679c\u89e3\u538b\u6210\u529f\uff0c\u6253\u5370\u51fa\u627e\u5230\u7684\u5bc6\u7801\u3002<\/p>\n<\/p>\n<p><p><strong>\u56db\u3001\u5229\u7528\u5e76\u884c\u8ba1\u7b97\u52a0\u901f\u7834\u89e3<\/strong><\/p>\n<\/p>\n<p><p>\u7834\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u901a\u5e38\u975e\u5e38\u8017\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u5229\u7528\u5e76\u884c\u8ba1\u7b97\u52a0\u901f\u7834\u89e3\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><h3>\u4f7f\u7528\u591a\u7ebf\u7a0b\u8fdb\u884c\u66b4\u529b\u7834\u89e3<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528Python\u591a\u7ebf\u7a0b\u8fdb\u884c\u66b4\u529b\u7834\u89e3\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import zipfile<\/p>\n<p>import itertools<\/p>\n<p>import string<\/p>\n<p>from concurrent.futures import ThreadPoolExecutor<\/p>\n<p>def try_password(zip_file_path, password):<\/p>\n<p>    zip_file = zipfile.ZipFile(zip_file_path)<\/p>\n<p>    try:<\/p>\n<p>        zip_file.extractall(pwd=password.encode())<\/p>\n<p>        print(f&quot;Password found: {password}&quot;)<\/p>\n<p>        return password<\/p>\n<p>    except (RuntimeError, zipfile.BadZipFile):<\/p>\n<p>        return None<\/p>\n<p>def parallel_brute_force_zip(zip_file_path):<\/p>\n<p>    characters = string.ascii_letters + string.digits<\/p>\n<p>    max_length = 6  # \u5047\u8bbe\u5bc6\u7801\u957f\u5ea6\u4e0d\u8d85\u8fc76\u4f4d<\/p>\n<p>    with ThreadPoolExecutor(max_workers=8) as executor:<\/p>\n<p>        for length in range(1, max_length + 1):<\/p>\n<p>            for password in itertools.product(characters, repeat=length):<\/p>\n<p>                password = &#39;&#39;.join(password)<\/p>\n<p>                future = executor.submit(try_password, zip_file_path, password)<\/p>\n<p>                if future.result():<\/p>\n<p>                    return future.result()<\/p>\n<p>    print(&quot;Password not found&quot;)<\/p>\n<p>    return None<\/p>\n<h2><strong>\u4f7f\u7528\u793a\u4f8b<\/strong><\/h2>\n<p>zip_file_path = &#39;encrypted.zip&#39;<\/p>\n<p>parallel_brute_force_zip(zip_file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>ThreadPoolExecutor<\/code>\u521b\u5efa\u591a\u4e2a\u7ebf\u7a0b\u6765\u5e76\u884c\u5c1d\u8bd5\u5bc6\u7801\u7ec4\u5408\uff0c\u4ece\u800c\u52a0\u901f\u7834\u89e3\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e94\u3001\u5176\u4ed6\u65b9\u6cd5\u548c\u5de5\u5177<\/strong><\/p>\n<\/p>\n<p><p>\u9664\u4e86\u4e0a\u8ff0\u65b9\u6cd5\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5de5\u5177\u548c\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u7834\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u3002<\/p>\n<\/p>\n<p><h3>\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5de5\u5177\u5982John the Ripper\u3001Hashcat\u7b49\u4e5f\u53ef\u4ee5\u7528\u4e8e\u7834\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u3002\u8fd9\u4e9b\u5de5\u5177\u901a\u5e38\u6bd4\u624b\u5de5\u7f16\u5199\u7684Python\u811a\u672c\u66f4\u9ad8\u6548\u3002<\/p>\n<\/p>\n<p><h3>\u4f7f\u7528GPU\u52a0\u901f<\/h3>\n<\/p>\n<p><p>\u5229\u7528GPU\u52a0\u901f\u53ef\u4ee5\u5927\u5e45\u63d0\u9ad8\u7834\u89e3\u901f\u5ea6\u3002Python\u4e2d\u7684PyCUDA\u3001PyOpenCL\u7b49\u5e93\u53ef\u4ee5\u7528\u4e8e\u7f16\u5199GPU\u52a0\u901f\u7684\u7834\u89e3\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><h3>\u6df7\u5408\u653b\u51fb<\/h3>\n<\/p>\n<p><p>\u6df7\u5408\u653b\u51fb\u7ed3\u5408\u4e86\u591a\u79cd\u653b\u51fb\u65b9\u6cd5\uff0c\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u7834\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u5148\u4f7f\u7528\u5b57\u5178\u653b\u51fb\uff0c\u518d\u4f7f\u7528\u66b4\u529b\u7834\u89e3\u5c1d\u8bd5\u5269\u4f59\u7684\u53ef\u80fd\u6027\u3002<\/p>\n<\/p>\n<p><p><strong>\u516d\u3001\u5408\u6cd5\u6027\u548c\u9053\u5fb7\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u52a0\u5bc6\u7834\u89e3\u65f6\uff0c\u5fc5\u987b\u786e\u4fdd\u6709\u5408\u6cd5\u7684\u6388\u6743\u3002\u672a\u7ecf\u6388\u6743\u7684\u7834\u89e3\u884c\u4e3a\u662f\u8fdd\u6cd5\u7684\uff0c\u5e76\u4e14\u8fdd\u53cd\u9053\u5fb7\u51c6\u5219\u3002\u4f7f\u7528\u8fd9\u4e9b\u6280\u672f\u65f6\uff0c\u8bf7\u786e\u4fdd\u53ea\u7528\u4e8e\u5408\u6cd5\u548c\u9053\u5fb7\u7684\u7528\u9014\u3002<\/p>\n<\/p>\n<p><h3>\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u6211\u4eec\u4e86\u89e3\u4e86\u5982\u4f55\u4f7f\u7528Python\u8fdb\u884c\u66b4\u529b\u7834\u89e3\u3001\u5b57\u5178\u653b\u51fb\u548c\u7ec4\u5408\u653b\u51fb\u6765\u7834\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u3002\u6211\u4eec\u8fd8\u4ecb\u7ecd\u4e86\u5982\u4f55\u5229\u7528\u5e76\u884c\u8ba1\u7b97\u548c\u5176\u4ed6\u5de5\u5177\u52a0\u901f\u7834\u89e3\u8fc7\u7a0b\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u548c\u5de5\u5177\u53ef\u4ee5\u5927\u5e45\u63d0\u9ad8\u7834\u89e3\u6548\u7387\uff0c\u4f46\u5fc5\u987b\u786e\u4fdd\u5728\u5408\u6cd5\u548c\u9053\u5fb7\u7684\u8303\u56f4\u5185\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728\u4f7f\u7528Python\u8fdb\u884c\u786c\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u65f6\u9700\u8981\u54ea\u4e9b\u5e93\uff1f<\/strong><br \/>\u4e3a\u4e86\u6210\u529f\u89e3\u5bc6\u548c\u89e3\u538b\u7f29\u52a0\u5bc6\u7684\u538b\u7f29\u5305\uff0c\u901a\u5e38\u9700\u8981\u4f7f\u7528\u4ee5\u4e0b\u51e0\u4e2aPython\u5e93\uff1a<code>zipfile<\/code>\u7528\u4e8e\u5904\u7406ZIP\u6587\u4ef6\uff0c<code>pycryptodome<\/code>\u6216<code>cryptography<\/code>\u7528\u4e8e\u89e3\u5bc6\u6587\u4ef6\u3002\u5982\u679c\u5904\u7406\u7684\u662f\u5176\u4ed6\u7c7b\u578b\u7684\u538b\u7f29\u5305\uff0c\u6bd4\u5982RAR\uff0c\u53ef\u4ee5\u4f7f\u7528<code>rarfile<\/code>\u5e93\u3002<\/p>\n<p><strong>\u5982\u4f55\u5224\u65ad\u4e00\u4e2a\u538b\u7f29\u5305\u662f\u5426\u88ab\u52a0\u5bc6\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u5c1d\u8bd5\u6253\u5f00\u538b\u7f29\u5305\u5e76\u67e5\u770b\u5176\u662f\u5426\u8bf7\u6c42\u5bc6\u7801\u6765\u5224\u65ad\u3002\u5bf9\u4e8eZIP\u683c\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528<code>zipfile<\/code>\u5e93\u4e2d\u7684<code>ZipFile<\/code>\u5bf9\u8c61\u5c1d\u8bd5\u8bfb\u53d6\u6587\u4ef6\u5217\u8868\u3002\u5982\u679c\u9047\u5230<code>RuntimeError<\/code>\uff0c\u901a\u5e38\u8868\u793a\u8be5\u538b\u7f29\u5305\u662f\u52a0\u5bc6\u7684\u3002<\/p>\n<p><strong>\u89e3\u5bc6\u52a0\u5bc6\u538b\u7f29\u5305\u7684\u8fc7\u7a0b\u662f\u4ec0\u4e48\u6837\u7684\uff1f<\/strong><br \/>\u89e3\u5bc6\u52a0\u5bc6\u538b\u7f29\u5305\u7684\u8fc7\u7a0b\u901a\u5e38\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a\u9996\u5148\uff0c\u4f7f\u7528\u9002\u5f53\u7684\u5e93\u6253\u5f00\u538b\u7f29\u5305\u5e76\u63d0\u4f9b\u5bc6\u7801\uff1b\u63a5\u7740\uff0c\u89e3\u5bc6\u6587\u4ef6\u6d41\u5e76\u5c06\u89e3\u5bc6\u540e\u7684\u6570\u636e\u5199\u5165\u5230\u65b0\u7684\u6587\u4ef6\uff1b\u6700\u540e\uff0c\u4f7f\u7528\u89e3\u538b\u7f29\u5e93\u5c06\u89e3\u5bc6\u540e\u7684\u6587\u4ef6\u63d0\u53d6\u5230\u6307\u5b9a\u76ee\u5f55\u3002\u786e\u4fdd\u5728\u89e3\u5bc6\u8fc7\u7a0b\u4e2d\u9075\u5faa\u6587\u4ef6\u683c\u5f0f\u548c\u52a0\u5bc6\u7b97\u6cd5\u7684\u8981\u6c42\uff0c\u4ee5\u786e\u4fdd\u6210\u529f\u89e3\u5bc6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f00\u5934\u6bb5\u843d\uff1a \u7834\u89e3\u52a0\u5bc6\u538b\u7f29\u5305\u662f\u4e00\u9879\u590d\u6742\u4e14\u6709\u4e00\u5b9a\u96be\u5ea6\u7684\u4efb\u52a1\uff0c\u901a\u5e38\u6d89\u53ca\u5230\u5bc6\u7801\u5b66\u548c\u8ba1\u7b97\u673a\u5b89\u5168\u7684\u77e5\u8bc6\u3002\u5bf9\u4e8ePython\u6765 [&hellip;]","protected":false},"author":3,"featured_media":1074934,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1074926"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1074926"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1074926\/revisions"}],"predecessor-version":[{"id":1074937,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1074926\/revisions\/1074937"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1074934"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1074926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1074926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1074926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}