Skip to content

Instantly share code, notes, and snippets.

View syzdek's full-sized avatar

David M. Syzdek syzdek

  • Alaska Communications
  • Anchorage, Alaska
  • 13:56 (UTC -08:00)
View GitHub Profile
@syzdek
syzdek / MacOS VPN Split Routing.md
Created September 9, 2026 22:56
MacOS VPN: Static Route / Split Routing

MacOS VPN Split Routes

MacOS Tahoe does not allow the end user to specify local networks which by-pass the VPN. Routes on MacOS can be manually modified to send default traffic through the local LAN and only send specific routes across the VPN by creating more sepcific routes (i.e. 0.0.0.0/1 and 128.0.0.0/1) to use the local gateway and by creating specific routes for the VPN connection.

In my specific environment, I have the following networks:

  • 192.168.0.0/24 - MacBook/Workstation LAN
  • 192.168.0.1/32 - MacBook/Workstation LAN Gateway
  • 10.0.0.0/8 - Remote VPN Networks
@syzdek
syzdek / ipv6-regex-test.sh
Last active July 8, 2026 00:56
Simple script to test my IPv6 regular expression.
#!/bin/sh
#
# Use posixregex CLI tool from: https://github.com/syzdek/dmstools/blob/master/src/posixregex.c
RE_IPV4="((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
posixregex -r "^(${RE_IPV4})$" \
127.0.0.1 \
10.0.0.1 \
192.168.1.1 \
/*
* TOTP: Time-Based One-Time Password Algorithm
* Copyright (c) 2015, David M. Syzdek <david@syzdek.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
@syzdek
syzdek / locky-dga.c
Last active November 26, 2025 01:14
Locky Ransomware Domain Generation Algorithm
/*
* Locky Ransomware Domain Generation Algorithm
*
* Original code from Forcepoint Security Labs:
* https://blogs.forcepoint.com/security-labs/locky-ransomware-encrypts-documents-databases-code-bitcoin-wallets-and-more
*
* Code updated by David M. Syzdek <ten . kedzys @ divad> on 2016/02/24
*
* Compile with:
* gcc -W -Wall -Werror -o locky-dga locky-dga.c
@syzdek
syzdek / ldapsearch-sync.c
Created December 11, 2011 07:10
an example of an LDAP synchronous search using an LDAP API
/*
* Simple Programming Examples And References
* Copyright (C) 2011 David M. Syzdek <david@syzdek.net>.
*
* @SYZDEK_BSD_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
@syzdek
syzdek / books.sql
Created May 5, 2011 07:26
SQLite3 Example DB and queries
--
-- Simple SQLite3 Example
-- Copyright (C) 2011 David M. Syzdek <david@syzdek.net>
--
-- Run:
-- cat hello.sql | sqlite3 hello.db
--
-- creates tables
#
# Instructions for making hybrid GPT/MBR boot USB thumb drive.
# The Slackware Linux installer will be added to the image as an example,
# however the syslinux configuration can be modified to include any desired
# image.
#
# A USB thumb drive formatted with these instructions was able to
# boot the Slackware Installer on a:
#
# Dell Latitude E6430 in Legacy BIOS mode
@syzdek
syzdek / cli-nsrunloop.m
Created July 31, 2012 21:36
Creating an NSRunLoop for a command line utility.
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
NSRunLoop * runLoop;
CLIMain * main; // replace with desired class
@autoreleasepool
{
// create run loop
@syzdek
syzdek / ldapsearch-async.c
Created December 13, 2011 02:41
an example of an LDAP asynchronous search using an LDAP API
/*
* Simple Programming Examples And References
* Copyright (C) 2011 David M. Syzdek <david@syzdek.net>.
*
* @SYZDEK_BSD_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
@syzdek
syzdek / keybase.md
Created April 14, 2020 23:22
keybase.md

Keybase proof

I hereby claim:

  • I am syzdek on github.
  • I am syzdek (https://keybase.io/syzdek) on keybase.
  • I have a public key ASAGpvnIp42DL04AiqXD3ppMpNOXC2cs0e9BQfbBykTHSAo

To claim this, I am signing this object: