パッケージ jcifs.smb1.ntlmssp
クラス Type3Message
- java.lang.Object
-
- jcifs.smb1.ntlmssp.NtlmMessage
-
- jcifs.smb1.ntlmssp.Type3Message
-
- すべての実装されたインタフェース:
NtlmFlags
public class Type3Message extends NtlmMessage
Represents an NTLMSSP Type-3 message.
-
-
フィールドの概要
-
クラスから継承されたフィールド jcifs.smb1.ntlmssp.NtlmMessage
NTLMSSP_SIGNATURE, UNI_ENCODING
-
インタフェースから継承されたフィールド jcifs.smb1.ntlmssp.NtlmFlags
NTLMSSP_NEGOTIATE_128, NTLMSSP_NEGOTIATE_56, NTLMSSP_NEGOTIATE_ALWAYS_SIGN, NTLMSSP_NEGOTIATE_DATAGRAM_STYLE, NTLMSSP_NEGOTIATE_KEY_EXCH, NTLMSSP_NEGOTIATE_LM_KEY, NTLMSSP_NEGOTIATE_LOCAL_CALL, NTLMSSP_NEGOTIATE_NETWARE, NTLMSSP_NEGOTIATE_NTLM, NTLMSSP_NEGOTIATE_NTLM2, NTLMSSP_NEGOTIATE_OEM, NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED, NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED, NTLMSSP_NEGOTIATE_SEAL, NTLMSSP_NEGOTIATE_SIGN, NTLMSSP_NEGOTIATE_TARGET_INFO, NTLMSSP_NEGOTIATE_UNICODE, NTLMSSP_REQUEST_ACCEPT_RESPONSE, NTLMSSP_REQUEST_INIT_RESPONSE, NTLMSSP_REQUEST_NON_NT_SESSION_KEY, NTLMSSP_REQUEST_TARGET, NTLMSSP_TARGET_TYPE_DOMAIN, NTLMSSP_TARGET_TYPE_SERVER, NTLMSSP_TARGET_TYPE_SHARE
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 Type3Message()Creates a Type-3 message using default values from the current environment.Type3Message(byte[] 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)Creates a Type-3 message with the specified parameters.Type3Message(Type2Message type2)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)Creates a Type-3 message in response to the given Type-2 message.
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 static StringgetDefaultDomain()Returns the default domain from the current environment.static intgetDefaultFlags()Returns the default flags for a generic Type-3 message in the current environment.static intgetDefaultFlags(Type2Message type2)Returns the default flags for a Type-3 message created in response to the given Type-2 message in the current environment.static StringgetDefaultPassword()Returns the default password from the current environment.static StringgetDefaultUser()Returns the default user from the current environment.static StringgetDefaultWorkstation()Returns the default workstation from the current environment.StringgetDomain()Returns the domain in which the user has an account.byte[]getLMResponse()Returns the LanManager/LMv2 response.static byte[]getLMResponse(Type2Message type2, String password)Constructs the LanManager response to the given Type-2 message using the supplied password.static byte[]getLMv2Response(Type2Message type2, String domain, String user, String password, byte[] clientChallenge)byte[]getMasterKey()The real session key if the regular session key is actually the encrypted version used for key exchange.static byte[]getNTLMv2Response(Type2Message type2, byte[] responseKeyNT, byte[] clientChallenge)byte[]getNTResponse()Returns the NT/NTLMv2 response.static byte[]getNTResponse(Type2Message type2, String password)Constructs the NT response to the given Type-2 message using the supplied password.byte[]getSessionKey()Returns the session key.StringgetUser()Returns the username for the authenticating user.StringgetWorkstation()Returns the workstation from which authentication is being performed.voidsetDomain(String domain)Sets the domain for this message.voidsetLMResponse(byte[] lmResponse)Sets the LanManager/LMv2 response for this message.voidsetNTResponse(byte[] ntResponse)Sets the NT/NTLMv2 response for this message.voidsetSessionKey(byte[] sessionKey)Sets the session key.voidsetUser(String user)Sets the user for this message.voidsetWorkstation(String workstation)Sets the workstation for this message.byte[]toByteArray()Returns the raw byte representation of this message.StringtoString()-
クラスから継承されたメソッド jcifs.smb1.ntlmssp.NtlmMessage
getFlag, getFlags, setFlag, setFlags
-
-
-
-
コンストラクタの詳細
-
Type3Message
public Type3Message()
Creates a Type-3 message using default values from the current environment.
-
Type3Message
public Type3Message(Type2Message type2)
Creates a Type-3 message in response to the given Type-2 message using default values from the current environment.- パラメータ:
type2- The Type-2 message which this represents a response to.
-
Type3Message
public Type3Message(Type2Message type2, String password, String domain, String user, String workstation, int flags)
Creates a Type-3 message in response to the given Type-2 message.- パラメータ:
type2- The Type-2 message which this represents a response to.password- The password to use when constructing the response.domain- The domain in which the user has an account.user- The username for the authenticating user.workstation- The workstation from which authentication is taking place.
-
Type3Message
public Type3Message(int flags, byte[] lmResponse, byte[] ntResponse, String domain, String user, String workstation)Creates a Type-3 message with the specified parameters.- パラメータ:
flags- The flags to apply to this message.lmResponse- The LanManager/LMv2 response.ntResponse- The NT/NTLMv2 response.domain- The domain in which the user has an account.user- The username for the authenticating user.workstation- The workstation from which authentication is taking place.
-
Type3Message
public Type3Message(byte[] material) throws IOExceptionCreates a Type-3 message using the given raw Type-3 material.- パラメータ:
material- The raw Type-3 material used to construct this message.- 例外:
IOException- If an error occurs while parsing the material.
-
-
メソッドの詳細
-
getLMResponse
public byte[] getLMResponse()
Returns the LanManager/LMv2 response.- 戻り値:
- A
byte[]containing the LanManager response.
-
setLMResponse
public void setLMResponse(byte[] lmResponse)
Sets the LanManager/LMv2 response for this message.- パラメータ:
lmResponse- The LanManager response.
-
getNTResponse
public byte[] getNTResponse()
Returns the NT/NTLMv2 response.- 戻り値:
- A
byte[]containing the NT/NTLMv2 response.
-
setNTResponse
public void setNTResponse(byte[] ntResponse)
Sets the NT/NTLMv2 response for this message.- パラメータ:
ntResponse- The NT/NTLMv2 response.
-
getDomain
public String getDomain()
Returns the domain in which the user has an account.- 戻り値:
- A
Stringcontaining the domain for the user.
-
setDomain
public void setDomain(String domain)
Sets the domain for this message.- パラメータ:
domain- The domain.
-
getUser
public String getUser()
Returns the username for the authenticating user.- 戻り値:
- A
Stringcontaining the user for this message.
-
setUser
public void setUser(String user)
Sets the user for this message.- パラメータ:
user- The user.
-
getWorkstation
public String getWorkstation()
Returns the workstation from which authentication is being performed.- 戻り値:
- A
Stringcontaining the workstation.
-
setWorkstation
public void setWorkstation(String workstation)
Sets the workstation for this message.- パラメータ:
workstation- The workstation.
-
getMasterKey
public byte[] getMasterKey()
The real session key if the regular session key is actually the encrypted version used for key exchange.- 戻り値:
- A
byte[]containing the session key.
-
getSessionKey
public byte[] getSessionKey()
Returns the session key.- 戻り値:
- A
byte[]containing the session key.
-
setSessionKey
public void setSessionKey(byte[] sessionKey)
Sets the session key.- パラメータ:
sessionKey- The session key.
-
toByteArray
public byte[] toByteArray()
クラスからコピーされた説明:NtlmMessageReturns the raw byte representation of this message.- 定義:
toByteArrayクラス内NtlmMessage- 戻り値:
- A
byte[]containing the raw message material.
-
getDefaultFlags
public static int getDefaultFlags()
Returns the default flags for a generic Type-3 message in the current environment.- 戻り値:
- An
intcontaining the default flags.
-
getDefaultFlags
public static int getDefaultFlags(Type2Message type2)
Returns the default flags for a Type-3 message created in response to the given Type-2 message in the current environment.- 戻り値:
- An
intcontaining the default flags.
-
getLMResponse
public static byte[] getLMResponse(Type2Message type2, String password)
Constructs the LanManager response to the given Type-2 message using the supplied password.- パラメータ:
type2- The Type-2 message.password- The password.- 戻り値:
- A
byte[]containing the LanManager response.
-
getLMv2Response
public static byte[] getLMv2Response(Type2Message type2, String domain, String user, String password, byte[] clientChallenge)
-
getNTLMv2Response
public static byte[] getNTLMv2Response(Type2Message type2, byte[] responseKeyNT, byte[] clientChallenge)
-
getNTResponse
public static byte[] getNTResponse(Type2Message type2, String password)
Constructs the NT response to the given Type-2 message using the supplied password.- パラメータ:
type2- The Type-2 message.password- The password.- 戻り値:
- A
byte[]containing the NT response.
-
getDefaultDomain
public static String getDefaultDomain()
Returns the default domain from the current environment.- 戻り値:
- The default domain.
-
getDefaultUser
public static String getDefaultUser()
Returns the default user from the current environment.- 戻り値:
- The default user.
-
getDefaultPassword
public static String getDefaultPassword()
Returns the default password from the current environment.- 戻り値:
- The default password.
-
getDefaultWorkstation
public static String getDefaultWorkstation()
Returns the default workstation from the current environment.- 戻り値:
- The default workstation.
-
-