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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vncviewer.java

?? 一個遠程登陸器的原代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        desme.encrypt(passwd, 0, passwd, 0);

        // end equivalent of vncEncryptPasswdMS

	// get the mslogon Challenge from server 
        rfb.is.readFully(challengems);
      }
      // mslogon support end
      
      byte[] challenge = new byte[16];
      rfb.is.readFully(challenge);

      if (pw.length() > 8)
	pw = pw.substring(0, 8); // Truncate to 8 chars

      // vncEncryptBytes in the UNIX libvncauth truncates password
      // after the first zero byte. We do to.
      int firstZero = pw.indexOf(0);
      if (firstZero != -1)
	pw = pw.substring(0, firstZero);

      // mslogon support
      if (mslogon ){ 
        for (i= 0; i<32; i++) {
		challengems[i]= (byte) (passwd[i]^challengems[i]);
        }
        rfb.os.write(user);
        rfb.os.write(domain);
        rfb.os.write(challengems);
      }
      // mslogon support end

      byte[] key = {0, 0, 0, 0, 0, 0, 0, 0};
      System.arraycopy(pw.getBytes(), 0, key, 0, pw.length());

      DesCipher des = new DesCipher(key);

      des.encrypt(challenge, 0, challenge, 0);
      des.encrypt(challenge, 8, challenge, 8);
     
      rfb.os.write(challenge);

      int authResult = rfb.is.readInt();

      switch (authResult) {
      case RfbProto.VncAuthOK:
	System.out.println("VNC authentication succeeded");
	return true;
      case RfbProto.VncAuthFailed:
	System.out.println("VNC authentication failed");
	break;
      case RfbProto.VncAuthTooMany:
	throw new Exception("VNC authentication failed - too many tries");
      default:
	throw new Exception("Unknown VNC authentication result " + authResult);
      }
      break;

    case RfbProto.MsLogon:
    	System.out.println("MS-Logon (DH) detected");
		if (AuthMsLogon(us, pw)) {
			return true;
		}
		break;
    default:
      throw new Exception("Unknown VNC authentication scheme " + authScheme);
    }
    return false;
  }

  // marscha@2006: Try to better hide the windows password.
  // I know that this is no breakthrough in modern cryptography.
  // It's just a patch/kludge/workaround.
  boolean AuthMsLogon(String us, String pw) throws Exception {
	byte user[] = new byte[256];
	byte passwd[] = new byte[64];

    long gen  = rfb.is.readLong();
	long mod  = rfb.is.readLong();
	long resp = rfb.is.readLong();
		
	DH dh = new DH(gen, mod);
	long pub = dh.createInterKey();

	rfb.os.write(DH.longToBytes(pub));

	long key = dh.createEncryptionKey(resp);
	System.out.println("gen=" + gen + ", mod=" + mod
			+ ", pub=" + pub + ", key=" + key);

	DesCipher des = new DesCipher(DH.longToBytes(key));

	System.arraycopy(us.getBytes(), 0, user, 0, us.length() );
	// and pad it with Null
	if (us.length() < 256) {
	  for (i=us.length(); i<256; i++){ user[i]= 0; }
	}

    // copy the pw (password) parameter into the password Byte formated variable 
    System.arraycopy(pw.getBytes(), 0, passwd, 0, pw.length() );
	// and pad it with Null
	if (pw.length() < 32) {
	  for (i=pw.length(); i<32; i++){ passwd[i]= 0; }
	}

	//user = domain + "\\" + user;

	des.encryptText(user, user, DH.longToBytes(key));
	des.encryptText(passwd, passwd, DH.longToBytes(key));
	
	rfb.os.write(user);
	rfb.os.write(passwd);


    int authResult = rfb.is.readInt();

    switch (authResult) {
      case RfbProto.VncAuthOK:
	System.out.println("MS-Logon (DH) authentication succeeded");
	return true;
      case RfbProto.VncAuthFailed:
	System.out.println("MS-Logon (DH) authentication failed");
	break;
      case RfbProto.VncAuthTooMany:
	throw new Exception("MS-Logon (DH) authentication failed - too many tries");
      default:
	throw new Exception("Unknown MS-Logon (DH) authentication result " + authResult);
    }
    return false;
}


  //
  // Do the rest of the protocol initialisation.
  //

  void doProtocolInitialisation() throws IOException {

    rfb.writeClientInit();

    rfb.readServerInit();

    System.out.println("Desktop name is " + rfb.desktopName);
    System.out.println("Desktop size is " + rfb.framebufferWidth + " x " +
		       rfb.framebufferHeight);

    setEncodings();
  }


  //
  // Send current encoding list to the RFB server.
  //

  void setEncodings() {
    try {
      if (rfb != null && rfb.inNormalProtocol) {
	rfb.writeSetEncodings(options.encodings, options.nEncodings);
	if (vc != null) {
	  vc.softCursorFree();
	}
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }


  //
  // setCutText() - send the given cut text to the RFB server.
  //

  void setCutText(String text) {
    try {
      if (rfb != null && rfb.inNormalProtocol) {
	rfb.writeClientCutText(text);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }


  //
  // Order change in session recording status. To stop recording, pass
  // null in place of the fname argument.
  //

  void setRecordingStatus(String fname) {
    synchronized(recordingSync) {
      sessionFileName = fname;
      recordingStatusChanged = true;
    }
  }

  //
  // Start or stop session recording. Returns true if this method call
  // causes recording of a new session.
  //

  boolean checkRecordingStatus() throws IOException {
    synchronized(recordingSync) {
      if (recordingStatusChanged) {
	recordingStatusChanged = false;
	if (sessionFileName != null) {
	  startRecording();
	  return true;
	} else {
	  stopRecording();
	}
      }
    }
    return false;
  }

  //
  // Start session recording.
  //

  protected void startRecording() throws IOException {
    synchronized(recordingSync) {
      if (!recordingActive) {
	// Save settings to restore them after recording the session.
	cursorUpdatesDef =
	  options.choices[options.cursorUpdatesIndex].getSelectedItem();
	eightBitColorsDef =
	  options.choices[options.eightBitColorsIndex].getSelectedItem();
	// Set options to values suitable for recording.
	options.choices[options.cursorUpdatesIndex].select("Disable");
	options.choices[options.cursorUpdatesIndex].setEnabled(false);
	options.setEncodings();
	options.choices[options.eightBitColorsIndex].select("Full");
	options.choices[options.eightBitColorsIndex].setEnabled(false);
	options.setColorFormat();
      } else {
	rfb.closeSession();
      }

      System.out.println("Recording the session in " + sessionFileName);
      rfb.startSession(sessionFileName);
      recordingActive = true;
    }
  }

  //
  // Stop session recording.
  //

  protected void stopRecording() throws IOException {
    synchronized(recordingSync) {
      if (recordingActive) {
	// Restore options.
	options.choices[options.cursorUpdatesIndex].select(cursorUpdatesDef);
	options.choices[options.cursorUpdatesIndex].setEnabled(true);
	options.setEncodings();
	options.choices[options.eightBitColorsIndex].select(eightBitColorsDef);
	options.choices[options.eightBitColorsIndex].setEnabled(true);
	options.setColorFormat();

	rfb.closeSession();
	System.out.println("Session recording stopped.");
      }
      sessionFileName = null;
      recordingActive = false;
    }
  }


  //
  // readParameters() - read parameters from the html source or from the
  // command line.  On the command line, the arguments are just a sequence of
  // param_name/param_value pairs where the names and values correspond to
  // those expected in the html applet tag source.
  //

  public void readParameters() {
    host = readParameter("HOST", !inAnApplet);
    if (host == null) {
      host = getCodeBase().getHost();
      if (host.equals("")) {
	fatalError("HOST parameter not specified");
      }
    }

    String str = readParameter("PORT", true);
    port = Integer.parseInt(str);

    if (inAnApplet) {
      str = readParameter("Open New Window", false);
      if (str != null && str.equalsIgnoreCase("Yes"))
	inSeparateFrame = true;
    }

    encPasswordParam = readParameter("ENCPASSWORD", false);
    if (encPasswordParam == null)
      passwordParam = readParameter("PASSWORD", false);

    // "Show Controls" set to "No" disables button panel.
    showControls = true;
    str = readParameter("Show Controls", false);
    if (str != null && str.equalsIgnoreCase("No"))
      showControls = false;

    // Do we continue showing desktop on remote disconnect?
    showOfflineDesktop = false;
    str = readParameter("Show Offline Desktop", false);
    if (str != null && str.equalsIgnoreCase("Yes"))
      showOfflineDesktop = true;

    // Fine tuning options.
    deferScreenUpdates = readIntParameter("Defer screen updates", 20);
    deferCursorUpdates = readIntParameter("Defer cursor updates", 10);
    deferUpdateRequests = readIntParameter("Defer update requests", 50);
  }

  public String readParameter(String name, boolean required) {
    if (inAnApplet) {
      String s = getParameter(name);
      if ((s == null) && required) {
	fatalError(name + " parameter not specified");
      }
      return s;
    }

    for (int i = 0; i < mainArgs.length; i += 2) {
      if (mainArgs[i].equalsIgnoreCase(name)) {
	try {
	  return mainArgs[i+1];
	} catch (Exception e) {
	  if (required) {
	    fatalError(name + " parameter not specified");
	  }
	  return null;
	}
      }
    }
    if (required) {
      fatalError(name + " parameter not specified");
    }
    return null;
  }

  int readIntParameter(String name, int defaultValue) {
    String str = readParameter(name, false);
    int result = defaultValue;
    if (str != null) {
      try {
	result = Integer.parseInt(str);
      } catch (NumberFormatException e) { }
    }
    return result;
  }

  //
  // moveFocusToDesktop() - move keyboard focus either to the
  // VncCanvas or to the AuthPanel.
  //

  void moveFocusToDesktop() {
    if (vncContainer != null) {
      if (vc != null && vncContainer.isAncestorOf(vc)) {
	vc.requestFocus();
      } else if (vncContainer.isAncestorOf(authenticator)) {
	authenticator.moveFocusToPasswordField();
      }
    }
  }

  //
  // disconnect() - close connection to server.
  //

  boolean disconnectRequested = false;

  synchronized public void disconnect() {
    disconnectRequested = true;
    if (rfb != null) {
      rfb.close();
      rfb = null;
    }
    System.out.println("Disconnect");
    options.dispose();
    clipboard.dispose();
    if (rec != null)
      rec.dispose();

    if (inAnApplet) {
      vncContainer.removeAll();
      Label errLabel = new Label("Disconnected");
      errLabel.setFont(new Font("Helvetica", Font.PLAIN, 12));
      vncContainer.setLayout(new FlowLayout(FlowLayout.LEFT, 30, 30));
      vncContainer.add(errLabel);
      if (inSeparateFrame) {
	vncFrame.pack();
      } else {
	validate();
      }
      rfbThread.stop();
    } else {
      System.exit(0);
    }
  }

  //
  // fatalError() - print out a fatal error message.
  //

  synchronized public void fatalError(String str) {
    if (rfb != null) {
      rfb.close();
      rfb = null;
    }
    System.out.println(str);

    if (disconnectRequested) {
      // Not necessary to show error message if the error was caused
      // by I/O problems after the disconnect() method call.
      disconnectRequested = false;
      return;
    }

    if (inAnApplet) {
      vncContainer.removeAll();
      Label errLabel = new Label(str);
      errLabel.setFont(new Font("Helvetica", Font.PLAIN, 12));
      vncContainer.setLayout(new FlowLayout(FlowLayout.LEFT, 30, 30));
      vncContainer.add(errLabel);
      if (inSeparateFrame) {
	vncFrame.pack();
      } else {
	validate();
      }
      Thread.currentThread().stop();
    } else {
      System.exit(1);
    }
  }


  //
  // This method is called before the applet is destroyed.
  //

  public void destroy() {
    vncContainer.removeAll();
    options.dispose();
    clipboard.dispose();
    if (ftp != null)
      ftp.dispose();
    if (rec != null)
      rec.dispose();
    if (rfb != null)
      rfb.close();
    if (inSeparateFrame)
      vncFrame.dispose();
  }


  //
  // Close application properly on window close event.
  //

  public void windowClosing(WindowEvent evt) {
    if (rfb != null)
      disconnect();

    vncFrame.dispose();
    if (!inAnApplet) {
      System.exit(0);
    }
  }

  //
  // Move the keyboard focus to the password field on window activation.
  //

  public void windowActivated(WindowEvent evt) {
    if (vncFrame.isAncestorOf(authenticator))
      authenticator.moveFocusToPasswordField();
  }

  //
  // Ignore window events we're not interested in.
  //

  public void windowDeactivated (WindowEvent evt) {}
  public void windowOpened(WindowEvent evt) {}
  public void windowClosed(WindowEvent evt) {}
  public void windowIconified(WindowEvent evt) {}
  public void windowDeiconified(WindowEvent evt) {}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲性图库| 国产丶欧美丶日本不卡视频| 蜜臀久久99精品久久久久久9| 成人va在线观看| 2014亚洲片线观看视频免费| 亚洲一区二区3| jvid福利写真一区二区三区| 日韩欧美国产综合| 亚洲成人福利片| 91在线视频在线| 欧美—级在线免费片| 美女一区二区在线观看| 欧美日韩在线播放一区| 日韩毛片精品高清免费| 国产电影精品久久禁18| 精品盗摄一区二区三区| 奇米综合一区二区三区精品视频| 日本精品一区二区三区高清| 国产精品素人一区二区| 国产一区二区电影| 精品国产乱码久久久久久1区2区| 奇米综合一区二区三区精品视频| 欧美日韩视频一区二区| 亚洲国产精品久久艾草纯爱| 91在线免费播放| 亚洲伦理在线精品| 国产成人午夜99999| 亚洲精品一线二线三线 | 欧美一区二区在线播放| 亚洲成av人片在线| 欧美欧美欧美欧美首页| 香蕉加勒比综合久久| 欧美性大战久久久| 亚洲成人综合视频| 91精品免费观看| 日韩在线a电影| 日韩一卡二卡三卡四卡| 久久精品久久综合| 久久久久久久久久久99999| 国产老肥熟一区二区三区| 国产亚洲美州欧州综合国| 国产高清精品在线| 日韩一区日韩二区| 色欧美日韩亚洲| 日日骚欧美日韩| 久久丝袜美腿综合| heyzo一本久久综合| 亚洲码国产岛国毛片在线| 欧美日韩一二区| 乱一区二区av| 国产精品情趣视频| 91黄色在线观看| 蜜桃久久av一区| 国产精品视频第一区| 一本色道亚洲精品aⅴ| 亚洲成年人影院| 26uuu亚洲| 色婷婷一区二区| 美国十次了思思久久精品导航| 精品久久久久久久久久久院品网 | 欧美午夜一区二区三区| 首页国产丝袜综合| 久久久精品国产免大香伊| 成人性生交大片免费看在线播放| 悠悠色在线精品| 日韩视频在线一区二区| 成人av在线网站| 日韩精品电影在线观看| 欧美国产精品中文字幕| 91国偷自产一区二区三区成为亚洲经典| 首页综合国产亚洲丝袜| 国产精品热久久久久夜色精品三区| 欧美日韩美女一区二区| 成人精品免费网站| 蜜臀av一区二区| 亚洲精品成人天堂一二三| 久久在线观看免费| 欧美日韩国产大片| 成人综合激情网| 免费的成人av| 一区二区欧美国产| 国产午夜精品一区二区三区四区| 日本韩国欧美在线| 国产成人在线电影| 美国三级日本三级久久99| 亚洲精品视频一区| 中国av一区二区三区| 亚洲精品一区在线观看| 欧美精选午夜久久久乱码6080| 丁香激情综合国产| 玖玖九九国产精品| 午夜精品免费在线| 日韩理论电影院| 国产三级精品三级| 久久综合狠狠综合| 欧美一区二区三区视频| 在线免费观看一区| 91视视频在线直接观看在线看网页在线看| 久久精品国产精品亚洲精品| 亚洲观看高清完整版在线观看| 国产欧美日韩不卡免费| 精品第一国产综合精品aⅴ| 欧美一二三区精品| 91.com在线观看| 欧美性大战久久久久久久蜜臀| 99视频国产精品| 99视频一区二区三区| 成人一区二区视频| 国产精品一区二区果冻传媒| 韩国精品一区二区| 久久国产精品无码网站| 裸体在线国模精品偷拍| 美美哒免费高清在线观看视频一区二区 | 国产日产精品一区| 久久久久9999亚洲精品| 国产拍欧美日韩视频二区| 精品久久久久久久久久久院品网| 日韩一区二区三区四区五区六区| 91精品国产91热久久久做人人| 欧美高清性hdvideosex| 91麻豆精品91久久久久同性| 欧美一区二区三区四区五区| 精品福利一区二区三区免费视频| 欧美精品一区二区三区在线| 久久久久久免费| 欧美国产激情二区三区| 《视频一区视频二区| 亚洲综合免费观看高清完整版在线| 亚洲免费视频成人| 天堂蜜桃91精品| 日本成人在线视频网站| 国产在线麻豆精品观看| 成人免费三级在线| 欧美日韩精品一区二区在线播放| 欧美精品乱码久久久久久按摩| 日韩欧美123| 国产午夜精品理论片a级大结局| 国产女同互慰高潮91漫画| 国产精品久久久久久久久久久免费看| 亚洲色图色小说| 三级影片在线观看欧美日韩一区二区| 免费黄网站欧美| 懂色av一区二区夜夜嗨| 在线观看日韩一区| 日韩免费性生活视频播放| 久久久久国产精品免费免费搜索| 国产精品久久久久三级| 五月天一区二区三区| 国产在线精品一区二区| 色婷婷精品久久二区二区蜜臀av| 在线播放/欧美激情| 中文字幕国产一区二区| 夜夜精品浪潮av一区二区三区| 亚洲一区在线观看网站| 国产中文一区二区三区| 欧美在线综合视频| 久久久噜噜噜久久人人看 | 中文字幕一区二区三| 日本91福利区| 91色视频在线| 久久影音资源网| 午夜视频在线观看一区二区三区| 韩国女主播一区二区三区| 欧美网站一区二区| 国产精品另类一区| 久久精品国产网站| 欧美三级在线视频| 综合在线观看色| 九色porny丨国产精品| 在线观看不卡一区| 中文字幕免费不卡在线| 久久99热99| 欧美日韩视频一区二区| 亚洲色欲色欲www在线观看| 国产一区二区h| 欧美电视剧在线看免费| 午夜精品久久久久久久99樱桃| 成人免费视频一区二区| 精品国产91亚洲一区二区三区婷婷| 一区二区三区欧美亚洲| 国产不卡一区视频| 久久一区二区三区四区| 日本91福利区| 欧美一级片免费看| 亚洲成va人在线观看| 欧美性淫爽ww久久久久无| **性色生活片久久毛片| 国产成人亚洲综合a∨婷婷图片 | 精品综合免费视频观看| 日韩一区二区三免费高清| 亚洲国产中文字幕| 欧洲国产伦久久久久久久| 最新不卡av在线| 91一区一区三区| 日韩美女啊v在线免费观看| av成人动漫在线观看| 国产精品视频麻豆| 99re66热这里只有精品3直播| 亚洲欧美一区二区视频| 99久久久无码国产精品|