From 6df602f0da80110b9fe7de12cfb332b082cdaf26 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 09:27:32 +0000 Subject: [PATCH 1/2] Initial plan From 77e27a2a08d4ead0be2c9dd6a3b852a1c579a8de Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 09:28:41 +0000 Subject: [PATCH 2/2] Fix Export-GHEntraFido: load HtmlAgilityPack.dll from PSParseHTML module directory instead of scanning $HOME Agent-Logs-Url: https://github.com/DevClate/EntraFIDOFinder/sessions/d66739a1-3d9d-43cb-84e0-425eac406af0 Co-authored-by: DevClate <107187714+DevClate@users.noreply.github.com> --- Scripts/Export-GHEntraFido.ps1 | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Scripts/Export-GHEntraFido.ps1 b/Scripts/Export-GHEntraFido.ps1 index 73282ed..fc8c399 100644 --- a/Scripts/Export-GHEntraFido.ps1 +++ b/Scripts/Export-GHEntraFido.ps1 @@ -23,22 +23,21 @@ Function Export-GHEntraFido { [string]$Url ) - if (-not ('HtmlAgilityPack.HtmlDocument' -as [type])) { - $dll = Get-ChildItem -Path $HOME -Recurse -Filter HtmlAgilityPack.dll -ErrorAction SilentlyContinue | - Select-Object -First 1 - - if (-not $dll) { - throw "HtmlAgilityPack.dll not found. Ensure the dependency is installed before running Export-GHEntraFido." + if (-not (Get-Module -Name PSParseHTML)) { + Import-Module PSParseHTML -ErrorAction Stop } - Add-Type -Path $dll.FullName -} + if (-not ('HtmlAgilityPack.HtmlDocument' -as [type])) { + $module = Get-Module PSParseHTML + $dll = Get-ChildItem -Path $module.ModuleBase -Recurse -Filter HtmlAgilityPack.dll -ErrorAction SilentlyContinue | + Select-Object -First 1 - $response = Invoke-WebRequest -Uri $Url -UseBasicParsing - $htmlContent = $response.Content + if (-not $dll) { + throw "HtmlAgilityPack.dll not found under PSParseHTML module path. Ensure PSParseHTML is installed before running Export-GHEntraFido." + } - $htmlDocument = New-Object HtmlAgilityPack.HtmlDocument - $htmlDocument.LoadHtml($htmlContent) + Add-Type -Path $dll.FullName + } # Fetch the webpage content $response = Invoke-WebRequest -Uri $Url -UseBasicParsing