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

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 3006|回复: 4
收起左侧

[会员申请] 申请会员 ID:WarMj

[复制链接]
吾爱游客  发表于 2018-6-1 11:00
1、申 请 I D:WarMj
2、个人邮箱:R.Donghui@outlook.com
3、原创技术文章:QQ 坦白说解密工具

GitHub链接:https://github.com/WarMj/tanbaishuo

  1. 参考下面教程获取密码文件。
    https://tyjun.cn/qqtbsyl/
  1. 将得到的密码保存到桌面并命名为1.txt
    加密文件.png

  2. 运行程序后桌面会得到名为2.txt的解码文件。
    中间的就是QQ号,不能得到完整的QQ,但保证前几位无误,足够查出是谁了。
    解密文件.png

源码仅分享一种算法思路,若要使用源码,请自行修改文件路径。

源码

    package tanbaishuo;

    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileWriter;
    import java.io.InputStreamReader;
    import java.util.ArrayList;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;

    /*
     * 解码表
     *  0 - "oe", "n", "z"
            1 - "oK", "6", "5"
            2 - "ow", "-", "A"
            3 - "oi", "o", "i"
            4 - "7e", "v", "P"
            5 - "7K", "4", "k"
            6 - "7w", "C", "s"
            7 - "7i", "S", "l"
            8 - "Ne", "c", "F"
            9 - "NK", "E", "q"
     */

    public class Main {

        private static ArrayList<String> result = new ArrayList<>();

        // 破解密码
        public static String returnPass(String str) {
            String regex = "(.)";
            String[] strs = new String[12];
            Pattern p = Pattern.compile(regex);
            Matcher m = p.matcher(str);
            for (int i = 0; i < 12; i++) {
                if (m.find()) {
                    strs[i] = m.group();
                }
            }

            String result = "";
            int count = 1;
            for (int i = 0; i < 12; i++) {
                if (count <= 4) {
                    if (count < 2) {
                        result += uncode(strs[i] + strs[i + 1]);
                        i++;
                        count++;
                    } else {
                        try {
                            result += uncode(strs[i]);
                        } catch (NullPointerException n) {
                        }
                    }
                } else {
                    count = 0;
                    i--;
                }
                count++;
            }
            return result;
        }

        // 密码本
        public static String uncode(String str) {
            switch (str) {
                case "oe":
                case "n":
                case "z":
                    return "0";
                case "oK":
                case "6":
                case "5":
                    return "1";
                case "ow":
                case "-":
                case "A":
                    return "2";
                case "oi":
                case "o":
                case "i":
                    return "3";
                case "7e":
                case "v":
                case "P":
                    return "4";
                case "7K":
                case "4":
                case "k":
                    return "5";
                case "7w":
                case "C":
                case "s":
                    return "6";
                case "7i":
                case "S":
                case "l":
                    return "7";
                case "Ne":
                case "c":
                case "F":
                    return "8";
                case "NK":
                case "E":
                case "q":
                    return "9";
                default:
                    return "-1";
            }
        }

        // 读取文件
        public static void readTxtFile(String filePath) {
            try {
                String encoding = "GBK";
                File file = new File(filePath);
                if (file.isFile() && file.exists()) {
                    InputStreamReader read = new InputStreamReader(new FileInputStream(file), encoding);
                    BufferedReader bufferedReader = new BufferedReader(read);
                    String lineTxt = null;
                    while ((lineTxt = bufferedReader.readLine()) != null) {
                        // 将文本切割成段
                        strSplit(lineTxt);
                    }
                    read.close();
                } else {
                    System.out.println("找不到指定的文件");
                }
            } catch (Exception e) {
                System.out.println("读取文件内容出错");
                e.printStackTrace();
            }
        }

        // 输出文件
        public static void writeTxtFile(String string) throws Exception {
            File file = new File("C:\\Users\\WarMj\\Desktop\\2.txt");
            FileWriter fw;
            try {
                fw = new FileWriter(file);
                fw.write(string);
                fw.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        // 将整段切开
        private static void strSplit(String str) {
            String[] strs = str.split("\\},\\{");
            for (String s : strs) {
                returnResult(s);
            }
        }

        // 将结果保存到result中
        public static void returnResult(String str) {
            String regex = "\"fromNick\":\"([^\"]+)\".*fromEncodeUin\":" + "\"\\*S1\\*([^\"]+)\".*topicName\":\"([^\"]+)\"";
            Pattern p = Pattern.compile(regex);
            Matcher m = p.matcher(str);
            while (m.find()) {
                result.add(m.group(1) + " " + returnPass(m.group(2)) + " " + m.group(3));
            }
        }

        public static void main(String argv[]) {
            String inputfilePath = "C:\\Users\\WarMj\\Desktop\\1.txt";
            readTxtFile(inputfilePath);

            String write = "";
            try {
                for (int i = 0; i < result.size(); i++) {
                    write += result.get(i) + "\n";
                }
                System.out.println(write);
                writeTxtFile(write);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

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

kjavas 发表于 2018-6-2 07:55 来自手机
什么意思
Ganlv 发表于 2018-6-2 14:03
首先,你需要证明你是你
https://www.jianshu.com/p/8039f9f6e3e1

就算证明了,这个解密程序估计达不到通过标准。
相反,tyjun的那个抓包、分析代码的过程倒是说不定可以通过。
无常方便面 发表于 2018-6-4 13:57
Ganlv 发表于 2018-6-2 14:03
首先,你需要证明你是你
https://www.jianshu.com/p/8039f9f6e3e1

赶驴大佬的 吾爱破解论坛特聘技术专家 是怎么来的
Ganlv 发表于 2018-6-6 17:47
无常方便面 发表于 2018-6-4 13:57
赶驴大佬的 吾爱破解论坛特聘技术专家 是怎么来的

拿出点真家伙就行了 https://www.52pojie.cn/thread-717586-1-1.html
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

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

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

GMT+8, 2024-5-2 06:05

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

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