MT Manager v2.15.3版本的 MD5 值为:27f0d62ac7123fbbaefff319fdab9f13
以下内容为反编译后的 C2792.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 C2792 implements Closeable {
public C13606 f10145;
public boolean f10146 = false;
public final String f10147;
public SecureRandom f10148;
public final String f10149;
public C11033 f10150;
public final int f10151;
public C14821 f10152;
public C5980 f10153;
public Vector f10154;
public C13761 f10155;
public final synchronized boolean m7903(String str, String str2) {
boolean m14971;
if (this.f10145 != null) {
if (!this.f10146) {
if (this.f10153 == null) {
this.f10153 = new C5980(this.f10145);
}
if (this.f10150 == null) {
this.f10150 = new C11033(this.f10145);
}
if (str == null) {
throw new IllegalArgumentException("user argument is null");
}
if (str2 == null) {
throw new IllegalArgumentException("password argument is null");
}
m14971 = this.f10153.m14971(str, str2);
this.f10146 = m14971;
} else {
throw new IllegalStateException("Connection is already authenticated!");
}
} else {
throw new IllegalStateException("Connection is not established!");
}
return m14971;
}
public final synchronized boolean m7904(String str, char[] cArr) {
boolean m14973;
if (this.f10145 != null) {
if (!this.f10146) {
if (this.f10153 == null) {
this.f10153 = new C5980(this.f10145);
}
if (this.f10150 == null) {
this.f10150 = new C11033(this.f10145);
}
if (str == null) {
throw new IllegalArgumentException("user argument is null");
}
if (cArr == null) {
throw new IllegalArgumentException("pemPrivateKey argument is null");
}
m14973 = this.f10153.m14973(str, cArr, m7901());
this.f10146 = m14973;
} else {
throw new IllegalStateException("Connection is already authenticated!");
}
} else {
throw new IllegalStateException("Connection is not established!");
}
return m14973;
}
public final synchronized C14401 m7905() {
?? obj;
if (this.f10145 != null) {
if (this.f10146) {
C11033 c11033 = this.f10150;
m7901();
obj = new Object();
obj.f42943 = false;
obj.f42945 = false;
obj.f42942 = c11033;
obj.f42944 = c11033.m24342();
} 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 void m7906() {
if (this.f10145 != null) {
if (!this.f10146) {
throw new IllegalStateException("The connection is not authenticated.");
}
this.f10150.m24349();
} else {
throw new IllegalStateException("You need to establish a connection first.");
}
}
public final synchronized boolean m7908() {
return this.f10146;
}
private final SecureRandom m7901() {
SecureRandom secureRandom;
if (this.f10148 == null) {
try {
secureRandom = SecureRandom.getInstance("SHA1PRNG");
} catch (NoSuchAlgorithmException unused) {
secureRandom = new SecureRandom();
}
this.f10148 = secureRandom;
}
return this.f10148;
}
public final int m7902() {
C11033 c11033 = this.f10150;
if (c11033 == null) {
return 0;
}
return c11033.m24333();
}
public final synchronized void m7907() {
if (this.f10145 == null) {
?? obj = new Object();
obj.f33732 = false;
obj.f33733 = false;
C13606 c13606 = new C13606(this.f10149, this.f10151, this.f10147);
this.f10145 = c13606;
c13606.m28862(this.f10154);
synchronized (this.f10145) {
}
try {
try {
try {
RunnableC6869 m24436 = C11080.m24436(System.currentTimeMillis() + 60000, new RunnableC7002(this, obj));
try {
this.f10145.m28866(this.f10152, this.f10155, m7901());
this.f10145.m28872();
this.f10145.m28860();
C11080.m24437(m24436);
synchronized (obj) {
if (obj.f33733) {
throw new IOException("This exception will be replaced by the one below =)");
}
obj.f33732 = true;
}
} catch (SocketTimeoutException e) {
throw ((SocketTimeoutException) new SocketTimeoutException("The connect() operation on the socket timed out.").initCause(e));
}
} catch (IOException e2) {
m7899(new Throwable("There was a problem during connect.").initCause(e2));
synchronized (obj) {
if (obj.f33733) {
throw new SocketTimeoutException("The kexTimeout (60000 ms) expired.");
}
if (e2 instanceof C12897) {
throw e2;
}
throw ((IOException) new IOException("There was a problem while connecting to " + this.f10149 + ":" + this.f10151).initCause(e2));
}
}
} catch (Throwable th) {
if (0 != 0) {
C11080.m24437(null);
synchronized (obj) {
if (obj.f33733) {
throw new IOException("This exception will be replaced by the one below =)");
}
obj.f33732 = true;
}
}
throw th;
}
} catch (SocketTimeoutException e3) {
throw e3;
}
} else {
throw new IOException("Connection to " + this.f10149 + " is already in connected state!");
}
}
public C2792(String str, int i) {
?? obj = new Object();
int i2 = C13464.f40246;
obj.f43974 = 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.f43973 = C13464.m28656();
obj.f43969 = C5558.m14007();
obj.f43970 = C5558.m14007();
obj.f43972 = C4248.m11143();
obj.f43971 = C4248.m11143();
this.f10152 = obj;
this.f10155 = new Object();
this.f10154 = new Vector();
this.f10149 = str;
this.f10151 = i;
this.f10147 = null;
}
@Override
public final synchronized void close() {
m7899(new Throwable("Closed due to user request."));
}
public void m7899(Throwable th) {
C11033 c11033 = this.f10150;
if (c11033 != null) {
c11033.m24345();
}
C13606 c13606 = this.f10145;
if (c13606 != null) {
c13606.m28861(th, true);
this.f10145 = null;
}
this.f10153 = null;
this.f10150 = null;
this.f10146 = false;
}
}