Skip to content

Instantly share code, notes, and snippets.

View abjurato's full-sized avatar
💜

Anatoly Rosencrantz abjurato

💜
View GitHub Profile
@abjurato
abjurato / macho_extractor.c
Created September 27, 2019 12:54 — forked from C0deH4cker/macho_extractor.c
Program that will extract a segment from a mach-o file. Should even work on Linux/BSD/UNIX?
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
/* For supporting Linux and other systems that don't have mach-o headers */
@abjurato
abjurato / EndpointSecurityDemo.m
Created February 13, 2020 14:49 — forked from Omar-Ikram/EndpointSecurityDemo.m
A demo of using Apple's new EndpointSecurity framework - tested on macOS Catalina 10.15 (19A583)
//
// main.m
// EndpointSecurityDemo
//
// Created by Omar Ikram on 17/06/2019 - Catalina 10.15 Beta 1 (19A471t)
// Updated by Omar Ikram on 15/08/2019 - Catalina 10.15 Beta 5 (19A526h)
// Updated by Omar Ikram on 01/12/2019 - Catalina 10.15 (19A583)
//
#import <Foundation/Foundation.h>
@abjurato
abjurato / Activity.swift
Created July 6, 2020 14:48 — forked from zwaldowski/Activity.swift
os_activity_t for Swift 3
//
// Activity.swift
//
// Created by Zachary Waldowski on 8/21/16.
// Copyright © 2016 Zachary Waldowski. Licensed under MIT.
//
import os.activity
private final class LegacyActivityContext {
@abjurato
abjurato / Activity.swift
Created July 6, 2020 14:49 — forked from mono0926/Activity.swift
os_activity_t for Swift 4
//
// Activity.swift
//
// Created by Zachary Waldowski on 8/21/16.
// Copyright © 2016 Zachary Waldowski. Licensed under MIT.
//
import os.activity
private final class LegacyActivityContext {
@abjurato
abjurato / Count lines of code in Xcode project
Created February 24, 2021 17:42 — forked from Tokuriku/Count lines of code in Xcode project
Count lines of code in SWIFT Xcode project
1. Open Terminal
2. cd to your Xcode project
3. Execute the following when inside your target project:
find . -name "*.swift" -print0 | xargs -0 wc -l