From 64e2de02e0812d855893777946cc0b4b7e1091d7 Mon Sep 17 00:00:00 2001 From: Patrick Neumann Date: Wed, 2 Dec 2020 17:37:14 +0100 Subject: [PATCH] Fixed timezone script for macOS and a typo --- .../nautilus/scripts/02-EWF-E01/01-ewfinfo | 2 +- .../scripts/05b-macOS/02-E01-timezone | 20 +++++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/home/lucifer/.local/share/nautilus/scripts/02-EWF-E01/01-ewfinfo b/home/lucifer/.local/share/nautilus/scripts/02-EWF-E01/01-ewfinfo index d8bd4ab..03e1a18 100755 --- a/home/lucifer/.local/share/nautilus/scripts/02-EWF-E01/01-ewfinfo +++ b/home/lucifer/.local/share/nautilus/scripts/02-EWF-E01/01-ewfinfo @@ -10,7 +10,7 @@ # 01-ewfinfo # # USAGE: -# Right klick on the first file of an EWF image and +# Right click on the first file of an EWF image and # choose this nautilus script from the context menu. # # OPTIONS: diff --git a/home/lucifer/.local/share/nautilus/scripts/05b-macOS/02-E01-timezone b/home/lucifer/.local/share/nautilus/scripts/05b-macOS/02-E01-timezone index 9bb48f2..853287a 100755 --- a/home/lucifer/.local/share/nautilus/scripts/05b-macOS/02-E01-timezone +++ b/home/lucifer/.local/share/nautilus/scripts/05b-macOS/02-E01-timezone @@ -2,15 +2,15 @@ #=============================================================================== # # DIRECTORY: -# /home/*/.local/share/nautilus/scripts/05b_macOS/ +# /home/*/.local/share/nautilus/scripts/05b-macOS/ # OR -# /home/*/.gnome2/nautilus-sctipts/05b_macOS/ (deprecated) +# /home/*/.gnome2/nautilus-sctipts/05b-macOS/ (deprecated) # # FILE: -# 02_timezone +# 02-E01-timezone # # USAGE: -# Right klick on an EWF (or RAW) image and +# Right click on the first file of an EWF image and # choose this nautilus script from the context menu. # # OPTIONS: @@ -102,8 +102,6 @@ check_dep "${MMLS_BIN}" "sleuthkit" check_dep "${PLUTIL_BIN}" "libplist-utils" check_dep "${RM_BIN}" "coreutils" check_dep "${SED_BIN}" "sed" - -# https://raw.githubusercontent.com/casualscripter/debian-stuff check_dep "${PPEPY_BIN}" "print_plist_entry.py" check_ext "${SOURCE}" "[eE]01" @@ -144,18 +142,14 @@ if ${FSSTAT_BIN} -o "${OFFSET}" "${SOURCE}" > /dev/null 2>&1 ; then -n "/Library/Preferences/.GlobalPreferences.plist" \ "${SOURCE}" )" if [ "${pref}" != "File not found" ] ; then - if [ ! -f "${TMP}/GlobalPreferences.plist" ] ; then - if ! ${ICAT_BIN} -o "${OFFSET}" "${SOURCE}" "${pref}" > "/tmp/${pref}.plist" ; then + if [ ! -f "${TMP}/${OFFSET}-GlobalPreferences.plist" ] ; then + if ! ${ICAT_BIN} -o "${OFFSET}" "${SOURCE}" "${pref}" > "${TMP}/${OFFSET}-GlobalPreferences.plist" ; then echo " During the execution of icat an error occurred." >> "${TIMEZONE}" fi - ${PLUTIL_BIN} --format xml --infile "/tmp/${pref}.plist" --outfile "${TMP}/GlobalPreferences.plist" - ${RM_BIN} "/tmp/${pref}.plist" - # since 10.10 (Yosemite) it seems, that the converted XML is not well formed!? - #${SED_BIN} --in-place --regexp-extended '/AppleLanguages<\/key>/,/<\/array>/ s/string/key/g' "${TMP}/GlobalPreferences.plist" fi echo -e -n " Some content from \".GlobalPreferences.plist\":\n " \ >> "${TIMEZONE}" - ${PPEPY_BIN} "${TMP}/GlobalPreferences.plist" TimeZoneName \ + ${PPEPY_BIN} "${TMP}/${OFFSET}-GlobalPreferences.plist" TimeZoneName \ >> "${TIMEZONE}" echo >> "${TIMEZONE}" else