diff --git a/how-to-encrypt-sign-and-decrypt-messages-using-pgp-on-macos-adding-privacy-to-email/README.md b/how-to-encrypt-sign-and-decrypt-messages-using-pgp-on-macos-adding-privacy-to-email/README.md index 50e4142..4950e8f 100644 --- a/how-to-encrypt-sign-and-decrypt-messages-using-pgp-on-macos-adding-privacy-to-email/README.md +++ b/how-to-encrypt-sign-and-decrypt-messages-using-pgp-on-macos-adding-privacy-to-email/README.md @@ -34,7 +34,7 @@ brew install gnupg #### Step 4: generate PGP key pair -```shell +```console $ gpg --full-generate-key gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. @@ -121,7 +121,7 @@ curl https://sunknudsen.com/sunknudsen.asc | gpg --import #### Confirm Sun’s PGP public key is legit using its fingerprint -```shell +```console $ gpg --fingerprint hello@sunknudsen.com gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp @@ -140,7 +140,7 @@ See https://sunknudsen.com/, https://github.com/sunknudsen/pgp-public-key and ht #### Paste, encrypt and sign message (enter line break and use command `ctrl+d` to quit edit mode) -```shell +```console $ gpg --encrypt --sign --armor --output ~/Desktop/encrypted.asc -r john@example.net -r hello@sunknudsen.com gpg: 5574F4B0B0F67D7F: There is no assurance this key belongs to the named user @@ -158,7 +158,7 @@ This is a test! #### Decrypt message to stdout and decode quoted-printable characters -```‌shell +```console $ gpg --decrypt /Users/johndoe/Desktop/encrypted.asc | perl -MMIME::QuotedPrint -0777 -nle 'print decode_qp($_)' gpg: encrypted with 4096-bit RSA key, ID 5574F4B0B0F67D7F, created 2019-10-17 "Sun Knudsen " diff --git a/how-to-spoof-anonymize-your-mac-address-and-hostname-automatically-at-boot-on-macos/README.md b/how-to-spoof-anonymize-your-mac-address-and-hostname-automatically-at-boot-on-macos/README.md index 74a7feb..b4c0167 100644 --- a/how-to-spoof-anonymize-your-mac-address-and-hostname-automatically-at-boot-on-macos/README.md +++ b/how-to-spoof-anonymize-your-mac-address-and-hostname-automatically-at-boot-on-macos/README.md @@ -21,7 +21,7 @@ sudo chown $(whoami):admin /usr/local/sbin/ #### Step 2: create `spoof.sh` script -**Pro tip 1: when copy/pasting commands that start with `cat << "EOF"`, select all lines (from `cat << "EOF"` to `EOF`) at once as they are part of the same (single) command** +> When copy/pasting commands that start with `cat << "EOF"`, select all lines (from `cat << "EOF"` to `EOF`) at once as they are part of the same (single) command ```shell cat << "EOF" > /usr/local/sbin/spoof.sh @@ -64,7 +64,7 @@ Exit on error export LC_CTYPE=C ``` -Fix `sed: RE error: illegal byte sequence` [sed](https://en.wikipedia.org/wiki/Sed) error +Fix `sed: RE error: illegal byte sequence` error ```shell dirname=`dirname "${BASH_SOURCE}"` @@ -98,7 +98,7 @@ sudo scutil --set HostName "$host_name" echo "Spoofed hostname to $host_name" ``` -Set `ComputerName`, `LocalHostName` and `HostName` using [scutil](https://ss64.com/osx/scutil.html) and echo spoofed computer name +Set `ComputerName`, `LocalHostName` and `HostName` using `scutil` and echo spoofed computer name ```shell mac_address_prefix=`sed "$(jot -r 1 1 768)q;d" $dirname/mac_address_prefixes.txt | sed -e 's/[^A-F0-9:]//g'` @@ -110,7 +110,7 @@ Set variable `mac_address_prefix` to random Apple MAC address prefix found in `m mac_address_suffix=`openssl rand -hex 3 | sed 's/\(..\)/\1:/g; s/.$//'` ``` -Set variable `mac_address_suffix` to random value genereated by [OpenSSL](https://en.wikipedia.org/wiki/OpenSSL) +Set variable `mac_address_suffix` to random value genereated by OpenSSL ```shell mac_address=`echo "$mac_address_prefix:$mac_address_suffix" | awk '{print toupper($0)}'` @@ -123,7 +123,7 @@ sudo ifconfig en0 ether "$mac_address" echo "Spoofed MAC address of en0 interface to $mac_address" ``` -Set spoofed MAC address using [ifconfig](https://en.wikipedia.org/wiki/Ifconfig) and echo spoofed MAC address +Set spoofed MAC address using `ifconfig` and echo spoofed MAC address #### Step 3: make `spoof.sh` executable