From 5e2d228b630202b36c2443a8850607013d31c071 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Tue, 9 Mar 2021 11:30:16 +0000 Subject: [PATCH] CSV and TSV output should be independent + typos --- README.md | 4 ++-- generate-unique-machine-values.sh | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index be6646e..befd65a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Author: Sick.Codes https://sick.codes/ & https://twitter.com/sickcodes ### Follow @sickcodes on Twitter for updates! [https://twitter.com/sickcodes](https://twitter.com/sickcodes) -Terms & Conditions: Serial numbers are an important part of conducting iMessage security research and finding vulnerabilities in software prior to Bad Actors, therefor, you must agree to [Apple's Security Bounty program](https://developer.apple.com/security-bounty/requirements/). +Terms & Conditions: Serial numbers are an important part of conducting iMessage security research and finding vulnerabilities in software prior to Bad Actors, therefore, you must agree to [Apple's Security Bounty program](https://developer.apple.com/security-bounty/requirements/). ### PR & Contributor Credits @@ -45,7 +45,7 @@ Used at runtime in [Docker-OSX](https://github.com/sickcodes/Docker-OSX). # Requirements ```bash -# Ubuntu/Debian/Pop +# Ubuntu, Debian, Pop sudo apt update -y sudo apt install libguestfs-tools build-essential wget git linux-generic sudo -y diff --git a/generate-unique-machine-values.sh b/generate-unique-machine-values.sh index a05d238..b8fa553 100755 --- a/generate-unique-machine-values.sh +++ b/generate-unique-machine-values.sh @@ -258,12 +258,16 @@ generate_serial_sets () { if [ "${CSV_OUTPUT_FILENAME}" ]; then [ "${CSV_OUTPUT_FILENAME}" ] && export CSV_SERIAL_SETS_FILE="${CSV_OUTPUT_FILENAME}" - elif [ "${TSV_OUTPUT_FILENAME}" ]; then - [ "${TSV_OUTPUT_FILENAME}" ] && export TSV_SERIAL_SETS_FILE="${TSV_OUTPUT_FILENAME}" - else + else export CSV_SERIAL_SETS_FILE="${OUTPUT_DIRECTORY}/serial_sets-${DATE_NOW}.csv" - export TSV_SERIAL_SETS_FILE="${OUTPUT_DIRECTORY}/serial_sets-${DATE_NOW}.tsv" fi + + if [ "${TSV_OUTPUT_FILENAME}" ]; then + [ "${TSV_OUTPUT_FILENAME}" ] && export TSV_SERIAL_SETS_FILE="${TSV_OUTPUT_FILENAME}" + else + export TSV_SERIAL_SETS_FILE="${OUTPUT_DIRECTORY}/serial_sets-${DATE_NOW}.csv" + fi + ./macserial \ --num "${SERIAL_SET_COUNT}" \