C# Class SharpCifs.Ntlmssp.Type3Message

Represents an NTLMSSP Type-3 message.
Represents an NTLMSSP Type-3 message.
Inheritance: NtlmMessage
Mostra file Open project: brandonprry/Potato Class Usage Examples

Public Methods

Method Description
GetDefaultDomain ( ) : string

Returns the default domain from the current environment.

Returns the default domain from the current environment.

GetDefaultFlags ( ) : int

Returns the default flags for a generic Type-3 message in the current environment.

Returns the default flags for a generic Type-3 message in the current environment.

GetDefaultFlags ( Type2Message type2 ) : int

Returns the default flags for a Type-3 message created in response to the given Type-2 message in the current environment.

Returns the default flags for a Type-3 message created in response to the given Type-2 message in the current environment.

GetDefaultPassword ( ) : string

Returns the default password from the current environment.

Returns the default password from the current environment.

GetDefaultUser ( ) : string

Returns the default user from the current environment.

Returns the default user from the current environment.

GetDefaultWorkstation ( ) : string

Returns the default workstation from the current environment.

Returns the default workstation from the current environment.

GetDomain ( ) : string

Returns the domain in which the user has an account.

Returns the domain in which the user has an account.

GetLMResponse ( ) : byte[]

Returns the LanManager/LMv2 response.

Returns the LanManager/LMv2 response.

GetLMResponse ( Type2Message type2, string password ) : byte[]

Constructs the LanManager response to the given Type-2 message using the supplied password.

Constructs the LanManager response to the given Type-2 message using the supplied password.

GetLMv2Response ( Type2Message type2, string domain, string user, string password, byte clientChallenge ) : byte[]
GetMasterKey ( ) : byte[]

The real session key if the regular session key is actually the encrypted version used for key exchange.

The real session key if the regular session key is actually the encrypted version used for key exchange.

GetNTResponse ( ) : byte[]

Returns the NT/NTLMv2 response.

Returns the NT/NTLMv2 response.

GetNTResponse ( Type2Message type2, string password ) : byte[]

Constructs the NT response to the given Type-2 message using the supplied password.

Constructs the NT response to the given Type-2 message using the supplied password.

GetNtlMv2Response ( Type2Message type2, byte responseKeyNt, byte clientChallenge ) : byte[]
GetSessionKey ( ) : byte[]

Returns the session key.

Returns the session key.

GetUser ( ) : string

Returns the username for the authenticating user.

Returns the username for the authenticating user.

GetWorkstation ( ) : string

Returns the workstation from which authentication is being performed.

Returns the workstation from which authentication is being performed.

SetDomain ( string domain ) : void

Sets the domain for this message.

Sets the domain for this message.

SetLmResponse ( byte lmResponse ) : void

Sets the LanManager/LMv2 response for this message.

Sets the LanManager/LMv2 response for this message.

SetNtResponse ( byte ntResponse ) : void

Sets the NT/NTLMv2 response for this message.

Sets the NT/NTLMv2 response for this message.

SetSessionKey ( byte sessionKey ) : void

Sets the session key.

Sets the session key.

SetUser ( string user ) : void

Sets the user for this message.

Sets the user for this message.

SetWorkstation ( string workstation ) : void

Sets the workstation for this message.

Sets the workstation for this message.

ToByteArray ( ) : byte[]
ToString ( ) : string
Type3Message ( Type2Message type2 ) : System

Creates a Type-3 message in response to the given Type-2 message using default values from the current environment.

Creates a Type-3 message in response to the given Type-2 message using default values from the current environment.

Type3Message ( Type2Message type2, string password, string domain, string user, string workstation, int flags ) : System

Creates a Type-3 message in response to the given Type-2 message.

Creates a Type-3 message in response to the given Type-2 message.

Type3Message ( byte material ) : System

Creates a Type-3 message using the given raw Type-3 material.

Creates a Type-3 message using the given raw Type-3 material.

Type3Message ( int flags, byte lmResponse, byte ntResponse, string domain, string user, string workstation ) : System

Creates a Type-3 message with the specified parameters.

Creates a Type-3 message with the specified parameters.

Private Methods

Method Description
Parse ( byte material ) : void
Type3Message ( ) : System

Method Details

GetDefaultDomain() public static method

Returns the default domain from the current environment.
Returns the default domain from the current environment.
public static GetDefaultDomain ( ) : string
return string

GetDefaultFlags() public static method

Returns the default flags for a generic Type-3 message in the current environment.
Returns the default flags for a generic Type-3 message in the current environment.
public static GetDefaultFlags ( ) : int
return int

GetDefaultFlags() public static method

Returns the default flags for a Type-3 message created in response to the given Type-2 message in the current environment.
Returns the default flags for a Type-3 message created in response to the given Type-2 message in the current environment.
public static GetDefaultFlags ( Type2Message type2 ) : int
type2 Type2Message
return int

GetDefaultPassword() public static method

Returns the default password from the current environment.
Returns the default password from the current environment.
public static GetDefaultPassword ( ) : string
return string

GetDefaultUser() public static method

Returns the default user from the current environment.
Returns the default user from the current environment.
public static GetDefaultUser ( ) : string
return string

GetDefaultWorkstation() public static method

Returns the default workstation from the current environment.
Returns the default workstation from the current environment.
public static GetDefaultWorkstation ( ) : string
return string

GetDomain() public method

Returns the domain in which the user has an account.
Returns the domain in which the user has an account.
public GetDomain ( ) : string
return string

GetLMResponse() public method

Returns the LanManager/LMv2 response.
Returns the LanManager/LMv2 response.
public GetLMResponse ( ) : byte[]
return byte[]

GetLMResponse() public static method

Constructs the LanManager response to the given Type-2 message using the supplied password.
Constructs the LanManager response to the given Type-2 message using the supplied password.
public static GetLMResponse ( Type2Message type2, string password ) : byte[]
type2 Type2Message The Type-2 message.
password string The password.
return byte[]

GetLMv2Response() public static method

public static GetLMv2Response ( Type2Message type2, string domain, string user, string password, byte clientChallenge ) : byte[]
type2 Type2Message
domain string
user string
password string
clientChallenge byte
return byte[]

GetMasterKey() public method

The real session key if the regular session key is actually the encrypted version used for key exchange.
The real session key if the regular session key is actually the encrypted version used for key exchange.
public GetMasterKey ( ) : byte[]
return byte[]

GetNTResponse() public method

Returns the NT/NTLMv2 response.
Returns the NT/NTLMv2 response.
public GetNTResponse ( ) : byte[]
return byte[]

GetNTResponse() public static method

Constructs the NT response to the given Type-2 message using the supplied password.
Constructs the NT response to the given Type-2 message using the supplied password.
public static GetNTResponse ( Type2Message type2, string password ) : byte[]
type2 Type2Message The Type-2 message.
password string The password.
return byte[]

GetNtlMv2Response() public static method

public static GetNtlMv2Response ( Type2Message type2, byte responseKeyNt, byte clientChallenge ) : byte[]
type2 Type2Message
responseKeyNt byte
clientChallenge byte
return byte[]

GetSessionKey() public method

Returns the session key.
Returns the session key.
public GetSessionKey ( ) : byte[]
return byte[]

GetUser() public method

Returns the username for the authenticating user.
Returns the username for the authenticating user.
public GetUser ( ) : string
return string

GetWorkstation() public method

Returns the workstation from which authentication is being performed.
Returns the workstation from which authentication is being performed.
public GetWorkstation ( ) : string
return string

SetDomain() public method

Sets the domain for this message.
Sets the domain for this message.
public SetDomain ( string domain ) : void
domain string The domain.
return void

SetLmResponse() public method

Sets the LanManager/LMv2 response for this message.
Sets the LanManager/LMv2 response for this message.
public SetLmResponse ( byte lmResponse ) : void
lmResponse byte The LanManager response.
return void

SetNtResponse() public method

Sets the NT/NTLMv2 response for this message.
Sets the NT/NTLMv2 response for this message.
public SetNtResponse ( byte ntResponse ) : void
ntResponse byte The NT/NTLMv2 response.
return void

SetSessionKey() public method

Sets the session key.
Sets the session key.
public SetSessionKey ( byte sessionKey ) : void
sessionKey byte The session key.
return void

SetUser() public method

Sets the user for this message.
Sets the user for this message.
public SetUser ( string user ) : void
user string The user.
return void

SetWorkstation() public method

Sets the workstation for this message.
Sets the workstation for this message.
public SetWorkstation ( string workstation ) : void
workstation string The workstation.
return void

ToByteArray() public method

public ToByteArray ( ) : byte[]
return byte[]

ToString() public method

public ToString ( ) : string
return string

Type3Message() public method

Creates a Type-3 message in response to the given Type-2 message using default values from the current environment.
Creates a Type-3 message in response to the given Type-2 message using default values from the current environment.
public Type3Message ( Type2Message type2 ) : System
type2 Type2Message The Type-2 message which this represents a response to.
return System

Type3Message() public method

Creates a Type-3 message in response to the given Type-2 message.
Creates a Type-3 message in response to the given Type-2 message.
public Type3Message ( Type2Message type2, string password, string domain, string user, string workstation, int flags ) : System
type2 Type2Message The Type-2 message which this represents a response to.
password string The password to use when constructing the response.
domain string The domain in which the user has an account.
user string The username for the authenticating user.
workstation string /// The workstation from which authentication is /// taking place. ///
flags int
return System

Type3Message() public method

Creates a Type-3 message using the given raw Type-3 material.
Creates a Type-3 message using the given raw Type-3 material.
If an error occurs while parsing the material. ///
public Type3Message ( byte material ) : System
material byte The raw Type-3 material used to construct this message.
return System

Type3Message() public method

Creates a Type-3 message with the specified parameters.
Creates a Type-3 message with the specified parameters.
public Type3Message ( int flags, byte lmResponse, byte ntResponse, string domain, string user, string workstation ) : System
flags int The flags to apply to this message.
lmResponse byte The LanManager/LMv2 response.
ntResponse byte The NT/NTLMv2 response.
domain string The domain in which the user has an account.
user string The username for the authenticating user.
workstation string /// The workstation from which authentication is /// taking place. ///
return System