Metadata-Version: 2.1
Name: ohre
Version: 0.0.2a0
Summary: ohre is a analyze and reverse tool of HarmonyOS APP package.
Home-page: https://github.com/ohreteam
License: AGPL-3.0
Author: koki
Author-email: k0k1fish@outlook.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Security
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Dist: pendulum (>=3.0.0,<4.0.0)
Requires-Dist: yara-python (>=4.5.0,<5.0.0)
Project-URL: Documentation, https://github.com/ohreteam/ohre
Description-Content-Type: text/markdown

# OHRE

<p>
<a href="https://github.com/ohreteam/ohre/star"><img alt="stars" src="https://img.shields.io/github/stars/ohreteam/ohre?style=social"></a>
<a href="https://github.com/ohreteam/ohre"><img alt="watchers" src="https://img.shields.io/github/watchers/ohreteam/ohre?style=social"></a> 
<a href="https://github.com/ohreteam/ohre"><img alt="updated time" src="https://badges.pufler.dev/updated/ohreteam/ohre"></a>
<a href="https://github.com/ohreteam/ohre"><img alt="last-commit" src="https://img.shields.io/github/last-commit/ohreteam/ohre"></a>
<a href="https://github.com/ohreteam/ohre"><img alt="created time" src="https://badges.pufler.dev/created/ohreteam/ohre"></a>
<a href="https://github.com/ohreteam/ohre"><img alt="visits" src="https://badges.pufler.dev/visits/ohreteam/ohre"></a>
<a href="https://github.com/ohreteam/ohre"><img alt="license" src="https://img.shields.io/github/license/ohreteam/ohre"></a>
<a href="https://github.com/ohreteam/ohre/graphs/commit-activity"><img alt="maintained" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg"></a>
</p>

- zh_CN [简体中文](README_ZH.md)

A **O**pen **H**armonyOS app/hap package analyze and **RE**verse tool, compatible with HarmonyOS NEXT. Maybe pronounced like "ōli".

With ohre, you can (or will can) perform the following operations on a HarmonyOS app package (.app or .hap): file operations, information analysis, resource analysis, sensitive information detection, vulnerability detection, reverse analysis, etc.

tag: HarmonyOS, Open HarmonyOS, HarmonyOS NEXT, 鸿蒙 OS, hap, app

## Features

OHRE is a full python3 tool to play with HarmonyOS .app and .hap files.

- .app
- .hap
- pack.json
- module.json
- resources analysis: resources.index, resources\base\\\*, etc
- Code file leakage detection: pattern of file names in a specific path, either in white or black
- Built-in and self-defined vulnerability and sensitive information detection rules based on yara
- xxx.abc (in progress)
- xxx.so (in progress)

> Because it is still under testing, the debug log will be placed in `pwd` by default, which is one of the requirements for creating a new issue.

## Installation

As far as we know ohre is platform-independent, which means it can be used under Windows, Linux, and macOS with any CPU architecture.

```bash
pip install yara-python
pip install ohre # install from pip release version # for all users

# install as a python package locally # for debug and developers
pip install -e . # in the same folder as setup.py and .git
```

## How to Use

`ohre_demo.py` is a demo that shows almost all usages. Check it and then maybe check the wiki(TBD).

```bash
python ohre_demo.py xxx.hap # run demo with HarmonyOS hap
python ohre_demo.py xxx.app # run demo with HarmonyOS app
python ohre_demo.py xxx.hap --resource_analysis # run demo with HarmonyOS hap and resource analysis
```

## Contacts

Please new an issue, participate in the discussion or make a PR.

