D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
sbin
/
Filename :
sendmail_bitninja
back
Copy
#!/bin/bash pwd=$(pwd) data=$(tee /var/log/stdin_content.log) to=$(echo -e "$data" | grep -oP '^To: \K.*' | tr -d '[:space:]') subject=$(echo -e "$data" | grep -oP '^Subject: \K.*') from=$(echo -e "$data" | grep -oP '^From: \K.*' | tr -d '[:space:]') file_name=$(echo "$data" | grep -oP '^X-PHP-Originating-Script: \K.*' | cut -d ':' -f 2-) echo "PWD: $pwd; TO: $to; SUBJECT: $subject; FROM: $from; FILE: $file_name" >> /var/log/sendmail_bitninja.log echo "$data" | /usr/sbin/sendmail "$@"