mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-24 23:00:19 +03:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b36a01e77a | ||
|
|
cb5b462e11 | ||
|
|
9eac9cb2a9 | ||
|
|
23f82d956a |
No files matched your search
Vendored
+3
@@ -144,6 +144,7 @@ declare module '@vue/runtime-core' {
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NSpin: typeof import('naive-ui')['NSpin']
|
||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||
@@ -152,6 +153,7 @@ declare module '@vue/runtime-core' {
|
||||
PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default']
|
||||
PercentageCalculator: typeof import('./src/tools/percentage-calculator/percentage-calculator.vue')['default']
|
||||
PhoneParserAndFormatter: typeof import('./src/tools/phone-parser-and-formatter/phone-parser-and-formatter.vue')['default']
|
||||
PortNumbers: typeof import('./src/tools/port-numbers/port-numbers.vue')['default']
|
||||
QrCodeGenerator: typeof import('./src/tools/qr-code-generator/qr-code-generator.vue')['default']
|
||||
RandomPortGenerator: typeof import('./src/tools/random-port-generator/random-port-generator.vue')['default']
|
||||
ResultRow: typeof import('./src/tools/ipv4-range-expander/result-row.vue')['default']
|
||||
@@ -159,6 +161,7 @@ declare module '@vue/runtime-core' {
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
RsaKeyPairGenerator: typeof import('./src/tools/rsa-key-pair-generator/rsa-key-pair-generator.vue')['default']
|
||||
SafelinkDecoder: typeof import('./src/tools/safelink-decoder/safelink-decoder.vue')['default']
|
||||
SlugifyString: typeof import('./src/tools/slugify-string/slugify-string.vue')['default']
|
||||
SpanCopyable: typeof import('./src/components/SpanCopyable.vue')['default']
|
||||
SqlPrettify: typeof import('./src/tools/sql-prettify/sql-prettify.vue')['default']
|
||||
|
||||
+1
-1
@@ -79,9 +79,9 @@
|
||||
"pdf-signature-reader": "^1.4.2",
|
||||
"pinia": "^2.0.34",
|
||||
"plausible-tracker": "^0.3.8",
|
||||
"port-numbers": "^8.0.11",
|
||||
"qrcode": "^1.5.1",
|
||||
"sql-formatter": "^13.0.0",
|
||||
"tidy-url": "^1.15.1",
|
||||
"ua-parser-js": "^1.0.35",
|
||||
"ulid": "^2.3.0",
|
||||
"unicode-emoji-json": "^0.4.0",
|
||||
|
||||
Generated
+8
-7
@@ -137,15 +137,15 @@ dependencies:
|
||||
plausible-tracker:
|
||||
specifier: ^0.3.8
|
||||
version: 0.3.8
|
||||
port-numbers:
|
||||
specifier: ^8.0.11
|
||||
version: 8.0.11
|
||||
qrcode:
|
||||
specifier: ^1.5.1
|
||||
version: 1.5.1
|
||||
sql-formatter:
|
||||
specifier: ^13.0.0
|
||||
version: 13.0.0
|
||||
tidy-url:
|
||||
specifier: ^1.15.1
|
||||
version: 1.15.1
|
||||
ua-parser-js:
|
||||
specifier: ^1.0.35
|
||||
version: 1.0.35
|
||||
@@ -7432,6 +7432,10 @@ packages:
|
||||
engines: {node: '>=10.13.0'}
|
||||
dev: false
|
||||
|
||||
/port-numbers@8.0.11:
|
||||
resolution: {integrity: sha512-2iZBdCzSZea7GIDpVecH0fIN1b55d7+YxjMAJ+9tgdD80FdR7v60BF23tm9yQ7VZpu91yLiHmqp75oAnYYYXnw==}
|
||||
dev: false
|
||||
|
||||
/postcss-selector-parser@6.0.13:
|
||||
resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -8408,10 +8412,6 @@ packages:
|
||||
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
|
||||
dev: true
|
||||
|
||||
/tidy-url@1.15.1:
|
||||
resolution: {integrity: sha512-LYBtesJs2WD92VEAprqdHSDLdZ91eRiO+OcAOYhsTdeLZvtIGKs8kK8egnzUxF3sr7AkCYAMj4UoRWslo5HszA==}
|
||||
dev: false
|
||||
|
||||
/tiny-emitter@2.1.0:
|
||||
resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==}
|
||||
dev: false
|
||||
@@ -9449,6 +9449,7 @@ packages:
|
||||
|
||||
/workbox-google-analytics@7.0.0:
|
||||
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
|
||||
deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
|
||||
dependencies:
|
||||
workbox-background-sync: 7.0.0
|
||||
workbox-core: 7.0.0
|
||||
|
||||
@@ -28,7 +28,7 @@ const compareMatch = computed(() => compareSync(compareString.value, compareHash
|
||||
mb-2
|
||||
/>
|
||||
<n-form-item label="Salt count: " label-placement="left" label-width="120">
|
||||
<n-input-number v-model:value="saltCount" placeholder="Salt rounds..." :max="10" :min="0" w-full />
|
||||
<n-input-number v-model:value="saltCount" placeholder="Salt rounds..." :max="100" :min="0" w-full />
|
||||
</n-form-item>
|
||||
|
||||
<c-input-text :value="hashed" readonly text-center />
|
||||
|
||||
+10
-3
@@ -6,7 +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 urlCleaner } from './url-cleaner';
|
||||
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';
|
||||
@@ -116,7 +116,6 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
urlEncoder,
|
||||
htmlEntities,
|
||||
urlParser,
|
||||
urlCleaner,
|
||||
deviceInformation,
|
||||
basicAuthGenerator,
|
||||
metaTagGenerator,
|
||||
@@ -154,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',
|
||||
|
||||
@@ -11,6 +11,9 @@ describe('integer-base-converter', () => {
|
||||
expect(convertBase({ value: '10100101', fromBase: 2, toBase: 16 })).toEqual('a5');
|
||||
expect(convertBase({ value: '192654', fromBase: 10, toBase: 8 })).toEqual('570216');
|
||||
expect(convertBase({ value: 'zz', fromBase: 64, toBase: 10 })).toEqual('2275');
|
||||
expect(convertBase({ value: '42540766411283223938465490632011909384', fromBase: 10, toBase: 10 })).toEqual('42540766411283223938465490632011909384');
|
||||
expect(convertBase({ value: '42540766411283223938465490632011909384', fromBase: 10, toBase: 16 })).toEqual('20010db8000085a300000000ac1f8908');
|
||||
expect(convertBase({ value: '20010db8000085a300000000ac1f8908', fromBase: 16, toBase: 10 })).toEqual('42540766411283223938465490632011909384');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,16 +5,16 @@ export function convertBase({ value, fromBase, toBase }: { value: string; fromBa
|
||||
let decValue = value
|
||||
.split('')
|
||||
.reverse()
|
||||
.reduce((carry: number, digit: string, index: number) => {
|
||||
.reduce((carry: bigint, digit: string, index: number) => {
|
||||
if (!fromRange.includes(digit)) {
|
||||
throw new Error(`Invalid digit "${digit}" for base ${fromBase}.`);
|
||||
}
|
||||
return (carry += fromRange.indexOf(digit) * fromBase ** index);
|
||||
}, 0);
|
||||
return (carry += BigInt(fromRange.indexOf(digit)) * BigInt(fromBase) ** BigInt(index));
|
||||
}, 0n);
|
||||
let newValue = '';
|
||||
while (decValue > 0) {
|
||||
newValue = toRange[decValue % toBase] + newValue;
|
||||
decValue = (decValue - (decValue % toBase)) / toBase;
|
||||
newValue = toRange[Number(decValue % BigInt(toBase))] + newValue;
|
||||
decValue = (decValue - (decValue % BigInt(toBase))) / BigInt(toBase);
|
||||
}
|
||||
return newValue || '0';
|
||||
}
|
||||
@@ -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'),
|
||||
});
|
||||
@@ -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>
|
||||
@@ -1,12 +0,0 @@
|
||||
import { ClearAll } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Url Cleaner',
|
||||
path: '/url-cleaner',
|
||||
description: 'Clean Ads tracker, UTM, Facebook and other ads provider parameters from an URL',
|
||||
keywords: ['url', 'cleaner', 'utm', 'fbclip'],
|
||||
component: () => import('./url-cleaner.vue'),
|
||||
icon: ClearAll,
|
||||
createdAt: new Date('2024-03-13'),
|
||||
});
|
||||
@@ -1,44 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { TidyURL } from 'tidy-url';
|
||||
import { Check as CheckIcon, LetterX as CrossIcon } from '@vicons/tabler';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
import { withDefaultOnError } from '@/utils/defaults';
|
||||
|
||||
const inputUrl = ref('');
|
||||
const cleanedUrl = computed(() => withDefaultOnError(() => TidyURL.clean(inputUrl.value), undefined));
|
||||
const isClean = computed(() => withDefaultOnError(() => TidyURL.clean(inputUrl.value)?.url === inputUrl.value, false));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-card title="Clean url">
|
||||
<c-input-text
|
||||
v-model:value="inputUrl"
|
||||
placeholder="Put your url here..."
|
||||
label="Url to clean"
|
||||
/>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<div v-if="inputUrl">
|
||||
<n-p v-if="isClean" text-center>
|
||||
<n-icon color="green">
|
||||
<CheckIcon />
|
||||
</n-icon>
|
||||
Is clean
|
||||
</n-p>
|
||||
<n-p v-if="!isClean" text-center>
|
||||
<n-icon color="red">
|
||||
<CrossIcon />
|
||||
</n-icon>
|
||||
Was not clean
|
||||
</n-p>
|
||||
<TextareaCopyable
|
||||
label="Cleaned url"
|
||||
:value="cleanedUrl?.url || ''"
|
||||
placeholder="The cleaned url will be here"
|
||||
mb-5
|
||||
mt-5
|
||||
/>
|
||||
</div>
|
||||
</c-card>
|
||||
</template>
|
||||
@@ -23,7 +23,7 @@ const decodeInput = ref('Hello%20world%20%3A)');
|
||||
const decodeOutput = computed(() => withDefaultOnError(() => decodeURIComponent(decodeInput.value), ''));
|
||||
|
||||
const decodeValidation = useValidation({
|
||||
source: encodeInput,
|
||||
source: decodeInput,
|
||||
rules: [
|
||||
{
|
||||
validator: value => isNotThrowing(() => decodeURIComponent(value)),
|
||||
|
||||
Reference in new issue
Block a user