ipachecker


Nameipachecker JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/Andres9890/ipachecker
SummaryA tool for checking if an .ipa file is encrypted
upload_time2025-08-26 21:22:00
maintainerNone
docs_urlNone
authorAndres99
requires_python>=3.8
licenseNone
keywords ios ipa analysis metadata encryption mobile app
VCS
bugtrack_url
requirements docopt-ng rich macholib
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [License Button]: https://img.shields.io/badge/License-MIT-black
[License Link]: https://github.com/Andres9890/ipachecker/blob/main/LICENSE 'MIT License.'

[PyPI Button]: https://img.shields.io/pypi/v/ipachecker?color=blue&label=PyPI
[PyPI Link]: https://pypi.org/project/ipachecker/ 'PyPI Package.'

# IPAchecker
[![Lint](https://github.com/Andres9890/ipachecker/actions/workflows/lint.yml/badge.svg)](https://github.com/Andres9890/ipachecker/actions/workflows/lint.yml)
[![Unit Tests](https://github.com/Andres9890/ipachecker/actions/workflows/unit-test.yml/badge.svg)](https://github.com/Andres9890/ipachecker/actions/workflows/unit-test.yml)
[![License Button]][License Link]
[![PyPI Button]][PyPI Link]

IPAchecker is a tool for analyzing iOS IPA files, It extracts metadata, checks encryption status, determines architecture, and provides detailed information about iOS applications, The tool supports both local path analysis and direct downloads from URLs (using curl), with batch processing for analyzing multiple ipas

> Python script provided by norep on discord, credits to him

## Features

- **Encryption Detection**: Determines if an IPA file is encrypted or decrypted by analyzing mach-o load commands
- **Metadata Extraction**: Reads app information from Info.plist including bundle ID, version, minimum iOS version, and display name
- **Architecture Analysis**: Identifies app architecture (32-bit, 64-bit, or Universal binary)
- **Batch Processing**: Analyze multiple IPA files from folders or URL/path lists
- **Remote Downloads**: Download and analyze IPA files directly from URLs using curl
- **Console Output**: progress bars, tables, and colored output using the `rich` library
- **JSON Export**: Export analysis results to JSON format
- **Obscura Filename**: Creates standardized filenames in iOSObscura format
- **MD5 Hash**: Generates file hash
- **Automatic Cleanup**: Optionally removes downloaded files after analysis

## Installation

Requires Python 3.8 or newer

```bash
pip install ipachecker
```

The package creates a console script named `ipachecker` once installed, You can also install from source using `pip install .`

## Usage

```bash
ipachecker <input>... [--output <output>] [--json] [--quiet] [--debug] [--dont-delete]
ipachecker --batch-analysis <path> [--output <output>] [--json] [--quiet] [--debug] [--dont-delete]
```

### Arguments

- `<input>` – Path to .ipa file or URL to download .ipa file
- `<path>` – For batch analysis: folder containing .ipa files, or .txt file with paths/URLs

### Options

- `-h, --help` – Show help message
- `-o, --output <output>` – Save results to specified JSON file
- `-j, --json` – Output results as JSON to stdout
- `-q, --quiet` – Only print errors and results
- `-d, --debug` – Print all logs to stdout for troubleshooting
- `--dont-delete` – Don't delete downloaded files after analysis
- `--batch-analysis` – Enable batch analysis mode for multiple files

### Examples

```bash
# Analyze a local IPA file
ipachecker /path/to/app.ipa

# Download and analyze from URL
ipachecker https://example.com/releases/MyApp-v1.2.ipa

# Analyze multiple files
ipachecker app1.ipa app2.ipa https://example.com/app3.ipa

# Batch analyze all IPAs in a folder
ipachecker --batch-analysis /path/folder

# Batch analyze from URL/path list file
ipachecker --batch-analysis thereisalist.txt

# Export results to JSON
ipachecker app.ipa --json --output results.json

# Debug mode for troubleshooting
ipachecker app.ipa --debug

# Keep downloaded files
ipachecker https://example.com/dl/app.ipa --dont-delete
```

### Example Output:

```
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Property              ┃ Value                                                          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Name                  │ Example                                                        │
│ Display Name          │ Example                                                        │
│ Bundle Identifier     │ com.example.app                                                │
│ Version               │ 1.0                                                            │
│ Minimum iOS           │ 2.0                                                            │
│ Architecture          │ 32-bit                                                         │
│ Encrypted             │ YES                                                            │
│ MD5 Hash              │ d41d8cd98f00b204e9800998ecf8427e                               │
│ File Size             │ 67 bytes                                                       │
└───────────────────────┴────────────────────────────────────────────────────────────────┘

Obscura-format filename:
Example-(com.example.app)-1.0-(iOS_2.0)-d41d8cd98f00b204e9800998ecf8427e.ipa
```

## Batch Analysis

ipachecker supports batch processing in two modes:

### Folder Analysis
Point to a folder containing .ipa files:
```bash
ipachecker --batch-analysis /User/downloads/ipas/
```

### List File Analysis
Create a text file with paths/URLs (one per line):
```
# ipas.txt
/Users/downloads/app1.ipa
/Users/downloads/app2.ipa

or

https://example.com/app.ipa
https://releases.example.zip/app67.ipa
```

Then analyze:
```bash
ipachecker --batch-analysis ipas.txt
```

## How it works

1. **Input Processing**: ipachecker determines if the input is a local file path or URL, For URLs, it uses curl to download the file with SSL compatibility and retry logic

2. **IPA Extraction**: The tool treats IPA files as ZIP archives and extracts them to a temporary directory, locating the `Payload/*.app` structure

3. **Metadata Reading**: Parses the `Info.plist` file to extract app metadata including bundle identifier, version information, display name, and minimum iOS version

4. **Binary Analysis**: Uses the macholib library to analyze the main executable's Mach-O binary format, checking load commands for encryption information and architecture details

5. **Encryption Detection**: Examines `encryption_info_command` and `encryption_info_command_64` load commands, If the `cryptid` field is 0, the binary is decrypted; if 1 or missing commands, it's encrypted

6. **Architecture Detection**: Identifies CPU types from Mach-O headers:
   - ARM64 (cputype 16777228) = 64-bit
   - ARMv7/ARMv7s (cputype 12) = 32-bit  
   - Multiple architectures = Universal

7. **Result Generation**: Compiles all information into a structured result with standardized Obscura filename format: `{DisplayName}-{BundleID}-{AppVersion}-{iOS_MinVersion}-{MD5Hash}.ipa`

8. **Output**: Presents results in rich console tables or JSON format, with batch summaries for multiple file analysis

9. **Cleanup**: Automatically removes downloaded temporary files unless `--dont-delete` is specified

## Error Handling

ipachecker provides clear error messages for common issues:

- **File not found**: Missing local files or invalid paths
- **Download failures**: Network issues, invalid URLs, or SSL problems
- **Invalid IPA files**: Corrupted archives or non-IPA files
- **Missing metadata**: Apps without proper Info.plist files
- **Analysis errors**: Corrupted binaries or unsupported formats

Use `--debug` flag for detailed troubleshooting info

## Integration

### JSON Output
Use `--json` arg for programmatic integration:

```json
{
  "appName": "Instagram",
  "displayName": "Instagram", 
  "bundleId": "com.burbn.instagram",
  "appVersion": "245.0",
  "minIOS": "13.0",
  "architecture": "64-bit",
  "encrypted": true,
  "obscuraFilename": "Instagram-(com.burbn.instagram)-245.0-(iOS_13.0)-d41d8cd98f00b204e9800998ecf8427e.ipa",
  "md5": "d41d8cd98f00b204e9800998ecf8427e",
  "fileSize": 125829120,
  "filePath": "/path/to/instagram.ipa"
}
```

### Exit Codes
- `0`: Success
- `1`: Analysis errors or failures

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Andres9890/ipachecker",
    "name": "ipachecker",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ios, ipa, analysis, metadata, encryption, mobile, app",
    "author": "Andres99",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/9a/43/c24e0fc257600df1f71b7c63dc1340cbb9599098934fa3d7bda96ba765ae/ipachecker-1.0.0.tar.gz",
    "platform": null,
    "description": "[License Button]: https://img.shields.io/badge/License-MIT-black\r\n[License Link]: https://github.com/Andres9890/ipachecker/blob/main/LICENSE 'MIT License.'\r\n\r\n[PyPI Button]: https://img.shields.io/pypi/v/ipachecker?color=blue&label=PyPI\r\n[PyPI Link]: https://pypi.org/project/ipachecker/ 'PyPI Package.'\r\n\r\n# IPAchecker\r\n[![Lint](https://github.com/Andres9890/ipachecker/actions/workflows/lint.yml/badge.svg)](https://github.com/Andres9890/ipachecker/actions/workflows/lint.yml)\r\n[![Unit Tests](https://github.com/Andres9890/ipachecker/actions/workflows/unit-test.yml/badge.svg)](https://github.com/Andres9890/ipachecker/actions/workflows/unit-test.yml)\r\n[![License Button]][License Link]\r\n[![PyPI Button]][PyPI Link]\r\n\r\nIPAchecker is a tool for analyzing iOS IPA files, It extracts metadata, checks encryption status, determines architecture, and provides detailed information about iOS applications, The tool supports both local path analysis and direct downloads from URLs (using curl), with batch processing for analyzing multiple ipas\r\n\r\n> Python script provided by norep on discord, credits to him\r\n\r\n## Features\r\n\r\n- **Encryption Detection**: Determines if an IPA file is encrypted or decrypted by analyzing mach-o load commands\r\n- **Metadata Extraction**: Reads app information from Info.plist including bundle ID, version, minimum iOS version, and display name\r\n- **Architecture Analysis**: Identifies app architecture (32-bit, 64-bit, or Universal binary)\r\n- **Batch Processing**: Analyze multiple IPA files from folders or URL/path lists\r\n- **Remote Downloads**: Download and analyze IPA files directly from URLs using curl\r\n- **Console Output**: progress bars, tables, and colored output using the `rich` library\r\n- **JSON Export**: Export analysis results to JSON format\r\n- **Obscura Filename**: Creates standardized filenames in iOSObscura format\r\n- **MD5 Hash**: Generates file hash\r\n- **Automatic Cleanup**: Optionally removes downloaded files after analysis\r\n\r\n## Installation\r\n\r\nRequires Python 3.8 or newer\r\n\r\n```bash\r\npip install ipachecker\r\n```\r\n\r\nThe package creates a console script named `ipachecker` once installed, You can also install from source using `pip install .`\r\n\r\n## Usage\r\n\r\n```bash\r\nipachecker <input>... [--output <output>] [--json] [--quiet] [--debug] [--dont-delete]\r\nipachecker --batch-analysis <path> [--output <output>] [--json] [--quiet] [--debug] [--dont-delete]\r\n```\r\n\r\n### Arguments\r\n\r\n- `<input>` \u2013 Path to .ipa file or URL to download .ipa file\r\n- `<path>` \u2013 For batch analysis: folder containing .ipa files, or .txt file with paths/URLs\r\n\r\n### Options\r\n\r\n- `-h, --help` \u2013 Show help message\r\n- `-o, --output <output>` \u2013 Save results to specified JSON file\r\n- `-j, --json` \u2013 Output results as JSON to stdout\r\n- `-q, --quiet` \u2013 Only print errors and results\r\n- `-d, --debug` \u2013 Print all logs to stdout for troubleshooting\r\n- `--dont-delete` \u2013 Don't delete downloaded files after analysis\r\n- `--batch-analysis` \u2013 Enable batch analysis mode for multiple files\r\n\r\n### Examples\r\n\r\n```bash\r\n# Analyze a local IPA file\r\nipachecker /path/to/app.ipa\r\n\r\n# Download and analyze from URL\r\nipachecker https://example.com/releases/MyApp-v1.2.ipa\r\n\r\n# Analyze multiple files\r\nipachecker app1.ipa app2.ipa https://example.com/app3.ipa\r\n\r\n# Batch analyze all IPAs in a folder\r\nipachecker --batch-analysis /path/folder\r\n\r\n# Batch analyze from URL/path list file\r\nipachecker --batch-analysis thereisalist.txt\r\n\r\n# Export results to JSON\r\nipachecker app.ipa --json --output results.json\r\n\r\n# Debug mode for troubleshooting\r\nipachecker app.ipa --debug\r\n\r\n# Keep downloaded files\r\nipachecker https://example.com/dl/app.ipa --dont-delete\r\n```\r\n\r\n### Example Output:\r\n\r\n```\r\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\r\n\u2503 Property              \u2503 Value                                                          \u2503\r\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\r\n\u2502 Name                  \u2502 Example                                                        \u2502\r\n\u2502 Display Name          \u2502 Example                                                        \u2502\r\n\u2502 Bundle Identifier     \u2502 com.example.app                                                \u2502\r\n\u2502 Version               \u2502 1.0                                                            \u2502\r\n\u2502 Minimum iOS           \u2502 2.0                                                            \u2502\r\n\u2502 Architecture          \u2502 32-bit                                                         \u2502\r\n\u2502 Encrypted             \u2502 YES                                                            \u2502\r\n\u2502 MD5 Hash              \u2502 d41d8cd98f00b204e9800998ecf8427e                               \u2502\r\n\u2502 File Size             \u2502 67 bytes                                                       \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n\r\nObscura-format filename:\r\nExample-(com.example.app)-1.0-(iOS_2.0)-d41d8cd98f00b204e9800998ecf8427e.ipa\r\n```\r\n\r\n## Batch Analysis\r\n\r\nipachecker supports batch processing in two modes:\r\n\r\n### Folder Analysis\r\nPoint to a folder containing .ipa files:\r\n```bash\r\nipachecker --batch-analysis /User/downloads/ipas/\r\n```\r\n\r\n### List File Analysis\r\nCreate a text file with paths/URLs (one per line):\r\n```\r\n# ipas.txt\r\n/Users/downloads/app1.ipa\r\n/Users/downloads/app2.ipa\r\n\r\nor\r\n\r\nhttps://example.com/app.ipa\r\nhttps://releases.example.zip/app67.ipa\r\n```\r\n\r\nThen analyze:\r\n```bash\r\nipachecker --batch-analysis ipas.txt\r\n```\r\n\r\n## How it works\r\n\r\n1. **Input Processing**: ipachecker determines if the input is a local file path or URL, For URLs, it uses curl to download the file with SSL compatibility and retry logic\r\n\r\n2. **IPA Extraction**: The tool treats IPA files as ZIP archives and extracts them to a temporary directory, locating the `Payload/*.app` structure\r\n\r\n3. **Metadata Reading**: Parses the `Info.plist` file to extract app metadata including bundle identifier, version information, display name, and minimum iOS version\r\n\r\n4. **Binary Analysis**: Uses the macholib library to analyze the main executable's Mach-O binary format, checking load commands for encryption information and architecture details\r\n\r\n5. **Encryption Detection**: Examines `encryption_info_command` and `encryption_info_command_64` load commands, If the `cryptid` field is 0, the binary is decrypted; if 1 or missing commands, it's encrypted\r\n\r\n6. **Architecture Detection**: Identifies CPU types from Mach-O headers:\r\n   - ARM64 (cputype 16777228) = 64-bit\r\n   - ARMv7/ARMv7s (cputype 12) = 32-bit  \r\n   - Multiple architectures = Universal\r\n\r\n7. **Result Generation**: Compiles all information into a structured result with standardized Obscura filename format: `{DisplayName}-{BundleID}-{AppVersion}-{iOS_MinVersion}-{MD5Hash}.ipa`\r\n\r\n8. **Output**: Presents results in rich console tables or JSON format, with batch summaries for multiple file analysis\r\n\r\n9. **Cleanup**: Automatically removes downloaded temporary files unless `--dont-delete` is specified\r\n\r\n## Error Handling\r\n\r\nipachecker provides clear error messages for common issues:\r\n\r\n- **File not found**: Missing local files or invalid paths\r\n- **Download failures**: Network issues, invalid URLs, or SSL problems\r\n- **Invalid IPA files**: Corrupted archives or non-IPA files\r\n- **Missing metadata**: Apps without proper Info.plist files\r\n- **Analysis errors**: Corrupted binaries or unsupported formats\r\n\r\nUse `--debug` flag for detailed troubleshooting info\r\n\r\n## Integration\r\n\r\n### JSON Output\r\nUse `--json` arg for programmatic integration:\r\n\r\n```json\r\n{\r\n  \"appName\": \"Instagram\",\r\n  \"displayName\": \"Instagram\", \r\n  \"bundleId\": \"com.burbn.instagram\",\r\n  \"appVersion\": \"245.0\",\r\n  \"minIOS\": \"13.0\",\r\n  \"architecture\": \"64-bit\",\r\n  \"encrypted\": true,\r\n  \"obscuraFilename\": \"Instagram-(com.burbn.instagram)-245.0-(iOS_13.0)-d41d8cd98f00b204e9800998ecf8427e.ipa\",\r\n  \"md5\": \"d41d8cd98f00b204e9800998ecf8427e\",\r\n  \"fileSize\": 125829120,\r\n  \"filePath\": \"/path/to/instagram.ipa\"\r\n}\r\n```\r\n\r\n### Exit Codes\r\n- `0`: Success\r\n- `1`: Analysis errors or failures\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A tool for checking if an .ipa file is encrypted",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/Andres9890/ipachecker",
        "issues": "https://github.com/Andres9890/ipachecker/issues",
        "repository": "https://github.com/Andres9890/ipachecker.git"
    },
    "split_keywords": [
        "ios",
        " ipa",
        " analysis",
        " metadata",
        " encryption",
        " mobile",
        " app"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "01f5e97354e2f6a7d20a69ef0641079e3dc05feef0d3cfe6a994ecdcb33c2565",
                "md5": "4e7330935fab905646e723a9b58f43de",
                "sha256": "85e3fc6a9bc77edaad4c6463f75aa63891d07347c9d34b1ccf27933a7d03e94f"
            },
            "downloads": -1,
            "filename": "ipachecker-1.0.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4e7330935fab905646e723a9b58f43de",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 15135,
            "upload_time": "2025-08-26T21:21:59",
            "upload_time_iso_8601": "2025-08-26T21:21:59.053143Z",
            "url": "https://files.pythonhosted.org/packages/01/f5/e97354e2f6a7d20a69ef0641079e3dc05feef0d3cfe6a994ecdcb33c2565/ipachecker-1.0.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9a43c24e0fc257600df1f71b7c63dc1340cbb9599098934fa3d7bda96ba765ae",
                "md5": "9c04923490b53e9cdea461b5fc87b168",
                "sha256": "2cf202b5e0c5aca6459cf904a100977fa5eb4e246a39aa739cc059ff235d3810"
            },
            "downloads": -1,
            "filename": "ipachecker-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9c04923490b53e9cdea461b5fc87b168",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 23605,
            "upload_time": "2025-08-26T21:22:00",
            "upload_time_iso_8601": "2025-08-26T21:22:00.575153Z",
            "url": "https://files.pythonhosted.org/packages/9a/43/c24e0fc257600df1f71b7c63dc1340cbb9599098934fa3d7bda96ba765ae/ipachecker-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-26 21:22:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Andres9890",
    "github_project": "ipachecker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "docopt-ng",
            "specs": [
                [
                    ">=",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    ">=",
                    "14.1.0"
                ]
            ]
        },
        {
            "name": "macholib",
            "specs": [
                [
                    ">=",
                    "1.16.3"
                ]
            ]
        }
    ],
    "lcname": "ipachecker"
}
        
Elapsed time: 1.39875s