@k03mad/dns-leak 7.1.1 → 7.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/lint.yml +3 -0
- package/.husky/pre-commit +0 -3
- package/app/helpers/text.js +21 -21
- package/app/run.js +2 -2
- package/package.json +6 -6
package/.husky/pre-commit
CHANGED
package/app/helpers/text.js
CHANGED
|
@@ -31,24 +31,24 @@ export const address = msg => blue(msg);
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* @param {object} [ipInfo]
|
|
34
|
-
* @param {string} [ipInfo.city]
|
|
35
|
-
* @param {string} [ipInfo.country]
|
|
36
|
-
* @param {string} [ipInfo.emoji]
|
|
37
34
|
* @param {string} [ipInfo.ip]
|
|
38
|
-
* @param {string} [ipInfo.
|
|
39
|
-
* @param {string} [ipInfo.
|
|
40
|
-
* @param {string} [ipInfo.
|
|
35
|
+
* @param {string} [ipInfo.country]
|
|
36
|
+
* @param {string} [ipInfo.countryEmoji]
|
|
37
|
+
* @param {string} [ipInfo.city]
|
|
41
38
|
* @param {string} [ipInfo.region]
|
|
39
|
+
* @param {string} [ipInfo.connectionOrg]
|
|
40
|
+
* @param {string} [ipInfo.connectionIsp]
|
|
41
|
+
* @param {string} [ipInfo.connectionDomain]
|
|
42
42
|
*/
|
|
43
43
|
export const formatIpInfo = ({
|
|
44
|
-
city,
|
|
45
|
-
country,
|
|
46
|
-
emoji,
|
|
47
44
|
ip,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
country,
|
|
46
|
+
countryEmoji,
|
|
47
|
+
city,
|
|
51
48
|
region,
|
|
49
|
+
connectionOrg,
|
|
50
|
+
connectionIsp,
|
|
51
|
+
connectionDomain,
|
|
52
52
|
} = {}) => {
|
|
53
53
|
let output = '';
|
|
54
54
|
|
|
@@ -56,26 +56,26 @@ export const formatIpInfo = ({
|
|
|
56
56
|
output += `${address(ip)}\n`;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
if (
|
|
60
|
-
output += `${orgIsp(
|
|
59
|
+
if (connectionOrg) {
|
|
60
|
+
output += `${orgIsp(connectionOrg)} `;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
if (
|
|
64
|
-
if (
|
|
63
|
+
if (connectionIsp && !connectionOrg?.includes(connectionIsp)) {
|
|
64
|
+
if (connectionOrg) {
|
|
65
65
|
output += orgIsp('/ ');
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
output += `${orgIsp(
|
|
68
|
+
output += `${orgIsp(connectionIsp)} `;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
if (
|
|
72
|
-
output += info(`(${
|
|
71
|
+
if (connectionDomain) {
|
|
72
|
+
output += info(`(${connectionDomain})`);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
output += '\n';
|
|
76
76
|
|
|
77
|
-
if (
|
|
78
|
-
output += `${
|
|
77
|
+
if (countryEmoji) {
|
|
78
|
+
output += `${countryEmoji} `;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
output += [
|
package/app/run.js
CHANGED
|
@@ -28,7 +28,7 @@ const dnsIps = [
|
|
|
28
28
|
|
|
29
29
|
const dnsIpsInfo = await Promise.all(dnsIps.map(async ip => {
|
|
30
30
|
try {
|
|
31
|
-
return await ip2geo(ip);
|
|
31
|
+
return await ip2geo({ip});
|
|
32
32
|
} catch {}
|
|
33
33
|
}));
|
|
34
34
|
|
|
@@ -55,7 +55,7 @@ if (dnsIpsInfoFormatted.length > 0) {
|
|
|
55
55
|
|
|
56
56
|
if (next.value?.ecs) {
|
|
57
57
|
try {
|
|
58
|
-
const data = await ip2geo(next.value.ecs.replace(/\/.+/, ''));
|
|
58
|
+
const data = await ip2geo({ip: next.value.ecs.replace(/\/.+/, '')});
|
|
59
59
|
data.ip += ` (${next.value.ecs})`;
|
|
60
60
|
|
|
61
61
|
output.push(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k03mad/dns-leak",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.3",
|
|
4
4
|
"description": "DNS leak test",
|
|
5
5
|
"maintainers": [
|
|
6
6
|
"Kirill Molchanov <k03.mad@gmail.com"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"node": ">=20"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@k03mad/ip2geo": "
|
|
21
|
+
"@k03mad/ip2geo": "7.0.0",
|
|
22
22
|
"@k03mad/request": "5.6.0",
|
|
23
23
|
"@k03mad/simple-log": "2.1.0",
|
|
24
24
|
"chalk": "5.3.0",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"ora": "8.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@k03mad/eslint-config": "
|
|
31
|
+
"@k03mad/eslint-config": "20.2.0",
|
|
32
32
|
"eslint": "8.56.0",
|
|
33
|
-
"husky": "
|
|
33
|
+
"husky": "9.0.7"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"lint": "npm run lint:eslint",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"clean": "npm run clean:modules && npm run clean:eslint:cache",
|
|
39
39
|
"clean:modules": "rm -rf ./node_modules || true",
|
|
40
40
|
"clean:eslint:cache": "rm -rf .eslintcache || true",
|
|
41
|
-
"setup": "npm run clean &&
|
|
42
|
-
"prepare": "husky
|
|
41
|
+
"setup": "npm run clean && pnpm i",
|
|
42
|
+
"prepare": "husky || true"
|
|
43
43
|
}
|
|
44
44
|
}
|