ipachecker 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Andres99
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,232 @@
1
+ Metadata-Version: 2.4
2
+ Name: ipachecker
3
+ Version: 1.0.0
4
+ Summary: A tool for checking if an .ipa file is encrypted
5
+ Home-page: https://github.com/Andres9890/ipachecker
6
+ Author: Andres99
7
+ License-Expression: MIT
8
+ Project-URL: homepage, https://github.com/Andres9890/ipachecker
9
+ Project-URL: repository, https://github.com/Andres9890/ipachecker.git
10
+ Project-URL: issues, https://github.com/Andres9890/ipachecker/issues
11
+ Keywords: ios,ipa,analysis,metadata,encryption,mobile,app
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: Implementation :: CPython
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Classifier: Topic :: System :: Archiving
25
+ Classifier: Topic :: Utilities
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: docopt-ng>=0.9.0
30
+ Requires-Dist: rich>=14.1.0
31
+ Requires-Dist: macholib>=1.16.3
32
+ Dynamic: home-page
33
+ Dynamic: license-file
34
+ Dynamic: requires-python
35
+
36
+ [License Button]: https://img.shields.io/badge/License-MIT-black
37
+ [License Link]: https://github.com/Andres9890/ipachecker/blob/main/LICENSE 'MIT License.'
38
+
39
+ [PyPI Button]: https://img.shields.io/pypi/v/ipachecker?color=blue&label=PyPI
40
+ [PyPI Link]: https://pypi.org/project/ipachecker/ 'PyPI Package.'
41
+
42
+ # IPAchecker
43
+ [![Lint](https://github.com/Andres9890/ipachecker/actions/workflows/lint.yml/badge.svg)](https://github.com/Andres9890/ipachecker/actions/workflows/lint.yml)
44
+ [![Unit Tests](https://github.com/Andres9890/ipachecker/actions/workflows/unit-test.yml/badge.svg)](https://github.com/Andres9890/ipachecker/actions/workflows/unit-test.yml)
45
+ [![License Button]][License Link]
46
+ [![PyPI Button]][PyPI Link]
47
+
48
+ 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
49
+
50
+ > Python script provided by norep on discord, credits to him
51
+
52
+ ## Features
53
+
54
+ - **Encryption Detection**: Determines if an IPA file is encrypted or decrypted by analyzing mach-o load commands
55
+ - **Metadata Extraction**: Reads app information from Info.plist including bundle ID, version, minimum iOS version, and display name
56
+ - **Architecture Analysis**: Identifies app architecture (32-bit, 64-bit, or Universal binary)
57
+ - **Batch Processing**: Analyze multiple IPA files from folders or URL/path lists
58
+ - **Remote Downloads**: Download and analyze IPA files directly from URLs using curl
59
+ - **Console Output**: progress bars, tables, and colored output using the `rich` library
60
+ - **JSON Export**: Export analysis results to JSON format
61
+ - **Obscura Filename**: Creates standardized filenames in iOSObscura format
62
+ - **MD5 Hash**: Generates file hash
63
+ - **Automatic Cleanup**: Optionally removes downloaded files after analysis
64
+
65
+ ## Installation
66
+
67
+ Requires Python 3.8 or newer
68
+
69
+ ```bash
70
+ pip install ipachecker
71
+ ```
72
+
73
+ The package creates a console script named `ipachecker` once installed, You can also install from source using `pip install .`
74
+
75
+ ## Usage
76
+
77
+ ```bash
78
+ ipachecker <input>... [--output <output>] [--json] [--quiet] [--debug] [--dont-delete]
79
+ ipachecker --batch-analysis <path> [--output <output>] [--json] [--quiet] [--debug] [--dont-delete]
80
+ ```
81
+
82
+ ### Arguments
83
+
84
+ - `<input>` – Path to .ipa file or URL to download .ipa file
85
+ - `<path>` – For batch analysis: folder containing .ipa files, or .txt file with paths/URLs
86
+
87
+ ### Options
88
+
89
+ - `-h, --help` – Show help message
90
+ - `-o, --output <output>` – Save results to specified JSON file
91
+ - `-j, --json` – Output results as JSON to stdout
92
+ - `-q, --quiet` – Only print errors and results
93
+ - `-d, --debug` – Print all logs to stdout for troubleshooting
94
+ - `--dont-delete` – Don't delete downloaded files after analysis
95
+ - `--batch-analysis` – Enable batch analysis mode for multiple files
96
+
97
+ ### Examples
98
+
99
+ ```bash
100
+ # Analyze a local IPA file
101
+ ipachecker /path/to/app.ipa
102
+
103
+ # Download and analyze from URL
104
+ ipachecker https://example.com/releases/MyApp-v1.2.ipa
105
+
106
+ # Analyze multiple files
107
+ ipachecker app1.ipa app2.ipa https://example.com/app3.ipa
108
+
109
+ # Batch analyze all IPAs in a folder
110
+ ipachecker --batch-analysis /path/folder
111
+
112
+ # Batch analyze from URL/path list file
113
+ ipachecker --batch-analysis thereisalist.txt
114
+
115
+ # Export results to JSON
116
+ ipachecker app.ipa --json --output results.json
117
+
118
+ # Debug mode for troubleshooting
119
+ ipachecker app.ipa --debug
120
+
121
+ # Keep downloaded files
122
+ ipachecker https://example.com/dl/app.ipa --dont-delete
123
+ ```
124
+
125
+ ### Example Output:
126
+
127
+ ```
128
+ ┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
129
+ ┃ Property ┃ Value ┃
130
+ ┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
131
+ │ Name │ Example │
132
+ │ Display Name │ Example │
133
+ │ Bundle Identifier │ com.example.app │
134
+ │ Version │ 1.0 │
135
+ │ Minimum iOS │ 2.0 │
136
+ │ Architecture │ 32-bit │
137
+ │ Encrypted │ YES │
138
+ │ MD5 Hash │ d41d8cd98f00b204e9800998ecf8427e │
139
+ │ File Size │ 67 bytes │
140
+ └───────────────────────┴────────────────────────────────────────────────────────────────┘
141
+
142
+ Obscura-format filename:
143
+ Example-(com.example.app)-1.0-(iOS_2.0)-d41d8cd98f00b204e9800998ecf8427e.ipa
144
+ ```
145
+
146
+ ## Batch Analysis
147
+
148
+ ipachecker supports batch processing in two modes:
149
+
150
+ ### Folder Analysis
151
+ Point to a folder containing .ipa files:
152
+ ```bash
153
+ ipachecker --batch-analysis /User/downloads/ipas/
154
+ ```
155
+
156
+ ### List File Analysis
157
+ Create a text file with paths/URLs (one per line):
158
+ ```
159
+ # ipas.txt
160
+ /Users/downloads/app1.ipa
161
+ /Users/downloads/app2.ipa
162
+
163
+ or
164
+
165
+ https://example.com/app.ipa
166
+ https://releases.example.zip/app67.ipa
167
+ ```
168
+
169
+ Then analyze:
170
+ ```bash
171
+ ipachecker --batch-analysis ipas.txt
172
+ ```
173
+
174
+ ## How it works
175
+
176
+ 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
177
+
178
+ 2. **IPA Extraction**: The tool treats IPA files as ZIP archives and extracts them to a temporary directory, locating the `Payload/*.app` structure
179
+
180
+ 3. **Metadata Reading**: Parses the `Info.plist` file to extract app metadata including bundle identifier, version information, display name, and minimum iOS version
181
+
182
+ 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
183
+
184
+ 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
185
+
186
+ 6. **Architecture Detection**: Identifies CPU types from Mach-O headers:
187
+ - ARM64 (cputype 16777228) = 64-bit
188
+ - ARMv7/ARMv7s (cputype 12) = 32-bit
189
+ - Multiple architectures = Universal
190
+
191
+ 7. **Result Generation**: Compiles all information into a structured result with standardized Obscura filename format: `{DisplayName}-{BundleID}-{AppVersion}-{iOS_MinVersion}-{MD5Hash}.ipa`
192
+
193
+ 8. **Output**: Presents results in rich console tables or JSON format, with batch summaries for multiple file analysis
194
+
195
+ 9. **Cleanup**: Automatically removes downloaded temporary files unless `--dont-delete` is specified
196
+
197
+ ## Error Handling
198
+
199
+ ipachecker provides clear error messages for common issues:
200
+
201
+ - **File not found**: Missing local files or invalid paths
202
+ - **Download failures**: Network issues, invalid URLs, or SSL problems
203
+ - **Invalid IPA files**: Corrupted archives or non-IPA files
204
+ - **Missing metadata**: Apps without proper Info.plist files
205
+ - **Analysis errors**: Corrupted binaries or unsupported formats
206
+
207
+ Use `--debug` flag for detailed troubleshooting info
208
+
209
+ ## Integration
210
+
211
+ ### JSON Output
212
+ Use `--json` arg for programmatic integration:
213
+
214
+ ```json
215
+ {
216
+ "appName": "Instagram",
217
+ "displayName": "Instagram",
218
+ "bundleId": "com.burbn.instagram",
219
+ "appVersion": "245.0",
220
+ "minIOS": "13.0",
221
+ "architecture": "64-bit",
222
+ "encrypted": true,
223
+ "obscuraFilename": "Instagram-(com.burbn.instagram)-245.0-(iOS_13.0)-d41d8cd98f00b204e9800998ecf8427e.ipa",
224
+ "md5": "d41d8cd98f00b204e9800998ecf8427e",
225
+ "fileSize": 125829120,
226
+ "filePath": "/path/to/instagram.ipa"
227
+ }
228
+ ```
229
+
230
+ ### Exit Codes
231
+ - `0`: Success
232
+ - `1`: Analysis errors or failures
@@ -0,0 +1,197 @@
1
+ [License Button]: https://img.shields.io/badge/License-MIT-black
2
+ [License Link]: https://github.com/Andres9890/ipachecker/blob/main/LICENSE 'MIT License.'
3
+
4
+ [PyPI Button]: https://img.shields.io/pypi/v/ipachecker?color=blue&label=PyPI
5
+ [PyPI Link]: https://pypi.org/project/ipachecker/ 'PyPI Package.'
6
+
7
+ # IPAchecker
8
+ [![Lint](https://github.com/Andres9890/ipachecker/actions/workflows/lint.yml/badge.svg)](https://github.com/Andres9890/ipachecker/actions/workflows/lint.yml)
9
+ [![Unit Tests](https://github.com/Andres9890/ipachecker/actions/workflows/unit-test.yml/badge.svg)](https://github.com/Andres9890/ipachecker/actions/workflows/unit-test.yml)
10
+ [![License Button]][License Link]
11
+ [![PyPI Button]][PyPI Link]
12
+
13
+ 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
14
+
15
+ > Python script provided by norep on discord, credits to him
16
+
17
+ ## Features
18
+
19
+ - **Encryption Detection**: Determines if an IPA file is encrypted or decrypted by analyzing mach-o load commands
20
+ - **Metadata Extraction**: Reads app information from Info.plist including bundle ID, version, minimum iOS version, and display name
21
+ - **Architecture Analysis**: Identifies app architecture (32-bit, 64-bit, or Universal binary)
22
+ - **Batch Processing**: Analyze multiple IPA files from folders or URL/path lists
23
+ - **Remote Downloads**: Download and analyze IPA files directly from URLs using curl
24
+ - **Console Output**: progress bars, tables, and colored output using the `rich` library
25
+ - **JSON Export**: Export analysis results to JSON format
26
+ - **Obscura Filename**: Creates standardized filenames in iOSObscura format
27
+ - **MD5 Hash**: Generates file hash
28
+ - **Automatic Cleanup**: Optionally removes downloaded files after analysis
29
+
30
+ ## Installation
31
+
32
+ Requires Python 3.8 or newer
33
+
34
+ ```bash
35
+ pip install ipachecker
36
+ ```
37
+
38
+ The package creates a console script named `ipachecker` once installed, You can also install from source using `pip install .`
39
+
40
+ ## Usage
41
+
42
+ ```bash
43
+ ipachecker <input>... [--output <output>] [--json] [--quiet] [--debug] [--dont-delete]
44
+ ipachecker --batch-analysis <path> [--output <output>] [--json] [--quiet] [--debug] [--dont-delete]
45
+ ```
46
+
47
+ ### Arguments
48
+
49
+ - `<input>` – Path to .ipa file or URL to download .ipa file
50
+ - `<path>` – For batch analysis: folder containing .ipa files, or .txt file with paths/URLs
51
+
52
+ ### Options
53
+
54
+ - `-h, --help` – Show help message
55
+ - `-o, --output <output>` – Save results to specified JSON file
56
+ - `-j, --json` – Output results as JSON to stdout
57
+ - `-q, --quiet` – Only print errors and results
58
+ - `-d, --debug` – Print all logs to stdout for troubleshooting
59
+ - `--dont-delete` – Don't delete downloaded files after analysis
60
+ - `--batch-analysis` – Enable batch analysis mode for multiple files
61
+
62
+ ### Examples
63
+
64
+ ```bash
65
+ # Analyze a local IPA file
66
+ ipachecker /path/to/app.ipa
67
+
68
+ # Download and analyze from URL
69
+ ipachecker https://example.com/releases/MyApp-v1.2.ipa
70
+
71
+ # Analyze multiple files
72
+ ipachecker app1.ipa app2.ipa https://example.com/app3.ipa
73
+
74
+ # Batch analyze all IPAs in a folder
75
+ ipachecker --batch-analysis /path/folder
76
+
77
+ # Batch analyze from URL/path list file
78
+ ipachecker --batch-analysis thereisalist.txt
79
+
80
+ # Export results to JSON
81
+ ipachecker app.ipa --json --output results.json
82
+
83
+ # Debug mode for troubleshooting
84
+ ipachecker app.ipa --debug
85
+
86
+ # Keep downloaded files
87
+ ipachecker https://example.com/dl/app.ipa --dont-delete
88
+ ```
89
+
90
+ ### Example Output:
91
+
92
+ ```
93
+ ┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
94
+ ┃ Property ┃ Value ┃
95
+ ┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
96
+ │ Name │ Example │
97
+ │ Display Name │ Example │
98
+ │ Bundle Identifier │ com.example.app │
99
+ │ Version │ 1.0 │
100
+ │ Minimum iOS │ 2.0 │
101
+ │ Architecture │ 32-bit │
102
+ │ Encrypted │ YES │
103
+ │ MD5 Hash │ d41d8cd98f00b204e9800998ecf8427e │
104
+ │ File Size │ 67 bytes │
105
+ └───────────────────────┴────────────────────────────────────────────────────────────────┘
106
+
107
+ Obscura-format filename:
108
+ Example-(com.example.app)-1.0-(iOS_2.0)-d41d8cd98f00b204e9800998ecf8427e.ipa
109
+ ```
110
+
111
+ ## Batch Analysis
112
+
113
+ ipachecker supports batch processing in two modes:
114
+
115
+ ### Folder Analysis
116
+ Point to a folder containing .ipa files:
117
+ ```bash
118
+ ipachecker --batch-analysis /User/downloads/ipas/
119
+ ```
120
+
121
+ ### List File Analysis
122
+ Create a text file with paths/URLs (one per line):
123
+ ```
124
+ # ipas.txt
125
+ /Users/downloads/app1.ipa
126
+ /Users/downloads/app2.ipa
127
+
128
+ or
129
+
130
+ https://example.com/app.ipa
131
+ https://releases.example.zip/app67.ipa
132
+ ```
133
+
134
+ Then analyze:
135
+ ```bash
136
+ ipachecker --batch-analysis ipas.txt
137
+ ```
138
+
139
+ ## How it works
140
+
141
+ 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
142
+
143
+ 2. **IPA Extraction**: The tool treats IPA files as ZIP archives and extracts them to a temporary directory, locating the `Payload/*.app` structure
144
+
145
+ 3. **Metadata Reading**: Parses the `Info.plist` file to extract app metadata including bundle identifier, version information, display name, and minimum iOS version
146
+
147
+ 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
148
+
149
+ 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
150
+
151
+ 6. **Architecture Detection**: Identifies CPU types from Mach-O headers:
152
+ - ARM64 (cputype 16777228) = 64-bit
153
+ - ARMv7/ARMv7s (cputype 12) = 32-bit
154
+ - Multiple architectures = Universal
155
+
156
+ 7. **Result Generation**: Compiles all information into a structured result with standardized Obscura filename format: `{DisplayName}-{BundleID}-{AppVersion}-{iOS_MinVersion}-{MD5Hash}.ipa`
157
+
158
+ 8. **Output**: Presents results in rich console tables or JSON format, with batch summaries for multiple file analysis
159
+
160
+ 9. **Cleanup**: Automatically removes downloaded temporary files unless `--dont-delete` is specified
161
+
162
+ ## Error Handling
163
+
164
+ ipachecker provides clear error messages for common issues:
165
+
166
+ - **File not found**: Missing local files or invalid paths
167
+ - **Download failures**: Network issues, invalid URLs, or SSL problems
168
+ - **Invalid IPA files**: Corrupted archives or non-IPA files
169
+ - **Missing metadata**: Apps without proper Info.plist files
170
+ - **Analysis errors**: Corrupted binaries or unsupported formats
171
+
172
+ Use `--debug` flag for detailed troubleshooting info
173
+
174
+ ## Integration
175
+
176
+ ### JSON Output
177
+ Use `--json` arg for programmatic integration:
178
+
179
+ ```json
180
+ {
181
+ "appName": "Instagram",
182
+ "displayName": "Instagram",
183
+ "bundleId": "com.burbn.instagram",
184
+ "appVersion": "245.0",
185
+ "minIOS": "13.0",
186
+ "architecture": "64-bit",
187
+ "encrypted": true,
188
+ "obscuraFilename": "Instagram-(com.burbn.instagram)-245.0-(iOS_13.0)-d41d8cd98f00b204e9800998ecf8427e.ipa",
189
+ "md5": "d41d8cd98f00b204e9800998ecf8427e",
190
+ "fileSize": 125829120,
191
+ "filePath": "/path/to/instagram.ipa"
192
+ }
193
+ ```
194
+
195
+ ### Exit Codes
196
+ - `0`: Success
197
+ - `1`: Analysis errors or failures