PHPackages                             hejunjie/wechat-bill-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hejunjie/wechat-bill-parser

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hejunjie/wechat-bill-parser
===========================

一个高性能、自动化的微信账单解析器，支持压缩包密码自动破解与账单数据智能提取，适用于账单分析、账单自动化入账、个人理财工具开发等场景 | A fast, automated Wechat bill parser that cracks compressed file passwords and extracts bill data. Perfect for bill analysis, automatic bookkeeping, and personal finance tools

v2.3.0(8mo ago)6241MITPHPPHP &gt;=8.1

Since May 27Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/zxc7563598/php-wechat-bill-parser)[ Packagist](https://packagist.org/packages/hejunjie/wechat-bill-parser)[ RSS](/packages/hejunjie-wechat-bill-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

hejunjie/wechat-bill-parser
===========================

[](#hejunjiewechat-bill-parser)

 [English](./README.md)｜[简体中文](./README.zh-CN.md)---

⚠️ This project is for learning and communication purposes only. Commercial or illegal use is strictly prohibited.

A high-performance, automated Wechat bill parser that supports automatic password cracking of compressed files and intelligent extraction of bill data. Ideal for scenarios such as bill analysis, automated bookkeeping, and personal finance tool development.

**This project has been parsed by Zread. If you need a quick overview of the project, you can click here to view it：[Understand this project](https://zread.ai/zxc7563598/php-wechat-bill-parser)**

---

✨ Features
----------

[](#-features)

- 🔐 **Automatic Password Cracking for Compressed Files**: Utilizes a native C-based multithreaded brute-force tool for extremely fast response and minimal resource usage.
- 📦 **No Manual Extraction Required**: Supports password-protected archives, automatically decompresses and reads bill data without manual intervention.
- 📄 **Intelligent Data Extraction**: Parses Wechat bill CSV files to quickly extract account information, user names, and transaction details.
- 🧩 **Highly Customizable**: Offers flexible control over the parsing process via callback functions—for example, to retrieve only the password without generating HTML.
- 📬 **Compatible with Email Monitoring Scripts**: Can be integrated with email listeners to enable fully automated bill collection and parsing.

---

🛠 System Requirements
---------------------

[](#-system-requirements)

This library depends on the C library [libzip](https://libzip.org/). Please install the dependency first:

- Ubuntu / Debian：

    ```
    sudo apt install libzip-dev
    ```
- macOS (using Homebrew)：

    ```
    brew install libzip
    ```
- Windows users can use this via WSL, or use the precompiled `zip_bruteforce.exe`.

---

📦 Installation
--------------

[](#-installation)

Install this library via Composer:

```
composer require hejunjie/wechat-bill-parser
```

---

🚀 Usage
-------

[](#-usage)

```
use Hejunjie\WechatBillParser\WechatBillParser;
use Hejunjie\WechatBillParser\ParseOptions;

$zipFile = '/path/to/微信支付账单.zip';

$options = new ParseOptions($zipFile);
$options->onPasswordFound = function ($password) {
    echo "password:$password\n";
    return true; // Returning false will terminate the subsequent parsing process.
};
$options->onDataParsed = function ($data) {
    echo "name " . $data['real_name'] . PHP_EOL;
    echo "account " . $data['account'] . PHP_EOL;
    echo "A total of " . count($data['data']) . " records have been parsed.\n";
    return true; // Returning false will skip the HTML generation step (under development).
};

// tips: Future versions may support directly generating a bill report as an HTML file.

$parser = new WechatBillParser();
$parser->parse($options);
```

You can also choose to retrieve only the password or only the bill data—simply implement the corresponding callback functions as needed.

---

🧠 Purpose &amp; Motivation
--------------------------

[](#-purpose--motivation)

I usually keep track of my bills and personal income and expenses, but the bill formats exported from WeChat and Alipay are inconsistent and often come as encrypted compressed files. Exporting, extracting, and organizing these bills every time is extremely tedious. So, I developed this tool:

- Acts as middleware for personal bill processing;
- Eliminates the need for manual downloading and extraction by automatically cracking compressed files and extracting data;
- Can be combined with email monitoring scripts to enable automated transaction collection;
- Simply forward all bill emails to a designated mailbox, and you can parse all bill data with one click—freeing your hands completely.

---

🧾 Output Structure Description
------------------------------

[](#-output-structure-description)

The `$data` passed into the `onDataParsed` callback is an array with the following structure:

```
[
  'real_name' => '张三', // name
  'account' => '18273727771', // WeChat Nickname
  'data' => [
      // Each line of bill record
      ["Transaction Time", "Transaction Type", "Counterparty", "Product", "Income/Expense", "Amount (CNY)", "Payment Method", "Current Status", "Transaction ID", "Merchant Order ID", "Remarks"]
      ...
  ]
]
```

---

📮 Contact
---------

[](#-contact)

If you have any questions, suggestions, or cooperation interests, feel free to reach out to me via GitHub Issues.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance64

Regular maintenance activity

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~19 days

Recently: every ~8 days

Total

6

Last Release

254d ago

Major Versions

v1.0.0 → v2.0.02025-08-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b65d4b40ae456172fb38f63f84bf737ac88031484b1f228b1cc8d71baa80adf?d=identicon)[苏青安](/maintainers/%E8%8B%8F%E9%9D%92%E5%AE%89)

---

Top Contributors

[![zxc7563598](https://avatars.githubusercontent.com/u/46590942?v=4)](https://github.com/zxc7563598 "zxc7563598 (10 commits)")

---

Tags

automationbill-parsercsv-parserfinancial-toolpassword-bruteforcepersonal-financephp-librarywechat

### Embed Badge

![Health badge](/badges/hejunjie-wechat-bill-parser/health.svg)

```
[![Health](https://phpackages.com/badges/hejunjie-wechat-bill-parser/health.svg)](https://phpackages.com/packages/hejunjie-wechat-bill-parser)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[in2code/powermail

Powermail is a well-known, editor-friendly, powerful and easy to use mailform extension for TYPO3 with a lots of features

982.5M38](/packages/in2code-powermail)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

44763.4k2](/packages/pimcore-data-importer)[portphp/spreadsheet

PhpSpreadsheet reader and writer for Port

14796.4k4](/packages/portphp-spreadsheet)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
