Coder Social home page Coder Social logo

douyin-sign's Introduction

首先这里有一篇关于Android逆向工程的文章,反编译了抖音的libuserinfo.so文件的种种加密入口限制,使得自己的Android程序可以调用该so文件直接加密校验。这样的效果就是无需真正意义破解加密算法。

我这里直接讲抖音的加密算法本身。火山小视频也一样。

抖音核心的步骤是:

  • 在查询串插入一个固定的键rstr
  • 对查询串进行按键排序并取值,对空格和+进行转义为a
  • 然后取MD5;如果时间轴&1为1,那么取多一次MD5
  • 将MD5结果分别和56、14进行2次错位排序算法
  • 将4的结果再进行一次错位排序,得到36位字符
  • 将字符分别取18位给到as和cp字段,追加到查询串最后

在最新的SDK版本有了新的mas字段辅助校验,这个完全可以忽略,只要把查询串的version_code设置到169之前就可以跳过这个字段了。 另外aid为必填字段,其他和接口本身无关的字段都可去掉。

截图1 截图1

由于这里涉及到抖音公司的核心利益,就不放具体代码和关键Key值了。有需要深入研究的朋友可以私信我。

douyin-sign's People

Contributors

flyoffline avatar quincyc379 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.