Example splitting string on slash character in ZSH.
$ str=part1/part2/part3
$ parts=(${(@s:/:)str})
$ echo $parts
part1 part2 part3
$ echo ${#parts[@]}
3
Example splitting string on slash character in ZSH.
$ str=part1/part2/part3
$ parts=(${(@s:/:)str})
$ echo $parts
part1 part2 part3
$ echo ${#parts[@]}
3
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){ |
from django.db.models import Field | |
from django.conf import settings | |
from django.utils.decorators import cached_property | |
class VirtualField(object): | |
""" | |
A virtual field, mainly used for caching and seamless computed field retrieval. | |
This acts both like a (cached) property and a virtual field if supported. | |
""" |
Today I wanted to move existing APFS-resident macOS Catalina installation to a new disk. I upgraded my late 2014 Mac Mini with a shiny new 1TB SSD. This took way too many hours of my life I will never get back. Hope this saves some time to you.
Good news:
This information is relevant for Catalina (I'm currently running macOS 10.15.1).
Researched by Robert Quattlebaum darco@deepdarc.com.
Last updated 2020-02-03.
For details, see "Mastering SSH", Second Edition, Chapter 14: Certificate Authorities. Also see 'man ssh-keygen': "ssh-keygen supports signing of keys to produce certificates that may be used for user or host authentication. Certificates consist of a public key, some identity information, zero or more principal (user or host) names and a set of options that are signed by a Certification Authority (CA) key. Clients or servers may then trust only the CA key and verify its signature on a certificate rather than trusting many user/host keys. Note that OpenSSH certificates are a different, and much simpler, format to the X.509 certificates used in ssl(8).
Choose a computer to act as the CA. We'll call this the CA computer (not CA host, since "host" is overloaded here). In this examp
# Dependencies: | |
# {:httpoison, "~> 1.5"}, | |
# {:floki, "~> 0.21.0"} | |
# {:benchee, "~> 1.0"} (Only for benchmarking – not in the script) | |
defmodule CrawlQueue do | |
use Agent | |
def start_link(urls) do |
You can unlock your rootfs on bootup from remote, using ssh to log in to the booting system while it's running with the initramfs mounted.
For remote unlocking to work, the following packages have to be installed before building the initramfs: dropbear
busybox
The file /etc/initramfs-tools/initramfs.conf
holds the configuration options used when building the initramfs. It should contain BUSYBOX=y
(this is set as the default when the busybox package is installed) to have busybox installed into the initramfs, and should not contain DROPBEAR=n, which would disable installation of dropbear to initramfs. If set to DROPBEAR=y, dropbear will be installed in any case; if DROPBEAR isn't set at all, then dropbear will only be installed in case of an existing cryptroot setup.
This brief tutorial will show you how to go about analyzing a raw binary firmware image in Ghidra.
I was recently interested in reversing some older Cisco IOS images. Those images come in the form of a single binary blob, without any sort of ELF, Mach-o, or PE header to describe the binary.
While I am using Cisco IOS Images in this example, the same process should apply to other Raw Binary Firmware Images.