Skip to content

Commit

Permalink
IDA Pro 8(?) support
Browse files Browse the repository at this point in the history
  • Loading branch information
PoomSmart committed Dec 30, 2023
1 parent 5f15644 commit 36cea3e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
3 changes: 0 additions & 3 deletions CoreGraphics/CoreGraphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ CGError CGSXorRegion(CGSRegionRef region1, CGSRegionRef region2, CGSRegionRef *o
CGError CGSOffsetRegion(CGSRegionRef region, CGFloat offsetLeft, CGFloat offsetTop, CGSRegionRef *outRegion);
CGError CGSIntersectRegionWithRect(const CGSRegionObj region,const CGRect *rect, CGSRegionObj *intersectRegion);
CGError CGSReleaseRegion(const CGRegionRef);
CGError CGSReleaseRegionEnumerator(const CGSRegionEnumeratorObj);
CGError CGSGetRegionBounds(CGSRegionRef region, CGRect *outRect);
CGError CGSSetWindowAlpha(CGSConnectionID, CGSWindowID, float alpha);
CGError CGSSetWindowClipShape(CGSConnectionID, CGSWindowID, CGRegionRef shape);
Expand Down Expand Up @@ -488,8 +487,6 @@ void CGFontRelease(CGFontRef font);
void CGPostError(const char *format, ...);
void CGIOSurfaceContextSetDisplayMask(CGContextRef, uint32_t mask);

void CGSReleaseRegionEnumerator(CGSRegionEnumeratorRef enumerator);

void CGCFRelease(CFTypeRef cf);
void CGCFDictionaryApplyBlock(CFDictionaryRef theDict, void *context);
void CGCFDictionarySetCString(CFMutableDictionaryRef theDict, const char *cStr);
Expand Down
Binary file added IDA.til
Binary file not shown.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ A collection of (public and private) types and functions definitions useful for
## Why even?
Would you rather re-define the same functions or types over and over as you work with different binaries?

## Usage (IDA Pro, 7.2+ recommended)
## Usage (IDA Pro 8+)
1. Copy `IDA.til` to `til` folder inside IDA application directory.
2. In IDA Pro, open `Type Libraries` window via `View > Open subviews > Type libraries` or press `Shift + F11`.
3. Right-click the type list and select `Load type library...`.
4. Select `IDA` and click `OK` button.

TIL created via this command:

```bash
tilib -c -hIDA.h IDA.til -D__EA64__ -P
```

## Usage (IDA Pro 7)
Go to `File > Load file > Parse C header file` then choose `IDA.h` to import everything at once.

Or, run this IDA command: `idaapi.idc_parse_types("/path/to/IDAObjcTypes/IDA.h", idc.PT_FILE)`
Expand Down
8 changes: 6 additions & 2 deletions Security/Security.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ CFTypeRef SecTaskCopyValueForEntitlement(SecTaskRef task, CFStringRef entitlemen
OSStatus SecCertificateAddToKeychain(SecCertificateRef certificate, SecKeychainRef keychain);
OSStatus SecCertificateCopyCommonName(SecCertificateRef certificate, CFStringRef *commonName);
OSStatus SecCertificateCopyEmailAddresses(SecCertificateRef certificate, CFArrayRef *emailAddresses);
OSStatus SecCertificateCopyPublicKey(SecCertificateRef certificate, SecKeyRef *key);
OSStatus SecCertificateGetData(SecCertificateRef certificate, CSSM_DATA_PTR data);
OSStatus SecCodeCheckValidity(SecCodeRef code, SecCSFlags flags, SecRequirementRef requirement);
OSStatus SecIdentityCopyCertificate(SecIdentityRef identityRef, SecCertificateRef *certificateRef);
Expand Down Expand Up @@ -89,7 +88,6 @@ SecCertificateRef SecCertificateCreateWithData(CFAllocatorRef allocator, CFDataR
SecCertificateRef SecTrustGetCertificateAtIndex(SecTrustRef trust, CFIndex ix);

SecKeyRef SecCertificateCopyKey(SecCertificateRef certificate);
SecKeyRef SecCertificateCopyPublicKey(SecCertificateRef certificate);
SecKeyRef SecKeyCreateRSAPublicKey(CFAllocatorRef allocator, const uint8_t *keyData, CFIndex keyDataLength, SecKeyEncoding encoding);
SecKeyRef SecKeyCreateWithData(CFDataRef keyData, CFDictionaryRef attributes, CFErrorRef *error);
SecKeyRef SecTrustCopyPublicKey(SecTrustRef trust);
Expand All @@ -113,3 +111,9 @@ bool SecTaskLoadEntitlements(SecTaskRef task, CFErrorRef *error);
bool SecTrustSetExceptions(SecTrustRef trust, CFDataRef exceptions);

void SecTaskFinalize(CFTypeRef cfTask);

#if TARGET_OS_OSX
OSStatus SecCertificateCopyPublicKey(SecCertificateRef certificate, SecKeyRef *key);
#else
SecKeyRef SecCertificateCopyPublicKey(SecCertificateRef certificate);
#endif
2 changes: 0 additions & 2 deletions objc/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ struct objc_object {
Class isa;
};

#if defined(GHIDRA) || defined(BINJA)
typedef void *id;
#endif

typedef struct Protocol {
NSObject super;
Expand Down

0 comments on commit 36cea3e

Please sign in to comment.