Socket
Book a DemoInstallSign in
Socket

github.com/jpeizer/mac-ips2crash

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/jpeizer/mac-ips2crash

v0.2.0
Source
Go
Version published
Created
Source

mac-ips2crash

Go IPS2Crash Checks

Go IPS2Crash Release

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

# 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

go get github.com/stitchless/mac-ips2crash
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) 
}

FAQs

Package last updated on 26 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.