MT Manager v2.15.3版本的 MD5 值为:27f0d62ac7123fbbaefff319fdab9f13
以下内容为反编译后的 C0905.java 源代码,内容仅作参考
package l;
import android.annotation.SuppressLint;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.EditText;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import bin.mt.plus.Main;
import bin.mt.plus.R;
import com.google.android.material.textfield.TextInputLayout;
import java.io.IOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
public final class C0905 extends AbstractC4083 {
public String f4180;
public String f4181;
public int f4182;
public String f4183;
public String f4184;
public String f4185;
public String f4186;
@Override
public final String getName() {
return this.f4183;
}
@Override
public final void mo3075(String str) {
this.f4186 = str;
}
@Override
public final String mo3080() {
return "SMB";
}
public C0905(int i) {
super(i);
this.f4184 = "";
this.f4182 = 445;
this.f4185 = "";
this.f4180 = "";
this.f4181 = "";
this.f4186 = "";
this.f4183 = "";
}
public C0905(C6723 c6723) {
super(c6723);
this.f4184 = "";
this.f4182 = 445;
this.f4185 = "";
this.f4180 = "";
this.f4181 = "";
this.f4186 = "";
this.f4183 = "";
this.f4184 = c6723.m16304("1");
this.f4182 = c6723.m16305("2");
this.f4185 = c6723.m16304("3");
this.f4180 = c6723.m16304("4");
this.f4181 = c6723.m16304("5");
this.f4186 = c6723.m16304("6");
this.f4183 = c6723.m16304("7");
this.f13045 = c6723.m16299("8") && c6723.m16303("8");
this.f13044 = c6723.m16299("9") && c6723.m16303("9");
}
@Override
public final String mo3072() {
StringBuilder sb = new StringBuilder("smb://");
sb.append(this.f4180);
if (!TextUtils.isEmpty(this.f4185)) {
sb.append(":");
sb.append(this.f4185);
}
sb.append("@");
sb.append(this.f4184);
if (this.f4182 != 445) {
sb.append(":");
sb.append(this.f4182);
}
return sb.toString();
}
@Override
public final C6723 mo3078() {
C6723 mo3078 = super.mo3078();
mo3078.m16297(this.f4184, "1");
mo3078.m16297(Integer.valueOf(this.f4182), "2");
mo3078.m16297(this.f4185, "3");
mo3078.m16297(this.f4180, "4");
mo3078.m16297(this.f4181, "5");
mo3078.m16297(this.f4186, "6");
mo3078.m16297(this.f4183, "7");
mo3078.m16298("8", this.f13045);
mo3078.m16298("9", this.f13044);
return mo3078;
}
@Override
public final String mo3079() {
String str = "smb://" + this.f4180 + "@" + this.f4184;
return str.endsWith("/") ? C10499.m23458(str, 1, 0) : str;
}
@Override
public final void mo3076(AbstractC4083 abstractC4083) {
if (abstractC4083 instanceof C0905) {
C0905 c0905 = (C0905) abstractC4083;
this.f4184 = c0905.f4184;
this.f4182 = c0905.f4182;
this.f4185 = c0905.f4185;
this.f4180 = c0905.f4180;
this.f4181 = c0905.f4181;
this.f4186 = c0905.f4186;
this.f4183 = c0905.f4183;
this.f13045 = c0905.f13045;
this.f13044 = c0905.f13044;
}
}
@Override
public final AbstractC1136 mo3073(int i) {
return new C1325(i, clone());
}
public static InterfaceC13030 m3068(String str, String str2, String str3) {
if (TextUtils.isEmpty(str2) && TextUtils.isEmpty(str3)) {
return C1804.m5343().mo11028();
}
if (!str2.equals("guest") || !TextUtils.isEmpty(str3)) {
C1776 c1776 = new C1776(str, str2, str3);
C1804 m5343 = C1804.m5343();
m5343.getClass();
return new C7698(m5343, c1776);
}
return C1804.m5343().m11029();
}
@Override
public final C1949 getIcon() {
return C1949.f7266;
}
@Override
public final String mo3077() {
return C4043.m10765(new StringBuilder("smb@"), this.f4183, " ");
}
@Override
public final void mo3074(Main main) {
m3071(main, this);
}
public static void m3070(AbstractActivityC5501 abstractActivityC5501) {
m3071(abstractActivityC5501, new C0905(-1));
}
@SuppressLint({"SetTextI18n"})
public static void m3071(final AbstractActivityC5501 abstractActivityC5501, C0905 c0905) {
View m13929 = abstractActivityC5501.m13929(R.layout.MT_Protector_res_0x7f0c00cc);
TextView textView = (TextView) m13929.findViewById(R.id.MT_Protector_res_0x7f090480);
final EditText editText = (EditText) m13929.findViewById(R.id.MT_Protector_res_0x7f0901b7);
final EditText editText2 = (EditText) m13929.findViewById(R.id.MT_Protector_res_0x7f090328);
final EditText editText3 = (EditText) m13929.findViewById(R.id.MT_Protector_res_0x7f090117);
final EditText editText4 = (EditText) m13929.findViewById(R.id.MT_Protector_res_0x7f0904b2);
final EditText editText5 = (EditText) m13929.findViewById(R.id.MT_Protector_res_0x7f090315);
final EditText editText6 = (EditText) m13929.findViewById(R.id.MT_Protector_res_0x7f090362);
final EditText editText7 = (EditText) m13929.findViewById(R.id.MT_Protector_res_0x7f090361);
final C2478 c2478 = (C2478) m13929.findViewById(R.id.MT_Protector_res_0x7f0901b0);
final C2478 c24782 = (C2478) m13929.findViewById(R.id.MT_Protector_res_0x7f0902d8);
c24782.setOnCheckedChangeListener(new Object());
((TextInputLayout) m13929.findViewById(R.id.MT_Protector_res_0x7f090431)).setEndIconOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
final EditText editText8 = editText2;
final EditText editText9 = editText7;
final EditText editText10 = editText;
final ?? r9 = new InterfaceC14665() {
@Override
public final void accept(Object obj) {
C9326 c9326 = (C9326) obj;
editText10.setText(c9326.m21582());
editText8.setText(String.valueOf(c9326.m21584()));
editText9.setText(c9326.m21583());
}
};
AbstractActivityC5501 abstractActivityC55012 = AbstractActivityC5501.this;
View m139292 = abstractActivityC55012.m13929(R.layout.MT_Protector_res_0x7f0c00b4);
TextView textView2 = (TextView) m139292.findViewById(R.id.MT_Protector_res_0x7f090480);
textView2.setText(R.string.MT_Protector_res_0x7f110622);
final ProgressBar progressBar = (ProgressBar) m139292.findViewById(R.id.MT_Protector_res_0x7f090336);
progressBar.setVisibility(0);
ListView listView = (ListView) m139292.findViewById(R.id.MT_Protector_res_0x7f0901ff);
C10953.m24235(listView);
final ?? baseAdapter = new BaseAdapter();
baseAdapter.f13567 = Collections.emptyList();
baseAdapter.f13565 = textView2.getPaddingLeft();
baseAdapter.f13566 = C8895.m20897(8.0f);
String str = null;
listView.setDivider(null);
listView.setAdapter((ListAdapter) baseAdapter);
C11908 mo13926 = abstractActivityC55012.mo13926();
mo13926.m25776(m139292);
mo13926.m25785(R.string.MT_Protector_res_0x7f110131, null);
mo13926.m25786();
final DialogInterfaceC9382 m25791 = mo13926.m25791();
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public final void onItemClick(AdapterView adapterView, View view2, int i, long j) {
r9.accept((C9326) baseAdapter.f13567.get(i));
m25791.dismiss();
}
});
final C5115 c5115 = new C5115(m25791);
m25791.m21736(abstractActivityC55012, c5115.f15415, new InterfaceC13385() {
@Override
public final void mo1191(Object obj) {
List list = (List) obj;
if (list == null) {
list = Collections.emptyList();
}
boolean isEmpty = list.isEmpty();
ProgressBar progressBar2 = progressBar;
if (isEmpty) {
progressBar2.setVisibility(0);
} else {
progressBar2.setVisibility(8);
}
C4273 c4273 = baseAdapter;
c4273.f13567 = list;
c4273.notifyDataSetChanged();
}
});
C12357.f36474.execute(new Runnable() {
@Override
public final void run() {
C5115 c51152 = C5115.this;
try {
C8658 c8658 = new C8658();
try {
c8658.m20409(new C12694(c51152));
System.out.println("jmdns listener start");
while (true) {
DialogInterfaceC9382 dialogInterfaceC9382 = (DialogInterfaceC9382) c51152.f15413.get();
if (dialogInterfaceC9382 == null || !dialogInterfaceC9382.m21739()) {
break;
} else {
SystemClock.sleep(100L);
}
}
System.out.println("jmdns listener end");
c8658.close();
} finally {
}
} catch (IOException unused) {
}
}
});
try {
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
loop0: while (true) {
if (!networkInterfaces.hasMoreElements()) {
break;
}
Enumeration<InetAddress> inetAddresses = networkInterfaces.nextElement().getInetAddresses();
while (inetAddresses.hasMoreElements()) {
InetAddress nextElement = inetAddresses.nextElement();
if (!(nextElement instanceof Inet6Address)) {
String hostAddress = nextElement.getHostAddress();
if (!"127.0.0.1".equals(hostAddress)) {
str = hostAddress;
break loop0;
}
}
}
}
} catch (SocketException unused) {
}
if (str == null) {
return;
}
final String substring = str.substring(0, str.lastIndexOf(".") + 1);
final AtomicInteger atomicInteger = new AtomicInteger(2);
final ?? r2 = new Runnable() {
@Override
public final void run() {
C3431.m9441(C5115.this, atomicInteger, substring);
}
};
C12357.f36474.execute(new Runnable() {
@Override
public final void run() {
for (int i = 0; i < 32; i++) {
C12357.f36474.execute(r2);
SystemClock.sleep(50L);
}
}
});
}
});
textView.setText(C2490.m7201(c0905.f13043 == -1 ? R.string.MT_Protector_res_0x7f1103f4 : R.string.MT_Protector_res_0x7f110229).concat(" SMB"));
editText.setText(c0905.f4184);
editText2.setText(String.valueOf(c0905.f4182));
editText3.setText(c0905.f4185);
editText4.setText(c0905.f4180);
editText5.setText(c0905.f4181);
editText6.setText(c0905.f4186);
editText7.setText(c0905.f4183);
c2478.setChecked(c0905.f13045);
c24782.setChecked(c0905.f13044);
AbstractC4083.m10851(editText, editText7, new C7641(0, editText3));
AbstractC4083.m10851(editText3, editText7, new C11192(2, editText));
C11908 mo13926 = abstractActivityC5501.mo13926();
mo13926.m25776(m13929);
mo13926.m25785(R.string.MT_Protector_res_0x7f110439, null);
DialogInterfaceC9382 m10766 = C4043.m10766(mo13926, R.string.MT_Protector_res_0x7f11010c, null, R.string.MT_Protector_res_0x7f1104c9, null);
C2490.m7189(editText);
final ?? r1 = new InterfaceC2876() {
@Override
public final Object get() {
return C0905.m3067(editText, editText2, editText3, editText4, editText5, editText6, editText7, c2478, c24782);
}
};
m10766.m21741().setOnClickListener(new ViewOnClickListenerC7989(1, r1, c0905, m10766));
m10766.m21740().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
C0905 c09052 = (C0905) r1.get();
if (c09052 == null) {
return;
}
new C13536(abstractActivityC5501, c09052, editText4).m24985();
}
});
}
public static C0905 m3067(EditText editText, EditText editText2, EditText editText3, EditText editText4, EditText editText5, EditText editText6, EditText editText7, C2478 c2478, C2478 c24782) {
int i;
if (!AbstractC4083.m10858(editText)) {
return null;
}
C0905 c0905 = new C0905(-1);
c0905.f4184 = editText.getText().toString();
try {
i = Integer.parseInt(editText2.getText().toString());
} catch (NumberFormatException unused) {
i = 445;
}
c0905.f4182 = i;
c0905.f4185 = editText3.getText().toString();
c0905.f4180 = editText4.getText().toString();
c0905.f4181 = editText5.getText().toString();
c0905.f4186 = editText6.getText().toString();
c0905.f4183 = AbstractC4083.m10849(editText7, TextUtils.isEmpty(c0905.f4185) ? c0905.f4184 : c0905.f4185);
c0905.f13045 = c2478.isChecked();
c0905.f13044 = c24782.isChecked();
return c0905;
}
public static void m3069(InterfaceC2876 interfaceC2876, C0905 c0905, DialogInterfaceC9382 dialogInterfaceC9382) {
C0905 c09052 = (C0905) interfaceC2876.get();
if (c09052 == null) {
return;
}
if (c0905.f13043 == -1) {
C0905 c09053 = new C0905(AbstractC4083.m10855());
c09053.mo3076(c09052);
C0620.m2127(c09053);
} else {
c0905.mo3076(c09052);
C0620.m2134();
}
dialogInterfaceC9382.dismiss();
}
}