• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Hexdump类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中jcifs.util.Hexdump的典型用法代码示例。如果您正苦于以下问题:Java Hexdump类的具体用法?Java Hexdump怎么用?Java Hexdump使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Hexdump类属于jcifs.util包,在下文中一共展示了Hexdump类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: SigningDigest

import jcifs.util.Hexdump; //导入依赖的package包/类
public SigningDigest(byte[] macSigningKey, boolean bypass) throws SmbException {
    try {
        digest = MessageDigest.getInstance("MD5");
    } catch (NoSuchAlgorithmException ex) {
        if( log.level > 0 )
            ex.printStackTrace( log );
        throw new SmbException( "MD5", ex );
    }

    this.macSigningKey = macSigningKey;
    this.bypass = bypass;
    this.updates = 0;
    this.signSequence = 0;

    if( log.level >= 5 ) {
        log.println("macSigningKey:");
        Hexdump.hexdump( log, macSigningKey, 0, macSigningKey.length );
    }
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:20,代码来源:SigningDigest.java


示例2: writeBytesWireFormat

import jcifs.util.Hexdump; //导入依赖的package包/类
/**
 * {@inheritDoc}
 *
 * @see jcifs.internal.smb2.ServerMessageBlock2#writeBytesWireFormat(byte[], int)
 */
@Override
protected int writeBytesWireFormat ( byte[] dst, int dstIndex ) {
    int start = dstIndex;
    SMBUtil.writeInt2(24, dst, dstIndex);
    SMBUtil.writeInt2(this.closeFlags, dst, dstIndex + 2);
    dstIndex += 4;
    dstIndex += 4; // Reserved
    System.arraycopy(this.fileId, 0, dst, dstIndex, 16);
    dstIndex += 16;

    if ( log.isDebugEnabled() ) {
        log.debug(String.format("Closing %s (%s)", Hexdump.toHexString(this.fileId), this.fileName));
    }
    return dstIndex - start;
}
 
开发者ID:AgNO3,项目名称:jcifs-ng,代码行数:21,代码来源:Smb2CloseRequest.java


示例3: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
public String toString() {
    return new String( "SmbComNTCreateAndXResponse[" +
        super.toString() +
        ",oplockLevel=" + oplockLevel +
        ",fid=" + fid +
        ",createAction=0x" + Hexdump.toHexString( createAction, 4 ) +
        ",creationTime=" + new Date( creationTime ) +
        ",lastAccessTime=" + new Date( lastAccessTime ) +
        ",lastWriteTime=" + new Date( lastWriteTime ) +
        ",changeTime=" + new Date( changeTime ) +
        ",extFileAttributes=0x" + Hexdump.toHexString( extFileAttributes, 4 ) +
        ",allocationSize=" + allocationSize +
        ",endOfFile=" + endOfFile +
        ",fileType=" + fileType +
        ",deviceState=" + deviceState +
        ",directory=" + directory + "]" );
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:18,代码来源:SmbComNTCreateAndXResponse.java


示例4: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
public String toString() {
    return new String( super.toString() +
        ",totalParameterCount=" + totalParameterCount +
        ",totalDataCount=" + totalDataCount +
        ",maxParameterCount=" + maxParameterCount +
        ",maxDataCount=" + maxDataCount +
        ",maxSetupCount=" + (int)maxSetupCount +
        ",flags=0x" + Hexdump.toHexString( flags, 2 ) +
        ",timeout=" + timeout +
        ",parameterCount=" + parameterCount +
        ",parameterOffset=" + parameterOffset +
        ",parameterDisplacement=" + parameterDisplacement +
        ",dataCount=" + dataCount +
        ",dataOffset=" + dataOffset +
        ",dataDisplacement=" + dataDisplacement +
        ",setupCount=" + setupCount +
        ",pad=" + pad +
        ",pad1=" + pad1 );
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:20,代码来源:SmbComTransaction.java


示例5: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
public String toString() {
    String ret = "NtlmContext[auth=" + auth +
        ",ntlmsspFlags=0x" + Hexdump.toHexString(ntlmsspFlags, 8) +
        ",workstation=" + workstation +
        ",isEstablished=" + isEstablished +
        ",state=" + state +
        ",serverChallenge=";
    if (serverChallenge == null) {
        ret += "null";
    } else {
        ret += Hexdump.toHexString(serverChallenge, 0, serverChallenge.length * 2);
    }
    ret += ",signingKey=";
    if (signingKey == null) {
        ret += "null";
    } else {
        ret += Hexdump.toHexString(signingKey, 0, signingKey.length * 2);
    }
    ret += "]";
    return ret;
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:22,代码来源:NtlmContext.java


示例6: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
public String toString() {
    return new String( "SmbComNegotiateResponse[" +
        super.toString() +
        ",wordCount="           + wordCount +
        ",dialectIndex="        + dialectIndex +
        ",securityMode=0x"      + Hexdump.toHexString( server.securityMode, 1 ) +
        ",security="            + ( server.security == SECURITY_SHARE ? "share" : "user" ) +
        ",encryptedPasswords="  + server.encryptedPasswords +
        ",maxMpxCount="         + server.maxMpxCount +
        ",maxNumberVcs="        + server.maxNumberVcs +
        ",maxBufferSize="       + server.maxBufferSize +
        ",maxRawSize="          + server.maxRawSize +
        ",sessionKey=0x"        + Hexdump.toHexString( server.sessionKey, 8 ) +
        ",capabilities=0x"      + Hexdump.toHexString( server.capabilities, 8 ) +
        ",serverTime="          + new Date( server.serverTime ) +
        ",serverTimeZone="      + server.serverTimeZone +
        ",encryptionKeyLength=" + server.encryptionKeyLength +
        ",byteCount="           + byteCount +
        ",oemDomainName="       + server.oemDomainName + "]" );
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:21,代码来源:SmbComNegotiateResponse.java


示例7: getMessageByDcerpcError

import jcifs.util.Hexdump; //导入依赖的package包/类
static String getMessageByDcerpcError(int errcode) {
    int min = 0;
    int max = DCERPC_FAULT_CODES.length;

    while (max >= min) {
        int mid = (min + max) / 2;

        if (errcode > DCERPC_FAULT_CODES[mid]) {
            min = mid + 1;
        } else if (errcode < DCERPC_FAULT_CODES[mid]) {
            max = mid - 1;
        } else {
            return DCERPC_FAULT_MESSAGES[mid];
        }
    }

    return "0x" + Hexdump.toHexString(errcode, 8);
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:19,代码来源:DcerpcException.java


示例8: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
public String toString() {
    StringBuffer sb = new StringBuffer();
    String n = name;

    // fix MSBROWSE name
    if( n == null ) {
        n = "null";
    } else if( n.charAt( 0 ) == 0x01 ) {
        char c[] = n.toCharArray();
        c[0] = '.';
        c[1] = '.';
        c[14] = '.';
        n = new String( c );
    }

    sb.append( n ).append( "<" ).append( Hexdump.toHexString( hexCode, 2 )).append( ">" );
    if( scope != null ) {
        sb.append( "." ).append( scope );
    }
    return sb.toString();
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:22,代码来源:Name.java


示例9: getAllByAddress

import jcifs.util.Hexdump; //导入依赖的package包/类
/**
* Retrieve all addresses of a host by it's address. NetBIOS hosts can
* have many names for a given IP address. The name and IP address make the
* NetBIOS address. This provides a way to retrieve the other names for a
* host with the same IP address.
*
* @param addr the address to query
* @throws UnknownHostException if address cannot be resolved
*/

   public static NbtAddress[] getAllByAddress( NbtAddress addr )
                                               throws UnknownHostException {
       try {
           NbtAddress[] addrs = CLIENT.getNodeStatus( addr );
           cacheAddressArray( addrs );
           return addrs;
       } catch( UnknownHostException uhe ) {
           throw new UnknownHostException( "no name with type 0x" +
                           Hexdump.toHexString( addr.hostName.hexCode, 2 ) +
                           ((( addr.hostName.scope == null ) ||
                           ( addr.hostName.scope.length() == 0 )) ?
                           " with no scope" : " with scope " + addr.hostName.scope ) +
                           " for host " + addr.getHostAddress() );
       }
   }
 
开发者ID:codelibs,项目名称:jcifs,代码行数:26,代码来源:NbtAddress.java


示例10: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
/**
 * Return the numeric representation of this sid such as
 * <tt>S-1-5-21-1496946806-2192648263-3843101252-1029</tt>.
 */
public String toString() {
    String ret = "S-" + (revision & 0xFF) + "-";

    if (identifier_authority[0] != (byte)0 || identifier_authority[1] != (byte)0) {
        ret += "0x";
        ret += Hexdump.toHexString(identifier_authority, 0, 6);
    } else {
        long shift = 0;
        long id = 0;
        for (int i = 5; i > 1; i--) {
            id += (identifier_authority[i] & 0xFFL) << shift;
            shift += 8;
        }
        ret += id;
    }

    for (int i = 0; i < sub_authority_count ; i++)
        ret += "-" + (sub_authority[i] & 0xFFFFFFFFL);

    return ret;
}
 
开发者ID:jaeksoft,项目名称:jcifs-krb5,代码行数:26,代码来源:SID.java


示例11: doSend

import jcifs.util.Hexdump; //导入依赖的package包/类
protected void doSend( Request request ) throws IOException {
    synchronized (BUF) {
        ServerMessageBlock smb = (ServerMessageBlock)request;
        int n = smb.encode( BUF, 4 );
        Encdec.enc_uint32be( n & 0xFFFF, BUF, 0 ); /* 4 byte session message header */
        if (log.level >= 4) {
            do {
                log.println( smb );
            } while (smb instanceof AndXServerMessageBlock &&
                    (smb = ((AndXServerMessageBlock)smb).andx) != null);
            if (log.level >= 6) {
                Hexdump.hexdump( log, BUF, 4, n );
            }
        }
        /* For some reason this can sometimes get broken up into another
         * "NBSS Continuation Message" frame according to WireShark
         */
        out.write( BUF, 0, 4 + n );
    }
}
 
开发者ID:jaeksoft,项目名称:jcifs-krb5,代码行数:21,代码来源:SmbTransport.java


示例12: negotiateWrite

import jcifs.util.Hexdump; //导入依赖的package包/类
/**
 * @return
 * @throws IOException
 */
private int negotiateWrite ( CommonServerMessageBlockRequest req, boolean setmid ) throws IOException {
    if ( setmid ) {
        makeKey(req);
    }
    else {
        req.setMid(0);
        this.mid.set(1);
    }
    int n = req.encode(this.sbuf, 4);
    Encdec.enc_uint32be(n & 0xFFFF, this.sbuf, 0); /* 4 byte ssn msg header */

    if ( log.isTraceEnabled() ) {
        log.trace(req.toString());
        log.trace(Hexdump.toHexString(this.sbuf, 4, n));
    }

    this.out.write(this.sbuf, 0, 4 + n);
    this.out.flush();
    log.trace("Wrote negotiate request");
    return n;
}
 
开发者ID:AgNO3,项目名称:jcifs-ng,代码行数:26,代码来源:SmbTransportImpl.java


示例13: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
@Override
public String toString () {
    String ret = "NtlmContext[auth=" + this.auth + ",ntlmsspFlags=0x" + Hexdump.toHexString(this.ntlmsspFlags, 8) + ",workstation="
            + this.workstation + ",isEstablished=" + this.isEstablished + ",state=" + this.state + ",serverChallenge=";
    if ( this.serverChallenge == null ) {
        ret += "null";
    }
    else {
        ret += Hexdump.toHexString(this.serverChallenge, 0, this.serverChallenge.length * 2);
    }
    ret += ",signingKey=";
    if ( this.masterKey == null ) {
        ret += "null";
    }
    else {
        ret += Hexdump.toHexString(this.masterKey, 0, this.masterKey.length * 2);
    }
    ret += "]";
    return ret;
}
 
开发者ID:AgNO3,项目名称:jcifs-ng,代码行数:21,代码来源:NtlmContext.java


示例14: initSessionSecurity

import jcifs.util.Hexdump; //导入依赖的package包/类
protected void initSessionSecurity ( byte[] mk ) {
    this.signKey = deriveKey(mk, C2S_SIGN_CONSTANT);
    this.verifyKey = deriveKey(mk, S2C_SIGN_CONSTANT);

    if ( log.isDebugEnabled() ) {
        log.debug("Sign key is " + Hexdump.toHexString(this.signKey));
        log.debug("Verify key is " + Hexdump.toHexString(this.verifyKey));
    }

    this.sealClientKey = deriveKey(mk, C2S_SEAL_CONSTANT);
    this.sealClientHandle = Crypto.getArcfour(this.sealClientKey);
    if ( log.isDebugEnabled() ) {
        log.debug("Seal key is " + Hexdump.toHexString(this.sealClientKey));
    }

    this.sealServerKey = deriveKey(mk, S2C_SEAL_CONSTANT);
    this.sealServerHandle = Crypto.getArcfour(this.sealServerKey);

    if ( log.isDebugEnabled() ) {
        log.debug("Server seal key is " + Hexdump.toHexString(this.sealServerKey));
    }
}
 
开发者ID:AgNO3,项目名称:jcifs-ng,代码行数:23,代码来源:NtlmContext.java


示例15: run

import jcifs.util.Hexdump; //导入依赖的package包/类
public void run(String str) throws Exception
{
    Base64 b64 = new Base64();

    byte[] bytes = b64.decode(str);

    Hexdump.hexdump(System.out, bytes, 0, bytes.length);
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:9,代码来源:TestBase64.java


示例16: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
public String toString() {
    String result = new String( "SmbComTreeConnectAndX[" +
        super.toString() +
        ",disconnectTid=" + disconnectTid +
        ",passwordLength=" + passwordLength +
        ",password=" + Hexdump.toHexString( password, passwordLength, 0 ) +
        ",path=" + path +
        ",service=" + service + "]" );
    return result;
}
 
开发者ID:IdentityAutomation,项目名称:jcifs-idautopatch,代码行数:11,代码来源:SmbComTreeConnectAndX.java


示例17: update

import jcifs.util.Hexdump; //导入依赖的package包/类
public void update( byte[] input, int offset, int len ) {
    if( log.level >= 5 ) {
        log.println( "update: " + updates + " " + offset + ":" + len );
        Hexdump.hexdump( log, input, offset, Math.min( len, 256 ));
        log.flush();
    }
    if( len == 0 ) {
        return; /* CRITICAL */
    }
    digest.update( input, offset, len );
    updates++;
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:13,代码来源:SigningDigest.java


示例18: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
public String toString() {
    return new String( "SmbComOpenAndX[" +
        super.toString() +
        ",flags=0x" + Hexdump.toHexString( flags, 2 ) +
        ",desiredAccess=0x" + Hexdump.toHexString( desiredAccess, 4 ) +
        ",searchAttributes=0x" + Hexdump.toHexString( searchAttributes, 4 ) +
        ",fileAttributes=0x" + Hexdump.toHexString( fileAttributes, 4 ) +
        ",creationTime=" + new Date( creationTime ) +
        ",openFunction=0x" + Hexdump.toHexString( openFunction, 2 ) +
        ",allocationSize=" + allocationSize +
        ",fileName=" + path + "]" );
}
 
开发者ID:IdentityAutomation,项目名称:jcifs-idautopatch,代码行数:13,代码来源:SmbComOpenAndX.java


示例19: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
@Override
public String toString () {
    return new String(
        super.toString() + ",totalParameterCount=" + this.totalParameterCount + ",totalDataCount=" + this.totalDataCount + ",maxParameterCount="
                + this.maxParameterCount + ",maxDataCount=" + this.maxDataCount + ",maxSetupCount=" + (int) this.maxSetupCount + ",flags=0x"
                + Hexdump.toHexString(this.tflags, 2) + ",timeout=" + this.timeout + ",parameterCount=" + this.parameterCount
                + ",parameterOffset=" + this.parameterOffset + ",parameterDisplacement=" + this.parameterDisplacement + ",dataCount="
                + this.dataCount + ",dataOffset=" + this.dataOffset + ",dataDisplacement=" + this.dataDisplacement + ",setupCount="
                + this.setupCount + ",pad=" + this.pad + ",pad1=" + this.pad1);
}
 
开发者ID:AgNO3,项目名称:jcifs-ng,代码行数:11,代码来源:SmbComTransaction.java


示例20: toString

import jcifs.util.Hexdump; //导入依赖的package包/类
public String toString() {
    return new String( "SmbQueryFileBasicInfo[" +
        "createTime=" + new Date( createTime ) +
        ",lastAccessTime=" + new Date( lastAccessTime ) +
        ",lastWriteTime=" + new Date( lastWriteTime ) +
        ",changeTime=" + new Date( changeTime ) +
        ",attributes=0x" + Hexdump.toHexString( attributes, 4 ) + "]" );
}
 
开发者ID:codelibs,项目名称:jcifs,代码行数:9,代码来源:Trans2QueryPathInformationResponse.java



注:本文中的jcifs.util.Hexdump类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JBMenuItem类代码示例发布时间:2022-05-23
下一篇:
Java ThreadPool类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap