Coder Social home page Coder Social logo

arida's Introduction

Logo

Welcome to arida 👋

Version Documentation License: 暂无

基于FastAPI实现的Frida-RPC工具,只需开发好相对应app的Frida-Js脚本,即可自动生成相应的基于FastAPIFrida-RPC工具

原理介绍:https://mp.weixin.qq.com/s/U6RNZTFyLp5GsGU8o17x3Q

Demo

Do By You Self!

实现原理

Python执行PyexecJs通过Js的AST树结构获取Frida-Js脚本中rpc.exports的方法以及对应方法的参数个数,根据方法名和参数个数通过types.FunctionDefPython AST字节码来动态生成新的Function对象,并且结合pydanticcreate_model自动生成的参数模型注册到FastAPI的路由系统中,实现Frida-RPC的功能。

工作流程

工作流程

核心功能

  1. 管理JavaScript文件,具备APP-文件的映射关系

  2. 自动针对现有的JavaScript方法生成相应的API方法

  3. 自动生成Open API文档

Install

1. git clone [email protected]:lateautumn4lin/arida.git

2. conda create -n arida python==3.8

3. conda install --yes --file requirements.txt

Usage

1. uvicorn main:app --reload

2. watch 127.0.0.1:8000/docs 

eg:

生成的fastapi的api结构图

对应api的参数图

如何开发自己的接口呢?

  1. Config文件中写入自己的App信息

  2. Apps目录写开发相应的Frida-Js脚本,可参考其他两个文件

Run tests

uvicorn main:app --reload

测试Apk地址:

1. https://www.wandoujia.com/apps/6612700

2. https://www.wandoujia.com/apps/7666802

eg:

测试图

参考资料

  1. https://www.cnblogs.com/olivetree123/p/5067685.html(python动态创建函数)

  2. http://blog.soliloquize.org/2016/07/06/Python%E5%8A%A8%E6%80%81%E5%88%9B%E5%BB%BA%E5%87%BD%E6%95%B0/

  3. https://zhuanlan.zhihu.com/p/103665038(python字节码)

  4. https://www.jianshu.com/p/2006a8c75bb2(FastAPI动态建模)

  5. https://github.com/xonsh/xonsh/pull/3304/files(python AST解析参考)

Author

👤 Lateautumn4lin

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 Lateautumn4lin.
This project is 暂无 licensed.


This README was generated with ❤️ by readme-md-generator

arida's People

Contributors

tcc0lin 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.