From 492084940ef44b38f89f38afec1f149d4a8983fe Mon Sep 17 00:00:00 2001 From: bdalling Date: Wed, 22 Jan 2025 09:26:35 -0700 Subject: [PATCH] Add the URL Defanger Tool --- components.d.ts | 1 + locales/en.yml | 4 ++ src/tools/index.ts | 2 + src/tools/url-defang/index.ts | 12 ++++++ src/tools/url-defang/url-defang.vue | 59 +++++++++++++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 src/tools/url-defang/index.ts create mode 100644 src/tools/url-defang/url-defang.vue diff --git a/components.d.ts b/components.d.ts index 3e65c3cc..82a368b8 100644 --- a/components.d.ts +++ b/components.d.ts @@ -182,6 +182,7 @@ declare module '@vue/runtime-core' { UlidGenerator: typeof import('./src/tools/ulid-generator/ulid-generator.vue')['default'] UrlEncoder: typeof import('./src/tools/url-encoder/url-encoder.vue')['default'] UrlParser: typeof import('./src/tools/url-parser/url-parser.vue')['default'] + UrlDefang: typeof import('./src/tools/url-defang/url-defang.vue')['default'] UserAgentParser: typeof import('./src/tools/user-agent-parser/user-agent-parser.vue')['default'] UserAgentResultCards: typeof import('./src/tools/user-agent-parser/user-agent-result-cards.vue')['default'] UuidGenerator: typeof import('./src/tools/uuid-generator/uuid-generator.vue')['default'] diff --git a/locales/en.yml b/locales/en.yml index d03d80d3..b2dc0707 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -205,6 +205,10 @@ tools: title: URL parser description: Parse a URL into its separate constituent parts (protocol, origin, params, port, username-password, ...) + url-defang: + title: URL Defang + description: Defangs a given url to make a potentially malicous domain safe to share for security research or operations purposes. + iban-validator-and-parser: title: IBAN validator and parser description: Validate and parse IBAN numbers. Check if an IBAN is valid and get the country, BBAN, if it is a QR-IBAN and the IBAN friendly format. diff --git a/src/tools/index.ts b/src/tools/index.ts index 388cfaf4..f7ae9a9d 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -83,6 +83,7 @@ import { tool as tokenGenerator } from './token-generator'; import type { ToolCategory } from './tools.types'; import { tool as urlEncoder } from './url-encoder'; import { tool as urlParser } from './url-parser'; +import { tool as urlDefang } from './url-defang'; import { tool as uuidGenerator } from './uuid-generator'; import { tool as macAddressLookup } from './mac-address-lookup'; import { tool as xmlFormatter } from './xml-formatter'; @@ -124,6 +125,7 @@ export const toolsByCategory: ToolCategory[] = [ urlEncoder, htmlEntities, urlParser, + urlDefang, deviceInformation, basicAuthGenerator, metaTagGenerator, diff --git a/src/tools/url-defang/index.ts b/src/tools/url-defang/index.ts new file mode 100644 index 00000000..b892a47a --- /dev/null +++ b/src/tools/url-defang/index.ts @@ -0,0 +1,12 @@ +import { Unlink } from '@vicons/tabler'; +import { defineTool } from '../tool'; +import { translate } from '@/plugins/i18n.plugin'; + +export const tool = defineTool({ + name: translate('tools.url-defang.title'), + path: '/url-defang', + description: translate('tools.url-defang.description'), + keywords: ['url', 'defang'], + component: () => import('./url-defang.vue'), + icon: Unlink, +}); diff --git a/src/tools/url-defang/url-defang.vue b/src/tools/url-defang/url-defang.vue new file mode 100644 index 00000000..0c2b81ac --- /dev/null +++ b/src/tools/url-defang/url-defang.vue @@ -0,0 +1,59 @@ + + + + +