Edit 2023-03-03: This is now written in long-form at https://jamesog.net/2023/03/03/yubikey-as-an-ssh-certificate-authority/
The original version is retained below.
ykmanfrom theyubikey-managerpackage- libykcs11 from the
yubico-piv-toolpackage
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| # Copyright (c) Rau Systemberatung GmbH (rausys.de) | |
| # MIT License | |
| # credits: https://pyimagesearch.com/start-here/ | |
| import argparse | |
| import os | |
| from datetime import datetime, timedelta |
| defmodule DateTimeParser do | |
| @mapping %{ | |
| "H" => "(?<hour>\\d{2})", | |
| "I" => "(?<hour12>\\d{2})", | |
| "M" => "(?<minute>\\d{2})", | |
| "S" => "(?<second>\\d{2})", | |
| "d" => "(?<day>\\d{2})", | |
| "m" => "(?<month>\\d{2})", | |
| "y" => "(?<year2>\\d{2})", | |
| "Y" => "(?<year>-?\\d{4})", |
Edit 2023-03-03: This is now written in long-form at https://jamesog.net/2023/03/03/yubikey-as-an-ssh-certificate-authority/
The original version is retained below.
ykman from the yubikey-manager packageyubico-piv-tool package| // MIT License | |
| // | |
| // Copyright (c) 2023 Lee Kah Seng | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: |
| ## In no particular order. I'm pulling these from a bookmark folder, I'll work on labeling as I have time. Hope these help. Will be mixing in Linux reference as well. | |
| Sidenote: the macOS Internals series is amazing, although might be out of reach for some. However if having a hard time deciding (I definitely way) and in budget, In my opinion, they are worth the price. I've worked through Volume II, waiting on Volume III. | |
| As always, most of what we need in our world can be found open sourced and provided by some of the brightest, but it can be a frustrating journey finding material. | |
| https://www.intezer.com/blog/malware-analysis/elf-malware-analysis-101-linux-threats-no-longer-an-afterthought/ | |
| http://timetobleed.com/dynamic-linking-elf-vs-mach-o/ | |
| https://github.com/apple/darwin-xnu | |
| https://opensource.apple.com/source/xnu/ | |
| https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/Architecture/Architecture.html |
Although below are methods to extract the contents of a macOS package without actually installing it, the best way might be to create a blank disk image and install the package to this disk image in order to inspect the package contents. To do so:
There are a ton of different ways to split up a string in Zsh. This gist attempts to show them with examples to help you build your own. I write Zsh scripts all the time, and still reference back to this gist, so there you go.
From the Zsh docs on Parameter Expansion Flags (yeah - I know... how would anyone ever find that if they didn't know where to look!?)
j:string: Join the words of arrays together using string as a separator.
s:string: Force field splitting at the separator string.
You can also read more by running man zshexpn. (Again, I know, right!? How would anyone know to look there!?)
| package main | |
| import ( | |
| "crypto/tls" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" | |
| "net/textproto" |
| #include <jvmti.h> | |
| #include <cstring> | |
| #include <iostream> | |
| void debug(char* msg...){ | |
| // printf(msg); | |
| } | |
| int loadJar(JNIEnv *jni){ |