亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ntlm.java

?? Light in the box 抓取程序。 使用HttpClient
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/auth/NTLM.java,v 1.11 2004/05/13 04:02:00 mbecke Exp $ * $Revision: 480424 $ * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ * * ==================================================================== * *  Licensed to the Apache Software Foundation (ASF) under one or more *  contributor license agreements.  See the NOTICE file distributed with *  this work for additional information regarding copyright ownership. *  The ASF licenses this file to You under the Apache License, Version 2.0 *  (the "License"); you may not use this file except in compliance with *  the License.  You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * *  Unless required by applicable law or agreed to in writing, software *  distributed under the License is distributed on an "AS IS" BASIS, *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *  See the License for the specific language governing permissions and *  limitations under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation.  For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */package org.apache.commons.httpclient.auth;import java.security.InvalidKeyException;import java.security.NoSuchAlgorithmException;import javax.crypto.BadPaddingException;import javax.crypto.Cipher;import javax.crypto.IllegalBlockSizeException;import javax.crypto.NoSuchPaddingException;import javax.crypto.spec.SecretKeySpec;import org.apache.commons.codec.binary.Base64;import org.apache.commons.httpclient.util.EncodingUtil;/** * Provides an implementation of the NTLM authentication protocol. * <p> * This class provides methods for generating authentication * challenge responses for the NTLM authentication protocol.  The NTLM * protocol is a proprietary Microsoft protocol and as such no RFC * exists for it.  This class is based upon the reverse engineering * efforts of a wide range of people.</p> * * <p>Please note that an implementation of JCE must be correctly installed and configured when * using NTLM support.</p> * * <p>This class should not be used externally to HttpClient as it's API is specifically * designed to work with HttpClient's use case, in particular it's connection management.</p> * * @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a> * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * * @version $Revision: 480424 $ $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ * @since 3.0 */final class NTLM {    /** Character encoding */    public static final String DEFAULT_CHARSET = "ASCII";    /** The current response */    private byte[] currentResponse;    /** The current position */    private int currentPosition = 0;    /** The character set to use for encoding the credentials */    private String credentialCharset = DEFAULT_CHARSET;        /**     * Returns the response for the given message.     *     * @param message the message that was received from the server.     * @param username the username to authenticate with.     * @param password the password to authenticate with.     * @param host The host.     * @param domain the NT domain to authenticate in.     * @return The response.     * @throws HttpException If the messages cannot be retrieved.     */    public final String getResponseFor(String message,            String username, String password, String host, String domain)            throws AuthenticationException {                        final String response;        if (message == null || message.trim().equals("")) {            response = getType1Message(host, domain);        } else {            response = getType3Message(username, password, host, domain,                    parseType2Message(message));        }        return response;    }    /**     * Return the cipher for the specified key.     * @param key The key.     * @return Cipher The cipher.     * @throws AuthenticationException If the cipher cannot be retrieved.     */    private Cipher getCipher(byte[] key) throws AuthenticationException {        try {            final Cipher ecipher = Cipher.getInstance("DES/ECB/NoPadding");            key = setupKey(key);            ecipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "DES"));            return ecipher;        } catch (NoSuchAlgorithmException e) {            throw new AuthenticationException("DES encryption is not available.", e);        } catch (InvalidKeyException e) {            throw new AuthenticationException("Invalid key for DES encryption.", e);        } catch (NoSuchPaddingException e) {            throw new AuthenticationException(                "NoPadding option for DES is not available.", e);        }    }    /**      * Adds parity bits to the key.     * @param key56 The key     * @return The modified key.     */    private byte[] setupKey(byte[] key56) {        byte[] key = new byte[8];        key[0] = (byte) ((key56[0] >> 1) & 0xff);        key[1] = (byte) ((((key56[0] & 0x01) << 6)             | (((key56[1] & 0xff) >> 2) & 0xff)) & 0xff);        key[2] = (byte) ((((key56[1] & 0x03) << 5)             | (((key56[2] & 0xff) >> 3) & 0xff)) & 0xff);        key[3] = (byte) ((((key56[2] & 0x07) << 4)             | (((key56[3] & 0xff) >> 4) & 0xff)) & 0xff);        key[4] = (byte) ((((key56[3] & 0x0f) << 3)             | (((key56[4] & 0xff) >> 5) & 0xff)) & 0xff);        key[5] = (byte) ((((key56[4] & 0x1f) << 2)             | (((key56[5] & 0xff) >> 6) & 0xff)) & 0xff);        key[6] = (byte) ((((key56[5] & 0x3f) << 1)             | (((key56[6] & 0xff) >> 7) & 0xff)) & 0xff);        key[7] = (byte) (key56[6] & 0x7f);                for (int i = 0; i < key.length; i++) {            key[i] = (byte) (key[i] << 1);        }        return key;    }    /**     * Encrypt the data.     * @param key The key.     * @param bytes The data     * @return byte[] The encrypted data     * @throws HttpException If {@link Cipher.doFinal(byte[])} fails     */    private byte[] encrypt(byte[] key, byte[] bytes)        throws AuthenticationException {        Cipher ecipher = getCipher(key);        try {            byte[] enc = ecipher.doFinal(bytes);            return enc;        } catch (IllegalBlockSizeException e) {            throw new AuthenticationException("Invalid block size for DES encryption.", e);        } catch (BadPaddingException e) {            throw new AuthenticationException("Data not padded correctly for DES encryption.", e);        }    }    /**      * Prepares the object to create a response of the given length.     * @param length the length of the response to prepare.     */    private void prepareResponse(int length) {        currentResponse = new byte[length];        currentPosition = 0;    }    /**      * Adds the given byte to the response.     * @param b the byte to add.     */    private void addByte(byte b) {        currentResponse[currentPosition] = b;        currentPosition++;    }    /**      * Adds the given bytes to the response.     * @param bytes the bytes to add.     */    private void addBytes(byte[] bytes) {        for (int i = 0; i < bytes.length; i++) {            currentResponse[currentPosition] = bytes[i];            currentPosition++;        }    }    /**      * Returns the response that has been generated after shrinking the array if     * required and base64 encodes the response.     * @return The response as above.     */    private String getResponse() {        byte[] resp;        if (currentResponse.length > currentPosition) {            byte[] tmp = new byte[currentPosition];            for (int i = 0; i < currentPosition; i++) {                tmp[i] = currentResponse[i];            }            resp = tmp;        } else {            resp = currentResponse;        }        return EncodingUtil.getAsciiString(Base64.encodeBase64(resp));    }        /**     * Creates the first message (type 1 message) in the NTLM authentication sequence.     * This message includes the user name, domain and host for the authentication session.     *     * @param host the computer name of the host requesting authentication.     * @param domain The domain to authenticate with.     * @return String the message to add to the HTTP request header.     */    public String getType1Message(String host, String domain) {        host = host.toUpperCase();        domain = domain.toUpperCase();        byte[] hostBytes = EncodingUtil.getBytes(host, DEFAULT_CHARSET);        byte[] domainBytes = EncodingUtil.getBytes(domain, DEFAULT_CHARSET);        int finalLength = 32 + hostBytes.length + domainBytes.length;        prepareResponse(finalLength);                // The initial id string.        byte[] protocol = EncodingUtil.getBytes("NTLMSSP", DEFAULT_CHARSET);        addBytes(protocol);        addByte((byte) 0);        // Type        addByte((byte) 1);        addByte((byte) 0);        addByte((byte) 0);        addByte((byte) 0);        // Flags        addByte((byte) 6);        addByte((byte) 82);        addByte((byte) 0);        addByte((byte) 0);        // Domain length (first time).        int iDomLen = domainBytes.length;        byte[] domLen = convertShort(iDomLen);        addByte(domLen[0]);        addByte(domLen[1]);        // Domain length (second time).        addByte(domLen[0]);        addByte(domLen[1]);        // Domain offset.        byte[] domOff = convertShort(hostBytes.length + 32);        addByte(domOff[0]);        addByte(domOff[1]);        addByte((byte) 0);        addByte((byte) 0);        // Host length (first time).        byte[] hostLen = convertShort(hostBytes.length);        addByte(hostLen[0]);        addByte(hostLen[1]);        // Host length (second time).        addByte(hostLen[0]);        addByte(hostLen[1]);

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99re亚洲国产精品| 在线不卡免费av| 三级久久三级久久| 国产欧美一二三区| 宅男噜噜噜66一区二区66| 国产成人在线免费| 日韩国产欧美在线观看| 日韩理论片网站| 久久免费偷拍视频| 欧美一区二区免费视频| 在线观看日韩国产| 成人午夜在线视频| 精品无人码麻豆乱码1区2区 | 久久精品72免费观看| 亚洲欧美日韩国产一区二区三区| 亚洲精品一区二区在线观看| 777a∨成人精品桃花网| 色诱亚洲精品久久久久久| 国产白丝网站精品污在线入口| 免费精品视频在线| 亚洲成人免费av| 夜夜爽夜夜爽精品视频| 亚洲欧美自拍偷拍| 中文字幕高清一区| 久久久久高清精品| 久久亚洲精品小早川怜子| 91精品国产丝袜白色高跟鞋| 欧美午夜精品久久久| 91一区一区三区| 99久久777色| 99精品国产一区二区三区不卡 | 欧美日韩二区三区| 一本色道久久综合亚洲91| 成人黄色电影在线| 国产成人av一区二区三区在线观看| 久久精品国产久精国产爱| 视频一区在线播放| 五月激情六月综合| 日韩黄色免费电影| 日本sm残虐另类| 热久久一区二区| 久久不见久久见免费视频7| 色婷婷综合视频在线观看| 91麻豆精品一区二区三区| 91麻豆国产精品久久| 在线观看亚洲精品视频| 欧美性猛交xxxx乱大交退制版 | 免费人成精品欧美精品| 日本视频在线一区| 久久99精品久久久久久国产越南 | 色综合 综合色| 欧美性受xxxx黑人xyx| 欧美日韩亚洲不卡| 欧美一区二区三区影视| 欧美大片免费久久精品三p| 精品免费日韩av| 国产欧美日韩另类视频免费观看| 国产精品久久久久aaaa樱花| 中文字幕亚洲视频| 亚洲自拍欧美精品| 日本不卡一区二区三区高清视频| 美国三级日本三级久久99| 精品一区二区免费视频| 国产69精品一区二区亚洲孕妇| 99精品视频在线观看| 91国偷自产一区二区开放时间| 3d成人h动漫网站入口| 欧美va亚洲va香蕉在线| 国产精品美日韩| 亚洲图片有声小说| 美女mm1313爽爽久久久蜜臀| 懂色av中文一区二区三区| 色婷婷久久久久swag精品| 91精品在线观看入口| 国产精品视频一二| 亚洲va欧美va天堂v国产综合| 久久草av在线| 色老头久久综合| 欧美va亚洲va国产综合| 亚洲另类在线一区| 韩国av一区二区三区四区| 91麻豆蜜桃一区二区三区| 日韩精品一区二区在线观看| 亚洲国产高清在线观看视频| 午夜精品久久久久久久久久久 | 91精品国产综合久久久久久 | 日韩精品专区在线影院重磅| 中文字幕中文字幕在线一区 | 91啪亚洲精品| 精品国产乱码久久久久久牛牛| 亚洲三级小视频| 精一区二区三区| 欧洲色大大久久| 日本一区二区免费在线观看视频| 一个色综合av| 成人综合在线观看| 91精品国产综合久久久蜜臀图片| 国产盗摄一区二区三区| 欧美日韩精品欧美日韩精品一 | 欧美色视频一区| 国产精品美女www爽爽爽| 蜜桃传媒麻豆第一区在线观看| 色8久久人人97超碰香蕉987| 国产视频一区二区三区在线观看| 天天免费综合色| 91麻豆免费在线观看| 国产欧美精品区一区二区三区| 男女男精品视频网| 欧美在线观看一二区| 国产精品久久网站| 国产一区二区91| 日韩欧美第一区| 日韩和欧美一区二区三区| 91视频www| 自拍av一区二区三区| 国产麻豆精品视频| 日韩欧美专区在线| 午夜精品视频在线观看| 日本道免费精品一区二区三区| 国产精品入口麻豆九色| 精品一区二区久久| 欧美一区二区视频在线观看2022| 亚洲综合色噜噜狠狠| 一本到不卡精品视频在线观看 | 亚洲成av人影院| 日本韩国精品一区二区在线观看| 日本一区二区三区dvd视频在线| 精品一区精品二区高清| 欧美xxx久久| 黄色日韩三级电影| 欧美电影免费观看高清完整版在线观看 | 香蕉加勒比综合久久| 色噜噜狠狠色综合欧洲selulu| 亚洲欧美日韩久久精品| 91最新地址在线播放| 亚洲欧美日韩国产综合在线| 色综合网色综合| 亚洲一二三四区不卡| 欧美日韩情趣电影| 日韩av中文字幕一区二区| 日韩欧美视频一区| 狠狠色丁香久久婷婷综合丁香| 精品免费日韩av| 国产成人日日夜夜| 国产精品五月天| 99国产精品久久久久久久久久久| 亚洲视频一区在线| 日本精品一区二区三区高清 | 久久精品国产秦先生| 2024国产精品| 成人午夜伦理影院| 亚洲欧美日韩久久精品| 欧美性色综合网| 免费在线观看精品| 久久久久久久久一| 99国产精品视频免费观看| 亚洲一区二区三区不卡国产欧美| 精品视频在线免费观看| 美女视频一区二区| 麻豆91精品91久久久的内涵| 久久久亚洲精品一区二区三区 | 五月天激情综合| 精品国产一区二区亚洲人成毛片| 国产一区二区三区久久久| 亚洲少妇屁股交4| 91精品视频网| 成人免费毛片高清视频| 亚洲综合激情网| 久久蜜桃一区二区| 色哦色哦哦色天天综合| 日产欧产美韩系列久久99| 久久久久久亚洲综合| 91色在线porny| 久久成人羞羞网站| 亚洲色欲色欲www| 欧美电影免费提供在线观看| 91小宝寻花一区二区三区| 免费人成精品欧美精品| 国产精品国模大尺度视频| 欧美精品第1页| 成人免费毛片嘿嘿连载视频| 五月天精品一区二区三区| 久久精品一区二区三区四区| 欧美色网一区二区| 国产成人综合在线| 三级成人在线视频| 亚洲天堂a在线| 2020国产精品| 欧美高清激情brazzers| 成人一区二区三区视频| 免播放器亚洲一区| 亚洲精品少妇30p| 久久亚洲精品国产精品紫薇| 欧洲中文字幕精品| 国产suv精品一区二区三区| 肉肉av福利一精品导航| 亚洲日本一区二区三区| 欧美精品一区二区在线播放| 欧美日韩在线一区二区| 99久久婷婷国产综合精品|