Skip to content

Checker Commands

m4bwav edited this page Dec 6, 2026 · 2 revisions

sw.py is the checker the skill runs. It lives at skills/scamwright/scripts/sw.py, needs Python 3.10 or later, and uses only the standard library. It never fetches a URL: every link check is done on the text of the address.

All output below was printed by sw.py 0.2.1 on 2026-12-05. Commands are shown from the repository root.

Usage

sw.py scan --text "..." | --file msg.txt | (stdin)   [--json]
sw.py url URL [URL ...]                              [--json]

Both commands exit 0 whatever they find. Read the risk line or the JSON, not the exit code.

scan

scan reads a message and reports the red flags it matches, then checks every link it finds. Give the text with --text, a file with --file, or pipe it on standard input. The skill writes pasted text to a scratch file and uses --file, so the message never lands in a project folder.

A fake toll text

python skills/scamwright/scripts/sw.py scan --text "TxTag: You have an unpaid toll balance of $4.35. Pay now: https://txtag-pay.top/pay"
risk: high  score: 6  hard red flag: yes
  [2] small unpaid toll, fee or delivery charge   "unpaid toll"
  https://txtag-pay.top/pay  host=txtag-pay.top  domain=txtag-pay.top  score=4
    [3] names 'txtag' but the domain is txtag-pay.top, not txtag.org
    [1] .top is a cheap TLD often used in scams (many legit sites use it too)
Heuristic hint only. Verify the sender and domain before giving a verdict.

The score is only 6, but the link names TxTag on a domain TxTag does not use. That brand mismatch is a hard flag, so the risk is high.

Gift cards and a threat

python skills/scamwright/scripts/sw.py scan --text "This is the IRS. You owe back taxes. Buy Google Play gift cards and read me the numbers or a warrant will be issued."
risk: high  score: 5  hard red flag: yes
  [3] asks for gift cards   "gift cards"
  [2] threat of arrest, warrant or legal action   "warrant"
Heuristic hint only. Verify the sender and domain before giving a verdict.

A rental scam

python skills/scamwright/scripts/sw.py scan --text "I'm working overseas right now so I can't show you the apartment. Wire the deposit to hold it and I'll mail you the keys."
risk: elevated  score: 7  hard red flag: no
  [3] absent owner plus pay before viewing   ""
  [2] owner abroad or can't show the place   "overseas right now so I can't show"
  [2] pay before viewing, keys by mail   "deposit to hold it"
Heuristic hint only. Verify the sender and domain before giving a verdict.

When both rental flags fire, scan adds rental-combo (weight 3, empty match). "Wire the deposit" does not match the wire-safe flag, which looks for "wire the money", "wire funds" or a "safe account".

A petition text with an opt-out

python skills/scamwright/scripts/sw.py scan --text "Hey Sam! This is Dana with Civic Voices. Sign the petition today - civicvoices.info/k3Zp Reply STOP to unsubscribe"
risk: low  score: 1  hard red flag: no
  good signs (scammers copy these too): opt-out
  civicvoices.info/k3Zp  host=civicvoices.info  domain=civicvoices.info  score=1
    [1] .info is a cheap TLD often used in scams (many legit sites use it too)
Heuristic hint only. Verify the sender and domain before giving a verdict.

From standard input

echo "Dear customer, your account has been locked. Click here to verify your account." | python skills/scamwright/scripts/sw.py scan
risk: some  score: 4  hard red flag: no
  [2] account locked, suspended or unusual activity   "account has been locked"
  [1] generic greeting   "Dear customer"
  [1] asks you to click or tap a link   "Click here"
Heuristic hint only. Verify the sender and domain before giving a verdict.

JSON

scan --json prints one object with risk, score, hard_red_flag, flags (each with weight, code, flag, match), good_signs, urls (each as url --json prints it) and note.

url

url checks one or more addresses without opening them. It prints the host, the registrable domain (the part to search for), a score and each finding. An address without a scheme is read as http://.

A brand in the wrong domain

python skills/scamwright/scripts/sw.py url "https://paypal-secure-login.com/x"
https://paypal-secure-login.com/x  host=paypal-secure-login.com  domain=paypal-secure-login.com  score=3
  [3] names 'paypal' but the domain is paypal-secure-login.com, not paypal.com

Several at once

python skills/scamwright/scripts/sw.py url "https://pollsample-research.netlify.app/hd-7/?id=QX7RB2KD" "http://192.168.4.20:8080/login" "https://www.usps.com/"
https://pollsample-research.netlify.app/hd-7/?id=QX7RB2KD  host=pollsample-research.netlify.app  domain=pollsample-research.netlify.app  score=3
  [2] free hosting (netlify.app): anyone can make this address in minutes
  [1] per-person ID in the link: opening it confirms your number or address is live
http://192.168.4.20:8080/login  host=192.168.4.20  domain=4.20  score=6
  [3] link goes to a raw IP address
  [1] per-person ID in the link: opening it confirms your number or address is live
  [1] plain http link
  [1] unusual port 8080
https://www.usps.com/  host=www.usps.com  domain=usps.com  score=0
  no offline red flags (still check the domain belongs to the sender)

Two things to know from this run. On a free host the domain shown keeps the site's own label (pollsample-research.netlify.app), since that is what someone registered. For a raw IP address the domain field is the last two numbers, which means nothing; read the raw-IP finding instead. The /login path was reported as a per-person ID: any path that ends in five to eight letters or digits and is ten characters or shorter gets that flag, so treat it as a weak sign.

The @ trick

python skills/scamwright/scripts/sw.py url "https://www.chase.com@evil.example/login"
https://www.chase.com@evil.example/login  host=evil.example  domain=evil.example  score=4
  [3] '@' in the address: the real host is evil.example, not 'www.chase.com'
  [1] per-person ID in the link: opening it confirms your number or address is live

JSON

python skills/scamwright/scripts/sw.py url --json bit.ly/3xYz
[
  {
    "url": "bit.ly/3xYz",
    "host": "bit.ly",
    "registrable": "bit.ly",
    "score": 2,
    "findings": [
      {
        "weight": 2,
        "code": "shortener",
        "flag": "link shortener hides the real destination"
      }
    ]
  }
]

Clone this wiki locally