code
stringlengths
3
1.18M
language
stringclasses
1 value
package com.trilead.ssh2; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; /** * A very basic <code>SCPClien...
Java
package com.trilead.ssh2; import java.io.IOException; /** * May be thrown upon connect() if a HTTP proxy is being used. * * @see Connection#connect() * @see Connection#setProxyData(ProxyData) * * @author Christian Plattner, plattner@trilead.com * @version $Id: HTTPProxyException.java,v 1.1 2007/...
Java
package com.trilead.ssh2.sftp; /** * * SFTP Error Codes * * @author Christian Plattner, plattner@trilead.com * @version $Id: ErrorCodes.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ * */ public class ErrorCodes { public static final int SSH_FX_OK = 0; public static final int SSH_FX_EOF = 1; p...
Java
package com.trilead.ssh2.sftp; /** * * Values for the 'text-hint' field in the SFTP ATTRS data type. * * @author Christian Plattner, plattner@trilead.com * @version $Id: AttrTextHints.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ * */ public class AttrTextHints { /** * The server knows the fi...
Java
package com.trilead.ssh2.sftp; /** * * SFTP Attribute Bits for the "attrib-bits" and "attrib-bits-valid" fields * of the SFTP ATTR data type. * <p> * Yes, these are the "attrib-bits", even though they have "_FLAGS_" in * their name. Don't ask - I did not invent it. * <p> * "<i>These fields, taken ...
Java
package com.trilead.ssh2.sftp; /** * * Types for the 'type' field in the SFTP ATTRS data type. * <p> * "<i>On a POSIX system, these values would be derived from the mode field * of the stat structure. SPECIAL should be used for files that are of * a known type which cannot be expressed in the protoco...
Java
package com.trilead.ssh2.sftp; /** * * Attribute Flags. The 'valid-attribute-flags' field in * the SFTP ATTRS data type specifies which of the fields are actually present. * * @author Christian Plattner, plattner@trilead.com * @version $Id: AttribFlags.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ *...
Java
package com.trilead.ssh2.sftp; /** * * SFTP Open Flags. * * The following table is provided to assist in mapping POSIX semantics * to equivalent SFTP file open parameters: * <p> * TODO: This comment should be moved to the open method. * <p> * <ul> * <li>O_RDONLY * <ul><li>desired-access = RE...
Java
package com.trilead.ssh2.sftp; /** * * SFTP Paket Types * * @author Christian Plattner, plattner@trilead.com * @version $Id: Packet.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ * */ public class Packet { public static final int SSH_FXP_INIT = 1; public static final int SSH_FXP_VERSION = 2; p...
Java
package com.trilead.ssh2.sftp; /** * * Permissions for the 'permissions' field in the SFTP ATTRS data type. * <p> * "<i>The 'permissions' field contains a bit mask specifying file permissions. * These permissions correspond to the st_mode field of the stat structure * defined by POSIX [IEEE.1003-1.199...
Java
/* * ConnectBot: simple, powerful, open-source SSH client for Android * Copyright 2007 Kenny Root, Jeffrey Sharkey * * Licensed 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.a...
Java
/* * ConnectBot: simple, powerful, open-source SSH client for Android * Copyright 2007 Kenny Root, Jeffrey Sharkey * * Licensed 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.a...
Java
/* * ConnectBot: simple, powerful, open-source SSH client for Android * Copyright 2007 Kenny Root, Jeffrey Sharkey * * Licensed 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.a...
Java
/* * ConnectBot: simple, powerful, open-source SSH client for Android * Copyright 2007 Kenny Root, Jeffrey Sharkey * * Licensed 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.a...
Java
package com.trilead.ssh2; /** * A <code>SFTPv3FileAttributes</code> object represents detail information * about a file on the server. Not all fields may/must be present. * * @author Christian Plattner, plattner@trilead.com * @version $Id: SFTPv3FileAttributes.java,v 1.2 2008/04/01 12:38:09 cplattne Exp...
Java
package com.trilead.ssh2; /** * A <code>SFTPv3FileHandle</code>. * * @author Christian Plattner, plattner@trilead.com * @version $Id: SFTPv3FileHandle.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public class SFTPv3FileHandle { final SFTPv3Client client; final byte[] fileHandle; boolean is...
Java
package com.trilead.ssh2; import java.util.Map; /** * AuthAgentCallback. * * @author Kenny Root * @version $Id$ */ public interface AuthAgentCallback { /** * @return array of blobs containing the OpenSSH-format encoded public keys */ Map<String,byte[]> retrieveIdentities(); /** * @param key A <code>RS...
Java
package com.trilead.ssh2.packets; import java.io.IOException; import java.math.BigInteger; /** * PacketKexDHReply. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketKexDHReply.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketKexDHReply { byte[] payload...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketServiceRequest. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketServiceRequest.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketServiceRequest { byte[] payload; String service...
Java
package com.trilead.ssh2.packets; import com.trilead.ssh2.DHGexParameters; /** * PacketKexDhGexRequest. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketKexDhGexRequest.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketKexDhGexRequest { byte[] payload; ...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketUserauthRequestPassword. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketUserauthRequestNone.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketUserauthRequestNone { byte[] payload;...
Java
package com.trilead.ssh2.packets; import java.io.UnsupportedEncodingException; import java.math.BigInteger; /** * TypesWriter. * * @author Christian Plattner, plattner@trilead.com * @version $Id: TypesWriter.java,v 1.2 2008/04/01 12:38:09 cplattne Exp $ */ public class TypesWriter { byte arr[]; ...
Java
package com.trilead.ssh2.packets; import java.math.BigInteger; /** * PacketKexDhGexInit. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketKexDhGexInit.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketKexDhGexInit { byte[] payload; BigInteger e; p...
Java
package com.trilead.ssh2.packets; import java.io.IOException; import java.math.BigInteger; /** * PacketKexDhGexGroup. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketKexDhGexGroup.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketKexDhGexGroup { byte[...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketChannelWindowAdjust. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketChannelWindowAdjust.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketChannelWindowAdjust { byte[] payload; ...
Java
package com.trilead.ssh2.packets; import java.io.IOException; import java.math.BigInteger; /** * PacketKexDhGexReply. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketKexDhGexReply.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketKexDhGexReply { byt...
Java
package com.trilead.ssh2.packets; /** * PacketGlobalCancelForwardRequest. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketGlobalCancelForwardRequest.java,v 1.1 2007/10/15 12:49:55 * cplattne Exp $ */ public class PacketGlobalCancelForwardRequest { byte[] payload...
Java
package com.trilead.ssh2.packets; /** * PacketSessionSubsystemRequest. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketSessionSubsystemRequest.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketSessionSubsystemRequest { byte[] payload; public int recip...
Java
package com.trilead.ssh2.packets; /** * PacketSessionExecCommand. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketSessionExecCommand.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketSessionExecCommand { byte[] payload; public int recipientChannelID; ...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketUserauthBanner. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketUserauthFailure.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketUserauthFailure { byte[] payload; String[] a...
Java
package com.trilead.ssh2.packets; /** * PacketSessionStartShell. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketSessionStartShell.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketSessionStartShell { byte[] payload; public int recipientChannelID; p...
Java
package com.trilead.ssh2.packets; import java.io.IOException; import java.math.BigInteger; import com.trilead.ssh2.util.Tokenizer; /** * TypesReader. * * @author Christian Plattner, plattner@trilead.com * @version $Id: TypesReader.java,v 1.2 2008/04/01 12:38:09 cplattne Exp $ */ public class T...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketUserauthRequestPassword. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketUserauthRequestPassword.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketUserauthRequestPassword { byte[] ...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketChannelOpenFailure. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketChannelOpenFailure.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketChannelOpenFailure { byte[] payload; pu...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketNewKeys. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketNewKeys.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketNewKeys { byte[] payload; public PacketNewKeys() { } ...
Java
package com.trilead.ssh2.packets; /** * PacketGlobalAuthAgent. * * @author Kenny Root, kenny@the-b.org * @version $Id$ */ public class PacketChannelAuthAgentReq { byte[] payload; public int recipientChannelID; public PacketChannelAuthAgentReq(int recipientChannelID) { this.recipientChannelID = recipientCh...
Java
package com.trilead.ssh2.packets; public class PacketSessionPtyResize { byte[] payload; public int recipientChannelID; public int width; public int height; public int pixelWidth; public int pixelHeight; public PacketSessionPtyResize(int recipientChannelID, int width, int height, int pixelWidth, int pixelHeigh...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketUserauthRequestPublicKey. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketUserauthRequestPublicKey.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketUserauthRequestPublicKey { byte...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketIgnore. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketIgnore.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketIgnore { byte[] payload; byte[] data; public void setData...
Java
package com.trilead.ssh2.packets; /** * Packets. * * @author Christian Plattner, plattner@trilead.com * @version $Id: Packets.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class Packets { public static final int SSH_MSG_DISCONNECT = 1; public static final int SSH_MSG_IGNORE = 2; public...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketUserauthInfoRequest. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketUserauthInfoRequest.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketUserauthInfoRequest { byte[] payload; ...
Java
package com.trilead.ssh2.packets; /** * PacketUserauthRequestInteractive. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketUserauthRequestInteractive.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketUserauthRequestInteractive { byte[] payload; String ...
Java
package com.trilead.ssh2.packets; /** * PacketChannelTrileadPing. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketChannelTrileadPing.java,v 1.1 2008/03/03 07:01:36 * cplattne Exp $ */ public class PacketChannelTrileadPing { byte[] payload; public int recipie...
Java
package com.trilead.ssh2.packets; /** * PacketOpenDirectTCPIPChannel. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketOpenDirectTCPIPChannel.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketOpenDirectTCPIPChannel { byte[] payload; int channelID; in...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketOpenSessionChannel. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketOpenSessionChannel.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketOpenSessionChannel { byte[] payload; in...
Java
package com.trilead.ssh2.packets; /** * PacketSessionX11Request. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketSessionX11Request.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketSessionX11Request { byte[] payload; public int recipientChannelID; p...
Java
package com.trilead.ssh2.packets; import com.trilead.ssh2.DHGexParameters; /** * PacketKexDhGexRequestOld. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketKexDhGexRequestOld.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketKexDhGexRequestOld { byte[] ...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketUserauthBanner. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketUserauthBanner.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketUserauthBanner { byte[] payload; String message...
Java
package com.trilead.ssh2.packets; /** * PacketUserauthInfoResponse. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketUserauthInfoResponse.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketUserauthInfoResponse { byte[] payload; String[] responses; p...
Java
package com.trilead.ssh2.packets; /** * PacketSessionPtyRequest. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketSessionPtyRequest.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketSessionPtyRequest { byte[] payload; public int recipientChannelID; p...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketDisconnect. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketDisconnect.java,v 1.2 2008/04/01 12:38:09 cplattne Exp $ */ public class PacketDisconnect { byte[] payload; int reason; String des...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketServiceAccept. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketServiceAccept.java,v 1.2 2008/04/01 12:38:09 cplattne Exp $ */ public class PacketServiceAccept { byte[] payload; String serviceN...
Java
package com.trilead.ssh2.packets; import java.math.BigInteger; /** * PacketKexDHInit. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketKexDHInit.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketKexDHInit { byte[] payload; BigInteger e; public Pac...
Java
package com.trilead.ssh2.packets; import java.io.IOException; /** * PacketChannelOpenConfirmation. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketChannelOpenConfirmation.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketChannelOpenConfirmation { byte[] ...
Java
package com.trilead.ssh2.packets; import java.io.IOException; import java.security.SecureRandom; import com.trilead.ssh2.compression.CompressionFactory; import com.trilead.ssh2.crypto.CryptoWishList; import com.trilead.ssh2.transport.KexParameters; /** * PacketKexInit. * * @author Christian Platt...
Java
package com.trilead.ssh2.packets; /** * PacketGlobalTrileadPing. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketGlobalTrileadPing.java,v 1.1 2008/03/03 07:01:36 cplattne Exp $ */ public class PacketGlobalTrileadPing { byte[] payload; public PacketGlobalTrileadPing() ...
Java
package com.trilead.ssh2.packets; /** * PacketGlobalForwardRequest. * * @author Christian Plattner, plattner@trilead.com * @version $Id: PacketGlobalForwardRequest.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $ */ public class PacketGlobalForwardRequest { byte[] payload; public boolean wantReply;...
Java
package com.trilead.ssh2; import java.io.IOException; import java.net.InetSocketAddress; import com.trilead.ssh2.channel.ChannelManager; import com.trilead.ssh2.channel.LocalAcceptThread; /** * A <code>LocalPortForwarder</code> forwards TCP/IP connections to a local * port via the secure tunnel to an...
Java
package com.trilead.ssh2; import java.io.CharArrayWriter; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.net.InetSocketAddress; import java.net.SocketTimeoutException; import java.security.SecureRandom; import java.util.Vector; import com.trilead.ssh2.auth.Authent...
Java
package com.trilead.ssh2; /** * A callback interface used to implement a client specific method of checking * server host keys. * * @author Christian Plattner, plattner@trilead.com * @version $Id: ServerHostKeyVerifier.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public interface ServerHostKeyV...
Java
package com.trilead.ssh2.auth; import java.io.IOException; import java.security.SecureRandom; import java.util.Vector; import com.trilead.ssh2.InteractiveCallback; import com.trilead.ssh2.crypto.PEMDecoder; import com.trilead.ssh2.packets.PacketServiceAccept; import com.trilead.ssh2.packets.PacketServiceRe...
Java
package com.trilead.ssh2; import java.io.IOException; import java.io.InputStream; /** * A <code>StreamGobbler</code> is an InputStream that uses an internal worker * thread to constantly consume input from another InputStream. It uses a buffer * to store the consumed data. The buffer size is automaticall...
Java
package com.trilead.ssh2; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.SecureRandom; import com.trilead.ssh2.channel.Channel; import com.trilead.ssh2.channel.ChannelManager; import com.trilead.ssh2.channel.X11ServerData; /** * A <code>Sess...
Java
package com.trilead.ssh2; import java.io.BufferedReader; import java.io.CharArrayReader; import java.io.CharArrayWriter; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.RandomAccessFile; import java.io.UnsupportedEncodingException; import java.net.InetAddress; im...
Java
package com.trilead.ssh2; import java.io.IOException; import com.trilead.ssh2.sftp.ErrorCodes; /** * Used in combination with the SFTPv3Client. This exception wraps * error messages sent by the SFTP server. * * @author Christian Plattner, plattner@trilead.com * @version $Id: SFTPException.java,v...
Java
package com.trilead.ssh2; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import com.trilead.ssh2.channel.Channel; import com.trilead.ssh2.channel.ChannelManager; import com.trilead.ssh2.channel.LocalAcceptThread; /** * A <code>LocalStreamForwarder</code> forwards...
Java
/* * ConnectBot: simple, powerful, open-source SSH client for Android * Copyright 2007 Kenny Root, Jeffrey Sharkey * * Licensed 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.a...
Java
package com.trilead.ssh2.channel; /** * IChannelWorkerThread. * * @author Christian Plattner, plattner@trilead.com * @version $Id: IChannelWorkerThread.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ interface IChannelWorkerThread { public void stopWorking(); }
Java
package com.trilead.ssh2.channel; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; import com.trilead.ssh2.log.Logger; /** * RemoteX11AcceptThread. * * @author Christian Plattner, plattner@trilead.com * @version $Id: RemoteX11AcceptThr...
Java
package com.trilead.ssh2.channel; import java.io.IOException; import java.util.HashMap; import java.util.Vector; import com.trilead.ssh2.AuthAgentCallback; import com.trilead.ssh2.ChannelCondition; import com.trilead.ssh2.log.Logger; import com.trilead.ssh2.packets.PacketChannelAuthAgentReq; import com.tr...
Java
package com.trilead.ssh2.channel; /** * RemoteForwardingData. Data about a requested remote forwarding. * * @author Christian Plattner, plattner@trilead.com * @version $Id: RemoteForwardingData.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public class RemoteForwardingData { public String bindAdd...
Java
package com.trilead.ssh2.channel; /** * Channel. * * @author Christian Plattner, plattner@trilead.com * @version $Id: Channel.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public class Channel { /* * OK. Here is an important part of the JVM Specification: * (http://java.sun.com/docs/books/v...
Java
package com.trilead.ssh2.channel; import java.io.IOException; import java.io.InputStream; /** * ChannelInputStream. * * @author Christian Plattner, plattner@trilead.com * @version $Id: ChannelInputStream.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public final class ChannelInputStream extends ...
Java
/* * ConnectBot: simple, powerful, open-source SSH client for Android * Copyright 2007 Kenny Root, Jeffrey Sharkey * * Licensed 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.a...
Java
package com.trilead.ssh2.channel; import java.io.IOException; import java.io.OutputStream; /** * ChannelOutputStream. * * @author Christian Plattner, plattner@trilead.com * @version $Id: ChannelOutputStream.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public final class ChannelOutputStream extend...
Java
package com.trilead.ssh2.channel; import java.io.IOException; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; /** * LocalAcceptThread. * * @author Christian Plattner, plattner@trilead.com * @version $Id: LocalAcceptThread.java,v 1.1 2007/10/15 12:49:56 cplatt...
Java
/* * ConnectBot: simple, powerful, open-source SSH client for Android * Copyright 2007 Kenny Root, Jeffrey Sharkey * * Licensed 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.a...
Java
package com.trilead.ssh2.channel; import java.io.IOException; import java.net.Socket; import com.trilead.ssh2.log.Logger; /** * RemoteAcceptThread. * * @author Christian Plattner, plattner@trilead.com * @version $Id: RemoteAcceptThread.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public cl...
Java
package com.trilead.ssh2.channel; /** * X11ServerData. Data regarding an x11 forwarding target. * * @author Christian Plattner, plattner@trilead.com * @version $Id: X11ServerData.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ * */ public class X11ServerData { public String hostname; public int po...
Java
package com.trilead.ssh2.channel; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; /** * A StreamForwarder forwards data between two given streams. * If two StreamForwarder threads are used (one for each direction) * then one can be configure...
Java
package com.trilead.ssh2; /** * An interface which needs to be implemented if you * want to capture debugging messages. * * @see Connection#enableDebugging(boolean, DebugLogger) * * @author Christian Plattner, plattner@trilead.com * @version $Id: DebugLogger.java,v 1.1 2008/03/03 07:01:36 cplattne Ex...
Java
package com.trilead.ssh2.log; import com.trilead.ssh2.DebugLogger; /** * Logger - a very simple logger, mainly used during development. * Is not based on log4j (to reduce external dependencies). * However, if needed, something like log4j could easily be * hooked in. * <p> * For speed reasons, the st...
Java
package com.trilead.ssh2.signature; import java.math.BigInteger; /** * RSAPublicKey. * * @author Christian Plattner, plattner@trilead.com * @version $Id: RSAPublicKey.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $ */ public class RSAPublicKey { BigInteger e; BigInteger n; public RSAPublicKey(B...
Java
package com.trilead.ssh2.signature; import java.io.IOException; import java.math.BigInteger; import java.security.SecureRandom; import com.trilead.ssh2.crypto.digest.SHA1; import com.trilead.ssh2.log.Logger; import com.trilead.ssh2.packets.TypesReader; import com.trilead.ssh2.packets.TypesWriter; /** ...
Java
package com.trilead.ssh2.signature; import java.math.BigInteger; /** * RSAPrivateKey. * * @author Christian Plattner, plattner@trilead.com * @version $Id: RSAPrivateKey.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $ */ public class RSAPrivateKey { private BigInteger d; private BigInteger e; priv...
Java
package com.trilead.ssh2.signature; import java.math.BigInteger; /** * DSAPublicKey. * * @author Christian Plattner, plattner@trilead.com * @version $Id: DSAPublicKey.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $ */ public class DSAPublicKey { private BigInteger p; private BigInteger q; private...
Java
package com.trilead.ssh2.signature; import java.math.BigInteger; /** * RSASignature. * * @author Christian Plattner, plattner@trilead.com * @version $Id: RSASignature.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $ */ public class RSASignature { BigInteger s; public BigInteger getS() { ...
Java
package com.trilead.ssh2.signature; import java.io.IOException; import java.math.BigInteger; import com.trilead.ssh2.crypto.SimpleDERReader; import com.trilead.ssh2.crypto.digest.SHA1; import com.trilead.ssh2.log.Logger; import com.trilead.ssh2.packets.TypesReader; import com.trilead.ssh2.packets.TypesWrit...
Java
package com.trilead.ssh2.signature; import java.math.BigInteger; /** * DSAPrivateKey. * * @author Christian Plattner, plattner@trilead.com * @version $Id: DSAPrivateKey.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $ */ public class DSAPrivateKey { private BigInteger p; private BigInteger q; priv...
Java
package com.trilead.ssh2.signature; import java.math.BigInteger; /** * DSASignature. * * @author Christian Plattner, plattner@trilead.com * @version $Id: DSASignature.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $ */ public class DSASignature { private BigInteger r; private BigInteger s; publi...
Java
package com.trilead.ssh2; /** * Contains constants that can be used to specify what conditions to wait for on * a SSH-2 channel (e.g., represented by a {@link Session}). * * @see Session#waitForCondition(int, long) * * @author Christian Plattner, plattner@trilead.com * @version $Id: ChannelCondition....
Java
package com.trilead.ssh2; /** * A <code>HTTPProxyData</code> object is used to specify the needed connection data * to connect through a HTTP proxy. * * @see Connection#setProxyData(ProxyData) * * @author Christian Plattner, plattner@trilead.com * @version $Id: HTTPProxyData.java,v 1.1 2007/10/15 ...
Java
package com.trilead.ssh2.transport; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import java.net.UnknownHostException; import java.security.SecureRandom; import java.util.Vector; ...
Java
package com.trilead.ssh2.transport; /** * NegotiateException. * * @author Christian Plattner, plattner@trilead.com * @version $Id: NegotiateException.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public class NegotiateException extends Exception { private static final long serialVersionUID = 368991...
Java
package com.trilead.ssh2.transport; import java.io.IOException; /** * MessageHandler. * * @author Christian Plattner, plattner@trilead.com * @version $Id: MessageHandler.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public interface MessageHandler { public void handleMessage(byte[] msg, int msgl...
Java
package com.trilead.ssh2.transport; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import com.trilead.ssh2.Connection; /** * ClientServerHello. * * @author Christian Plattner, plattner@trilead.com * @version $Id: C...
Java
package com.trilead.ssh2.transport; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.SecureRandom; import com.trilead.ssh2.compression.ICompressor; import com.trilead.ssh2.crypto.cipher.BlockCipher; import com.trilead.ssh2.crypto.cipher.CipherInputSt...
Java
package com.trilead.ssh2.transport; /** * NegotiatedParameters. * * @author Christian Plattner, plattner@trilead.com * @version $Id: NegotiatedParameters.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $ */ public class NegotiatedParameters { public boolean guessOK; public String kex_algo; public Stri...
Java
package com.trilead.ssh2.transport; import java.io.IOException; import java.security.SecureRandom; import com.trilead.ssh2.ConnectionInfo; import com.trilead.ssh2.DHGexParameters; import com.trilead.ssh2.ServerHostKeyVerifier; import com.trilead.ssh2.compression.CompressionFactory; import com.trilead.ssh2....
Java
package com.trilead.ssh2.transport; /** * KexParameters. * * @author Christian Plattner, plattner@trilead.com * @version $Id: KexParameters.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $ */ public class KexParameters { public byte[] cookie; public String[] kex_algorithms; public String[] server_hos...
Java