Exploit databaseDownload repository ZIP
GH-ef3d97a8ccdca9fadfa598b5cf6af377
action1corp/psaction1
Sources for CVE-2022-3775
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files11
action1corp/psaction1Revision 6df663089027
- ↑..Parent directory
- Get-Action1MappingIndexFileHeaderError.ps1
- New-Action1MappingIndexFile.ps1
- New-Action1MappingIndexHeaderContent.ps1
- New-ExportFileName.ps1
- New-TextFileWriteErrorMessage.ps1
- Read-Action1MappingIndex.ps1
- Read-JsonFile.ps1
- Test-Action1ExportFile.ps1
- Test-Action1MappingIndexFileHeader.ps1
- Write-Action1MappingIndexRecord.ps1
- Write-TextFileContent.ps1
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
Private/IO/Read-JsonFile.ps1
PowerShell · 1,194 bytes# Action1 Public Repository Material
# Subject to TERMS_OF_USE.md (https://github.com/Action1Corp/PSAction1/blob/main/TERMS_OF_USE.md)
# Provided AS IS
# Use at your own risk
# Review and test before production deployment
# (c) Action1 Corporation
function Read-JsonFile {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$Path
)
$pathResolver = $ExecutionContext.SessionState.Path
$resolvedPath = $pathResolver.GetUnresolvedProviderPathFromPSPath($Path)
if (-not (Test-Path -LiteralPath $resolvedPath -PathType Leaf)) {
$message = "JSON file '$resolvedPath' was not found."
Write-Action1Debug $message
Write-Error $message -ErrorAction Stop
}
try {
$jsonContent = Get-Content `
-LiteralPath $resolvedPath `
-Raw `
-ErrorAction Stop
return ConvertFrom-Json -InputObject $jsonContent -ErrorAction Stop
}
catch {
$message = "Failed to read JSON file '$resolvedPath'. "
$message += $_.Exception.Message
Write-Action1Debug $message
Write-Error $message -ErrorAction Stop
}
}