mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 13:57:10 -04:00
parent
cb5b462e11
commit
b36a01e77a
6 changed files with 78 additions and 7 deletions
|
@ -6,6 +6,7 @@ import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
|||
|
||||
import { tool as textToUnicode } from './text-to-unicode';
|
||||
import { tool as safelinkDecoder } from './safelink-decoder';
|
||||
import { tool as portNumbers } from './port-numbers';
|
||||
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
|
||||
import { tool as numeronymGenerator } from './numeronym-generator';
|
||||
import { tool as macAddressGenerator } from './mac-address-generator';
|
||||
|
@ -152,7 +153,15 @@ export const toolsByCategory: ToolCategory[] = [
|
|||
},
|
||||
{
|
||||
name: 'Network',
|
||||
components: [ipv4SubnetCalculator, ipv4AddressConverter, ipv4RangeExpander, macAddressLookup, macAddressGenerator, ipv6UlaGenerator],
|
||||
components: [
|
||||
ipv4SubnetCalculator,
|
||||
ipv4AddressConverter,
|
||||
ipv4RangeExpander,
|
||||
macAddressLookup,
|
||||
macAddressGenerator,
|
||||
ipv6UlaGenerator,
|
||||
portNumbers,
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Math',
|
||||
|
|
12
src/tools/port-numbers/index.ts
Normal file
12
src/tools/port-numbers/index.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { PlugConnected } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Port Numbers',
|
||||
path: '/port-numbers',
|
||||
description: 'Search for assigned usage of a given port and protocol',
|
||||
keywords: ['port', 'tcp', 'udp', 'protocol'],
|
||||
component: () => import('./port-numbers.vue'),
|
||||
icon: PlugConnected,
|
||||
createdAt: new Date('2024-04-20'),
|
||||
});
|
38
src/tools/port-numbers/port-numbers.vue
Normal file
38
src/tools/port-numbers/port-numbers.vue
Normal file
|
@ -0,0 +1,38 @@
|
|||
<script setup lang="ts">
|
||||
import ports from 'port-numbers';
|
||||
import SpanCopyable from '@/components/SpanCopyable.vue';
|
||||
|
||||
const port = ref(80);
|
||||
const protocol = ref('tcp');
|
||||
const result = computed(() => {
|
||||
const [type, description] = ports[`${port.value}/${protocol.value}` as (keyof typeof ports)];
|
||||
return { type: type ?? 'unknown', description: description ?? 'Unknown' };
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-card title="Port search">
|
||||
<n-space>
|
||||
<n-form-item label="Port number">
|
||||
<n-input-number v-model:value="port" :min="1" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Protocol">
|
||||
<c-select
|
||||
v-model:value="protocol"
|
||||
:options="[{ value: 'tcp', label: 'TCP' }, { value: 'udp', label: 'UDP' }]"
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
</c-card>
|
||||
|
||||
<c-card>
|
||||
<n-form-item label="Type">
|
||||
<SpanCopyable :value="result?.type" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Description">
|
||||
<SpanCopyable :value="result?.description" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue