A C library for macOS-related shenanigans.


LibVolcano

LibVolcano (or simply, Volcano) is a C library for macOS-related shenanigans. Performing low-level tasks such as reading and writing process memory can get complex quickly and require lots of boilerplate code. The goal of LibVolcano is simple: to provide a clean, consistent, and powerful API on top of numerous macOS system APIs.

#include <Volcano/Log.h>
#include <Volcano/ObjectiveC.h>

// ...

@implementation VCExample

+ (BOOL)alwaysNo {
  return NO;
}

@end

void __attribute__((constructor)) init() {
  struct VcLogContext *lc = VcLogCreateContext();

  VcLog(lc, "Module loaded successfully");

  VcObjcReplaceMethod("NSString", "hasPrefix", "VCExample", "alwaysNo");
  VcLog(lc, "Replaced NSString/hasPrefix; will always return NO");
}

A simple example showing Objective-C method replacement at runtime.

Disclaimer: This is not a production-ready library. It is the result of my attempts to cut down on repeated code in various projects of mine. There will issues, and I probably don't have time to fix all of them. That being said...

I hope you find this library useful, and if you do, please let me know!

Building

Given that this is a library for macOS-specific mischief, it obviously only compiles on macOS. However, since LibVolcano uses CMake, obtaining a macOS machine should be the hardest part of the build process. To build, simply configure CMake and build:

$ cmake -S . -B build
$ cmake --build build -j8

Conventions

This project follows a handful of conventions, some typical and some unusual:

  • Type aliases via typedef are used rather frequently to alias primitive and system types. This may be upsetting to some, but I prefer to see consistently named types in my code, and I wrote this library for myself after all.

  • All functions are prefixed with Vc and an additional group prefix, for example VcObjc and VcKern for Objective-C and kernel related functions, respectively.

  • Source code is formatted using the LLVM clang-format style.

Documentation

Documentation can be built by running doxygen in the project root.

License

Copyright 2021 Jon Palmisciano. Licensed under the 3-clause BSD license. For more information, see LICENSE.txt.

Owner
Jon Palmisciano
Software engineer & security researcher
Jon Palmisciano
Similar Resources

General repository for all software (emulators, dev tools, etc) related to Vircon32 but not running on console itself

Vircon32: Computer software This is a general repository containing source code related to Vircon32 implementation, this is, software that does NOT ru

Nov 15, 2022

The repo for all content related to Bootcamp 2022.

Bootcamp 2022 Welcome to the CSERL Systems Bootcamp, Summer 2022. CSERL: www.cse.iitb.ac.in/cserl This repository has detailed listing of weekly exerc

Dec 21, 2022

A python library to run metal compute kernels on MacOS

metalcompute for Python A python library to run metal compute kernels on MacOS Usage Example execution from M1-based Mac running MacOS 12.0: ./build

Nov 7, 2022

C++ Library Manager for Windows, Linux, and MacOS

Vcpkg: Overview 中文总览 Español 한국어 Français Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constant

Jan 4, 2023

Quick Look extension for Markdown files on macOS Catalina and Big Sur.

Quick Look extension for Markdown files on macOS Catalina and Big Sur.

QLMarkdown is a macOS Quick Look extension to preview Markdown files. It can also preview textbundle packages and rmarkdown (.rmd) files.

Jan 1, 2023

A beginner friendly desktop UI for Tasmota flashed devices for Windows, macOS and Linux.

A beginner friendly desktop UI for Tasmota flashed devices for Windows, macOS and Linux.

TasmoManager A beginner friendly desktop UI for Tasmota flashed devices for Windows, macOS and Linux. Features Native Tasmota device discovery (via ta

Dec 10, 2022

A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via `dart:ffi`

cronet_flutter A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via dart:ffi

Dec 11, 2022

"Sigma File Manager" is a free, open-source, quickly evolving, modern file manager (explorer / finder) app for Windows, MacOS, and Linux.

"Sigma File Manager" is a free, open-source, quickly evolving, modern file manager (explorer / finder) app for Windows, MacOS, and Linux.

Dec 31, 2022

An unofficial Realtek PCIe-based card reader driver for macOS

Realtek PCIe Card Reader Driver for macOS Unleash the full potential of your SDXC UHS-I cards Introduction An unofficial macOS kernel extension for Re

Jan 7, 2023
Related tags
Macos-arm64-emulation - A guide for emulating macOS arm64e on an x86-based host.

macos-arm64-emulation Use the following guide to download and configure all of the necessary tools and files for emulating the macOS arm64e kernel. Th

Jan 7, 2023
C library containing useful base64 related functions.

b64 C library containing useful fast base64 related functions. Usage Get the library: It's very simple to use it, run the "build_lib.sh" shell script

May 8, 2022
Not related to software bugs and exploits; this repo contains snippets of code that demonstrate some interesting functionality or a handy trick.

Proof-of-Concept Not related to software bugs and exploits; this repo contains snippets of code that demonstrate some interesting functionality or a h

Nov 19, 2022
Code and material related to PICO-8 and other products by Lexaloffle Games LLP

lexaloffle This is a miscellaneous collection of code and material related to products by Lexaloffle Games LLP. This collection is maintained for the

Dec 29, 2022
Flutter plugin serving utilities related to Windows taskbar. 💙
Flutter plugin serving utilities related to Windows taskbar. 💙

windows_taskbar Flutter plugin serving utilities related to Windows taskbar ?? Install dependencies: windows_taskbar: ^0.0.1 Demo Checkout the exam

Dec 21, 2022
AX.25 protocol (packet radio and APRS) interface / bridging / switching / terminal related software for Linux

CB3ROB-AX25-TOOLS-LINUX 2021-11-23T00:58:49Z (TUESDAY) cb3rob-kiss-tcp-attach.c links ax0 interface to KISS-TCP TNC, soundmodem (direwolf), or multipl

Jan 1, 2022
stfl with Newsboat-related bugfixes

This is a low-key fork. It's maintained to the extent necessary for Newsboat. PRs and additional maintainers are welcome! The original README follows.

Aug 25, 2022
Contribute all levels of C++ related codes for Hacktoberfest 2021!
Contribute all levels of C++ related codes for Hacktoberfest 2021!

Everything-C++ Contribute all levels of C++ related codes for Hacktoberfest 2021! About This repository contains C++ programs on various topics. What

Oct 31, 2022
Projects related to sync'ing esphome devices with other protocols: DDP, E131, etc...

esphome sync This project is due to a desire to leverage WLED's new virtual strip (via DDP) feature or software like xLights or LEDFx to controls ESP

Dec 24, 2022
CMake modules for common applications related to computer graphics

cgcmake CMake modules for common applications related to computer graphics Sample Usage Maya Project |-- CMakeLists.txt |-- cgcmake |-- modules

Dec 5, 2022