吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 4853|回复: 10
收起左侧

[Java 原创] 羊了个羊 9.21 最新Java通过代码

[复制链接]
owo163 发表于 2022-9-21 20:04
根据这个博主  羊了个羊MatchPlayInfo序列化分析
https://www.52pojie.cn/thread-1690631-1-1.html
(出处: 吾爱破解论坛)



从写java代码,测过可以无限刷通关  ,原博主逆向牛逼 :lol


[Java] 纯文本查看 复制代码
 

import cn.hutool.core.codec.Base64;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;

import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class YLYUHttp {

    static ExecutorService threadPool= Executors.newFixedThreadPool(10);

    static String loginOppoURL = "https://cat-match.easygame2021.com/sheep/v1/user/login_oppo" ;
    static String matchTypeURL = "https://cat-match.easygame2021.com/sheep/v1/game/map_info_ex?matchType=3" ;

    static String t = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTQ3ODI5NjIsIm5iZiI6MTY2MzY4MDc2MiwiaWF0IjoxNjYzNjc4OTYyLCJqdGkiOiJDTTpjYXRfbWF0Y2g6bHQxMjM0NTYiLCJvcGVuX2lkIjoiIiwidWlkIjo4MTMxOTUyOSwiZGVidWciOiIiLCJsYW5nIjoiIn0.GHT4Oi_3lbLYrsnaXyFSL6Xhv1azQVre6N82_z56-lU";
    public static void main(String[] args) {

        //String uid = "230058077";
         String uid = "81315929";
        getToken(t);

    }

    public static String getToken(String t ) {
        try {

        } catch (Exception e) {
            e.printStackTrace();

        }
        return null;
    }





//    public static void  sucees(String uid){
//        if(uid.length() < 10 && uid.matches("[0-9]+")){
//            String tokne = getToken(uid);
//            System.out.println(tokne);
//            int num = 0;
//            for(int i=0 ; i< 10 ; i++){
//                num = send( tokne) + num;
//                try {
//                    Thread.sleep(500);
//                    System.out.print(num);
//                } catch (InterruptedException e) {
//                    e.printStackTrace();
//                }
//            }
//            System.out.println( " [通关 "+num+" 次 ,成功] ");
//        }else {
//            System.out.println("不是数字");
//        }
//    }


    public static String autoGame(String t) {
        try {
            HashMap<String, Object> paramMap = new HashMap<>();
            paramMap.put("t", t);
            paramMap.put("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI MiniGame WindowsWechat");
            paramMap.put("Referer", "https://servicewechat.com/wx141bfb9b73c970a9/23/page-frame.html");

            String matchType = HttpUtil.get(matchTypeURL+ "&t=" +t);

            String mad5 = JSONObject.parseObject(matchType).getJSONObject("data").getJSONArray("map_md5").getString(1);
            String url = "https://cat-match-static.easygame2021.com/maps/" + mad5 + ".txt";

            String s = HttpUtil.get(url);

            JSONObject jsonObject = JSONObject.parseObject(s);
            JSONObject levelData = jsonObject.getJSONObject("levelData");
            Iterator<String> iterator = levelData.keySet().iterator();

            int totalSize = 0;
            while (iterator.hasNext()) {
                String next = iterator.next();
                JSONArray jsonArray = levelData.getJSONArray(next);
                totalSize += jsonArray.size();
            }
            JSONArray jsonArray = new JSONArray();
            for (int i = 0; i < totalSize; i++) {
                JSONObject data = new JSONObject();
                data.put("chessIndex", Math.min(i, 127));
                data.put("timeTag", Math.min(i, 127));
                jsonArray.add(data);
            }
            List<Byte> bytes = Lists.newArrayList();
            bytes.add((byte) 8);
            bytes.add((byte) 3);
            for (int i = 0; i < jsonArray.size(); i++) {
                JSONObject jsonObject1 = jsonArray.getJSONObject(i);
                bytes.add((byte) 34);
                bytes.add((byte) 4);
                bytes.add((byte) 8);
                bytes.add(jsonObject1.getByte("chessIndex"));
                bytes.add((byte) 16);
                bytes.add(jsonObject1.getByte("chessIndex"));
            }
            byte[] dataByte = new byte[bytes.size()];
            for (int i = 0; i < bytes.size(); i++) {
                dataByte[i] = bytes.get(i);
            }

            String gameOverExUrl = "https://cat-match.easygame2021.com/sheep/v1/game/game_over_ex" ;
            HashMap<String, Object> paramMap1 = new HashMap<>();
            paramMap1.put("rank_score",1);
            paramMap1.put("rank_state",1);
            paramMap1.put("rank_time",1);
            paramMap1.put("rank_role",1);
            paramMap1.put("skin",1);
            paramMap1.put("t",t);
            paramMap1.put("MatchPlayInfo", Base64.encode(dataByte));


            String json = JSONObject.toJSONString(paramMap1);
            System.out.println(json);
            String s1  =   sendPost(gameOverExUrl,json,paramMap);;

            System.out.println(s1);

            return  "";
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("获取token失败");
            return "01";
        }
    }







//    public static void  sucees(String uid){
//        if(uid.length() < 10 && uid.matches("[0-9]+")){
//            String tokne = getToken(uid);
//            System.out.println(tokne);
//            int num = 0;
//            for(int i=0 ; i< 10 ; i++){
//                num = send( tokne) + num;
//                try {
//                    Thread.sleep(500);
//                    System.out.print(num);
//                } catch (InterruptedException e) {
//                    e.printStackTrace();
//                }
//            }
//            System.out.println( " [通关 "+num+" 次 ,成功] ");
//        }else {
//            System.out.println("不是数字");
//        }
//    }


    public static String sendPost(String url, String param, Map<String, Object> header) throws UnsupportedEncodingException, IOException {
        PrintWriter out = null;
        BufferedReader in = null;
        String result = "";
        URL realUrl = new URL(url);
        // 打开和URL之间的连接
        URLConnection conn = realUrl.openConnection();
        //设置超时时间
        conn.setConnectTimeout(5000);
        conn.setReadTimeout(15000);
        // 设置通用的请求属性
        if (header!=null) {
            for (Map.Entry<String, Object> entry : header.entrySet()) {
                conn.setRequestProperty(entry.getKey(), entry.getValue().toString());
            }
        }

        conn.setRequestProperty("accept", "*/*");
        conn.setRequestProperty("connection", "Keep-Alive");
        conn.setRequestProperty("Content-Type", "application/json; charset=utf-8");
        // 发送POST请求必须设置如下两行
        conn.setDoOutput(true);
        conn.setDoInput(true);
        // 获取URLConnection对象对应的输出流
        out = new PrintWriter(conn.getOutputStream());
        // 发送请求参数
        out.print(param);
        // flush输出流的缓冲
        out.flush();
        // 定义BufferedReader输入流来读取URL的响应
        in = new BufferedReader(
                new InputStreamReader(conn.getInputStream(), "utf8"));
        String line;
        while ((line = in.readLine()) != null) {
            result += line;
        }
        if(out!=null){
            out.close();
        }
        if(in!=null){
            in.close();
        }
        return result;
    }
}

免费评分

参与人数 3吾爱币 +8 热心值 +3 收起 理由
llonggzs + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!
小跑工作室 + 1 + 1 我很赞同!
wushaominkk + 7 + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!

查看全部评分

本帖被以下淘专辑推荐:

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

zxw757026112 发表于 2022-9-22 22:13
不明觉厉
小跑工作室 发表于 2022-9-22 21:54
大哥,有成品吗。 我帮你测试一下,我愿做小白鼠
conbio 发表于 2022-9-22 21:55
cy2931 发表于 2022-9-24 18:42
学习一下
sknbs 发表于 2022-9-25 00:57
试一下这个
 楼主| owo163 发表于 2022-9-25 14:00

这过时了
cbctan 发表于 2022-9-28 23:45
顶一顶。
qw3025 发表于 2022-9-29 10:31
还生效不
huyifan311 发表于 2022-10-2 20:08
楼主,现在还能用am
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-8 19:58

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表