Giter Site home page Giter Site logo

autojs-unpacker's Introduction

📤 autojs-unpacker

This is a reverse engineering tool for Android AutoJS application. It can decrypt js files in the project directory and re-encrypt them.

中文文档

Feature

  • decrypt a single file
  • encrypt a single file
  • decrypt/encrypt all files in the project directory

Usage

  • Clone this library to this machine, and make sure that frida has been installed via pip
  • First, make your android device connected to your computer by usb, and start frida-server as root user.
  • Second, make sure that the applicaion you want to decrypt is running.
  • Follow the usage below:
Usage: unpacker.py -m {e,d,l} -p PKG [other arguments]
             _        _                                        _             
  __ _ _   _| |_ ___ (_)___       _   _ _ __  _ __   __ _  ___| | _____ _ __ 
 / _` | | | | __/ _ \| / __|_____| | | | '_ \| '_ \ / _` |/ __| |/ / _ \ '__|
| (_| | |_| | || (_) | \__ \_____| |_| | | | | |_) | (_| | (__|   <  __/ |   
 \__,_|\__,_|\__\___// |___/      \__,_|_| |_| .__/ \__,_|\___|_|\_\___|_|   
                   |__/                      |_|                             
                                                                    by: imlk
https://github.com/KB5201314/autojs-unpacker


Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -D ID, --device=ID    connect to device with the given ID
  -U, --usb             connect to USB device
  -R, --remote          connect to remote frida-server
  -H HOST, --host=HOST  connect to remote frida-server on HOST
  -O FILE, --options-file=FILE
                        text file containing additional command line options
  -m MODE, --mode=MODE  choose "e" for encrypt, or "d" for decrypt, or "l" for
                        hot load into device
  -p PKG, --pkg=PKG     package name or process name in android device to be
                        attached
  --id=INPUT_DIR        directory of input files. entry js file(e.g main.js)
                        will not be recognized if project.json not in this
                        directory
  --od=OUTPUT_DIR       directory of output files
  --if=INPUT_FILE       directory of single input file
  --of=OUTPUT_FILE      directory of single output file
  --isui                whether the file to be encrypted specified by -if is
                        an ui script

Examples

  • decrypt a file
# decrypt ./assets/project/main.js to ./src/main.js
./unpacker.py -U -m d -p com.example.pkg --if ./assets/project/main.js --of ./src/main.js
  • encrypt a file
# encrypt ./src/main.js to ./src_en/main.js
./unpacker.py -U -m e -p com.example.pkg --if ./src/main.js --of ./src_en/main.js
  • hotload a file
# encrypt and load ./src/main.js to (data)/main.js
# this will encrypt ./src/main.js on your computer and replace with app's cache on your phone, so that you can quickly see the effect of modifying the script.
./unpacker.py -U -m l -p com.example.pkg --if ./src/main.js --of main.js

autojs-unpacker's People

Contributors

imlk0 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  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

autojs-unpacker's Issues

使用时报错,但是不清楚是什么原因

Microsoft Windows [版本 10.0.18363.778]
(c) 2019 Microsoft Corporation。保留所有权利。

C:\Windows\system32>python D:\frida\autojs-unpacker-master\unpacker.py u d -p com.example.script1559346752811 -if D:/frida/autojs-unpacker-master/assets/project/01main.js -of D:/frida/autojs-unpacker-master/unmain.js
Usage: unpacker.py -m {e,d} -p PKG [other arguments]
_ _ _
__ _ _ | | ___ ()__ _ _ _ __ _ __ __ _ | | _____ _ __
/ | | | | __/ _ \| / __|_____| | | | '_ \| '_ \ / _ |/ | |/ / _ \ '|
| (
| | |
| | || (
) | _
_| || | | | | |) | (| | (__| < __/ |
_
,|_,|__// |/ _,|| || .__/ _,|___||__|_|
|
/ |_|
by: imlk
https://github.com/KB5201314/autojs-unpacker

unpacker.py: error: no such option: -i

运行报错

运行报错如下:
测试server 连接是正常的
图片

how to use it in windows?

i run it in windows10 cmd:
python ../../autojs-unpacker\unpacker.py -U -m d -p com.example.script --if ./project/main.js --of ./project/main2.js
and it throws:
Traceback (most recent call last): File "../../autojs-unpacker\autojs-unpacker\unpacker.py", line 208, in <module> app = AutoJSUnpackerApplication() File "D:\Develop\Anaconda3\envs\spider\lib\site-packages\frida_tools\application.py", line 140, in __init__ self._add_options(parser) File "../../autojs-unpacker\autojs-unpacker\unpacker.py", line 41, in _add_options parser.add_option('-m', '--mode', action="store", choices=['e', 'd', 'l'], type='choice', help='choose "e" for encrypt, or "d" for decrypt, or "l" for hot load into device') AttributeError: 'ArgumentParser' object has no attribute 'add_option'

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.