Giter Site home page Giter Site logo

parakeet-crypto-rs's Introduction

parakeet-crypto-rs

使用 Rust 重新实现 Parakeet 所支持的算法。

目前已实现的算法

  • QQ 音乐
    • QMCv1 (static_map)
      • qmcflac / qmc3
    • QMCv2 (map / rc4)
      • mflac / mgg1
  • 酷狗音乐
    • kgm / vpr
  • 酷我音乐
    • kwm / AI 升频 mflac 2
  • 喜马拉雅
    • 安卓客户端 x2m / x3m 3
    • PC 客户端 xm

命令行调用

你可以在项目百科查看命令行调用相关的帮助内容。

致谢

部分项目参考了其他人现有的项目,你可以点击下述链接查看:

声明

我们 "Parakeet-RS 小组" 不支持亦不提倡盗版。 我们认为人们能够选择如何享用购买的内容。 小鹦鹉软件的使用者应保留解密后的副本仅做个人使用,而非进行二次分发。 因使用该软件产生的任何问题都与软件作者无关。

We "Team Parakeet-RS" do not endorse nor encourage piracy. We believe that people should have a choice when consuming purchased content. Parakeet users should keep their decrypted copies for private use, not to re-distribute them. We are not liable for any damage caused by the use of this software.

Footnotes

  1. 安卓需要提取密钥数据库;PC 端需要提供密钥数据库以及解密密钥。

  2. 需要在有特权的安卓设备提取密钥文件: /data/data/cn.kuwo.player/files/mmkv/cn.kuwo.player.mmkv.defaultconfig

  3. 文件名为“乱码”,获取对应名称则需要手动提取数据库进行处理。

parakeet-crypto-rs's People

Contributors

jixunmoe avatar liuguangw avatar

Stargazers

Kotsuki Crrashh avatar Isotr0py avatar Huibq avatar 麦穗喵 avatar Hamusuta avatar  avatar  avatar C3H4 avatar 逸轩 avatar 李榕 avatar  avatar  avatar GreenYoshi (Wang Han) avatar  avatar basicbh avatar MengYX avatar  avatar Jiongjia Lu avatar

Watchers

 avatar Kostas Georgiou avatar  avatar

Forkers

liuguangw huibq

parakeet-crypto-rs's Issues

酷狗音乐 - 加密算法 v4 实现

下述实现为伪代码。生产密钥已经抹去。

没有样本文件。

std::vector<uint8_t> kugou_v4_final_key_expansion(const char* table, std::vector<uint8_t> key) {
  auto table_len = strlen(table);
  auto key_md5 = md5(key);
  std::vector<uint8_t> vec_md5;
  std::vector<int> indexes = {
    5, 14, 13, 2, 12, 10, 15, 11, 3, 8,
    5, 6, 9, 4, 3, 7, 0, 14, 13, 6, 2,
    12, 10, 15, 1, 11, 8, 7, 9, 4, 1
  };
  for (auto index : indexes ) {
    vec_md5.push_back(key_md5[index]);
  }

  std::vector<uint8_t> vec_result;
  vec_result.reserve((vec_md5_len - 1) * (table_len - 1) * 4);
  for (int i = 1; i < vec_md5_len; i++) {
    for (int j = 1; j < table_len; j++) {
      uint32_t temp = i * j * table[j] * vec_md5[i];
      vec_result.push_back(uint8_t(temp));
      vec_result.push_back(uint8_t(temp >> 0x18));
      vec_result.push_back(uint8_t(temp >> 0x10));
      vec_result.push_back(uint8_t(temp >> 0x08));
    }
  }

  return vec_result;
}

// FileKeyExpansion:
static char table_kugou_v4_filekey_expansion[] = "... this is a secret ...";
this->key2 = kugou_v4_final_key_expansion(table_kugou_v4_filekey_expansion, file_key);

// KeySlotKeyExpansion:
static char table_kugou_v4_slotkey_expansion[] = "... this is a secret ...";
key = base64(hex(md5(table_kugou_v4_slotkey_expansion)));
this->key1= kugou_v4_final_key_expansion(table_kugou_v4_slotkey, key);

// decryption:
for (int i = 0; i < n; i++) {
  auto key1_index = offset % key1.len();
  auto key1_div = offset / key1.len();
  auto key2_index = offset % key2.len();

  uint8_t temp = buffer[i];
  temp ^= key2[key1_div % key2.len()];
  temp ^= (temp << 4);
  temp ^= key1[key1_index];
  temp ^= uint8_t(offset ^ (offset >> 16) ^ (offset >> 8) ^ (offset >> 24));
  buffer[i] = temp;

  offset++;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.