Subscribe: TinyApps.Org
http://tinyapps.org/weblog/index.atom
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
disk utility  disk  firewall status  firewall  install  library preferences  macos  mode  reddit  registrant  status  utility  whois  windows 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: TinyApps.Org

TinyApps.Org



TinyApps.Org



Last Build Date: Tue, 14 Nov 2017 07:00:00 GMT

 



whois terminal command not returning registrant contact info

Tue, 14 Nov 2017 07:00:00 GMT

At some point in recent history, whois stopped returning registrant contact info for a number of TLDs, including .com*. In Why is 'whois' showing no registrant information?, bu11etpr00f explains that the specific registrar whois server must now be queried directly in order to get registrant contact information, i.e.,

$ whois reddit.com
...
Registrar WHOIS Server: whois.markmonitor.com
...
$ whois -h whois.markmonitor.com reddit.com
...
Registrant Name: Domain Administrator
Registrant Organization: Reddit Inc.
Registrant Street: 548 Market St.,
...

Rather than running two commands, I cobbled together this oneliner:

$ whois -h $(whois reddit.com | grep 'Registrar WHOIS Server:' | cut -f2- -d:) reddit.com

but quickly realized that I use whois often enough to create a bash function for it.

So I saved this in ~/.bash_profile:

function w2 {
  whois -h $(whois $1 | grep 'Registrar WHOIS Server:' | cut -f2- -d:) $1
}

then ran source ~/.bash_profile to reload.

Much easier now:

$ w2 reddit.com
...
Registrant Name: Domain Administrator
Registrant Organization: Reddit Inc.
Registrant Street: 548 Market St.,
...

* Thanks to Guy at easyDNS for kindly informing me of the difference between thick and thin WHOIS registries. See also Anthony Geoghegan's reply to Why do some domain names have extremely truncated whois information? for more information.




Demi-decennial coworking update

Thu, 26 Oct 2017 07:00:00 GMT

WeWork "transforms buildings into beautiful, collaborative workspaces." 237 buildings in 56 cities, for teams of 1 to 500+.

Previously: 2005, 2010

*Yes, this installment is running slightly behind schedule.



Windows 10: Restore classic blue solid color Desktop background

Mon, 16 Oct 2017 07:15:00 GMT

In Windows 2000 and XP, the default solid color Desktop background was a serene shade of blue:

(image)

Hue: 141
Sat: 115
Lum: 105

 

Red: 58
Grn: 110
Blu: 165

 

Hex: #3A6EA5

The "Windows Classic" theme in Windows 7 used the same color, but there was a slightly darker blue default color available in the Solid Colors menu, which was still available in Windows 8.1:

(image)

Hue: 142
Sat: 203
Lum: 60

 

Red: 10
Grn: 59
Blu: 118

 

Hex: #0A3B76

Inexplicably, Windows 10 not only removed these calming blue tones and replaced them with 24 largely garish colors, but also failed to provide any option for customizing colors in the main Settings menu (right click Desktop > Personalize > Background: Solid Color). Happily, the classic Desktop Background applet is accessible via Run > control /name Microsoft.Personalization /page pageWallpaper. Not only can you select the Windows 7 darker blue, but you can also create custom colors by clicking "More...".

UPDATE: The day after this post, Microsoft released Windows 10 Fall Creators Update, which includes a "Custom color" option in the main Background settings window. Click "More" to enter RGB, HSV, or hex values.




macOS: Export Contacts to CSV

Mon, 16 Oct 2017 07:00:00 GMT

While Contacts.app does not include an explicit CSV export option, one can be easily effected by:
  1. highlighting desired contacts,
  2. dragging them into a new Numbers spreadsheet, and
  3. exporting the spreadsheet to CSV



Taking screenshots in macOS Recovery Mode or within a bootable installer

Sun, 01 Oct 2017 07:15:00 GMT

  1. Boot into Recovery Mode (Cmd+R) or via a USB bootable install disk
  2. Utilities > Terminal
  3. If you have access to the existing macOS install, you can use the copy of screencapture located at /Volumes/Macintosh\ HD/usr/sbin/screencapture for the following. Otherwise, copy /usr/sbin/screencapture from another macOS install to a USB flash drive (e.g., SANDISK) and run from there.
  4. Open desired application(s) from the Terminal, e.g.,
    • Disk Utility: /Applications/Utilities/Disk\ Utility.app/Contents/MacOS/Disk\ Utility
    • Safari: /Applications/Safari.app/Contents/MacOS/Safari
  5. Open another tab in Terminal and run /Volumes/SANDISK/screencapture /Volumes/SANDISK/screenshot.png

References:




High Sierra's Disk Utility does not recognize unformatted disks

Sun, 01 Oct 2017 07:00:00 GMT

unless you click View > Show All Devices, quit Disk Utility, then relaunch it (thanks to xenadu02 for the workaround!)

macOS 10.13's Disk Utility 17.0 (1626) does not recognize raw drives. Here is an example while booted from the installer, attempting to prepare a new internal drive:

(image)

However, as seen in the blue Terminal window, diskutil does recognize the drive. We'll use it to perform a quick, cursory format (e.g., diskutil eraseDisk JHFS+ NewDisk GPT disk0) to make the disk appear in Disk Utility, where further modifications can more easily be made:

(image)

Plugging in an unformatted external drive produces the usual alert, "The disk you inserted was not readable by this computer. Initialize... | Ignore | Eject", but clicking Initialize just opens Disk Utility without the disk appearing:

(image)

As shown above, clicking View > Show All Devices does not cause the raw disk to appear.

UPDATE: Fans of Disk Utility's last classic version (13 (606) from OS X 10.10 Yosemite) have got it running in El Capitan and Sierra:

Disk Utility version 13 was the last to support:

  • Repairing permissions
  • Verifying disks
  • Software RAID
  • Burning optical discs (CDs and DVDs)
  • Dragging and dropping of disk images

However, in light of APFS and other changes, it may be wiser to simply use diskutil and hdiutil instead.







Menu bar firewall status indicator

Sun, 10 Sep 2017 07:15:00 GMT

BitBar (open source) can be used to display an emoji of choice in the menubar depending on the built-in Application Firewall's state: off (0), on for specific services (1), or on for essential services (aka stealth mode) (2):

(image)

  1. Install and launch BitBar
  2. Create a new directory (e.g., ~/bitbar/) to store plugins when prompted
  3. Save the following Bash script as ~/bitbar/firewall_status_indicator.10s.sh and make it executable (chmod +x firewall_status_indicator.10s.sh):
    #!/bin/bash
    
    state=$(defaults read "/Library/Preferences/com.apple.alf" globalstate);
    
    if [ "$state" -eq 2 ]; then
      echo "🔒"
    elif [ "$state" -eq 1 ]; then
      echo "❗️"
    else
      echo "‼️"
    fi
    
    echo "---"
    echo "Open Firewall preference pane| href='x-apple.systempreferences:com.apple.preference.security?Firewall'"
    

GeekTool (free) can display a tiny red or green status LED on the desktop or in the menubar to indicate the firewall status:

(image)

  • Steps:
    1. Install and launch GeekTool
    2. Check "Enable" and "Automatically launch at login"
    3. Drag "Shell" to the desktop
    4. Position: 1007 | 4 (change as needed)
    5. Size: 95 | 45
    6. Check "Keep on Top"
    7. Command: if [ `defaults read "/Library/Preferences/com.apple.alf" globalstate` -eq 2 ];then EX=0;else EX=1;fi;exit $EX
    8. Refresh every: 60s (change as desired)
    9. Check "Display status feedback image"
  • Notes:
    • To check for (1), change "-eq 2" to "-eq 1" and to check for either (1) or (2), change to "-ge 1"
    • If your geeklet causes GeekTool to freeze, delete ~/Library/Preferences/org.tynsoe.geeklet.shell.plist to start over.
  • Props:

TextBar ($2.99) can be used to display a shield icon and the firewall state (0, 1, or 2 as explained above) in the menu bar:

(image)

  1. Install and launch TextBar
  2. Disable the default items
  3. Click the plus symbol to add a new item
  4. Replace echo 'Hello' with defaults read /Library/Preferences/com.apple.alf globalstate
  5. Check the far left box to enable and select the shield image



Particulars: BgInfo for OS X / macOS

Sun, 10 Sep 2017 07:00:00 GMT

Sysinternals' BgInfo has been around for ages, displaying key system info on the Windows Desktop for convenience (especially handy for admins supporting remote users).

Glencode's Particulars offers similar functionality for Mac users, including a lab mode to help ease mass deployment.



Recovering saved macOS user passwords

Thu, 07 Sep 2017 07:00:00 GMT

Users who have (inadvisedly) enabled automatic login often forget the password. It is merely encoded with an XOR cipher and stored in /etc/kcpassword.

A number of sites suggest this Ruby one-liner to recover it:

sudo ruby -e'key=[125,137,82,35,210,188,221,234,163,185,31];IO.read("/etc/kcpassword").bytes.each_with_index{|b,i|break if key.include?(b);print [b^key[i%key.size]].pack("U*")}'

However, only the first four characters were returned in my limited testing.

Joaquin Moreno Garijo's Python script, kcpass.py, did the trick:

  1. Copy /etc/kcpassword via target disk mode, single-user mode, etc.
  2. curl -O https://raw.githubusercontent.com/jjarava/mac-osx-forensics/master/kcpass.py
  3. chmod +x kcpass.py
  4. ./kcpass.py $(xxd -p /path/to/kcpassword)
        Kcpasswd: 0x09e03c5ab3ccad998dd66d1a89b165ae7e8912b851f8f0ff.
        Magic Xor: 0x7d895223d2bcddeaa3b91f.
        Used Magic Xor: 0x7d895223d2bcddeaa3b91f7d895223d2bcddeaa3b91f7d895223d2bcddeaa3b91f.
    
        The password is: "tinyapps.org".
    

See also: