MT Manager v2.15.3版本的 MD5 值为:1cbd6ee7afdac97645dd3a8c4751ecf0
以下内容为反编译后的 C3223.java 源代码,内容仅作参考
package l;
import java.io.Closeable;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Vector;
public final class C3223 implements Closeable {
public final String f9811;
public final int f9812;
public boolean f9813 = false;
public C12256 f9814;
public C3692 f9815;
public C7905 f9816;
public Vector f9817;
public final String f9818;
public SecureRandom f9819;
public C5471 f9820;
public C12542 f9821;
public final synchronized void m9171() {
if (this.f9814 != null) {
if (!this.f9813) {
throw new IllegalStateException("The connection is not authenticated.");
}
this.f9816.m18952();
} else {
throw new IllegalStateException("You need to establish a connection first.");
}
}
public final synchronized boolean m9173(String str, String str2) {
boolean m10108;
if (this.f9814 != null) {
if (!this.f9813) {
if (this.f9815 == null) {
this.f9815 = new C3692(this.f9814);
}
if (this.f9816 == null) {
this.f9816 = new C7905(this.f9814);
}
if (str == null) {
throw new IllegalArgumentException("user argument is null");
}
if (str2 == null) {
throw new IllegalArgumentException("password argument is null");
}
m10108 = this.f9815.m10108(str, str2);
this.f9813 = m10108;
} else {
throw new IllegalStateException("Connection is already authenticated!");
}
} else {
throw new IllegalStateException("Connection is not established!");
}
return m10108;
}
public final synchronized boolean m9174(String str, char[] cArr) {
boolean m10110;
if (this.f9814 != null) {
if (!this.f9813) {
if (this.f9815 == null) {
this.f9815 = new C3692(this.f9814);
}
if (this.f9816 == null) {
this.f9816 = new C7905(this.f9814);
}
if (str == null) {
throw new IllegalArgumentException("user argument is null");
}
if (cArr == null) {
throw new IllegalArgumentException("pemPrivateKey argument is null");
}
m10110 = this.f9815.m10110(str, cArr, m9170());
this.f9813 = m10110;
} else {
throw new IllegalStateException("Connection is already authenticated!");
}
} else {
throw new IllegalStateException("Connection is not established!");
}
return m10110;
}
public final synchronized C5377 m9176() {
?? obj;
if (this.f9814 != null) {
if (this.f9813) {
C7905 c7905 = this.f9816;
m9170();
obj = new Object();
obj.f17054 = false;
obj.f17056 = false;
obj.f17055 = c7905;
obj.f17057 = c7905.m18936();
} else {
throw new IllegalStateException("Cannot open session, connection is not authenticated.");
}
} else {
throw new IllegalStateException("Cannot open session, you need to establish a connection first.");
}
return obj;
}
public final synchronized boolean m9177() {
return this.f9813;
}
private final SecureRandom m9170() {
SecureRandom secureRandom;
if (this.f9819 == null) {
try {
secureRandom = SecureRandom.getInstance("SHA1PRNG");
} catch (NoSuchAlgorithmException unused) {
secureRandom = new SecureRandom();
}
this.f9819 = secureRandom;
}
return this.f9819;
}
public final int m9172() {
C7905 c7905 = this.f9816;
if (c7905 == null) {
return 0;
}
return c7905.m18938();
}
public final synchronized void m9175() {
if (this.f9814 == null) {
?? obj = new Object();
obj.f25387 = false;
obj.f25388 = false;
C12256 c12256 = new C12256(this.f9811, this.f9812, this.f9818);
this.f9814 = c12256;
c12256.m26714(this.f9817);
synchronized (this.f9814) {
}
try {
try {
try {
RunnableC9730 m19192 = C8046.m19192(System.currentTimeMillis() + 60000, new RunnableC9962(this, obj));
try {
this.f9814.m26717(this.f9820, this.f9821, m9170());
this.f9814.m26724();
this.f9814.m26712();
C8046.m19193(m19192);
synchronized (obj) {
if (obj.f25388) {
throw new IOException("This exception will be replaced by the one below =)");
}
obj.f25387 = true;
}
} catch (SocketTimeoutException e) {
throw ((SocketTimeoutException) new SocketTimeoutException("The connect() operation on the socket timed out.").initCause(e));
}
} catch (IOException e2) {
m9168(new Throwable("There was a problem during connect.").initCause(e2));
synchronized (obj) {
if (obj.f25388) {
throw new SocketTimeoutException("The kexTimeout (60000 ms) expired.");
}
if (e2 instanceof C15014) {
throw e2;
}
throw ((IOException) new IOException("There was a problem while connecting to " + this.f9811 + ":" + this.f9812).initCause(e2));
}
}
} catch (Throwable th) {
if (0 != 0) {
C8046.m19193(null);
synchronized (obj) {
if (obj.f25388) {
throw new IOException("This exception will be replaced by the one below =)");
}
obj.f25387 = true;
}
}
throw th;
}
} catch (SocketTimeoutException e3) {
throw e3;
}
} else {
throw new IOException("Connection to " + this.f9811 + " is already in connected state!");
}
}
public C3223(String str, int i) {
?? obj = new Object();
int i2 = C15063.f45285;
obj.f18137 = new String[]{"diffie-hellman-group-exchange-sha256", "diffie-hellman-group-exchange-sha1", "diffie-hellman-group14-sha1", "diffie-hellman-group1-sha1", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "curve25519-sha256", "curve25519-sha256@libssh.org"};
obj.f18139 = C15063.m31417();
obj.f18136 = C0418.m1676();
obj.f18134 = C0418.m1676();
obj.f18138 = C11320.m25208();
obj.f18135 = C11320.m25208();
this.f9820 = obj;
this.f9821 = new Object();
this.f9817 = new Vector();
this.f9811 = str;
this.f9812 = i;
this.f9818 = null;
}
@Override
public final synchronized void close() {
m9168(new Throwable("Closed due to user request."));
}
public void m9168(Throwable th) {
C7905 c7905 = this.f9816;
if (c7905 != null) {
c7905.m18946();
}
C12256 c12256 = this.f9814;
if (c12256 != null) {
c12256.m26713(th, true);
this.f9814 = null;
}
this.f9815 = null;
this.f9816 = null;
this.f9813 = false;
}
}