TYPE-0
FILEMANAGER
UP LEVEL
HOME
EXIT
Current Directory:
scripts2
/
EDIT: imunify_full.sh
#!/bin/bash # List infected files of an account (ImunifyAV), with last mod date # and numeric permissions. USER=$1 if ! [ "$USER" ]; then echo "You must provide a username." exit 1 fi if ! id $USER 2> /dev/null > /dev/null; then echo "User \"$USER\" does not exist." exit 2 fi LOAD=$(imunify-antivirus malware user list --json \ | jq -r --arg USER "$USER" '.items[] | select( .user == $USER)') LIMIT=$(echo $LOAD | jq -r .infected) SCAN_RAW=$(echo $LOAD | jq -r .scan_date) CUR_RAW=$(imunify-antivirus malware on-demand status | grep -w $USER) if [ "$SCAN_RAW" == "null"]; then SCAN=Never else SCAN=$(date -d @$SCAN_RAW) fi if [ "$CUR_RAW" ]; then CUR=Yes else CUR=No fi HEADER=\ "------ Account: $USER ------\nScanning?: $CUR\nLast scan: $SCAN\nTotal infected: $LIMIT\n------ Account: $USER ------" echo -e $HEADER imunify-antivirus malware malicious list --user $USER --limit $LIMIT --json | jq -r .items[].file \ | xargs -I {} stat --printf "%a\t%y\t%n\n" {} echo -e $HEADER
SAVE CHANGES
BACK TO DIR
TYPE-0 MANAGER © 2026 |
System Ready