Skip to content

Instantly share code, notes, and snippets.

@lpar
Last active April 20, 2024 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lpar/3002691f4819639c759d797673ee8945 to your computer and use it in GitHub Desktop.
Save lpar/3002691f4819639c759d797673ee8945 to your computer and use it in GitHub Desktop.
Rules for Bouncer app to block SMS spam from Democratic campaigns

I got tired of SMS spam from political campaigns. I found an app called Bouncer for iOS which lets you create your own filtering rules to move SMS into a junk folder, but that seemed like hard work.

So I tried various paid services that claimed they could stop SMS spam, some of which claimed they used AI. None of them worked as well as Bouncer plus a few rules I wrote myself. In addition, Bouncer runs entirely on the device, unlike several of the commercial systems, so your messages aren't sent to some random server somewhere.

Happily Bouncer can import and export rules as JSON, so here are mine. It has been several weeks since spam texts made it to my message inbox; the rules caught four on Thursday.

As an aside, SMS spam is supposed to be illegal without consent, and I've been careful never to give my number to any political campaign. But political campaigns get around the law by having banks of humans copy and paste the spam and send it from individual accounts, instead of having software do it.

If someone out there wants to write an app that uses a shared blocklist to get rid of political spam, I would happily pay a monthly fee for the service, since apparently the phone companies aren't interested in doing anything about it.

[
{
"type": "any",
"phrase": ".actblue.com",
"subAction": "none",
"id": "618CCB2A-8268-4887-99A1-A0E8F838960B",
"action": "junk",
"caseSensitive": false,
"useRegex": false
},
{
"action": "junk",
"caseSensitive": false,
"subAction": "none",
"id": "9567A2AA-F2A9-435B-B847-A13BEC67B2DF",
"type": "any",
"phrase": ".campaigndeputy.com",
"useRegex": false
},
{
"type": "any",
"id": "695F67C9-C4B7-4E49-868F-E8D0CC037F81",
"caseSensitive": false,
"subAction": "none",
"phrase": "Biden",
"useRegex": false,
"action": "junk"
},
{
"subAction": "none",
"action": "junk",
"type": "any",
"caseSensitive": false,
"phrase": "Congress",
"useRegex": false,
"id": "1899EFA5-3832-4F91-BB56-F2204D2E7820"
},
{
"caseSensitive": false,
"subAction": "none",
"id": "0A63EF66-A86C-4AF3-8DCE-3A9BDE2C5A1B",
"phrase": "DCCC",
"useRegex": false,
"action": "junk",
"type": "any"
},
{
"useRegex": false,
"type": "any",
"caseSensitive": false,
"action": "junk",
"id": "C8038F44-5D6B-472D-BDCE-C2D25A425321",
"phrase": "Environmental Defense Action Fund",
"subAction": "none"
},
{
"subAction": "none",
"type": "any",
"caseSensitive": false,
"phrase": "Senate (majority|control)",
"useRegex": true,
"id": "E0CBC455-A45B-4EFF-AF7B-C864163CE6AD",
"action": "junk"
},
{
"subAction": "none",
"type": "any",
"action": "junk",
"id": "894AF09B-07B9-405D-B313-FF0BA7A38EE0",
"caseSensitive": false,
"useRegex": true,
"phrase": "[𝚊𝚋𝚌𝚍𝚎𝚏𝚐𝚑𝚒𝚓𝚔𝚕𝚖𝚗𝚘𝚙𝚚𝚛𝚜𝚝𝚞𝚟𝚠𝚡𝚢𝚣𝙖𝙗𝙘𝙙𝙚𝙛𝙜𝙝𝙞𝙟𝙠𝙡𝙢𝙣𝙤𝙥𝙦𝙧𝙨𝙩𝙪𝙫𝙬𝙭𝙮𝙯𝘢𝘣𝘤𝘥𝘦𝘧𝘨𝘩𝘪𝘫𝘬𝘭𝘮𝘯𝘰𝘱𝘲𝘳𝘴𝘵𝘶𝘷𝘸𝘹𝘺𝘻𝗮𝗯𝗰𝗱𝗲𝗳𝗴𝗵𝗶𝗷𝗸𝗹𝗺𝗻𝗼𝗽𝗾𝗿𝘀𝘁𝘂𝘃𝘄𝘅𝘆𝘇𝖺𝖻𝖼𝖽𝖾𝖿𝗀𝗁𝗂𝗃𝗄𝗅𝗆𝗇𝗈𝗉𝗊𝗋𝗌𝗍𝗎𝗏𝗐𝗑𝗒𝗓𝖆𝖇𝖈𝖉𝖊𝖋𝖌𝖍𝖎𝖏𝖐𝖑𝖒𝖓𝖔𝖕𝖖𝖗𝖘𝖙𝖚𝖛𝖜𝖝𝖞𝖟𝓪𝓫𝓬𝓭𝓮𝓯𝓰𝓱𝓲𝓳𝓴𝓵𝓶𝓷𝓸𝓹𝓺𝓻𝓼𝓽𝓾𝓿𝔀𝔁𝔂𝔃𝒂𝒃𝒄𝒅𝒆𝒇𝒈𝒉𝒊𝒋𝒌𝒍𝒎𝒏𝒐𝒑𝒒𝒓𝒔𝒕𝒖𝒗𝒘𝒙𝒚𝒛𝐚𝐛𝐜𝐝𝐞𝐟𝐠𝐡𝐢𝐣𝐤𝐥𝐦𝐧𝐨𝐩𝐪𝐫𝐬𝐭𝐮𝐯𝐰𝐱𝐲𝐳]"
},
{
"phrase": "\\w4\\w\\w\\.us",
"action": "junk",
"caseSensitive": false,
"subAction": "none",
"id": "BBABBF92-5EB4-426B-A14B-A4AAA0A335B4",
"useRegex": true,
"type": "any"
},
{
"action": "junk",
"id": "397AB20E-C92C-486A-9F63-47AF80196ED8",
"subAction": "none",
"useRegex": false,
"type": "any",
"caseSensitive": false,
"phrase": "bvf4us.com"
},
{
"id": "CD6FAAD2-6D57-4D68-9272-14B3C4E2CB9C",
"useRegex": false,
"subAction": "none",
"type": "any",
"phrase": "cg4utah.us",
"caseSensitive": false,
"action": "junk"
},
{
"action": "junk",
"subAction": "none",
"useRegex": false,
"id": "9A2E5428-B113-408D-89F6-7512858CF7BF",
"type": "any",
"phrase": "chip in",
"caseSensitive": false
},
{
"caseSensitive": false,
"id": "84847951-0E58-4E4A-9092-9ACCE380E9AD",
"action": "junk",
"subAction": "none",
"type": "any",
"phrase": "dcccgift.org",
"useRegex": false
},
{
"id": "C68AD614-FDAD-4798-9C6A-D3C64A8CE3BD",
"subAction": "none",
"caseSensitive": false,
"action": "junk",
"phrase": "dcccwins.us",
"useRegex": false,
"type": "any"
},
{
"id": "47693FA0-C4AD-4D3B-8CD5-B88DB4D4BA20",
"subAction": "none",
"phrase": "dem-govs.us",
"useRegex": false,
"caseSensitive": false,
"action": "junk",
"type": "any"
},
{
"id": "7DD56CD8-3305-4BA7-A5CB-0653C6A98457",
"subAction": "none",
"phrase": "dems-sos.us",
"type": "any",
"caseSensitive": false,
"useRegex": false,
"action": "junk"
},
{
"id": "832903A3-F30A-4543-B6C2-67CB8A329F9A",
"type": "any",
"action": "junk",
"phrase": "dmp4fl.us",
"subAction": "none",
"caseSensitive": false,
"useRegex": false
},
{
"type": "any",
"phrase": "dscc4us.com",
"caseSensitive": false,
"subAction": "none",
"id": "7C96177D-7EA2-4505-996F-19283F531004",
"action": "junk",
"useRegex": false
},
{
"caseSensitive": false,
"useRegex": false,
"subAction": "none",
"action": "junk",
"type": "any",
"phrase": "dsccfor.us",
"id": "461D72AD-ECE3-425C-B5FA-CA86664C0258"
},
{
"phrase": "early voting",
"useRegex": false,
"type": "any",
"subAction": "none",
"id": "1F963502-5098-40D5-B68E-03D289F2991B",
"action": "junk",
"caseSensitive": false
},
{
"action": "junk",
"phrase": "frost4congress.us",
"type": "any",
"subAction": "none",
"id": "D60C3B04-0772-4799-B34B-DC7541EA5580",
"caseSensitive": false,
"useRegex": false
},
{
"action": "junk",
"type": "any",
"id": "98A49120-4BC1-485C-899C-AA273CDF0029",
"caseSensitive": false,
"phrase": "fundprogress.us",
"useRegex": false,
"subAction": "none"
},
{
"subAction": "none",
"id": "1998E334-FC5C-42F0-B0AD-20B39FFC5B0C",
"caseSensitive": false,
"phrase": "fundprogress.us",
"type": "any",
"useRegex": false,
"action": "junk"
},
{
"type": "any",
"caseSensitive": false,
"subAction": "none",
"id": "3A59C7E3-A068-4B2E-A1AB-679820B3816D",
"phrase": "give.lcv.org",
"useRegex": false,
"action": "junk"
},
{
"subAction": "none",
"phrase": "hj4ny.us",
"useRegex": false,
"id": "707B3D35-3FE4-4AE2-9675-34477550BD3A",
"caseSensitive": false,
"type": "any",
"action": "junk"
},
{
"id": "0753C845-A938-4CC6-81EA-3AEEEF5303D3",
"subAction": "none",
"useRegex": false,
"action": "junk",
"caseSensitive": false,
"type": "any",
"phrase": "hmpac.us"
},
{
"type": "any",
"id": "6AAC31A9-0C3A-47B3-9E4C-344F1C4E32CE",
"subAction": "none",
"caseSensitive": false,
"action": "junk",
"useRegex": false,
"phrase": "housemajority.us"
},
{
"id": "738973BC-3B21-4E4A-952E-D25D1583161D",
"action": "junk",
"caseSensitive": false,
"type": "any",
"subAction": "none",
"phrase": "jb4or.com",
"useRegex": false
},
{
"type": "any",
"action": "junk",
"phrase": "sb4oh.us",
"caseSensitive": false,
"useRegex": false,
"id": "0F971023-56B2-4BB2-860D-05E281C9A8A3",
"subAction": "none"
},
{
"action": "junk",
"phrase": "sbforohio.com",
"caseSensitive": false,
"type": "any",
"subAction": "none",
"useRegex": false,
"id": "18AEE438-E4C7-49C5-B6CE-BB678462B70A"
},
{
"caseSensitive": false,
"id": "BEE0F2A1-8854-40CE-BFE7-7B0ECE0FF130",
"subAction": "transactionOther",
"useRegex": false,
"phrase": "security code",
"type": "any",
"action": "transaction"
},
{
"type": "any",
"caseSensitive": false,
"id": "79C93F7D-E942-4A0F-AE38-C5491EB3AFBD",
"action": "junk",
"subAction": "none",
"phrase": "travistwostep.com",
"useRegex": false
},
{
"phrase": "twitter.com",
"useRegex": false,
"action": "junk",
"caseSensitive": false,
"type": "any",
"subAction": "none",
"id": "AE0E0465-0DA0-418C-A143-17CEFA0970A3"
},
{
"action": "junk",
"useRegex": false,
"phrase": "usa4unfpa.com",
"id": "762ACA17-A75A-4EFB-90E3-F3999BF2B779",
"caseSensitive": false,
"type": "any",
"subAction": "none"
},
{
"id": "2B837C32-C04A-4B4E-B89F-295CEF1E8B96",
"type": "any",
"phrase": "verification code",
"caseSensitive": false,
"action": "transaction",
"subAction": "transactionOther",
"useRegex": false
},
{
"subAction": "none",
"id": "3C8186DF-D2E5-4F09-816F-C10487C7C1D9",
"action": "junk",
"useRegex": true,
"phrase": "vote (yes|no) on",
"type": "any",
"caseSensitive": false
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment