add jq to install script and improved cxheckbadge with profile name

This commit is contained in:
2025-11-17 20:21:27 -07:00
parent 0298b613f6
commit 45a810fa95
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -6,6 +6,8 @@ set -e # die on any errpr because nmama didnt raise no bitch
provided_credential="$1" provided_credential="$1"
openbadge_file="$2" openbadge_file="$2"
# maek sure da args are in place or print help and fail # maek sure da args are in place or print help and fail
if [ -z "$provided_credential" -o -z "$openbadge_file" ]; then if [ -z "$provided_credential" -o -z "$openbadge_file" ]; then
echo -e "Usage:\n\tcheckbadge <string credential> <path to openbadge file>\n\nRequires: coreutils, jq, and exiftool" echo -e "Usage:\n\tcheckbadge <string credential> <path to openbadge file>\n\nRequires: coreutils, jq, and exiftool"
@@ -26,6 +28,7 @@ openbadge_url=$(echo $openbadge_json | jq -r '.badge')
openbadge_sha256=$(echo $openbadge_json | jq -r '.recipient.identity' | awk -F '$' '{print $2}') openbadge_sha256=$(echo $openbadge_json | jq -r '.recipient.identity' | awk -F '$' '{print $2}')
openbadge_salt=$(echo $openbadge_json | jq -r '.recipient.salt') openbadge_salt=$(echo $openbadge_json | jq -r '.recipient.salt')
openbadge_narrative=$(echo $openbadge_json | jq -r '.narrative') openbadge_narrative=$(echo $openbadge_json | jq -r '.narrative')
openbadge_name=$(echo $openbadge_json | jq -r '.extensions.recipientProfile.name')
# generate da checksum from the provided credential and extracted salt # generate da checksum from the provided credential and extracted salt
# sha256(<string provided credential><string extracted salt>) # sha256(<string provided credential><string extracted salt>)
@@ -39,7 +42,7 @@ else
fi fi
# outputter # outputter
echo -e "\nProvided Credential: $provided_credential\nBadge File: $openbadge_file\n\tExtracted Badge URL: $openbadge_url\n\tExtracted Salt: $openbadge_salt\n\tExtracted Narrative: $openbadge_narrative\n\tExtracted SHA256 Checksum: $openbadge_sha256\n\tGenerated SHA256 Checksum: $generated_sha256\n\t\tFrom: sha256(<string credential><string salt>)\n\nTESTING \"$provided_credential\" AGAINST OPENBADGE FILE \"$openbadge_file\"\n\n$check" echo -e "\nProvided Credential: $provided_credential\nBadge File: $openbadge_file\n\tBadge URL: $openbadge_url\n\tSalt: $openbadge_salt\n\tNarrative: $openbadge_narrative\n\tSHA256 Checksum: $openbadge_sha256\n\tGenerated SHA256 Checksum: $generated_sha256\n\t\tFrom: sha256(<string credential><string salt>)\n\nTESTING \"$provided_credential\" AGAINST OPENBADGE FILE \"$openbadge_file\"\n\n$check"
# do dey maaaatch again>??? # do dey maaaatch again>???
# but this time set retcode show succ or failure # but this time set retcode show succ or failure
+1 -1
View File
@@ -11,7 +11,7 @@ gitRepo='https://github.com/PrincessPi3/general-scripts-and-system-ssssssetup.gi
tmpDir='/tmp/generalssss' tmpDir='/tmp/generalssss'
tmp_customscripts_dir="$tmpDir/customscripts" tmp_customscripts_dir="$tmpDir/customscripts"
finalDir='/usr/share/customscripts' finalDir='/usr/share/customscripts'
packages="polygen polygen-data apache2 seclists cmake locales python3 build-essential gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib librust-git2+openssl-probe-dev cargo nginx build-essential cowsay iotop iptraf-ng gh btop screen byobu thefuck wget lynx zip unzip 7zip xz-utils gzip net-tools clamav php restic cifs-utils detox fdupes ripgrep avahi-daemon libnss-mdns xxd xrdp libimage-exiftool-perl kali-tools-hardware kali-tools-crypto-stego kali-tools-fuzzing kali-tools-bluetooth kali-tools-rfid kali-tools-sdr kali-tools-voip kali-tools-802-11 kali-tools-forensics samba procps snapd" packages="jq polygen polygen-data apache2 seclists cmake locales python3 build-essential gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib librust-git2+openssl-probe-dev cargo nginx build-essential cowsay iotop iptraf-ng gh btop screen byobu thefuck wget lynx zip unzip 7zip xz-utils gzip net-tools clamav php restic cifs-utils detox fdupes ripgrep avahi-daemon libnss-mdns xxd xrdp libimage-exiftool-perl kali-tools-hardware kali-tools-crypto-stego kali-tools-fuzzing kali-tools-bluetooth kali-tools-rfid kali-tools-sdr kali-tools-voip kali-tools-802-11 kali-tools-forensics samba procps snapd"
echo -e "\nSTARTING!\n\tUsing Shell $SHELL\n" echo -e "\nSTARTING!\n\tUsing Shell $SHELL\n"