• This repository has been archived on 07/Dec/2017
  • Stars
    star
    194
  • Rank 200,219 (Top 4 %)
  • Language
    C
  • License
    Other
  • Created about 14 years ago
  • Updated almost 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MagicKit is an Objective-C file identification framework based on libmagic.

MagicKit.framework

MagicKit.framework is an easy-to-use wrapper around the libmagic file identification library. It provides a high-level Objective-C interface and deals in Foundation types (NSString, NSData, et al).

MagicKit.framework is available for both OS X (as a framework) or iOS as a static library with header files. MagicKit.framework consists of a master class, GEMagicKit, and an intermediary class, GEMagicResult. The GEMagicKit master class has six class methods, listed below in descending order of convenience.

+ (GEMagicResult *)magicForFileAtPath:(NSString *)path;
+ (GEMagicResult *)magicForFileAtURL:(NSURL *)aURL;
+ (GEMagicResult *)magicForData:(NSData *)data;

+ (GEMagicResult *)magicForFileAtPath:(NSString *)path decompress:(BOOL)decompress;
+ (GEMagicResult *)magicForFileAtURL:(NSURL *)aURL decompress:(BOOL)decompress;
+ (GEMagicResult *)magicForData:(NSData *)data decompress:(BOOL)decompress;

These methods all return the GEMagicResult intermediary class. The GEMagicResult class has four properties. These are mimeType, description, uniformType and uniformTypeHierarchy. the first three properties are NSString objects, the final returns an NSArray object.

Example MIME types include:

  • application/xml; charset=us-ascii
  • video/x-msvideo; charset=binary

Or a textual description, respectively:

  • XML document text
  • RIFF (little-endian) data, AVI, 624 x 352, 23.98 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz))

Finally, uniformType and uniformTypeHierarchy return Uniform Type Identifiers for the relevant file/data. The type hierarchy is an array of types that the given file conforms to.

GEMagicKit can also decompress compressed files and hence attempt to determine the contents within.

MagicKit.framework is MIT-licensed. libmagic is BSD-licensed.

More Repositories

1

osx-abi-macho-file-format-reference

Mirror of OS X ABI Mach-O File Format Reference
761
star
2

ipv6-ghost-ship

Silly usage of AWS EC2 IPv6 prefixes
Go
322
star
3

cloudkey

No need for IAM users when we have Yubikeys
Go
158
star
4

flowdog

Framework for inspecting and editing traffic in AWS VPCs
Go
109
star
5

rdsconn

rdsconn makes connecting to an AWS RDS instance inside a VPC from your laptop easier
Go
107
star
6

openrolesanywhere

Open-source proof-of-concept client for AWS IAM Roles Anywhere
Go
70
star
7

centralized-logs

Centralizing AWS CloudWatch log forwarding via EventBridge and Step Functions
49
star
8

s3zipper

A tool that allows downloading S3 directories as ZIP files
Go
34
star
9

jwtex

A serverless JWT exchanger and OIDC IdP
Go
32
star
10

ima.ge.cx

TypeScript
31
star
11

freedata

A silly project for free (maybe) egress from EC2 instances using Tailscale and Session Manager
Go
31
star
12

aws_sdk.nim

Nim
28
star
13

demo-serverless-aspnetcore

ASP.Net Core 3.1 on AWS Lambda demo
C#
24
star
14

cloudenv

Go
23
star
15

postinvoke

Run in-process code after your Go-powered Lambda function has returned
Go
23
star
16

awsaccountcreds

Go
21
star
17

secretsctx

Go
20
star
18

ses-sidecar

An SMTP server sidecar to allow AWS SES usage with IAM roles
Go
15
star
19

GEBEncoding

An Objective-C BEncoding Library
Objective-C
11
star
20

vpcdelorean

Go
9
star
21

sph

Nim
9
star
22

ima.ge.cx-backend

Go
8
star
23

sphlib

C
7
star
24

serverful

Go
7
star
25

prelink_unpack

Tool for unpacking the prelinked kernel on iOS.
Python
7
star
26

go-xrayprofile

Selective profiling of AWS Lambda functions
Go
6
star
27

lzo

Ruby
6
star
28

iphone_detect

C
5
star
29

cwemf-to-honeycomb

Go
5
star
30

matconnect

A silly proof-of-concept for VPC network nonsense
Go
5
star
31

sshcontainers

Go
4
star
32

SSCrypto

Unofficial mirror of the SSCrypto.framework wrapper around OpenSSL
Objective-C
4
star
33

ghcs

Nim
4
star
34

ios_sig

C
3
star
35

freedumb

Go
3
star
36

ghal

ghal allows streaming of live GitHub Actions build logs to your terminal
Go
3
star
37

idp4nathan

for t04glovern's eyes only
Go
2
star
38

awsdial

Go
2
star
39

gha-stats

Go
2
star
40

vpcjump

Helper tool for connecting to jumpboxes in AWS.
Ruby
2
star
41

lambda

Go
1
star
42

pandaboot

A libusb-based tool to copy bootloaders to the Pandaboard using USB.
C
1
star
43

demotemplate

1
star
44

ami2docker

Ruby
1
star
45

Protobuf.framework

Ruby
1
star
46

update-function-code-bug

Reproduction of AWS Lambda UpdateFunctionCode bug
Shell
1
star
47

aidansteele.github.io

Ruby
1
star
48

stepapi

TypeScript
1
star
49

learning-nim-aws

Nim
1
star
50

protobuf-mirror

Unofficial git mirror of the Google Protocol Buffers project
C++
1
star