Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brittonhayes/defangle
🧛 Defangle is the gleam link defanger. Make URLs, IPs, and Emails safe to share.
https://github.com/brittonhayes/defangle
defang erlang gleam infosec security
Last synced: 27 days ago
JSON representation
🧛 Defangle is the gleam link defanger. Make URLs, IPs, and Emails safe to share.
- Host: GitHub
- URL: https://github.com/brittonhayes/defangle
- Owner: brittonhayes
- Created: 2024-03-16T20:12:26.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-19T06:00:26.000Z (8 months ago)
- Last Synced: 2024-10-05T23:03:55.652Z (about 1 month ago)
- Topics: defang, erlang, gleam, infosec, security
- Language: Gleam
- Homepage:
- Size: 836 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🦇 defangle
[![Package Version](https://img.shields.io/hexpm/v/defangle)](https://hex.pm/packages/defangle)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/defangle/)Defangle is a Gleam library for defanging URLs, Emails, and IP addresses making them safe to share.
## 📥 Install defangle
```sh
gleam add defangle
```## âš¡ Usage
```gleam
import defanglepub fn main() {
// Defang a URL, email, or IP address to make it safe to share
"https://www.suspicious-url.com"
|> defangle.defang
// "hxxps[://]www[.]suspicious-url[.]com"
// Defang a URL to make it safe to share
"https://www.suspicious-url.com"
|> defangle.defang_url
// "hxxps[://]www[.]suspicious-url[.]com"// Defang an email address to make it safe to share
"[email protected]"
|> defangle.defang_email
// "lucy[at]suspicious-url[.]com"// Defang an IPv4 address to make it safe to share. Doesn't support IPv6 yet.
"103.253.144.32"
|> defangle.defang_ip
// "103[.]253[.]144[.]32"
}
```Further documentation can be found at .
## Development
```sh
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell
```