Exploit database

GH-ef3d97a8ccdca9fadfa598b5cf6af377

action1corp/psaction1

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2022-3775

2 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files8
action1corp/psaction1Revision 6df663089027

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

Private/API/Trace-WebResponseContent.ps1

PowerShell · 1,479 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 Trace-WebResponseContent {
    [CmdletBinding()]
    param(
        [Parameter(Position = 0)]
        [AllowNull()]
        [object]$Response,
        [Parameter(Position = 1)]
        [AllowNull()]
        [object]$ErrorRecord
    )

    $responseContent = $null

    if ($null -ne $Response) {
        if (-not ($Response -is [System.Net.WebResponse])) {
            $responseContent = [string]$Response
        }
        else {
            try {
                $responseStream = $Response.GetResponseStream()

                if ($null -ne $responseStream) {
                    $streamReader = New-Object System.IO.StreamReader($responseStream)

                    try {
                        $responseContent = $streamReader.ReadToEnd()
                    }
                    finally {
                        $streamReader.Dispose()
                    }
                }
            }
            catch {
                $responseContent = $null
            }
        }
    }

    if ([string]::IsNullOrWhiteSpace($responseContent) -and $ErrorRecord) {
        if ($ErrorRecord.ErrorDetails) {
            $responseContent = $ErrorRecord.ErrorDetails.Message
        }
    }

    return $responseContent
}