当前位置: 首页 > news >正文

wordpress网站恢复seo作弊

wordpress网站恢复,seo作弊,书画院网站建设方案,在电脑上建设网站1、首先将后缀名(.docx)修改为压缩包格式(.zip)。 2、修改解密word加密.py里zip的位置,和新生成的zip的位置和名称 import zipfile import xml.etree.ElementTree as ET import os import shutil# 定义文件路径 zip_file_path rC:\Users\Administrator\Desktop\新…

1、首先将后缀名(.docx)修改为压缩包格式(.zip)。

2、修改解密word加密.py里zip的位置,和新生成的zip的位置和名称

import zipfile
import xml.etree.ElementTree as ET
import os
import shutil# 定义文件路径
zip_file_path = r'C:\Users\Administrator\Desktop\新建文件夹 (3)\小说 en.zip'
new_zip_file_path = r'C:\Users\Administrator\Desktop\新建文件夹 (3)\小说 en_modified.zip'
xml_file_path_in_zip = 'word/settings.xml'# 创建临时目录
temp_dir = 'temp_zip'
os.makedirs(temp_dir, exist_ok=True)# 打开 ZIP 文件
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:# 解压缩所有文件到临时目录zip_ref.extractall(temp_dir)# 构建完整的 XML 文件路径
xml_file_full_path = os.path.join(temp_dir, xml_file_path_in_zip)# 解析 XML 文件,并指定命名空间
tree = ET.parse(xml_file_full_path)
root = tree.getroot()# 定义命名空间
namespace = {'w': 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'}# 查找并修改 w:documentProtection 元素的 w:enforcement 属性
document_protection = root.find('.//w:documentProtection', namespace)
if document_protection is not None:if '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}enforcement' in document_protection.attrib:document_protection.attrib['{http://schemas.openxmlformats.org/wordprocessingml/2006/main}enforcement'] = 'false'# 将修改后的 XML 文件保存回临时目录
tree.write(xml_file_full_path, encoding='utf-8', xml_declaration=True, default_namespace='http://schemas.openxmlformats.org/wordprocessingml/2006/main')# 创建新的 ZIP 文件
with zipfile.ZipFile(new_zip_file_path, 'w', zipfile.ZIP_DEFLATED) as new_zip_ref:for foldername, subfolders, filenames in os.walk(temp_dir):for filename in filenames:file_path = os.path.join(foldername, filename)arcname = os.path.relpath(file_path, temp_dir)new_zip_ref.write(file_path, arcname)# 清理临时目录
shutil.rmtree(temp_dir)print(f'修改后的 ZIP 文件已保存到: {new_zip_file_path}')

3、运行解密word加密.py

4、将新生成的zip后缀改回.docx

5、打开.docx看是否已经解除密码保护了

http://www.hkea.cn/news/119700/

相关文章:

  • 厦门做点击付费网站培训教育
  • 常州网站建设案例网站制作建设公司
  • 外国人做家具的网站一站传媒seo优化
  • 佛山h5建站模板怎样优化网站
  • 第三方做公司网站谷歌搜索广告优化
  • 网站风格模板快速排名精灵
  • 做网站横幅 的网站推荐几个公司推广
  • html5国内网站建设客户管理软件
  • 网站建设报价单站长工具 seo查询
  • 日本电商网站贵州快速整站优化
  • 物业服务网站建设建立网站要多少钱一年
  • 中铁建设门户加长版廊坊百度提升优化
  • 最便宜的外贸网站建设电商平台运营方案
  • 做网站应该会什么问题网络营销软文范例500字
  • 摄影网课百度关键词优化查询
  • 打广告型的营销网站西安百度推广外包
  • 乌鲁木齐招聘网站建设一站式网络营销
  • 中小型网站建设服务淘宝数据分析工具
  • 梧州网站设计企业网站模板建站
  • 行政事业单位网站建设建议营销策划公司
  • 网络推广网站怎么做百度联盟广告点击一次收益
  • wordpress居中样式宁波seo网络推广外包报价
  • java做网站用到哪些技术网络营销的重要性与意义
  • 网络营销推广的作用谷歌seo什么意思
  • 免费网站建设解决方案郑州网络营销公司哪个好
  • 转转怎么做钓鱼网站税收大数据
  • 株洲专业网站排名优化深圳产品网络推广
  • 深圳美食教学网站制作如何免费搭建自己的网站
  • 兰州移动端网站建设广东整治互联网霸王条款
  • 彩票网站该怎么建设天津seo实战培训