Laukidh@Laukidh@infosec.exchange
SMS Spam Handler iPhone Shortcut with install instructions펼치기

This shortcut runs when you get a text message containing the word “stop”.

It checks if the sender is in your contacts and if not it looks for another keyword like “end” “unsubscribe” and then checks the rest of the message against a political wordlist. (SpamMatch.txt, which is written by the setup shortcut below. It’s newline separated and supports regex, customize away and let me know what works for you).

I should note that you’ll probably find your favorite candidate in that wordlist.

If it’s spam, it sends back “stop”, reports the sender to 7726 (spam), and adds them to a contact (setup shortcut below) that identifies all your spammers and lets you just swipe to block them.

Sorry, you will have to build a bit of the automation yourself. We can’t share or back up the “Automation” that kicks it off.

Main shortcut “text spam handler” (install this): icloud.com/shortcuts/edbe30f39 (Updated 20260709)

Setup/Maintenance shortcut (install and run this; it will write a file then prompt with a contact to create; if you change what the contact is named, you will need to edit a single line in the main shortcut):

icloud.com/shortcuts/17039457e

1 1 4

불러오는 중…

Laukidh@Laukidh@infosec.exchange
@Laukidh@infosec.exchange 님에게 답글
Instructions for creating iPhone automation펼치기

Now, build this where you want it to execute (on your iphone)

New automation

Create a dictionary for sender/content from the shortcut input

Check the number isn’t in our contacts. If it is, error out (show notification if desired then stop this shortcut).

If not, write the dictionary to a file it should go on your phone in the Shortcuts directory that was created by the setup script we ran. The file name you want to create is “SpamMessage.json” and overwrite if it exists.

Last, call the first shortcut we installed, run shortcut “Text Spam Handler” (pass the Dictionary as input)

When
Sender:  Any Sender
Message Contains: STOP
Run Immediately
Within the new automation:


receive messages as
input


New Dictionary
Sender (select the shortcut input for Message Sender) 
Content (select shortcut input for Message Content)

Get phone numbers from
Shortcut Input Sender

Get contacts from
Phone Numbers (previous action)
If Contact Name has  any value


Show notification
Sender in Contacts

Attachment
Contacts
Stop this shortcut

Otherwise

Otherwise

Show notification
Phone Numbers

Save Dictionary to Shortcuts


Run Shortcut Text Spam Handler 

End If
Laukidh@Laukidh@infosec.exchange
@Laukidh@infosec.exchange 님에게 답글

Alright. Let me know what isn’t clear. I’m sure there’s a ton of little details I didn’t include. Like, I didn’t expand a bunch of fields and you may want to know some of that.

All the files write to local storage in the phone, but you can change that if you want, with an unfortunate number of clicks.

Laukidh@Laukidh@infosec.exchange
@Laukidh@infosec.exchange 님에게 답글

Releasing a new bundle seems to be my cue to do a major update and break stuff on my local copy.

Adding some state checkpointing, should take care of the separate “slow” shortcut. I also moved the Pending logic to the Maintenance script… so it should just be 2 when I finish testing and release that update.