Skip to content

Latest commit

 

History

History
111 lines (83 loc) · 2.32 KB

File metadata and controls

111 lines (83 loc) · 2.32 KB
external help file Module Name online version schema
Pup.dll-Help.xml
Pup
2.0.0

Send-PupWebSocketMessage

SYNOPSIS

Sends a message through an active WebSocket connection.

SYNTAX

Send-PupWebSocketMessage -Page <PupPage> -Message <String> [-Url <String>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

Injects a message into an open WebSocket connection on the page. Useful for testing WebSocket-based APIs and real-time features.

EXAMPLES

Example 1: Send a simple message

Send-PupWebSocketMessage -Page $page -Message '{"action":"ping"}'

Sends a JSON message through the first available WebSocket.

Example 2: Target specific WebSocket by URL

Send-PupWebSocketMessage -Page $page -Message '{"cmd":"admin"}' -Url "api.target.com"

Sends a message to a specific WebSocket matching the URL pattern.

PARAMETERS

-Message

The message to send through the WebSocket

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Page

The page containing the WebSocket connection

Type: PupPage
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url

WebSocket URL pattern to target (if multiple connections exist)

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS