Skip to main content

ObjC and Swift application binary interface (ABI) to inspect static runtime information. (w. Class-Dump)

Project description

umbrella-py 🚧

Status

Pure Python implementation for the Umbrella project - a tool to instpect static runtime information of Objective-C and Swift binaries. As of now, MachO and PE binaries will be accepted by the API.

Plase follow the documentation for more details on how to use this library.

Swift-Dump Examples

Structs can be fully reversed using the internal API. Even generic types are supported.

Original program Re-structured with `dump_struct`
struct Resolution {
    var width = 0
    var height = 0
}
struct Person<A> {
  var name: String
  let foo: A
}
struct main.Resolution {
  // Fields
  var width: Swift.Int
  var height: Swift.Int
}
struct main.Person<A> {
  // Fields
  var name: Swift.String
  let foo: A
}

Classes are more complicated as they store more than just their fields. Note that generic classes won't be reversed fully as Swift's generation of generic signatures is not the same on all plattforms.

Original program Re-structured with `dump_class`
public class Bar {
    public func x() -> String {...}
    public func y() -> Int64 {...}
}

public class Foo: Bar {
    public let i = 0;
    var someLongVariableName = 1;
    private func indexed() -> Int {...}
    public override func x() -> String {...}
    public override func y() -> Int64 {...}
}
public class main.Bar {
  // Methods
  /* 0x1270 */ public func x() -> Swift.String
  /* 0x12a0 */ public func y() -> Swift.Int64
  /* 0x1320 */ static func <stripped> // Init
}
public class main.Foo: ? {
  // Properties/Fields
  let i: Swift.Int
  var someLongVariableName: Swift.Int

  // Methods
  /* 0x13a0 */ func someLongVariableName.getter : Swift.Int // (stripped)
  /* 0x13f0 */ func someLongVariableName.setter : Swift.Int // (stripped)
  /* 0x1440 */ func someLongVariableName.modify : Swift.Int // (stripped)
  /* 0x14b0 */ func <stripped> // Method
  // Overridden functions
  /* 0x14cc */ public override func x() -> Swift.String // from main.Bar
  /* 0x14fc */ public override func y() -> Swift.Int64 // from main.Bar
  /* 0x151c */ static override func <stripped> // Init from main.Bar

}

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

umbrella-py-0.0.1.tar.gz (68.3 kB view hashes)

Uploaded Source

Built Distribution

umbrella_py-0.0.1-py3-none-any.whl (83.8 kB view hashes)

Uploaded Python 3

Supported by

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