powershell - 在不修改 Fiddler 规则的情况下转储 fiddler 上的会话
问题描述
我想做这件事:
选择一个会话
转储此会话(问题在这里)
另外,我想在不修改 Fiddler 规则的情况下做到这一点。我已经通过修改 Fiddler 规则来做到这一点,但是该程序将在多台机器上使用,并且很难在每台机器上更改 Fiddler 规则。
我不知道这是否可能。
通过修改提琴手规则来做到这一点的代码是:
电源外壳 :
$filePath = "...\nameFile.txt" # file which contain the names of fiddler ZIP files
$file = Get-Content $filePath # content of nameFile
foreach ($line in $file) {
start $line # open the file
Write-Host "File : $line open"
Start-Sleep -s 1
}
& "...\Fiddler\ExecAction.exe" "failuresselection" # select all failures and make another file (see Fiddler Rules)
提琴手规则:
static function OnExecAction(sParams: String[]): Boolean {
[...]
// Select all failures and put them in a new ZIP file
case "failuresselection":
var path = "...\\Newlogs";
UI.actSelectSessionsWithResponseCode(449);
if (UI.GetFirstSelectedSession() != null){
UI.actSaveSessionsToZip(path+"\\Logs" + 449 + ".saz");
}
// Confirmation
FiddlerObject.StatusText = "Dumped all failures sessions to " + path;
UI.actExit();
return true;
[...]
}
我试试这个,但它不起作用:
& "...\Fiddler\ExecAction.exe" "FiddlerApplication.UI.actSelectAll();"
这是选择所有行,但我认为 ExecAction.exe 替换了 QuickExec。
总之,我正在寻找一种方法来做同样的事情而不修改 Fiddler 规则。
解决方案
推荐阅读
- flutter - Flutter中Completer和Isolates的解释和区别
- ios - UITableView didSelectRowAt 无法获取我的单元格
- c - 如何计算文本文件中相互重叠的单词
- vba - 在 VBA 中组织嵌套条件语句的更好方法是什么?
- bash - 我有一个脚本,它在屏幕上提供输出并将该数据放入日志文件中,但我希望该数据采用另一种格式。我怎样才能做到这一点?
- c# - 为什么我在使用不同十进制符号选项的系统上运行数学应用程序时会崩溃?
- jpa - 如何持久化实现 Collection 的实体
- javascript - 将标题标签添加到 JavaScript 生成的 iframe
- jenkins - 无法使用 Jenkins 进行部署
- visual-studio - 如何强制 Visual Studio 不使用专用 GPU 而只使用集成显卡?