P
postcd
Guest
Hello,
please how can i extract an Linux command out of e-mail message?
I sent an e-mail with this text:
and in the received e-mail file is:
The e-mail encoding is:
Content-Type: multipart/alternative
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Please which example command can i use to extract that Linux command out of the mail file not knowing which command the file will contain, only knowing that the command will be after string "cmd: " ?
I am able to extract alphanumeric string, but i do not know how to do what i explained.
Thank You
please how can i extract an Linux command out of e-mail message?
I sent an e-mail with this text:
dfgděšřčéáčřéš6356556<='";
pwd: heslo12
cmd: echo "$(date) zzzz";whoami
and in the received e-mail file is:
<div dir=3D"ltr"><h2 id=3D"gmail-:14z" class=3D"gmail-hP" tabindex=3D"-1">d=
fgd=C4=9B=C5=...=99=C3=A9=C5=A1635655<wbr>6=
<=3D'";</h2><p>pwd: heslo12</p><p>cmd: echo "$(date) =
zzzz";whoami</p><p>sdfsd<br></p></div>
The e-mail encoding is:
Content-Type: multipart/alternative
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Please which example command can i use to extract that Linux command out of the mail file not knowing which command the file will contain, only knowing that the command will be after string "cmd: " ?
I am able to extract alphanumeric string, but i do not know how to do what i explained.
Thank You
Last edited: