Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edoardottt/defangjs
URL / IP / Email defanging with Javascript. Make IoC harmless.
https://github.com/edoardottt/defangjs
cti defang defanging email email-security emailjs evasion-attack ioc ip javascript javascript-library malware malware-protection nodejs phishing phishing-attacks phishing-protection security-tools url url-defanging
Last synced: 2 months ago
JSON representation
URL / IP / Email defanging with Javascript. Make IoC harmless.
- Host: GitHub
- URL: https://github.com/edoardottt/defangjs
- Owner: edoardottt
- License: gpl-3.0
- Created: 2022-03-10T17:54:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-29T10:03:20.000Z (about 1 year ago)
- Last Synced: 2024-10-20T02:19:23.885Z (2 months ago)
- Topics: cti, defang, defanging, email, email-security, emailjs, evasion-attack, ioc, ip, javascript, javascript-library, malware, malware-protection, nodejs, phishing, phishing-attacks, phishing-protection, security-tools, url, url-defanging
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/defangjs
- Size: 62.5 KB
- Stars: 26
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
defangjs
URL / IP / Email defanging with Javascript
Coded with 💙 by edoardotttDefanging is the process where URLs, IPs, and email addresses no longer become effective (or clickable if you want). Why? Links can be used for phishing or it's simply safer to display them in a weakened way if they are malicious resources (eg. Indicators of compromise for a malware).
- [Blocking Email Links: Why we use HXXP in emails](https://privacymatters.ubc.ca/blocking-email-links-why-we-use-hxxp-emails)
- [Email Security – Defanging URLs](https://www.ibm.com/docs/en/sqsp/32.0?topic=SSBRUQ_32.0.0/com.ibm.resilient.doc/install/resilient_install_defangURLs.htm)Install ⬇️
------```console
npm install defangjs@latest
```Usage 🚀
-------```Javascript
var defangjs = require('defangjs');var url = 'https://www.edoardoottavianelli.it/index.html';
console.log(defangjs.Url(url));
// hxxps[://]www[.]edoardoottavianelli[.]it/index.htmlvar maliciousIpv4 = '666.666.666.666';
console.log(defangjs.Ip(maliciousIpv4));
// 666[.]666[.]666[.]666var maliciousIpv6 = '2001:0db8:85a3:0000:0000:8a2e:0370:7334';
console.log(defangjs.Ip(maliciousIpv6));
// 2001[:]0db8[:]85a3[:]0000[:]0000[:]8a2e[:]0370[:]7334var maliciousEmail = 'mailto:[email protected]';
console.log(defangjs.Email(maliciousEmail));
// mailto[:]edoardott@gmail[.]com
```Test 🧑🏭
-------```console
npm test
```Take a look to [test.js](https://github.com/edoardottt/defangjs/blob/main/test.js), this file contains all the supported formats (URLs, various protocols, ports, Ipv4 and Ipv6 and email addresses)
Changelog 📌
-------Detailed changes for each release are documented in the [release notes](https://github.com/edoardottt/defangjs/releases).
Contributing 🤝
------If you want to contribute to this project, you can start opening an [issue](https://github.com/edoardottt/defangjs/issues).
License 📝
-------This repository is under [GNU General Public License v3.0](https://github.com/edoardottt/defangjs/blob/main/LICENSE).
[edoardoottavianelli.it](https://www.edoardoottavianelli.it) to contact me.