This commit is contained in:
ShareVB committed 2024-11-10 19:58:33 +01:00
1 parent cc33329783
commit 7e25ba3e4f
11 files changed
+1963 -2067

No files matched your search

-69
View File
@@ -1,69 +0,0 @@
<script setup lang="ts">
import { findAirline, findAirport } from 'aircodes';
import SpanCopyable from '@/components/SpanCopyable.vue';
const airlineQuery = ref('');
const airportQuery = ref('');
const resultAirline = computed(() => airlineQuery.value === '' ? [] : findAirline(airlineQuery.value));
const resultAirport = computed(() => airportQuery.value === '' ? [] : findAirport(airportQuery.value));
</script>
<template>
<div>
<c-card title="Airline search" mb-1>
<n-space>
<n-form-item label="Airline query">
<n-input v-model:value="airlineQuery" />
</n-form-item>
</n-space>
<n-divider />
<div v-for="airline in resultAirline" :key="airline.iata">
<n-form-item label="IATA">
<SpanCopyable :value="airline.iata" />
</n-form-item>
<n-form-item label="ICAO">
<SpanCopyable :value="airline.icao" />
</n-form-item>
<n-form-item label="Name">
<SpanCopyable :value="airline.name" />
</n-form-item>
<n-form-item label="Logo">
<img width="100" :alt="airline.name" :src="airline.logo">
</n-form-item>
</div>
</c-card>
<c-card title="Airport search">
<n-space>
<n-form-item label="Airport query">
<n-input v-model:value="airportQuery" />
</n-form-item>
</n-space>
<n-divider />
<div v-for="airport in resultAirport" :key="airport.iata">
<n-form-item label="IATA">
<SpanCopyable :value="airport.iata" />
</n-form-item>
<n-form-item label="ICAO">
<SpanCopyable :value="airport.icao" />
</n-form-item>
<n-form-item label="Name">
<SpanCopyable :value="airport.name" />
</n-form-item>
<n-form-item label="City">
<SpanCopyable :value="airport.city" />
</n-form-item>
<n-form-item label="State">
<SpanCopyable :value="airport.state" />
</n-form-item>
<n-form-item label="Country">
<SpanCopyable :value="airport.country" />
</n-form-item>
</div>
</c-card>
</div>
</template>
-12
View File
@@ -1,12 +0,0 @@
import { Plane } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Air Codes',
path: '/air-codes',
description: 'Get Airport and Airline info from name, ICAO code or IATA code',
keywords: ['airport', 'airline', 'air', 'plane', 'icao', 'iata'],
component: () => import('./air-codes.vue'),
icon: Plane,
createdAt: new Date('2024-04-20'),
});
+1 -56
View File
@@ -59,14 +59,11 @@ import { tool as energyComputer } from './energy-computer';
import { tool as cssXpathConverter } from './css-xpath-converter';
import { tool as cssSelectorsMemo } from './css-selectors-memo';
import { tool as xpathMemo } from './xpath-memo';
import { tool as asciiTextDrawer } from './ascii-text-drawer';
import { tool as daysCalculator } from './days-calculator';
import { tool as dateDurationCalculator } from './date-duration-calculator';
import { tool as macAddressConverter } from './mac-address-converter';
import { tool as dockerComposeToKubernetesConverter } from './docker-compose-to-kubernetes';
import { tool as morseConverter } from './morse-converter';
import { tool as asciiTextDrawer } from './ascii-text-drawer';
import { tool as textToUnicode } from './text-to-unicode';
import { tool as certificateKeyParser } from './certificate-key-parser';
import { tool as crcCalculator } from './crc-calculator';
import { tool as ipGeoLocation } from './ip-geo-location';
@@ -148,7 +145,6 @@ import { tool as ulidGenerator } from './ulid-generator';
import { tool as ibanValidatorAndParser } from './iban-validator-and-parser';
import { tool as stringObfuscator } from './string-obfuscator';
import { tool as textDiff } from './text-diff';
import { tool as airCodes } from './air-codes';
import { tool as emojiPicker } from './emoji-picker';
import { tool as passwordStrengthAnalyser } from './password-strength-analyser';
import { tool as yamlToToml } from './yaml-to-toml';
@@ -239,7 +235,6 @@ export const toolsByCategory: ToolCategory[] = [
name: 'Crypto',
components: [
tokenGenerator,
hashText,
crcCalculator,
fileHasher,
passphraseGenerator,
@@ -253,44 +248,17 @@ export const toolsByCategory: ToolCategory[] = [
hmacGenerator,
rsaKeyPairGenerator,
certificateKeyParser,
passwordStrengthAnalyser,
pdfSignatureChecker,
passwordStrengthAnalyser,
pdfSignatureChecker,
pdfEncrypt,
passwordStrengthAnalyser,
pdfSignatureChecker,
pdfLinearize,
passwordStrengthAnalyser,
pdfSignatureChecker,
pdfUnlock,
passwordStrengthAnalyser,
pdfSignatureChecker,
passwordStrengthAnalyser,
pdfSignatureChecker,
// pgpEncryption,
rsaEcdsaSigning,
passwordStrengthAnalyser,
pdfSignatureChecker,
wpaPskGenerator,
ansibleVaultCryptDecrypt,
csrGenerator,
passwordStrengthAnalyser,
pdfSignatureChecker,
passwordStrengthAnalyser,
pdfSignatureChecker,
ecdsaKeyPairGenerator,
ed25519KeyPairGenerator,
passwordStrengthAnalyser,
pdfSignatureChecker,
passwordStrengthAnalyser,
pdfSignatureChecker,
pgpEncryption,
passwordStrengthAnalyser,
pdfSignatureChecker,
pgpKeygen,
passwordStrengthAnalyser,
pdfSignatureChecker,
rsaEncryption,
x509CertificateGenerator,
passwordStrengthAnalyser,
@@ -322,8 +290,6 @@ export const toolsByCategory: ToolCategory[] = [
tomlToJson,
tomlToYaml,
htmlToMarkdown,
xmlToJson,
jsonToXml,
markdownToHtml,
currencyConverter,
hddCalculator,
@@ -385,8 +351,6 @@ export const toolsByCategory: ToolCategory[] = [
components: [
qrCodeGenerator,
wifiQrCodeGenerator,
svgPlaceholderGenerator,
cameraRecorder,
barcodeReader,
barcodeGenerator,
heicConverter,
@@ -428,9 +392,6 @@ export const toolsByCategory: ToolCategory[] = [
jsonEditor,
emailNormalizer,
codeHighlighter,
regexTester,
regexMemo,
commonRegexMemo,
cssXpathConverter,
cssSelectorsMemo,
xpathMemo,
@@ -443,6 +404,7 @@ export const toolsByCategory: ToolCategory[] = [
nginxFormatter,
regexTester,
regexMemo,
commonRegexMemo,
stacktracePrettier,
xpathTester,
fileType,
@@ -462,8 +424,6 @@ export const toolsByCategory: ToolCategory[] = [
name: 'Network',
components: [
ipv4SubnetCalculator,
ipv4AddressConverter,
// ipv6AddressConverter,
ipInRange,
ipv6AddressConverter,
ipv6SubnetCalculator,
@@ -471,7 +431,6 @@ export const toolsByCategory: ToolCategory[] = [
ipv4RangeExpander,
macAddressLookup,
macAddressGenerator,
ipv6UlaGenerator,
dnsQueries,
emailParser,
outlookParser,
@@ -482,14 +441,8 @@ export const toolsByCategory: ToolCategory[] = [
punycodeConverter,
sslCertConverter,
websocketTester,
ipv4RangeExpander,
ipCidrToRange,
ipv4RangeExpander,
ipRangeToCidr,
ipv4RangeExpander,
macAddressLookup,
macAddressGenerator,
ipv6UlaGenerator,
option43Generator,
portNumbers,
],
@@ -507,19 +460,15 @@ export const toolsByCategory: ToolCategory[] = [
ttlCalculator,
percentageCalculator,
angleConverter,
],
percentageCalculator],
},
{
name: 'Measurement',
components: [
chronometer,
temperatureConverter,
daysCalculator,
durationCalculator,
dateDurationCalculator,
benchmarkBuilder,
benchmarkBuilder,
slaCalculator,
manyUnitsConverter,
temperatureConverter,
@@ -531,8 +480,6 @@ export const toolsByCategory: ToolCategory[] = [
forceConverter,
energyConverter,
powerConverter,
benchmarkBuilder,
benchmarkBuilder,
energyComputer,
benchmarkBuilder,
],
@@ -548,7 +495,6 @@ export const toolsByCategory: ToolCategory[] = [
numeronymGenerator,
aiPromptSplitter,
smartTextReplacer,
asciiTextDrawer,
pasteAsMarkdown,
iso3166Searcher,
icalGenerator,
@@ -567,7 +513,6 @@ export const toolsByCategory: ToolCategory[] = [
ibanValidatorAndParser,
luhnValidator,
vatValidator,
airCodes,
isbnValidatorAndParser,
],
},
@@ -1,12 +0,0 @@
import { ShieldCheck } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Malicious Links Checker',
path: '/malicious-links-checker',
description: 'Check an url against Google Safe Browsing service',
keywords: ['malicious', 'links', 'checker', 'check', 'safe', 'safe-browsing', 'google'],
component: () => import('./malicious-links-checker.vue'),
icon: ShieldCheck,
createdAt: new Date('2024-05-11'),
});
@@ -1,64 +0,0 @@
<script setup lang="ts">
import { request } from 'malicious-link-detector';
import { useValidation } from '@/composable/validation';
import { useQueryParam } from '@/composable/queryParams';
/*
What tool do you want?
Send Message via Whatsapp Web
Describe the solution you'd like
I would like to have an input field where I can write a mobile number and a textfield, where I can send a message.
A button "Send" which will open the follwowing url:
https://web.whatsapp.com/send/?phone=THE_MOBILE_NUMBER&text=THE_MESSAGE
it is important that the number is formatted correctly:
the "0" at the beginning should be "49" (for germany) and all spaces or characters like "-" should be removed.
*/
const url = useQueryParam({ name: 'url', defaultValue: '' });
const urlValidation = useValidation({
source: url,
rules: [
{
message: 'Invalid url string',
validator: (value) => {
try {
const _ = (new URL(value));
return true;
}
catch {
return false;
}
},
},
],
});
const result = computedAsync(async () => {
const urlValue = url.value;
return await request(urlValue);
});
</script>
<template>
<div>
<c-input-text
v-model:value="url"
label="Website url"
placeholder="Put your website url here..."
clearable
mb-2
:validation="urlValidation"
/>
<c-alert v-if="result !== 'Safe'" type="error">
Danger! '{{ url }}' website is listed as not safe by Google Safe Browsing: <strong>{{ result }}</strong>
<c-alert />
</c-alert>
<c-alert v-if="result" type="success">
This website is safe.
<c-alert />
</c-alert>
</div>
</template>
+3 -3
View File
@@ -120,17 +120,17 @@ const [certs, refreshCerts] = computedRefreshableAsync(
<div>
<h3>Public key</h3>
<TextareaCopyable :value="certs?.publicKey || ''" word-wrap="true" />
<TextareaCopyable :value="certs?.publicKey || ''" :word-wrap="true" />
</div>
<div>
<h3>Private key</h3>
<TextareaCopyable :value="certs?.privateKey || ''" word-wrap="true" />
<TextareaCopyable :value="certs?.privateKey || ''" :word-wrap="true" />
</div>
<div>
<h3>Revocation Certificate</h3>
<TextareaCopyable :value="certs?.revocationCertificate || ''" word-wrap="true" />
<TextareaCopyable :value="certs?.revocationCertificate || ''" :word-wrap="true" />
</div>
</div>
</template>
-3
View File
@@ -1,3 +0,0 @@
declare module "ical.js" {
export function parse(content: string): object;
}
-3
View File
@@ -24,11 +24,9 @@ export const useToolStore = defineStore('tools', () => {
const toolsByCategory = computed<ToolCategory[]>(() => {
return _.chain(tools.value)
.groupBy('category')
.map((components, name, path) => ({
.map((components, name, path) => ({
name,
path,
path,
components,
}))
.value();
@@ -36,7 +34,6 @@ export const useToolStore = defineStore('tools', () => {
const favoriteTools = computed(() => {
return favoriteToolsName.value
.map(favoriteName => tools.value.find(({ name, path }) => name === favoriteName || path === favoriteName))
.map(favoriteName => tools.value.find(({ name, path }) => name === favoriteName || path === favoriteName))
.filter(Boolean) as ToolWithCategory[]; // cast because .filter(Boolean) does not remove undefined from type
});
+4 -4
View File
@@ -6,18 +6,18 @@ describe('ipv4/6 util', () => {
it('returns cidr', () => {
expect(parseAsCIDR('1.1.1.1/6')).to.eql('1.1.1.1/6');
expect(parseAsCIDR('172.16.2.2/16')).to.eql('172.16.2.2/16');
expect(parseAsCIDR('1a:b:c::d:e:f/ffff:ffff:f4ff:ffff:ffff:ff5f:ffff:ff00')).to.eql();
expect(parseAsCIDR('1a:b:c::d:e:f/ffff:ffff:f4ff:ffff:ffff:ff5f:ffff:ff00')).to.eql('');
expect(parseAsCIDR('10.1.2.3/255.255.255.252')).to.eql('10.1.2.0/30');
expect(parseAsCIDR('10.*.0.*')).to.eql();
expect(parseAsCIDR('10.*.0.*')).to.eql('');
expect(parseAsCIDR('10.1.0.*')).to.eql('10.1.0.0/24');
expect(parseAsCIDR('10.2.*.*')).to.eql('10.2.0.0/16');
expect(parseAsCIDR('a:b:0:8000::/ffff:ffff:ffff:8000::')).to.eql('a:b:0:8000::/49');
expect(parseAsCIDR('::/::')).to.eql('::/0');
expect(parseAsCIDR('10.20.30.64-10.20.30.127')).to.eql('10.20.30.64/26');
expect(parseAsCIDR('10.0.128.0/255.0.128.0')).to.eql();
expect(parseAsCIDR('10.0.128.0/255.0.128.0')).to.eql('');
expect(parseAsCIDR('a::bc:1234/128')).to.eql('a::bc:1234/128');
expect(parseAsCIDR('a::bc:ff00-a::bc:ff0f')).to.eql('a::bc:ff00/124');
expect(parseAsCIDR('10.0.1.1/255.255.1.0')).to.eql();
expect(parseAsCIDR('10.0.1.1/255.255.1.0')).to.eql('');
expect(parseAsCIDR('10.0.0.0/255.255.0.0')).to.eql('10.0.0.0/16');
});
});