I am a terrible newbie to bash scripts and I hope someone can help me with this problem.
There is a problem with the standalone scripts of the Prey project. There is a line that should send an email, and, apparently, is not formatted correctly.
response=`mailsender -f "$mail_from" -t "$mail_to" -u "$complete_subject" \
-s $smtp_server -a $file_list -o message-file="$trace_file.msg" \
tls=auto username=$smtp_username \
password=\`decrypt \"$smtp_password\"\``
In cases where mailsender is an alias for the Brandon Zehm PERL sendEmail script, $ smtp_password is a meaningless base64 password encoding and is decrypted:
decrypt() {
echo "$1" | openssl enc -base64 -d
}
So can someone tell me what happened to the script? For reference, if I just replace the entire decryption part with the plaintext password, it works fine. i.e:.
response=`mailsender -f "$mail_from" -t "$mail_to" -u "$complete_subject" \
-s $smtp_server -a $file_list -o message-file="$trace_file.msg" \
tls=auto username=$smtp_username password=actual_password`
source
share