diff --git a/app/src/main/assets/channel b/app/src/main/assets/channel new file mode 100644 index 0000000..79e5013 --- /dev/null +++ b/app/src/main/assets/channel @@ -0,0 +1 @@ +baidu \ No newline at end of file diff --git a/app/src/main/assets/controlStatus.json b/app/src/main/assets/controlStatus.json new file mode 100644 index 0000000..938c8dc --- /dev/null +++ b/app/src/main/assets/controlStatus.json @@ -0,0 +1 @@ +{"success":0,"msg":"获取成功","control_status":"1"} \ No newline at end of file diff --git a/app/src/main/assets/denglu.json b/app/src/main/assets/denglu.json new file mode 100644 index 0000000..132abb1 --- /dev/null +++ b/app/src/main/assets/denglu.json @@ -0,0 +1,8 @@ +{ + "data": { + "phone": "19992697335", + "task_type": 1 + }, + "msg": "账号登录", + "success": 1 +} \ No newline at end of file diff --git a/app/src/main/assets/huashu.json b/app/src/main/assets/huashu.json new file mode 100644 index 0000000..dada64d --- /dev/null +++ b/app/src/main/assets/huashu.json @@ -0,0 +1,116 @@ +{ + "msg": "获取信息成功", + "data": [ + { + "id": "01", + "comment": "好几次看到你了~缘分互关一下吧!互赞三个!", + "type": "1" + }, + { + "id": "02", + "comment": "拍的不错,好几次看到你了~缘分互关一下吧!,互赞三个!", + "type": "1" + }, + { + "id": "03", + "comment": "你的视频真好~互关一下,互赞三个!", + "type": "1" + }, + { + "id": "04", + "comment": "唉~好几次看到你了~缘分互关一下,互赞三个!", + "type": "1" + }, + { + "id": "05", + "comment": "看到你好几次了~互赞三个互关吧!", + "type": "1" + }, + { + "id": "06", + "comment": "在吗?互关一下互赞三个吧,我看到你好几次了", + "type": "1" + }, + { + "id": "07", + "comment": "感谢关注~我的作品评论一下吧", + "type": "1" + }, + { + "id": "08", + "comment": "最新的作品评论一下吧!感谢", + "type": "1" + }, + { + "id": "09", + "comment": "最近发了几个好笑视频~求点赞", + "type": "1" + }, + { + "id": "10", + "comment": "忙啥呢~互赞三个好吗?", + "type": "1" + } + , + { + "id": "11", + "comment": "一直关注你互赞三个吧!", + "type": "1" + } + , + { + "id": "12", + "comment": "hi~我发的搞笑视频看了吗?赞一下吧", + "type": "1" + } + , + { + "id": "13", + "comment": "互赞三个~好吗?", + "type": "1" + } + , + { + "id": "14", + "comment": "挺喜欢你的视频的,互关然后互赞三个吧", + "type": "1" + } + , + { + "id": "15", + "comment": "期待更新更多作品啊~互关后互赞三个吧", + "type": "1" + } + , + { + "id": "16", + "comment": "你好呀", + "type": "4" + } + , + { + "id": "17", + "comment": "你的作品很好", + "type": "4" + } + , + { + "id": "18", + "comment": "期待更新更多作品", + "type": "4" + } + , + { + "id": "19", + "comment": "好几次看到你了~缘分互关一下吧!互赞三个!", + "type": "2" + } + , + { + "id": "20", + "comment": "拍的不错,好几次看到你了~缘分互关一下吧!互赞三个!", + "type": "2" + } + ], + "success": 0 +} \ No newline at end of file diff --git a/app/src/main/assets/jiaguan.json b/app/src/main/assets/jiaguan.json new file mode 100644 index 0000000..3339afd --- /dev/null +++ b/app/src/main/assets/jiaguan.json @@ -0,0 +1,31 @@ +{ + "data": { + "create_time": "2020-11-23 11:43:23", + "end_time": "22:00:00", + "func_type": "1", + "function_execute": { + "account_duration": 1, + "and_fans": 0, + "and_follow": 0, + "create_time": "2020-11-16 10:43:40", + "id": 1, + "is_rand_comment": 1, + "is_rand_follow": 1, + "is_rand_forward": 0, + "is_rand_good": 1, + "max_follow": 0, + "max_work_time": 0, + "min_work": 0, + "task_id": "1", + "touch_num": "0", + "watch_duration_max": 2, + "watch_duration_min": 1 + }, + "short_id": "tangjie0501", + "start_time": "08:00:00", + "task_id": "1", + "task_type": "4" + }, + "msg": "执行固定任务", + "success": 4 +} \ No newline at end of file diff --git a/app/src/main/assets/meituan_cities.db b/app/src/main/assets/meituan_cities.db new file mode 100644 index 0000000..1e2d2a4 Binary files /dev/null and b/app/src/main/assets/meituan_cities.db differ diff --git a/app/src/main/assets/qianghongbao.json b/app/src/main/assets/qianghongbao.json new file mode 100644 index 0000000..964a6a5 --- /dev/null +++ b/app/src/main/assets/qianghongbao.json @@ -0,0 +1,31 @@ +{ + "data": { + "create_time": "2021-07-13 16:29:24", + "end_time": "16:40:00", + "func_type": "5", + "function_execute": { + "account_duration": "1", + "bag_min_coin": "0", + "change_time": "1", + "create_time": "2021-07-13 16:29:24", + "grab_lucky_bag": "1", + "grab_red_envelopes": "1", + "id": "3", + "if_quguan": "0", + "live_click": "1", + "live_num": "1", + "live_speech": "1", + "red_min_coin": "0", + "task_id": "0bee5c22575c7aaf1aac37c8a9a01e37", + "task_type": "1", + "touch_num": "0" + }, + "short_id": "tangjie0501", + "short_name": "蝴蝶剑", + "start_time": "16:20:00", + "task_id": "0bee5c22575c7aaf1aac37c8a9a01e37", + "task_type": "4" + }, + "msg": "执行固定任务", + "success": 4 +} \ No newline at end of file diff --git a/app/src/main/assets/quguan.json b/app/src/main/assets/quguan.json new file mode 100644 index 0000000..e2986a9 --- /dev/null +++ b/app/src/main/assets/quguan.json @@ -0,0 +1,27 @@ +{ + "data": { + "create_time": "2021-11-02 09:11:00", + "end_time": "12:00:00", + "func_type": "7", + "function_execute": { + "account_duration": "1", + "create_time": "2021-11-02 09:11:00", + "dy_number": [ + "anan394859", + "I712280" + ], + "id": "45", + "if_quguan": "0", + "task_id": "2233445566778899", + "task_type": "1", + "touch_num": "0" + }, + "short_id": "86733000440", + "short_name": "酒酿樱桃子U", + "start_time": "09:00:00", + "task_id": "2233445566778899", + "task_type": "4" + }, + "msg": "执行固定任务", + "success": 4 +} \ No newline at end of file diff --git a/app/src/main/assets/touchTask.json b/app/src/main/assets/touchTask.json new file mode 100644 index 0000000..1f242ce --- /dev/null +++ b/app/src/main/assets/touchTask.json @@ -0,0 +1,14 @@ +{ + "msg": "获取信息成功", + "data": [ + { + "phone": "18533978534", + "name": "暗示" + }, + { + "phone": "16533978524", + "name": "收到" + } + ], + "success": 0 +} \ No newline at end of file diff --git a/app/src/main/assets/xposed_init b/app/src/main/assets/xposed_init new file mode 100644 index 0000000..07531a6 --- /dev/null +++ b/app/src/main/assets/xposed_init @@ -0,0 +1 @@ +com.fisherbone.fuzhu.hook.MainHook \ No newline at end of file diff --git a/app/src/main/assets/zhibojianliebiao.json b/app/src/main/assets/zhibojianliebiao.json new file mode 100644 index 0000000..e792036 --- /dev/null +++ b/app/src/main/assets/zhibojianliebiao.json @@ -0,0 +1,13 @@ +{ + "data": [ + { + "room_name": "丽丫头", + "room_shortid": "liyatouma" + },{ + "room_name": "神奇主妇", + "room_shortid": "shenqizhufu" + } + ], + "msg": "获取成功", + "success": 0 +} \ No newline at end of file diff --git a/app/src/main/java/com/fisherbone/fuzhu/activity/ControlWindow.java b/app/src/main/java/com/fisherbone/fuzhu/activity/ControlWindow.java index c13e7f5..fb07b6a 100644 --- a/app/src/main/java/com/fisherbone/fuzhu/activity/ControlWindow.java +++ b/app/src/main/java/com/fisherbone/fuzhu/activity/ControlWindow.java @@ -124,7 +124,11 @@ public class ControlWindow { stutas(ChangLiang.isrun); AblStepHandler.sendMsg(AblSteps.STEP_130); break; - case "7"://潜在客户加关(大咖) + case "7":// + stutas(ChangLiang.isrun); + AblStepHandler.sendMsg(AblSteps.STEP_231); + break; + case "71"://潜在客户加关(大咖) stutas(ChangLiang.isrun); AblStepHandler.sendMsg(AblSteps.STEP_170); break; diff --git a/app/src/main/java/com/fisherbone/fuzhu/activity/MainActivity.java b/app/src/main/java/com/fisherbone/fuzhu/activity/MainActivity.java index f3f24cf..940d3e0 100644 --- a/app/src/main/java/com/fisherbone/fuzhu/activity/MainActivity.java +++ b/app/src/main/java/com/fisherbone/fuzhu/activity/MainActivity.java @@ -492,7 +492,7 @@ public class MainActivity extends BaseActivity implements InfoMessage { public void onEventMainThread(PotCusBean potCusBean) { if ("1".equals(potCusBean.getSelect())) { if (potCusBean.getBigshotdatas().size() > 0) { - execute("7"); + execute("71"); } } if (VALUE_TWO.equals(potCusBean.getSelect())) { @@ -750,9 +750,9 @@ public class MainActivity extends BaseActivity implements InfoMessage { controlWindow.stutas(true); controlWindow.closedWin(); AblViewUtil.mySleep(2); - AblStepHandler.getInstance().setStop(false); - Log.e("step###", "开始执行关闭抖音程序"); - AblStepHandler.sendMsg(192); +// AblStepHandler.getInstance().setStop(false); +// Log.e("step###", "开始执行关闭抖音程序"); +// AblStepHandler.sendMsg(192); FinishTask(); } diff --git a/app/src/main/java/com/fisherbone/fuzhu/activity/StartTask.java b/app/src/main/java/com/fisherbone/fuzhu/activity/StartTask.java index a6f6e89..046ae10 100644 --- a/app/src/main/java/com/fisherbone/fuzhu/activity/StartTask.java +++ b/app/src/main/java/com/fisherbone/fuzhu/activity/StartTask.java @@ -9,8 +9,10 @@ import com.fisherbone.fuzhu.ChangLiang; import com.fisherbone.fuzhu.abllib.AblStepHandler; import com.fisherbone.fuzhu.abllib.AblSteps; import com.fisherbone.fuzhu.abllib.utils.AblUtil; +import com.fisherbone.fuzhu.db.DouyinBean; import com.fisherbone.fuzhu.db.dao.ZhanghaoDao; import com.fisherbone.fuzhu.db.zhuanghaoBeanData; +import com.fisherbone.fuzhu.entity.AppoBean; import com.fisherbone.fuzhu.entity.LiveBean; import com.fisherbone.fuzhu.entity.RecFollowBean; import com.fisherbone.fuzhu.entity.RedEnvBean; @@ -19,11 +21,14 @@ import com.fisherbone.fuzhu.entity.touchTaskBean; import com.fisherbone.fuzhu.okgonet.HttpConstants; import com.fisherbone.fuzhu.okgonet.NetApi; import com.fisherbone.fuzhu.utils.DateUtils; +import com.fisherbone.fuzhu.utils.GetJsonDataUtil; import com.fisherbone.fuzhu.utils.JsonUtils; import com.fisherbone.fuzhu.utils.ProfileSpUtils; +import com.google.gson.Gson; import com.lzy.okgo.model.HttpParams; import com.lzy.okgo.model.Response; +import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -94,7 +99,7 @@ public class StartTask { ChangLiang.istask = false; //领取到任务开始执行,调接口通知后台 Log.e("TIAOSHI###", "开始给后台上报拿到了停任务"); - updateTaskStatus(); + updateTaskStatus(""); AblStepHandler.getInstance().setStop(true); ChangLiang.isstart = "0"; if (valueZero.equals(ChangLiang.isstarttwo)) { @@ -179,6 +184,9 @@ public class StartTask { case "6": tastJiexisix(body); break; + case "7"://指定直播间加关任务 + tastJiexiseven(body); + break; default: Log.e("TIAOSHI###", "执行的功能类型不匹配"); break; @@ -192,11 +200,69 @@ public class StartTask { } } + private void tastJiexiseven(String body) { + Log.e("TIAOSHI###", "指定直播间的任务数据开始解析"); + //拿到这个功能类型,然后去解析数据。 + try { + //拿到json字符串,假数据 + // String JsonData = new GetJsonDataUtil().getJson(mContext, "quguan.json");//获取assets目录下的json文件数据 + JSONObject jsonObject = new JSONObject(body); + JSONObject data = jsonObject.getJSONObject("data"); + String createTime =data.getString("create_time"); + String endTime =data.getString("end_time"); + String startTime =data.getString("start_time"); + String funcType = data.getString("func_type"); + String taskId = data.getString("task_id");//任务id + String shortId = data.getString("short_id");//抖音id + String shortName = data.getString("short_name");//抖音昵称 + String taskType = data.getString("task_type");//固定任务 + + JSONObject functionExecute = data.getJSONObject("function_execute"); + String id = functionExecute.getString("id");//-- 任务功能id + String taskId1 = functionExecute.getString("task_id");//-- 任务id + String accountDuration = functionExecute.getString("account_duration");//单账号时长(h) + JSONArray jsonList = functionExecute.getJSONArray("dy_number"); + List mList = new ArrayList<>(); + List dataBeans = new ArrayList<>(); + for (int i = 0; i < jsonList.length(); i++) { + String json = (String) jsonList.get(i); + mList.add(json); + AppoBean.DataBean dataBean = new AppoBean.DataBean(); + dataBean.setRoom_shortid(json); + dataBeans.add(dataBean); + } + Gson gson = new Gson(); + String s1 = gson.toJson(mList); + Log.e("要执行的抖音号字符串", s1); + AppoBean appoBean1 = new AppoBean(dataBeans); + ProfileSpUtils.getInstance().saveAppoBean(appoBean1); + AppoBean appoBean = ProfileSpUtils.getInstance().getAppoBean(); + List data1 = appoBean.getData(); + Gson gsonn = new Gson(); + String s12 = gsonn.toJson(data1); + Log.e("要添加的字符串", s12);//[{"login_status":"1","short_id":"xiao629972576","short_name":""}] + ChangLiang.task_id = taskId;//任务id + ChangLiang.short_id = shortId;//抖音id + ChangLiang.task_short_name = shortName;//任务抖音昵称 + ChangLiang.task_type = taskType;//固定任务 + ChangLiang.id = id;//功能id + String gaizaotime = gaizaotime(endTime); + //领取到任务开始执行,调接口通知后台 + updateTaskStatus(funcType); + //执行帐号切换帐号 + Log.e("TIAOSHI###", "执行帐号切换帐号"); + startExecution(mContext, AblSteps.STEP_3); + daojishifour(30, funcType); + } catch (JSONException e) { + e.printStackTrace(); + } + } + /** * app拿到任务调用接口 */ - private void updateTaskStatus() { + private void updateTaskStatus(String str) { final HttpParams paramsPost = new HttpParams(); paramsPost.put("short_id", ChangLiang.short_id); paramsPost.put("task_id", ChangLiang.task_id); @@ -210,7 +276,7 @@ public class StartTask { String msg = jsonObject.getString("msg"); String success = jsonObject.getString("success"); if (valueZero.equals(success)) { - com.fisherbone.fuzhu.utils.ToastUtils.showToast(mContext, "开始执行新任务"); + com.fisherbone.fuzhu.utils.ToastUtils.showToast(mContext, "开始执行新任务"+str); Log.e("TIAOSHI###", "给后台上报任务==" + msg); } } catch (JSONException e) { @@ -305,7 +371,7 @@ public class StartTask { ProfileSpUtils.getInstance().saveProfile(recFollowBean); Log.e("TIAOSHI###", "一键加关的数据解析成功"); //领取到任务开始执行,调接口通知后台 - updateTaskStatus(); + updateTaskStatus(funcType); //执行帐号切换帐号 Log.e("TIAOSHI###", "开始执行帐号切换帐号"); AblStepHandler.getInstance().setStop(false); @@ -380,7 +446,7 @@ public class StartTask { ChangLiang.minfans = saveFans; Log.e("TIAOSHI###", "一键取关的数据解析成功"); //领取到任务开始执行,调接口通知后台 - updateTaskStatus(); + updateTaskStatus(funcType); //执行帐号切换帐号 Log.e("TIAOSHI###", "执行帐号切换帐号"); startExecution(mContext, AblSteps.STEP_3); @@ -421,7 +487,7 @@ public class StartTask { ChangLiang.touch_num = touchNum;//功能id Log.e("TIAOSHI###", "幢号的数据解析成功"); - updateTaskStatus(); + updateTaskStatus(funcType); //如果当前登录的抖音号和后台指派任务的抖音号不一致 touchTask(touchNum, new MainActivity.Zhuanhaoretren() { @Override @@ -650,7 +716,7 @@ public class StartTask { ProfileSpUtils.getInstance().saveRedEnvBean(redEnvBean); Log.e("TIAOSHI###", "抢红包的数据解析成功"); //领取到任务开始执行,调接口通知后台 - updateTaskStatus(); + updateTaskStatus(funcType); Log.e("TIAOSHI###", "执行帐号切换帐号"); startExecution(mContext, AblSteps.STEP_3); daojishifour(30, funcType); @@ -773,7 +839,7 @@ public class StartTask { ProfileSpUtils.getInstance().saveLiveBean(liveBean); Log.e("TIAOSHI###", "直播间加热的数据解析成功"); //领取到任务开始执行,调接口通知后台 - updateTaskStatus(); + updateTaskStatus(funcType); //执行帐号切换帐号 Log.e("TIAOSHI###", "执行帐号切换帐号"); startExecution(mContext, AblSteps.STEP_3); @@ -794,7 +860,7 @@ public class StartTask { ChangLiang.phonenum = phone; // ChangLiang.tasktype = 1; ChangLiang.task_type = "1"; - updateTaskStatus(); + updateTaskStatus(""); AblUtil.addSuspensionWindowView(mContext, controlWindow.initWindowView("4")); } catch (JSONException e) { e.printStackTrace();