Documentation ¶
Overview ¶
Package parsing provides functions for parsing Windows specific data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeCliXmlErr ¶
DecodeCliXmlErr converts a CLIXML error string to a human-readable PowerShell error message.
func EncodePwshCmd ¶
EncodePwshCmd encodes a powershell command to be executed on a Windows machine. It encodes the command to UTF-16-LE and then to base64. It returns a valid powershell.exe command with no profile and the encoded command.
Types ¶
type DotnetTime ¶
DotnetTime is a custom time type that embeds the time.Time type. It is designed to handle the unmarshalling of dotnet JSON datetime strings in the format "\"/Date(timestamp)/\"" when used as a field in a struct that is being unmarshalled from JSON.
func (*DotnetTime) UnmarshalJSON ¶
func (t *DotnetTime) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for the DotnetTime type. It parses a JSON-encoded dotnet JSON datetime string and converts it into a DotnetTime object. The input byte slice is expected to represent a dotnet JSON datetime string in the format "\"/Date(timestamp)/\"".