GalaxyVPN v1.2.3版本的 MD5 值为:642e5f69966a3849933084f3c0fba1d5
以下内容为反编译后的 IpLocation.java 源代码,内容仅作参考
package com.neko.ip.location;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.neko.ip.location.RequestNetwork;
import com.v2ray.ang.ui.BaseActivity;
import java.util.ArrayList;
import java.util.HashMap;
public class IpLocation extends BaseActivity {
private HashMap<String, Object> Map = new HashMap<>();
private ArrayList<HashMap<String, Object>> Maps = new ArrayList<>();
private RequestNetwork.RequestListener _req_request_listener;
private TextView city;
private TextView country;
private EditText edittext1;
private LinearLayout linear1;
private LinearLayout linear10;
private LinearLayout linear11;
private LinearLayout linear12;
private Button linear2;
private LinearLayout linear4;
private LinearLayout linear5;
private LinearLayout linear6;
private LinearLayout linear9;
private TextView region;
private RequestNetwork req;
private TextView textview2;
private TextView textview4;
private TextView textview6;
private TextView textview7;
private TextView textview8;
private TextView textview9;
private void initialize(Bundle bundle) {
this.linear1 = (LinearLayout) findViewById(getUwU("linear1", "id"));
this.linear11 = (LinearLayout) findViewById(getUwU("linear11", "id"));
this.linear10 = (LinearLayout) findViewById(getUwU("linear10", "id"));
this.linear9 = (LinearLayout) findViewById(getUwU("linear9", "id"));
this.linear2 = (Button) findViewById(getUwU("linear2", "id"));
this.linear12 = (LinearLayout) findViewById(getUwU("linear12", "id"));
this.edittext1 = (EditText) findViewById(getUwU("edittext1", "id"));
this.textview2 = (TextView) findViewById(getUwU("textview2", "id"));
this.linear4 = (LinearLayout) findViewById(getUwU("linear4", "id"));
this.linear6 = (LinearLayout) findViewById(getUwU("linear6", "id"));
this.linear5 = (LinearLayout) findViewById(getUwU("linear5", "id"));
this.textview4 = (TextView) findViewById(getUwU("textview4", "id"));
this.city = (TextView) findViewById(getUwU("city", "id"));
this.textview6 = (TextView) findViewById(getUwU("textview6", "id"));
this.region = (TextView) findViewById(getUwU("region", "id"));
this.textview7 = (TextView) findViewById(getUwU("textview7", "id"));
this.country = (TextView) findViewById(getUwU("country", "id"));
this.textview8 = (TextView) findViewById(getUwU("textview8", "id"));
this.textview9 = (TextView) findViewById(getUwU("textview9", "id"));
this.req = new RequestNetwork(this);
this.linear11.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
IpLocation ipLocation = IpLocation.this;
IpLocation.this.getApplicationContext();
((ClipboardManager) ipLocation.getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText("clipboard", IpLocation.this.textview9.getText().toString()));
}
});
this.linear2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
IpLocation.this._Aniqlash(IpLocation.this.edittext1.getText().toString());
}
});
this._req_request_listener = new RequestNetwork.RequestListener() {
@Override
public void onErrorResponse(String str, String str2) {
}
@Override
public void onResponse(String str, String str2, HashMap<String, Object> hashMap) {
try {
IpLocation.this.Maps = (ArrayList) new Gson().fromJson("[".concat(str2.concat("]")), new TypeToken<ArrayList<HashMap<String, Object>>>() {
}.getType());
IpLocation.this.city.setText(((HashMap) IpLocation.this.Maps.get(0)).get("city").toString());
IpLocation.this.country.setText(((HashMap) IpLocation.this.Maps.get(0)).get("country").toString());
IpLocation.this.region.setText(((HashMap) IpLocation.this.Maps.get(0)).get("region").toString());
IpLocation.this.textview9.setText(((HashMap) IpLocation.this.Maps.get(0)).get("ip").toString());
} catch (Exception e) {
Util.showMessage(IpLocation.this.getApplicationContext(), "Error!");
}
}
};
}
private void initializeLogic() {
this.req.startRequestNetwork("GET", "https://ipinfo.io/geo", "", this._req_request_listener);
}
public void _Aniqlash(String str) {
this.req.setHeaders(this.Map);
this.req.startRequestNetwork("GET", "https://ipinfo.io/".concat(this.edittext1.getText().toString().concat("/geo")), "", this._req_request_listener);
}
public int getUwU(String str, String str2) {
return getBaseContext().getResources().getIdentifier(str, str2, getBaseContext().getPackageName());
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(getUwU("uwu_ip_location", "layout"));
initialize(bundle);
initializeLogic();
}
}