Make a protected link unsafe
Project description
kachi
Make a protected link unsafe.
Requirements
- Python 3.10+
Installation
pip install kachi
Usage
from kachi import unsafe_link
result = unsafe_link("https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fexample.com")
print(result) # https://example.com
Bundled Rules
| Rule | Service |
|---|---|
azure_email |
Azure Email Safe Links |
barracuda |
Barracuda Link Protect |
esvalabs |
EsvaLabs URL Sandbox |
fireeye |
FireEye URL Defense |
o365_safelinks |
Microsoft 365 Safe Links |
proofpoint_v1 |
Proofpoint URL Defense v1 |
proofpoint_v2 |
Proofpoint URL Defense v2 |
ses_awstrack |
AWS SES Click Tracking |
sophos |
Sophos Email Protection |
trendmicro |
Trend Micro Email Security |
urldefense_v3 |
Proofpoint URL Defense v3 |
whatsapp |
WhatsApp Link Redirect |
Rule Schema
Each rule is a YAML file with the following structure:
name: example_rule
filter:
hostname: example.com # exact match, or /regex/
path: /redirect # optional, exact match or /regex/
pre_extract: # optional, transforms applied to URL before extraction
- html_unescape
- url_decode
extract:
from: query_param # query_param, path_regex, or url_regex
keys: [url, u] # for query_param: parameter names to try in order
pattern: "/L0/(http[^/?#]+)" # for path_regex/url_regex: regex with capture group
select: first # for query_param: first (default) or last
post_extract: # optional, transforms applied to extracted value
- url_decode
Filter
hostname(required): string or list of strings. Exact match or/regex/.path(optional): string or list of strings. Exact match or/regex/.
Extract Sources
| Source | Description |
|---|---|
query_param |
Extract from URL query parameters. Requires keys. |
path_regex |
Match regex against URL path. Requires pattern with a capture group. |
url_regex |
Match regex against full URL. Requires pattern with a capture group. |
Transforms
| Name | Description |
|---|---|
html_unescape |
Decode HTML entities (& -> &) |
url_decode |
Percent-decode (%2F -> /) |
base64_decode |
Base64 decode |
prepend |
Prepend a string (requires a value, e.g. {prepend: "http://"}) |
proofpoint_v2_decode |
Decode Proofpoint v2 URL encoding |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kachi-0.1.0.tar.gz.
File metadata
- Download URL: kachi-0.1.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed8bea0df699ee093436151e0ffcfcad7cc181d35e853f4a4a0402a24f80dcf7
|
|
| MD5 |
2a516f4a41e3e99c0b6cdfc2e4b7c7b1
|
|
| BLAKE2b-256 |
e5eb113b1f82bc4f81816b8c28fea102bb186ef7f2d45fd630b4ac668a751998
|
Provenance
The following attestation bundles were made for kachi-0.1.0.tar.gz:
Publisher:
publish.yml on ninoseki/kachi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kachi-0.1.0.tar.gz -
Subject digest:
ed8bea0df699ee093436151e0ffcfcad7cc181d35e853f4a4a0402a24f80dcf7 - Sigstore transparency entry: 928191501
- Sigstore integration time:
-
Permalink:
ninoseki/kachi@02a756d718853132c50aafb05c23649305f47a5d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/ninoseki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02a756d718853132c50aafb05c23649305f47a5d -
Trigger Event:
release
-
Statement type:
File details
Details for the file kachi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kachi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92321e01be78bacbab915b12c06ce77ffbe4738019071346665a62335249f6e7
|
|
| MD5 |
5247300af473d2d6dbc4e16befe8b6a7
|
|
| BLAKE2b-256 |
59afeb61b371cb27d9aa930fbf950c251a6eafac91f97aa5ee8dcade02607b3f
|
Provenance
The following attestation bundles were made for kachi-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ninoseki/kachi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kachi-0.1.0-py3-none-any.whl -
Subject digest:
92321e01be78bacbab915b12c06ce77ffbe4738019071346665a62335249f6e7 - Sigstore transparency entry: 928191502
- Sigstore integration time:
-
Permalink:
ninoseki/kachi@02a756d718853132c50aafb05c23649305f47a5d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/ninoseki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02a756d718853132c50aafb05c23649305f47a5d -
Trigger Event:
release
-
Statement type: