Skip to main content

A python tool for analyzing .ipa files

Project description

IPAchecker

Lint Unit Tests License Button PyPI Button Downloads Badge

IPAchecker is a python 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 was 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
  • File Renaming: Automatically rename IPA files to standardized obscura filename format
  • Console Output: progress bars, tables, and colored output using the rich library
  • JSON Export: Export analysis results to JSON format
  • XML Export: Export analysis results to XML 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

pip install ipachecker

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

Usage

ipachecker <input>... [--output <output>] [--json | --xml] [--quiet] [--debug] [--dont-delete] [--rename] [--name <template>]
ipachecker --batch-analysis <path> [--output <output>] [--json | --xml] [--quiet] [--debug] [--dont-delete] [--rename] [--name <template>]

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 file (format determined by --json or --xml)
  • -j, --json – Output results as JSON to stdout
  • -x, --xml – Output results as XML 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
  • --rename – Rename IPA files to obscura filename format after analysis
  • -n, --name <template> – Custom rename template (implies --rename)
  • --batch-analysis – Enable batch analysis mode for multiple files

Examples

# 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 and rename to obscura format
ipachecker app.ipa --rename

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

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

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

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

# Export results to XML
ipachecker app.ipa --xml --output results.xml

# Output XML to stdout
ipachecker app.ipa --xml

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

# Keep downloaded files and rename them
ipachecker https://example.com/app.ipa --dont-delete --rename

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                                                            │
│ Original Filename     │ example_app.ipa                                                │
│ MD5 Hash              │ d41d8cd98f00b204e9800998ecf8427e                               │
│ File Size             │ 67 bytes                                                       │
└───────────────────────┴────────────────────────────────────────────────────────────────┘

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

File Renaming

The --rename flag automatically renames analyzed IPA files to the standardized Obscura filename format:

{DisplayName}-({BundleID})-{AppVersion}-(iOS_{MinVersion})-{MD5Hash}.ipa

Custom naming schemes

Use --name to supply your own naming template (this implies --rename):

ipachecker app.ipa --name "{DisplayName}-({BundleID})-{AppVersion}-(iOS_{MinVersion})-{MD5Hash}-{Architecture}"

Supported placeholders:

  • {DisplayName}: App display name
  • {BundleID}: Bundle identifier
  • {AppVersion}: App version
  • {MinVersion}: Minimum iOS version
  • {MD5Hash}: IPA MD5 hash
  • {Architecture}: 32-bit, 64-bit, or Universal

Notes:

  • Quote the template in your shell to avoid interpretation.
  • If the template result does not end with .ipa, it will be appended automatically.
  • Output filenames are sanitized for filesystem safety and will not overwrite existing files.

Key behaviors:

  • Only renames local files (not downloaded files, unless used with --dont-delete)
  • Skips files that already have the correct obscura format name
  • Will not overwrite existing files
  • Works with both single file and batch analysis modes
  • Displays clear status messages for each rename operation

Examples:

# Rename a single file after analysis
ipachecker MyApp.ipa --rename
# Result: MyApp-(com.company.myapp)-1.2.3-(iOS_13.0)-abc123...ipa

# Batch rename all IPAs in a folder
ipachecker --batch-analysis /path/to/ipas --rename

# Download, analyze, keep em, and rename
ipachecker https://example.com/app.ipa --dont-delete --rename

Batch Analysis

ipachecker supports batch processing in two modes:

Folder Analysis

Point to a folder containing .ipa files:

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:

ipachecker --batch-analysis ipas.txt

Batch Rename

Add the --rename flag to automatically rename all successfully analyzed files:

ipachecker --batch-analysis /path/ --rename

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. File Renaming (Optional): When --rename flag is used, renames the analyzed IPA file to the obscura format, handling file conflicts and permission errors gracefully

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

  10. 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
  • Rename failures: Permission issues, file conflicts, or filesystem errors

Use --debug flag for detailed troubleshooting info

Integration

JSON Output

Use --json arg for JSON format output:

{
  "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",
  "originalFilename": "instagram.ipa",
  "md5": "d41d8cd98f00b204e9800998ecf8427e",
  "fileSize": 125829120,
  "filePath": "/path/to/instagram.ipa"
}

XML Output

Use --xml arg for XML format output:

<?xml version="1.0" encoding="UTF-8"?>
<result>
  <appName>Instagram</appName>
  <displayName>Instagram</displayName>
  <bundleId>com.burbn.instagram</bundleId>
  <appVersion>245.0</appVersion>
  <minIOS>13.0</minIOS>
  <architecture>64-bit</architecture>
  <encrypted>True</encrypted>
  <obscuraFilename>Instagram-(com.burbn.instagram)-245.0-(iOS_13.0)-d41d8cd98f00b204e9800998ecf8427e.ipa</obscuraFilename>
  <originalFilename>instagram.ipa</originalFilename>
  <md5>d41d8cd98f00b204e9800998ecf8427e</md5>
  <fileSize>125829120</fileSize>
  <filePath>/path/to/instagram.ipa</filePath>
</result>

Exit Codes

  • 0: Success
  • 1: Analysis errors or failures

[!WARNING] This tool is not affiliated with, endorsed by, or sponsored by Apple Inc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipachecker-1.0.4.tar.gz (65.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipachecker-1.0.4-py2.py3-none-any.whl (43.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ipachecker-1.0.4.tar.gz.

File metadata

  • Download URL: ipachecker-1.0.4.tar.gz
  • Upload date:
  • Size: 65.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ipachecker-1.0.4.tar.gz
Algorithm Hash digest
SHA256 97c6e4598401171a6357fcae8e0a5cb50bec75f7e1d9591f914c8e0d62dc265c
MD5 bff70c8071e63516f881dfdde859610c
BLAKE2b-256 eaa1d4a2beb39e0d9bfb1c3b8605d0c04b40a3b895d1b1cdc06f4830842c2dc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ipachecker-1.0.4.tar.gz:

Publisher: release.yml on Andres9890/ipachecker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ipachecker-1.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: ipachecker-1.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ipachecker-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 79e0aa50acc715dbb7b73b5f693f22d2e89048a6cb93f227a250f1b78c3d0afc
MD5 a5245e3f7e44d8b0012465d2a6783789
BLAKE2b-256 807b259ec43f81c4d9c9b5e5d0a974b3d6cd7e3d1339c003ff249e26e7468611

See more details on using hashes here.

Provenance

The following attestation bundles were made for ipachecker-1.0.4-py2.py3-none-any.whl:

Publisher: release.yml on Andres9890/ipachecker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page