Skip to content

Instantly share code, notes, and snippets.

@blunderbusq
blunderbusq / aniserve.swift
Created March 24, 2022 01:20
A stand-alone HTTP server that fetches anisette data from the locally-running AltServer mail plug-in and returns it as a JSON object
// An HTTP server that connects to the AltServer mail plugin
// on the local host and serves the anisette data in JSON form.
//
// Requires macOS 10.12+ and Swift 5.5+
//
// Server usage: swift aniserve.swift -p <port:6969> -d <endpoint:"anisette">
//
// Client usage: curl http://localhost:6969/anisette
//
import Foundation