摘要: manifest.json "permissions": [ "storage" ] popup.js var data = { "url": "http://127.0.0.1" }; chrome.storage.local.set({ "data": data }, function(){ c 阅读全文
posted @ 2024-02-22 23:00 wstong 阅读(393) 评论(0) 推荐(0)
摘要: 直接使用flask自带的wsgi,关闭debug模式会出现以下警告 from flask import Flask app = Flask(__name__, static_folder="./static") app.run(host="0.0.0.0", port=8080, debug=Fal 阅读全文
posted @ 2024-02-15 23:06 wstong 阅读(160) 评论(0) 推荐(0)
摘要: 主要分为3个步骤,解压docx文件,压缩图片,压缩文件,需要用到zipfile和pillow 1. 解压docx文件 import zipfile zip_file = zipfile.ZipFile("./test.docx") zip_file.extractall("./test") zip_ 阅读全文
posted @ 2023-12-19 21:19 wstong 阅读(94) 评论(0) 推荐(0)
摘要: 1. word格式转换 先将word转换为xml格式,路径需要绝对路径 from win32com import client import os def doc2docx(path): word = client.Dispatch("Word.Application") doc = word.Do 阅读全文
posted @ 2023-12-04 12:08 wstong 阅读(146) 评论(0) 推荐(0)
摘要: 1. requests_toolbelt 先安装requests_toolbelt pip install requests_toolbelt 上传实例 import requests from requests_toolbelt import MultipartEncoder upload_url 阅读全文
posted @ 2023-11-29 10:28 wstong 阅读(541) 评论(0) 推荐(0)
摘要: 将当前文件夹的文件根据创建时间进行整理 # 整理当前文件夹 import time import os import shutil # 将旧文件复制到新路径 def cutFile(fileName): if os.path.isdir(fileName) == True: return if fi 阅读全文
posted @ 2023-11-03 10:37 wstong 阅读(26) 评论(0) 推荐(0)
摘要: 这里只做简单的纯6位数字的密码的破解 import PyPDF2 from tqdm import trange PDFfile = "test.pdf" pdf_obj = open(PDFfile, "rb") pdf_reader = PyPDF2.PdfReader(pdf_obj) for 阅读全文
posted @ 2023-11-02 08:13 wstong 阅读(408) 评论(0) 推荐(0)
摘要: 1. 接收蓝牙日志 可以用手机拨号##5959##打开蓝牙调试 然后使用对应的手机app先使用对应的蓝牙产品 2. 蓝牙日志分析 将手机上的蓝牙日志文件(btsnoop_hci.log)拷贝到电脑上使用wireshark打开,主要是看发送和接收的数据,以下是某体重秤 3. 寻找设备 import a 阅读全文
posted @ 2023-10-16 16:13 wstong 阅读(2781) 评论(0) 推荐(0)
摘要: 简单使用 安装 pip3 install black 使用 black {source_file_or_directory} 跳过字符串格式化 black -S {source_file_or_directory} 阅读全文
posted @ 2023-10-09 09:33 wstong 阅读(29) 评论(0) 推荐(0)
摘要: 如图要删除以下两个分区,如果右键的话只弹出帮助,可以使用windows自带的diskpart命令 运行后效果如下 使用 list disk 查看磁盘 使用 sel disk 2 选择磁盘2 使用 list partition 查看当前磁盘分区 假设要删除分区1,则需要先选中分区1后再执行删除操作,命 阅读全文
posted @ 2023-09-25 19:56 wstong 阅读(288) 评论(0) 推荐(0)