-
-
Save p0w3rsh3ll/1ce19dea81f760466b84c11e435dff6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
Add-Type -AssemblyName System.Web.Extensions | |
$javaScriptSerializer = New-Object System.Web.Script.Serialization.JavaScriptSerializer | |
$javaScriptSerializer.MaxJsonLength = [System.Int32]::MaxValue | |
$javaScriptSerializer.RecursionLimit = 99 | |
( | |
( | |
$javaScriptSerializer.DeserializeObject( | |
(Get-Content -Encoding UTF8 -Raw -Path "$($env:APPDATA)\Mozilla\Firefox\Profiles\*\sessionstore-backups\recovery.js" -ErrorAction Stop).Trim('()') | |
)['windows'] | |
) | Select -First 1 | |
)['tabs'] | | |
Where { -not($_.hidden) } | | |
ForEach-Object { | |
$e = @($_.entries)[-1] | |
[pscustomobject]@{ | |
url = ($e)['url'] | |
title= ($e)['title'] | |
} | |
} | |
} catch { | |
Write-Warning -Message "Failed because $($_.Exception.Message)" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment