MT Manager v2.15.3版本的 MD5 值为:34ea5286e529d87838c6cae0a2220d93
以下内容为反编译后的 C1777.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 C1777 implements Closeable {
public C6988 f5541;
public final String f5542;
public SecureRandom f5543;
public C4555 f5544;
public final int f5545;
public C12723 f5546;
public C4654 f5547;
public boolean f5548 = false;
public C7830 f5549;
public final String f5550;
public Vector f5551;
public final synchronized boolean m5261(String str, String str2) {
boolean m27158;
if (this.f5544 != null) {
if (!this.f5548) {
if (this.f5546 == null) {
this.f5546 = new C12723(this.f5544);
}
if (this.f5549 == null) {
this.f5549 = new C7830(this.f5544);
}
if (str == null) {
throw new IllegalArgumentException("user argument is null");
}
if (str2 == null) {
throw new IllegalArgumentException("password argument is null");
}
m27158 = this.f5546.m27158(str, str2);
this.f5548 = m27158;
} else {
throw new IllegalStateException("Connection is already authenticated!");
}
} else {
throw new IllegalStateException("Connection is not established!");
}
return m27158;
}
public final synchronized boolean m5262(String str, char[] cArr) {
boolean m27160;
if (this.f5544 != null) {
if (!this.f5548) {
if (this.f5546 == null) {
this.f5546 = new C12723(this.f5544);
}
if (this.f5549 == null) {
this.f5549 = new C7830(this.f5544);
}
if (str == null) {
throw new IllegalArgumentException("user argument is null");
}
if (cArr == null) {
throw new IllegalArgumentException("pemPrivateKey argument is null");
}
m27160 = this.f5546.m27160(str, cArr, m5257());
this.f5548 = m27160;
} else {
throw new IllegalStateException("Connection is already authenticated!");
}
} else {
throw new IllegalStateException("Connection is not established!");
}
return m27160;
}
public final synchronized boolean m5263() {
return this.f5548;
}
public final synchronized void m5265() {
if (this.f5544 != null) {
if (!this.f5548) {
throw new IllegalStateException("The connection is not authenticated.");
}
this.f5549.m18590();
} else {
throw new IllegalStateException("You need to establish a connection first.");
}
}
public final synchronized C6829 m5266() {
?? obj;
if (this.f5544 != null) {
if (this.f5548) {
C7830 c7830 = this.f5549;
m5257();
obj = new Object();
obj.f18372 = false;
obj.f18369 = false;
obj.f18370 = c7830;
obj.f18371 = c7830.m18601();
} 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;
}
private final SecureRandom m5257() {
SecureRandom secureRandom;
if (this.f5543 == null) {
try {
secureRandom = SecureRandom.getInstance("SHA1PRNG");
} catch (NoSuchAlgorithmException unused) {
secureRandom = new SecureRandom();
}
this.f5543 = secureRandom;
}
return this.f5543;
}
public final int m5260() {
C7830 c7830 = this.f5549;
if (c7830 == null) {
return 0;
}
return c7830.m18583();
}
public final synchronized void m5264() {
if (this.f5544 == null) {
?? obj = new Object();
obj.f21735 = false;
obj.f21736 = false;
C4555 c4555 = new C4555(this.f5550, this.f5545, this.f5542);
this.f5544 = c4555;
c4555.m11715(this.f5551);
synchronized (this.f5544) {
}
try {
try {
try {
RunnableC4088 m19262 = C8298.m19262(System.currentTimeMillis() + 60000, new RunnableC3461(this, obj));
try {
this.f5544.m11716(this.f5541, this.f5547, m5257());
this.f5544.m11721();
this.f5544.m11713();
C8298.m19263(m19262);
synchronized (obj) {
if (obj.f21736) {
throw new IOException("This exception will be replaced by the one below =)");
}
obj.f21735 = true;
}
} catch (SocketTimeoutException e) {
throw ((SocketTimeoutException) new SocketTimeoutException("The connect() operation on the socket timed out.").initCause(e));
}
} catch (IOException e2) {
m5258(new Throwable("There was a problem during connect.").initCause(e2));
synchronized (obj) {
if (obj.f21736) {
throw new SocketTimeoutException("The kexTimeout (60000 ms) expired.");
}
if (e2 instanceof C11881) {
throw e2;
}
throw ((IOException) new IOException("There was a problem while connecting to " + this.f5550 + ":" + this.f5545).initCause(e2));
}
}
} catch (Throwable th) {
if (0 != 0) {
C8298.m19263(null);
synchronized (obj) {
if (obj.f21736) {
throw new IOException("This exception will be replaced by the one below =)");
}
obj.f21735 = true;
}
}
throw th;
}
} catch (SocketTimeoutException e3) {
throw e3;
}
} else {
throw new IOException("Connection to " + this.f5550 + " is already in connected state!");
}
}
public C1777(String str, int i) {
?? obj = new Object();
int i2 = C12133.f35567;
obj.f19316 = 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.f19318 = C12133.m25934();
obj.f19317 = C6379.m15226();
obj.f19320 = C6379.m15226();
obj.f19319 = C11105.m23947();
obj.f19321 = C11105.m23947();
this.f5541 = obj;
this.f5547 = new Object();
this.f5551 = new Vector();
this.f5550 = str;
this.f5545 = i;
this.f5542 = null;
}
@Override
public final synchronized void close() {
m5258(new Throwable("Closed due to user request."));
}
public void m5258(Throwable th) {
C7830 c7830 = this.f5549;
if (c7830 != null) {
c7830.m18593();
}
C4555 c4555 = this.f5544;
if (c4555 != null) {
c4555.m11714(th, true);
this.f5544 = null;
}
this.f5546 = null;
this.f5549 = null;
this.f5548 = false;
}
}