Skip to content

Instantly share code, notes, and snippets.

@PostsDesert
Last active October 30, 2017 23:15
Show Gist options
  • Save PostsDesert/ff800756335005f871fbb05c4256985a to your computer and use it in GitHub Desktop.
Save PostsDesert/ff800756335005f871fbb05c4256985a to your computer and use it in GitHub Desktop.
POC for spamming friends using iMessage
tell application "Messages"
--To get the group id I used "DB Browser for SQLite" and opened "~/Library/Messages/chat.db" after making a backup.
--For Group Chat
set groupid to "<GROUP-ID-HERE>" -- ex. iMessage;+;chat999999999999999999999
--For individual
--Set targetBuddy to email or phone number
set targetBuddy to "<PHONE-OR-EMAIL-HERE>" -- ex. 5515515551 or [email protected]
set targetService to id of 1st service whose service type = iMessage
-- Image or Text
set ImageAttachment to POSIX file "<FILEPATH>" as alias -- ex. "/Users/Home/Downloads/source.gif"
set textMessage to "<TEXT-MESSAGE-HERE>"
repeat
--Comment out the one you don't want to use
--For individual
set theBuddy to buddy targetBuddy of service id targetService
--For Group Chat
--set theBuddy to a reference to text chat id groupid
--Choose if you want to send the "textMessage" or "ImageAttachment" below
send textMessage to theBuddy
-- To add some delay between messages send enable this
--delay (random number from 0 to 1)
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment