https://github.com/stitchless/mac-ips2crash
This is a simple parser that will translate an IPS formatted crash report to the older text base .crash format
https://github.com/stitchless/mac-ips2crash
crash ips macos translation
Last synced: about 1 month ago
JSON representation
This is a simple parser that will translate an IPS formatted crash report to the older text base .crash format
- Host: GitHub
- URL: https://github.com/stitchless/mac-ips2crash
- Owner: stitchless
- License: unlicense
- Created: 2023-03-22T15:48:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-26T18:04:40.000Z (about 3 years ago)
- Last Synced: 2025-04-09T10:29:01.458Z (about 1 year ago)
- Topics: crash, ips, macos, translation
- Language: Go
- Homepage:
- Size: 56.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# mac-ips2crash
[](https://github.com/jpeizer/mac-ips2crash/actions/workflows/status.yml)
[](https://github.com/jpeizer/mac-ips2crash/actions/workflows/release.yml)
This is a simple tool to convert a macOS IPS file into a .crash report
that can be used with legacy tools and pipelines to symbolicate the crash. It can be used as a standalone tool or as a library.
This is my first open source project I am attempting to make for public use, so if you run into any issues, don't hesitate to open an issue or PR.
## Tool Usage
```shell
# Tool Release Binaries are available on the releases page
# Usage as a standalone tool
Usage of ./mac-ips2crash:
-i string
Path to IPS file
-o string
Path to output crash file
The file will replace any extension with .crash
```
# Library Usage
```shell
go get github.com/stitchless/mac-ips2crash
```
```go
package main
import (
"fmt"
"os"
"github.com/stitchless/mac-ips2crash"
)
func main() {
ipsFilePath := "/path/to/ips/file"
file, err := os.ReadFile(ipsFilePath)
if err != nil {
fmt.Println(err)
return
}
// However you have a []byte of the IPS file
crashReport, err := ips2crash.ProcessCrashReport(file)
if err != nil {
fmt.Println(err)
return
}
for _, line := range crashReport.LeadingText {
fmt.Println(line) // Prints any test that appears before the IPS formatted file
}
// Prints any text that appears after the IPS formatted file
for _, line := range crashReport.TrailingText {
fmt.Println(line)
}
// Prints the first JSON object in the IPS file (the header)
fmt.Println(crashReport.Header)
// Prints the second JSON object in the IPS file (the Payload)
fmt.Println(crashReport.Payload)
// Prints the formatted report minus the leading and trailing text
fmt.Println(crashReport.FormattedReport)
// Prints the formatted report with the leading and trailing text
fmt.Println(crashReport.Output)
}
```