int writeParameterWordsWireFormat( byte[] dst, int dstIndex ) { if( session.transport.server.security == SECURITY_SHARE && ( session.auth.hashesExternal || session.auth.password.length() > 0 )) { if( session.transport.server.encryptedPasswords ) { // encrypted password = session.auth.getAnsiHash( session.transport.server.encryptionKey ); passwordLength = password.length; } else if( DISABLE_PLAIN_TEXT_PASSWORDS ) { throw new RuntimeException( "Plain text passwords are disabled" ); } else { // plain text password = new byte[(session.auth.password.length() + 1) * 2]; passwordLength = writeString( session.auth.password, password, 0 ); } } else { // no password in tree connect passwordLength = 1; } dst[dstIndex++] = disconnectTid ? (byte)0x01 : (byte)0x00; dst[dstIndex++] = (byte)0x00; writeInt2( passwordLength, dst, dstIndex ); return 4; } int writeBytesWireFormat( byte[] dst, int dstIndex ) {
int writeParameterWordsWireFormat( byte[] dst, int dstIndex ) { if( session.transport.server.security == SECURITY_SHARE && ( session.auth.hashesExternal || session.auth.password.length() > 0 )) { if( session.transport.server.encryptedPasswords ) { // encrypted password = session.auth.getAnsiHash( session.transport.server.encryptionKey ); passwordLength = password.length; } else if( DISABLE_PLAIN_TEXT_PASSWORDS ) { throw new RuntimeException( "Plain text passwords are disabled" ); } else { // plain text password = new byte[(session.auth.password.length() + 1) * 2]; passwordLength = writeString( session.auth.password, password, 0 ); } } else { // no password in tree connect passwordLength = 1; } dst[dstIndex++] = disconnectTid ? (byte)0x01 : (byte)0x00; dst[dstIndex++] = (byte)0x00; writeInt2( passwordLength, dst, dstIndex ); return 4; } int writeBytesWireFormat( byte[] dst, int dstIndex ) {
int writeParameterWordsWireFormat( byte[] dst, int dstIndex ) { if( session.transport.server.security == SECURITY_SHARE && ( session.auth.hashesExternal || session.auth.password.length() > 0 )) { if( session.transport.server.encryptedPasswords ) { // encrypted password = session.auth.getAnsiHash( session.transport.server.encryptionKey ); passwordLength = password.length; } else if( DISABLE_PLAIN_TEXT_PASSWORDS ) { throw new RuntimeException( "Plain text passwords are disabled" ); } else { // plain text password = new byte[(session.auth.password.length() + 1) * 2]; passwordLength = writeString( session.auth.password, password, 0 ); } } else { // no password in tree connect passwordLength = 1; } dst[dstIndex++] = disconnectTid ? (byte)0x01 : (byte)0x00; dst[dstIndex++] = (byte)0x00; writeInt2( passwordLength, dst, dstIndex ); return 4; } int writeBytesWireFormat( byte[] dst, int dstIndex ) {
int writeParameterWordsWireFormat( byte[] dst, int dstIndex ) { if( session.transport.server.security == SECURITY_SHARE && ( session.auth.hashesExternal || session.auth.password.length() > 0 )) { if( session.transport.server.encryptedPasswords ) { // encrypted password = session.auth.getAnsiHash( session.transport.server.encryptionKey ); passwordLength = password.length; } else if( DISABLE_PLAIN_TEXT_PASSWORDS ) { throw new RuntimeException( "Plain text passwords are disabled" ); } else { // plain text password = new byte[(session.auth.password.length() + 1) * 2]; passwordLength = writeString( session.auth.password, password, 0 ); } } else { // no password in tree connect passwordLength = 1; } dst[dstIndex++] = disconnectTid ? (byte)0x01 : (byte)0x00; dst[dstIndex++] = (byte)0x00; writeInt2( passwordLength, dst, dstIndex ); return 4; } int writeBytesWireFormat( byte[] dst, int dstIndex ) {
capabilities &= ~SmbConstants.CAP_EXTENDED_SECURITY; } else if (session.transport.server.encryptedPasswords) { lmHash = auth.getAnsiHash( session.transport.server.encryptionKey ); ntHash = auth.getUnicodeHash( session.transport.server.encryptionKey );
capabilities &= ~SmbConstants.CAP_EXTENDED_SECURITY; } else if (session.transport.server.encryptedPasswords) { lmHash = auth.getAnsiHash( session.transport.server.encryptionKey ); ntHash = auth.getUnicodeHash( session.transport.server.encryptionKey );
capabilities &= ~SmbConstants.CAP_EXTENDED_SECURITY; } else if (session.transport.server.encryptedPasswords) { lmHash = auth.getAnsiHash( session.transport.server.encryptionKey ); ntHash = auth.getUnicodeHash( session.transport.server.encryptionKey );
capabilities &= ~SmbConstants.CAP_EXTENDED_SECURITY; } else if (session.transport.server.encryptedPasswords) { lmHash = auth.getAnsiHash( session.transport.server.encryptionKey ); ntHash = auth.getUnicodeHash( session.transport.server.encryptionKey );