K-Studios Hub v1.0版本的 MD5 值为:27abedca3b2878e1cf06ac747d354792
以下内容为反编译后的 MessageActivity.java 源代码,内容仅作参考
package com.KS.KStudiosHub;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.SparseBooleanArray;
import android.util.TypedValue;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.KS.KStudiosHub.RequestNetwork;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.BuildConfig;
import com.google.firebase.FirebaseApp;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
public class MessageActivity extends AppCompatActivity {
private TimerTask Waiterek;
private RequestNetwork WebhookSender;
private RequestNetwork.RequestListener _WebhookSender_request_listener;
private OnCompleteListener<AuthResult> _fAuth_create_user_listener;
private OnCompleteListener<Void> _fAuth_reset_password_listener;
private OnCompleteListener<AuthResult> _fAuth_sign_in_listener;
private Button button1;
private Button button2;
private Button button3;
private Button button4;
private Button button5;
private Button button6;
private Button button7;
private Button button8;
private LinearLayout choosing_section;
private LinearLayout discord;
private FirebaseAuth fAuth;
private OnCompleteListener<Void> fAuth_deleteUserListener;
private OnCompleteListener<Void> fAuth_emailVerificationSentListener;
private OnCompleteListener<AuthResult> fAuth_googleSignInListener;
private OnCompleteListener<AuthResult> fAuth_phoneAuthListener;
private OnCompleteListener<Void> fAuth_updateEmailListener;
private OnCompleteListener<Void> fAuth_updatePasswordListener;
private OnCompleteListener<Void> fAuth_updateProfileListener;
private LinearLayout linear1;
private LinearLayout linear2;
private LinearLayout linear3;
private EditText message;
private LinearLayout personal;
private TextView textview1;
private TextView textview2;
private TextView textview3;
private TextView textview4;
private TextView textview5;
private TextView textview6;
private EditText topic;
private EditText usernamek;
private SharedPreferences usnm_;
private Timer _timer = new Timer();
private HashMap<String, Object> map = new HashMap<>();
private String Randomizer = BuildConfig.FLAVOR;
private Intent TP = new Intent();
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.message);
initialize(bundle);
FirebaseApp.initializeApp(this);
initializeLogic();
}
private void initialize(Bundle bundle) {
this.choosing_section = (LinearLayout) findViewById(R.id.choosing_section);
this.personal = (LinearLayout) findViewById(R.id.personal);
this.discord = (LinearLayout) findViewById(R.id.discord);
this.textview1 = (TextView) findViewById(R.id.textview1);
this.button7 = (Button) findViewById(R.id.button7);
this.button8 = (Button) findViewById(R.id.button8);
this.textview5 = (TextView) findViewById(R.id.textview5);
this.textview6 = (TextView) findViewById(R.id.textview6);
this.button2 = (Button) findViewById(R.id.button2);
this.button3 = (Button) findViewById(R.id.button3);
this.button4 = (Button) findViewById(R.id.button4);
this.button5 = (Button) findViewById(R.id.button5);
this.linear1 = (LinearLayout) findViewById(R.id.linear1);
this.linear2 = (LinearLayout) findViewById(R.id.linear2);
this.linear3 = (LinearLayout) findViewById(R.id.linear3);
this.button1 = (Button) findViewById(R.id.button1);
this.button6 = (Button) findViewById(R.id.button6);
this.textview2 = (TextView) findViewById(R.id.textview2);
this.usernamek = (EditText) findViewById(R.id.usernamek);
this.textview3 = (TextView) findViewById(R.id.textview3);
this.topic = (EditText) findViewById(R.id.topic);
this.textview4 = (TextView) findViewById(R.id.textview4);
this.message = (EditText) findViewById(R.id.message);
this.WebhookSender = new RequestNetwork(this);
this.usnm_ = getSharedPreferences("usnm_", 0);
this.fAuth = FirebaseAuth.getInstance();
this.button7.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MessageActivity.this.choosing_section.setVisibility(8);
MessageActivity.this.personal.setVisibility(0);
MessageActivity.this.discord.setVisibility(8);
}
});
this.button8.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MessageActivity.this.choosing_section.setVisibility(8);
MessageActivity.this.personal.setVisibility(8);
MessageActivity.this.discord.setVisibility(0);
}
});
this.button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MessageActivity messageActivity = MessageActivity.this;
MessageActivity.this.getApplicationContext();
((ClipboardManager) messageActivity.getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText("clipboard", "kacperdc31@gmail.com"));
SketchwareUtil.showMessage(MessageActivity.this.getApplicationContext(), "Copied the email address successfully");
}
});
this.button3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MessageActivity messageActivity = MessageActivity.this;
MessageActivity.this.getApplicationContext();
((ClipboardManager) messageActivity.getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText("clipboard", "exkayem_pl#0"));
SketchwareUtil.showMessage(MessageActivity.this.getApplicationContext(), "Copied the Discord username successfully");
}
});
this.button4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MessageActivity.this.TP.setAction("android.intent.action.VIEW");
MessageActivity.this.TP.setData(Uri.parse("https://discord.gg/Hf4NcsYGvC"));
MessageActivity.this.startActivity(MessageActivity.this.TP);
}
});
this.button5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MessageActivity.this.choosing_section.setVisibility(0);
MessageActivity.this.personal.setVisibility(8);
MessageActivity.this.discord.setVisibility(8);
}
});
this.button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MessageActivity.this.Randomizer = String.valueOf(SketchwareUtil.getRandom(1000, 9999)).concat("-DwM-".concat(String.valueOf(SketchwareUtil.getRandom(1000, 9999)).concat("-".concat(String.valueOf(SketchwareUtil.getRandom(1000, 9999))))));
if (MessageActivity.this.topic.getText().toString().equals(BuildConfig.FLAVOR)) {
MessageActivity.this.topic.setError("You have to set a topic first before you send the message!");
} else if (!MessageActivity.this.message.getText().toString().equals(BuildConfig.FLAVOR)) {
if (MessageActivity.this.usernamek.getText().toString().equals(BuildConfig.FLAVOR)) {
MessageActivity.this.map = new HashMap();
MessageActivity.this.map.put("username", MessageActivity.this.usnm_.getString(FirebaseAuth.getInstance().getCurrentUser().getUid(), BuildConfig.FLAVOR));
MessageActivity.this.map.put("content", "***New Discord webhook Message***".concat("\n\nMessage ID: ||".concat(MessageActivity.this.Randomizer.concat("||".concat("\n\n\n\n***Topic:*** ".concat(MessageActivity.this.topic.getText().toString().concat("\n\n***Message:***\n```".concat(MessageActivity.this.message.getText().toString().concat("\n```".concat("\n\n\n***Account Data:*** (Private)".concat("\n***Email:*** ".concat("||".concat(FirebaseAuth.getInstance().getCurrentUser().getEmail().concat("||")).concat("\n***User UiD:*** ".concat("||".concat(FirebaseAuth.getInstance().getCurrentUser().getUid().concat("||"))))))))))))))));
MessageActivity.this.WebhookSender.setParams(MessageActivity.this.map, 0);
MessageActivity.this.WebhookSender.startRequestNetwork("POST", "https://discord.com/api/webhooks/1109596865982382110/IsBvMwLyhIot46YyR2__DUwOHaVvPIBHydgjMqC_ZgQ76bCTHzaUNxCfEaZs5cqJL-CN", "#".concat(String.valueOf(SketchwareUtil.getRandom(1000, 9999))), MessageActivity.this._WebhookSender_request_listener);
return;
}
MessageActivity.this.map = new HashMap();
MessageActivity.this.map.put("username", MessageActivity.this.usernamek.getText().toString());
MessageActivity.this.map.put("content", "***New Discord webhook Message***".concat("\n\nMessage ID: ||".concat(MessageActivity.this.Randomizer.concat("||".concat("\n\n\n\n***Topic:*** ".concat(MessageActivity.this.topic.getText().toString().concat("\n\n***Message:***\n```".concat(MessageActivity.this.message.getText().toString().concat("\n```".concat("\n\n\n***Account Data:*** (Private)".concat("\n***Email:*** ".concat("||".concat(FirebaseAuth.getInstance().getCurrentUser().getEmail().concat("||")).concat("\n***User UiD:*** ".concat("||".concat(FirebaseAuth.getInstance().getCurrentUser().getUid().concat("||"))))))))))))))));
MessageActivity.this.WebhookSender.setParams(MessageActivity.this.map, 0);
MessageActivity.this.WebhookSender.startRequestNetwork("POST", "https://discord.com/api/webhooks/1109596865982382110/IsBvMwLyhIot46YyR2__DUwOHaVvPIBHydgjMqC_ZgQ76bCTHzaUNxCfEaZs5cqJL-CN", "#".concat(String.valueOf(SketchwareUtil.getRandom(1000, 9999))), MessageActivity.this._WebhookSender_request_listener);
} else {
MessageActivity.this.message.setError("You have to type the message (description) first before you send the message!");
}
}
});
this.button6.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MessageActivity.this.choosing_section.setVisibility(0);
MessageActivity.this.personal.setVisibility(8);
MessageActivity.this.discord.setVisibility(8);
}
});
this.topic.addTextChangedListener(new AnonymousClass9());
this.message.addTextChangedListener(new AnonymousClass10());
this._WebhookSender_request_listener = new RequestNetwork.RequestListener() {
@Override
public void onResponse(String str, String str2, HashMap<String, Object> hashMap) {
}
@Override
public void onErrorResponse(String str, String str2) {
}
};
this.fAuth_updateEmailListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.fAuth_updatePasswordListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.fAuth_emailVerificationSentListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.fAuth_deleteUserListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.fAuth_phoneAuthListener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.fAuth_updateProfileListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.fAuth_googleSignInListener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this._fAuth_create_user_listener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this._fAuth_sign_in_listener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this._fAuth_reset_password_listener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
}
};
}
public class AnonymousClass9 implements TextWatcher {
AnonymousClass9() {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
charSequence.toString();
MessageActivity.this.Waiterek = new TimerTask() {
@Override
public void run() {
MessageActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
MessageActivity.this.Waiterek.cancel();
if (MessageActivity.this.topic.getText().toString().equals(BuildConfig.FLAVOR)) {
MessageActivity.this.topic.setError("You can't leave this area empty!");
}
}
});
}
};
MessageActivity.this._timer.schedule(MessageActivity.this.Waiterek, 100L);
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void afterTextChanged(Editable editable) {
}
}
public class AnonymousClass10 implements TextWatcher {
AnonymousClass10() {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
charSequence.toString();
MessageActivity.this.Waiterek = new TimerTask() {
@Override
public void run() {
MessageActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
MessageActivity.this.Waiterek.cancel();
if (MessageActivity.this.message.getText().toString().equals(BuildConfig.FLAVOR)) {
MessageActivity.this.message.setError("You can't leave this area empty!");
}
}
});
}
};
MessageActivity.this._timer.schedule(MessageActivity.this.Waiterek, 100L);
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void afterTextChanged(Editable editable) {
}
}
private void initializeLogic() {
this.choosing_section.setVisibility(0);
this.personal.setVisibility(8);
this.discord.setVisibility(8);
}
@Deprecated
public void showMessage(String str) {
Toast.makeText(getApplicationContext(), str, 0).show();
}
@Deprecated
public int getLocationX(View view) {
int[] iArr = new int[2];
view.getLocationInWindow(iArr);
return iArr[0];
}
@Deprecated
public int getLocationY(View view) {
int[] iArr = new int[2];
view.getLocationInWindow(iArr);
return iArr[1];
}
@Deprecated
public int getRandom(int i, int i2) {
return new Random().nextInt((i2 - i) + 1) + i;
}
@Deprecated
public ArrayList<Double> getCheckedItemPositionsToArray(ListView listView) {
ArrayList<Double> arrayList = new ArrayList<>();
SparseBooleanArray checkedItemPositions = listView.getCheckedItemPositions();
for (int i = 0; i < checkedItemPositions.size(); i++) {
if (checkedItemPositions.valueAt(i)) {
arrayList.add(Double.valueOf(checkedItemPositions.keyAt(i)));
}
}
return arrayList;
}
@Deprecated
public float getDip(int i) {
return TypedValue.applyDimension(1, i, getResources().getDisplayMetrics());
}
@Deprecated
public int getDisplayWidthPixels() {
return getResources().getDisplayMetrics().widthPixels;
}
@Deprecated
public int getDisplayHeightPixels() {
return getResources().getDisplayMetrics().heightPixels;
}
}