add cookie_grabber extension; minor fixes to TMWebDriver/SOPs/simphtml

This commit is contained in:
Liang Jiaqing
2026-02-19 18:40:28 +08:00
parent 467c4c0eb2
commit 8329efeb9c
9 changed files with 163 additions and 6 deletions

View File

@@ -9,6 +9,10 @@
- JS dispatch的事件`isTrusted=false`,敏感操作(文件上传/部分按钮)会被浏览器拦截
- 文件上传JS无法填充`<input type=file>`必须ljqCtrl物理点击+Win32轮询文件对话框
- 流程SetForegroundWindow→ljqCtrl点上传按钮→FindWindow轮询对话框→输入路径→轮询关闭
- 元素→屏幕物理坐标(ljqCtrl点击前必算)JS一次取rect+窗口信息,公式:
- `physX = (screenX + rect中心x) * dpr``physY = (screenY + chromeH + rect中心y) * dpr`
- chromeH = outerHeight - innerHeightdpr = devicePixelRatio
- 注意screenX/Y也是CSS像素所有值先加后统一乘dpr
- 结论:读信息+普通操作用TMWebDriver文件上传等敏感操作需配合ljqCtrl
## 导航
@@ -30,4 +34,8 @@ fetch('PDF_URL').then(r=>r.blob()).then(b=>{
a.click();
});
```
注意需同源或CORS允许跨域先导航到目标域再执行
注意需同源或CORS允许跨域先导航到目标域再执行
## Cookie提取(含HttpOnly)
前提:需先安装`assets/cookie_grabber/`扩展
机制:注入`id="__ljqcg__"`的div→扩展检测后自动将完整cookie写回该元素textContent含HttpOnly