Compare commits

...
4 changed files with 2210 additions and 2016 deletions

No files matched your search

+2117 -1955
View File
File diff suppressed because it is too large. Load diff
+52 -46
View File
@@ -289,13 +289,13 @@ importers:
version: 5.3.0
'@fortawesome/fontawesome-svg-core':
specifier: ^7.3.0
version: 7.3.0
version: 7.3.1
'@fortawesome/free-solid-svg-icons':
specifier: ^7.3.0
version: 7.3.0
version: 7.3.1
'@fortawesome/vue-fontawesome':
specifier: ^3.3.1
version: 3.3.1(@fortawesome/fontawesome-svg-core@7.3.0)(vue@3.5.39(typescript@6.0.3))
version: 3.3.3(@fortawesome/fontawesome-svg-core@7.3.1)(vue@3.5.39(typescript@6.0.3))
'@github/paste-markdown':
specifier: ^1.5.3
version: 1.5.3
@@ -1466,7 +1466,7 @@ importers:
version: 4.6.7
node:
specifier: runtime:24.x
version: runtime:24.21.0
version: runtime:24.22.3
oxfmt:
specifier: ^0.57.0
version: 0.57.0(svelte@5.56.4(@typescript-eslint/types@8.62.1))
@@ -2571,20 +2571,24 @@ packages:
resolution: {integrity: sha512-X/vND0Y1l9fVJ9O79UgtZnXSpz4aNF3bXlDxiJAEAm6kgeSftp9wjjBPgqzazJV8YlmxfRoeXNfSCJ48sf/Hhw==}
engines: {node: '>=6'}
'@fortawesome/fontawesome-svg-core@7.3.0':
resolution: {integrity: sha512-MFbTNLDWkLJwbozDvHOZ7hwyDjQcBMBattlcOQ6ZmV5YD9bBrqdl1rNtmVjQ/lzqveXXX3sMz2Ew6fAgXoxmkw==}
'@fortawesome/fontawesome-common-types@7.3.1':
resolution: {integrity: sha512-k0C0sdHmZtAo6dRDtd1Z/qcpyHbL0CKsjV8seMY/21xGhY5Wsv0XRmiI/xEEH4y2c9b1+jvgNs/3EqhV27yUEA==}
engines: {node: '>=6'}
'@fortawesome/fontawesome-svg-core@7.3.1':
resolution: {integrity: sha512-BoxVN3PKnMbgStHhjoaky/oWdxHomDqmBVA24IA3KEmssFGeI7u9YT/BJceOjIum/t6TpPa/vcMKaVYQeIQ/3Q==}
engines: {node: '>=6'}
'@fortawesome/free-regular-svg-icons@7.3.0':
resolution: {integrity: sha512-4675NiHzJJs0dLStFpp5G1JNfMYxqFSxZ2iCaiMfHptjlc8McLG9oqcd5pFEiPiqfiV2YG25cJ9EYWIEhUvp+A==}
engines: {node: '>=6'}
'@fortawesome/free-solid-svg-icons@7.3.0':
resolution: {integrity: sha512-YxI/CuwWeI3nPIoYU//vkDS+3ige/67DPZ6XwMATpYEFESzO9L8zfJOKllGRgIlpT/uebrZCcvAzp3peD7GmTw==}
'@fortawesome/free-solid-svg-icons@7.3.1':
resolution: {integrity: sha512-v0BLa0eqg7ubvVWeNSHVBs8fWH/GJicERZoJaxJ3FE/lj67VSqzoMg9pzfZVOfLMX10y0pGwQAuxoRVVH2patg==}
engines: {node: '>=6'}
'@fortawesome/vue-fontawesome@3.3.1':
resolution: {integrity: sha512-iAh0OHKe0+h4Xig5AZk8IYS1EXkDb0Du3aKzPwIk59pIiwQog5FDuJS5wXtlSqtnzG0+GWJpFEo7nrusERZvcw==}
'@fortawesome/vue-fontawesome@3.3.3':
resolution: {integrity: sha512-Jbjze98gGcVBSdkscLbnDlHECumMAFVWDarMtycctn9qL3p92ApnV36VW4PwVrcm9IWrHnnE6ZL9x7MXStSCfA==}
peerDependencies:
'@fortawesome/fontawesome-svg-core': ~1 || ~6 || ~7
vue: '>= 3.0.0 < 4'
@@ -9216,7 +9220,7 @@ packages:
resolution: {integrity: sha512-X75ZN8DCLftGM5iKwoYLA3rjnrAEs97MkzvSd4q2746Tgpg8b8XWiBGiBG4ZpgcAqBgtgPHTiAc8ZMCvZuikDw==}
engines: {node: '>=10'}
node@runtime:24.21.0:
node@runtime:24.22.3:
resolution:
type: variations
variants:
@@ -9224,9 +9228,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-rseyRkr7mfB4wZywbSAdVDvTsxHLoHEoK84bF8l+WLs=
integrity: sha256-aT/ojEqF5+Fy7BMvdg5ns5JbLWRCyxyzp0tz/Pgx9wo=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-aix-ppc64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-aix-ppc64.tar.gz
targets:
- cpu: ppc64
os: aix
@@ -9234,9 +9238,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-vtfupTJeEQjzLOUijd1qXw8IpJnuQqp0Qq6lg3AvYFc=
integrity: sha256-/24X1IdLdtJyISuQjMAg1ugV+6Wmx+qqBq3XJYQDB/0=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-darwin-arm64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-darwin-arm64.tar.gz
targets:
- cpu: arm64
os: darwin
@@ -9244,9 +9248,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-FGLLOzBGuBXPjqQ209pFDsGp8R2sflpGsK2lMF1+gJc=
integrity: sha256-l3YUrwUEyBBF5/2FWW28oOX5UblmgVFtra/tzKjER/c=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-darwin-x64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-darwin-x64.tar.gz
targets:
- cpu: x64
os: darwin
@@ -9254,9 +9258,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-ckKCw7Q67JmKqVJzgEZbRdIp4CG1gDX19PYwleq/5dU=
integrity: sha256-JhryryUN/X6fJc8VHRsnE6Ct+PEKmtEWxJR/aGJ6/+g=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-arm64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-arm64.tar.gz
targets:
- cpu: arm64
os: linux
@@ -9264,9 +9268,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-UcXVMGbukpILYXg7A7Buy5nzZhFg97Fcp36EdBFaZ7w=
integrity: sha256-uksmreH3s/W6Z1aFaBXeWONTdGAE5+RsyDgkOmy/Mpk=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-ppc64le.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-ppc64le.tar.gz
targets:
- cpu: ppc64le
os: linux
@@ -9274,9 +9278,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-Xy+jdCLgx13jXBaG/lHXgyTywqj+LMI5pB2cAAop2Tg=
integrity: sha256-2PhDl8FHjA7QwbKTQ2Ju0PXxoJhd8MWXXDDwwDg2Yx8=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-s390x.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-s390x.tar.gz
targets:
- cpu: s390x
os: linux
@@ -9284,9 +9288,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-PWNAX8ZaDS0pdsHwvC/Se7C9ByEkaecFqsPwOuWrTJw=
integrity: sha256-VJm2Y/Yscgk3FdqY9K6m+DQnrYurnPnHXwkk4ORWzhQ=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-x64-musl.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-x64-musl.tar.gz
targets:
- cpu: x64
os: linux
@@ -9295,9 +9299,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-bh24fvWLiBnl1UAu/xU2SRsY7djre+5e94l4duiNxf8=
integrity: sha256-Bh7D4wYhFXBbVrUfqcwzCrUNNLaWk4fU5LGlDGgJrMI=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-x64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-x64.tar.gz
targets:
- cpu: x64
os: linux
@@ -9305,10 +9309,10 @@ packages:
archive: zip
bin:
node: node.exe
integrity: sha256-h3mxveHTn41CDjtXqmV7OYka9DTT3kSpGQRM7AZ4WSE=
prefix: node-v24.21.0-win-arm64
integrity: sha256-s8x0opWznU8nMnHpb1jAbdKzV1fKEqvsZMfQWYtDTxQ=
prefix: node-v24.22.3-win-arm64
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-win-arm64.zip
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-win-arm64.zip
targets:
- cpu: arm64
os: win32
@@ -9316,10 +9320,10 @@ packages:
archive: zip
bin:
node: node.exe
integrity: sha256-FY92hbRN5R9sDfHRU1JsvNPhvHOajfxgdyHO913p5UE=
prefix: node-v24.21.0-win-x64
integrity: sha256-5hKvmfYmq0FeoiWva85clx/rRIy1yuJQuxw/pQxffZ8=
prefix: node-v24.22.3-win-x64
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-win-x64.zip
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-win-x64.zip
targets:
- cpu: x64
os: win32
@@ -9327,9 +9331,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-MEiwgR4VjKDYZytZyDmGF2PhREkpgNjSmzad/uRXR+Q=
integrity: sha256-JIyWqE9sgzhka5/XO/ElEkZ4+PsI218jAj9GIFXg7tw=
type: binary
url: https://unofficial-builds.nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-arm64-musl.tar.gz
url: https://unofficial-builds.nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-arm64-musl.tar.gz
targets:
- cpu: arm64
os: linux
@@ -9338,14 +9342,14 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-AacT402pjntNKjGR7nyj+T3QOE0aLvI8N5shYe5uEzo=
integrity: sha256-LbT4pAq+X1tdEZlkIj/tycTHxefGMpAa6GCvUix4RLI=
type: binary
url: https://unofficial-builds.nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-x64-musl.tar.gz
url: https://unofficial-builds.nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-x64-musl.tar.gz
targets:
- cpu: x64
os: linux
libc: musl
version: 24.21.0
version: 24.22.3
hasBin: true
nodemailer@9.0.1:
@@ -13325,21 +13329,23 @@ snapshots:
'@fortawesome/fontawesome-common-types@7.3.0': {}
'@fortawesome/fontawesome-svg-core@7.3.0':
'@fortawesome/fontawesome-common-types@7.3.1': {}
'@fortawesome/fontawesome-svg-core@7.3.1':
dependencies:
'@fortawesome/fontawesome-common-types': 7.3.0
'@fortawesome/fontawesome-common-types': 7.3.1
'@fortawesome/free-regular-svg-icons@7.3.0':
dependencies:
'@fortawesome/fontawesome-common-types': 7.3.0
'@fortawesome/free-solid-svg-icons@7.3.0':
'@fortawesome/free-solid-svg-icons@7.3.1':
dependencies:
'@fortawesome/fontawesome-common-types': 7.3.0
'@fortawesome/fontawesome-common-types': 7.3.1
'@fortawesome/vue-fontawesome@3.3.1(@fortawesome/fontawesome-svg-core@7.3.0)(vue@3.5.39(typescript@6.0.3))':
'@fortawesome/vue-fontawesome@3.3.3(@fortawesome/fontawesome-svg-core@7.3.1)(vue@3.5.39(typescript@6.0.3))':
dependencies:
'@fortawesome/fontawesome-svg-core': 7.3.0
'@fortawesome/fontawesome-svg-core': 7.3.1
vue: 3.5.39(typescript@6.0.3)
'@github/paste-markdown@1.5.3': {}
@@ -20290,7 +20296,7 @@ snapshots:
util: 0.12.5
vm-browserify: 1.1.2
node@runtime:24.21.0: {}
node@runtime:24.22.3: {}
nodemailer@9.0.1: {}
@@ -22623,7 +22629,7 @@ snapshots:
'@codemirror/state': 6.7.0
'@codemirror/view': 6.43.5
'@fortawesome/free-regular-svg-icons': 7.3.0
'@fortawesome/free-solid-svg-icons': 7.3.0
'@fortawesome/free-solid-svg-icons': 7.3.1
'@jsonquerylang/jsonquery': 5.1.1
'@lezer/highlight': 1.2.3
'@replit/codemirror-indentation-markers': 6.5.3(@codemirror/language@6.12.4)(@codemirror/state@6.7.0)(@codemirror/view@6.43.5)
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import {
format,
formatISO,
formatISO9075,
formatRFC3339,
@@ -10,6 +11,7 @@ import {
getUnixTime,
isDate,
isValid,
parse,
parseISO,
} from 'date-fns';
import { ticksFromDate, ticksToDate } from 'tick-time';
@@ -129,6 +131,12 @@ const formats: DateFormat[] = [
toDate: (date) => lDAPTimestampToDate(date),
formatMatcher: isLDAPTimestamp,
},
{
name: 'Julian Date (YYYY/DDD)',
fromDate: (date) => format(date, 'yyyy/DDD'),
toDate: (date) => parse(date, 'yyyy/DDD', new Date()),
formatMatcher: (date) => /\d{4}\/\d{3}/.test(date || ''),
},
{
name: 'Win32 FileTime/LDAP 18 digits Timestamp',
fromDate: (date) => dateToWin32FileTime(date),
@@ -139,7 +147,7 @@ const formats: DateFormat[] = [
name: '.Net ticks',
fromDate: (date) => ticksFromDate(date),
toDate: (date) => ticksToDate(date) || new Date(),
formatMatcher: (date) => /\d+/.test(date || ''),
formatMatcher: (date) => /^\d+$/.test(date || ''),
},
];
@@ -18,58 +18,71 @@ const { t } = useI18n();
const input = useQueryParam({ tool: 'mac-conv', name: 'addr', defaultValue: 'AA:BB:CC:DD:EE:FF' });
const convertMulti = (value: string, converter: (mac: string) => string): string => {
const macs = value.split(/[\s,;]+/).filter((mac) => mac.trim() !== '');
return macs
.map((mac) => {
try {
return converter(mac);
} catch (error) {
return t('tools.mac-address-converter.texts.error-invalid-mac-address', [mac]);
}
})
.join('\n');
};
const formats = computed(() => [
{
label: t('tools.mac-address-converter.texts.label-canonical-ietf-format'),
value: convertMacCanonicalIETF(input.value),
value: convertMulti(input.value, convertMacCanonicalIETF),
},
{
label: t('tools.mac-address-converter.texts.label-canonical-format'),
value: convertMacCanonical(input.value),
value: convertMulti(input.value, convertMacCanonical),
},
{
label: t('tools.mac-address-converter.texts.label-canonical-ieee-format'),
value: convertMacCanonicalIEEE(input.value),
value: convertMulti(input.value, convertMacCanonicalIEEE),
},
{
label: t('tools.mac-address-converter.texts.label-cisco'),
value: convertMacCISCO(input.value),
value: convertMulti(input.value, convertMacCISCO),
},
{
label: t('tools.mac-address-converter.texts.label-hex'),
value: convertMacToNumber(input.value).toString(16),
value: convertMulti(input.value, (mac) => convertMacToNumber(mac).toString(16)),
},
{
label: t('tools.mac-address-converter.texts.label-decimal'),
value: convertMacToNumber(input.value).toString(10),
value: convertMulti(input.value, (mac) => convertMacToNumber(mac).toString(10)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-canonical-ietf-format'),
value: convertMacToEUI64CanonicalIETF(input.value, false),
value: convertMulti(input.value, (mac) => convertMacToEUI64CanonicalIETF(mac, false)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-canonical-ieee-format'),
value: convertMacToEUI64CanonicalIEEE(input.value, false),
value: convertMulti(input.value, (mac) => convertMacToEUI64CanonicalIEEE(mac, false)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-cisco'),
value: convertMacToEUI64CISCO(input.value, false),
value: convertMulti(input.value, (mac) => convertMacToEUI64CISCO(mac, false)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-ipv6-canonical-ietf-format'),
value: convertMacToEUI64CanonicalIETF(input.value, true),
value: convertMulti(input.value, (mac) => convertMacToEUI64CanonicalIETF(mac, true)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-ipv6-canonical-ieee-format'),
value: convertMacToEUI64CanonicalIEEE(input.value, true),
value: convertMulti(input.value, (mac) => convertMacToEUI64CanonicalIEEE(mac, true)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-ipv6-cisco'),
value: convertMacToEUI64CISCO(input.value, true),
value: convertMulti(input.value, (mac) => convertMacToEUI64CISCO(mac, true)),
},
{
label: t('tools.mac-address-converter.texts.label-link-local-ipv6'),
value: convertMacToLinkLocalIPv6(input.value),
value: convertMulti(input.value, (mac) => convertMacToLinkLocalIPv6(mac)),
},
]);
@@ -86,8 +99,10 @@ const inputLabelAlignmentConfig = {
v-model:value="input"
:label="t('tools.mac-address-converter.texts.label-mac-address')"
size="large"
:placeholder="t('tools.mac-address-converter.texts.placeholder-type-a-mac-address')"
:placeholder="t('tools.mac-address-converter.texts.placeholder-type-mac-address')"
clearable
multiline
rows="3"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
@@ -103,6 +118,9 @@ const inputLabelAlignmentConfig = {
:value="format.value"
:label="format.label"
v-bind="inputLabelAlignmentConfig"
multiline
autosize
rows="1"
mb-1
/>
</c-card>