kingfisher/crates/kingfisher-rules/data/rules/telegram.yml

36 lines
943 B
YAML
Raw Normal View History

rules:
- name: Telegram Bot Token
id: kingfisher.telegram.1
pattern: |
(?xi)
\b
2025-11-06 09:11:24 -08:00
(?:telegram|tgram:)
(?:.|[\n\r]){0,32}?
(
2025-11-06 09:11:24 -08:00
[0-9]{7,10}
:
[A-Z0-9_-]{35}
)
2025-11-08 10:48:00 -08:00
\b
pattern_requirements:
min_digits: 2
confidence: medium
min_entropy: 3.5
validation:
type: Http
content:
request:
method: GET
url: "https://api.telegram.org/bot{{TOKEN}}/getMe"
response_matcher:
- type: StatusMatch
status: [200]
- type: WordMatch
words:
- '"ok":true'
examples:
2025-11-06 09:11:24 -08:00
- "tgram://110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsawd"
- "telegram: 508627689:AAEuLPKs-EhrjrYGnz60bnYNZqakf6HJxc0"
2026-02-10 19:24:19 -08:00
- "telegram token is 3628091811:BAG9RuJiqgOGIfFbOPBpAo6QhIJoD9mCdDs"
references:
- https://core.telegram.org/bots/api#authorizing-your-bot