Inspiration

In Pakistan, scam texts arrive every week: "Mubarak ho! Your BISP payment of Rs 25,000 is ready, pay a Rs 1,500 registration fee to this JazzCash number", "Your Easypaisa account will be blocked, share the code", "I sent money to you by mistake, please send it back". The people most likely to fall for them, older relatives and families waiting on BISP payments, are also the least likely to know the signs. The government even launched a dedicated cybercrime helpline (NCCIA 1799).

Most scam checkers are built for English messages from US banks. Ours mix English, Roman Urdu and Urdu script, and name JazzCash, Easypaisa, BISP and PTA.

What it does

  1. Paste the message (or tap an example).
  2. Instant rule check, in the browser, no AI: 18 warning signs written for Pakistani scams, like a request for an OTP or PIN, a fee before a "prize", an "official" message that gives a 03xx mobile number, a copycat site like hbl-update-kyc.com, an e-challan with a payment link, "sent by mistake, send it back", and job offers that want a fee. It also reads disguised spelling such as pr0c3ss1ng f33.
  3. Highlights the exact words that gave it away, inside the message.
  4. Gemma explains it (optional layer) in simple English or Urdu: what the sender wants and 1 to 3 things to do now.
  5. "Has anyone reported it?" On a tap, searches the web for the phone number or website in the message.
  6. Read aloud in English or Urdu, for people who find reading hard.
  7. Official helplines: NCCIA cybercrime 1799, PTA 0800-55055 / complaint.pta.gov.pk, JazzCash 4444, Easypaisa 3737, BISP's real SMS service 8171.

The answer is always one of: Likely a scam, Be careful, or No warning signs found (never "safe").

How we built it

  • Plain HTML, CSS and JavaScript, no framework, so it loads fast on a cheap phone. Urdu uses Noto Nastaliq and a full right-to-left layout.
  • rules.js: the rule check, shared by the page and the server. Each rule has a weight, English and Urdu explanations, and "only counts next to another sign" logic (a fee on a bill is normal, a fee next to a prize is not).
  • Gemma 4 (open-weight) for the explanation: through Google AI Studio's free tier, or fully offline with Ollama (gemma4:e4b on a 6 GB GTX 1660).
  • SerpApi for the lookup, cached and rate-limited.
  • Vercel serverless functions for the two API calls. Runs at zero cost.

Trust and responsible design

  • Privacy: phone numbers, CNICs and account numbers are replaced with [MOBILE NUMBER], [CNIC], [ACCOUNT NUMBER] in the browser before the AI sees the message. Nothing is stored or logged.
  • No made-up quotes: the server drops any "warning sign" the AI claims unless the quoted words really appear in the message.
  • No made-up phone numbers: the AI is told not to give numbers, and the server strips any it writes. Helplines are a fixed list checked against official sources.
  • Careful by default: when the rule check and the AI disagree, the page shows the more careful answer and says so.
  • Works without AI: if the AI is unavailable, the rule check still answers. The public demo currently runs in this rule-only mode.
  • Honest wording: "No warning signs found" plus "that does not prove it is safe", and on every result: "a second opinion, not a guarantee".
  • The lookup only runs on a tap, and only sends the number or site from the message.
  • All examples in the app are synthetic.

How well it works (tested on labeled messages)

Test set Messages Scams caught ("be careful" or higher) False alarms
Pakistan SMS classification set 4,895 82% 2.1%
same, at "likely scam" 71% 0.3%
UrduStack eval set (Roman Urdu, incl. disguised spelling) 86 83% 1.6%
Roman Urdu phishing set (Zenodo) 1,000 100% 0%
Rules alone, 150 held-out messages (half scams) 150 77% 0 of 75
Rules + Gemma, same 150 150 99% (93% at "likely scam") 0 of 75

Honesty note: the rules were written while looking at the Zenodo set and adjusted after reading misses on the other two, so these are best-case numbers, not a sealed test. 150 messages is a small sample.

Challenges

  • Real bank OTP texts say "never share your OTP", which looks like a scam to a keyword filter. The secret-code rule now ignores warnings phrased as "do not / never share".
  • Roman Urdu has no fixed spelling (krein, karein, kren), so patterns had to be loose without catching normal chat. "Anything urgent?" from a friend used to trigger the urgency rule; urgency now only counts next to another sign.
  • Shop promotions with short links looked like scams until the link rule learned to recognise registered-sender lines ("send REG to … to stop").
  • Gemma only sees the redacted message, so its quotes contain [MOBILE NUMBER]; the page splits quotes around the placeholders to highlight the right words.

What we learned

A simple, explainable rule check catches most local scams on its own, and showing which words are suspicious teaches people more than a yes/no answer. Writing for Roman Urdu and Urdu script was harder than the AI part.

Limitations

  • It is a second opinion, not a guarantee, and not a replacement for the official helplines.
  • New scam wording can slip past the rules until they are updated.
  • The web lookup shares a small free search quota, so it may be unavailable at times.

What's next

  • A WhatsApp bot, so people can forward a message instead of copying it.
  • Let people report a confirmed scam number, so the lookup finds our own reports too.
  • Test with real messages from family and friends (with their permission).

Built during the event

Started 2026-10-19 from an empty folder; the public repo history shows each step.

Credits

  • Datasets used only for testing: Roman Urdu Phishing SMS Dataset (Zenodo, DOI 10.5281/zenodo.21810885, CC BY 4.0); UrduStack eval set (MIT); usamabhatti1998/pakistan_sms_classification (local testing only).
  • Helpline numbers checked against PTA, NCCIA, PSCA and JazzCash pages.
  • Fonts: Inter, Noto Nastaliq Urdu (Google Fonts).
  • AI assistance: built with Claude Code (Anthropic), which wrote most of the code with me; Gemma does the explanations inside the app.

Built With

Share this project:

Updates

Submission history