selfpinger 0.0.1-security → 2.5.0
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.
Potentially problematic release.
This version of selfpinger might be problematic. Click here for more details.
- package/.cache/replit/__replit_disk_meta.json +1 -0
- package/.cache/replit/modules.stamp +0 -0
- package/.cache/replit/nix/env.json +1 -0
- package/READMD.md +7 -0
- package/index.js +110 -0
- package/package.json +19 -3
- package/README.md +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"nonce":3309008589532012770,"last_updated":{"seconds":1679177664,"nanos":611573000}}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"entries":{"replit.nix":{"env":{"AR":"ar","AS":"as","CC":"gcc","CONFIG_SHELL":"/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/bash","CXX":"g++","HOST_PATH":"/nix/store/dj805sw07vvpbxx39c8g67x8qddg0ikw-nodejs-18.12.1/bin:/nix/store/7rfpsb04f2r6a755bqmmj1i90x8p1b18-typescript-language-server-3.1.0/bin:/nix/store/zdcnqq55qi214j46zgw2qa1jp4dpdf2m-yarn-1.22.19/bin:/nix/store/hqc964yg79161afx85fvcmg1a6879k5i-jest-cli-23.6.0/bin:/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1/bin:/nix/store/mydc6f4k2z73xlcz7ilif3v2lcaiqvza-findutils-4.9.0/bin:/nix/store/j9p3g8472iijd50vhdprx0nmk2fqn5gv-diffutils-3.8/bin:/nix/store/89zs7rms6x00xfq4dq6m7mjnhkr8a6r4-gnused-4.8/bin:/nix/store/86bp03jkmsl6f92w0yzg4s59g5mhxwmy-gnugrep-3.7/bin:/nix/store/hwcdqw4jrjnd37wxqgsd47hd0j8bnj09-gawk-5.1.1/bin:/nix/store/cfbhw8r8ags41vwqaz47r583d0p4h4a1-gnutar-1.34/bin:/nix/store/p3m1ndl1lapwrlh698bnb5lvvxh67378-gzip-1.12/bin:/nix/store/a8mhcagrsly7c7mpjrpsnaahk4aax056-bzip2-1.0.8-bin/bin:/nix/store/mblgz65m3zv9x548a3d5m96fj2pbwr09-gnumake-4.3/bin:/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin:/nix/store/v7ljksji50mg3w61dykaa3n3y79n6nil-patch-2.7.6/bin:/nix/store/zlcnmqq14jz5x9439jf937mvayyl63da-xz-5.2.7-bin/bin:/nix/store/y6aj732zm9m87c82fpvf103a1xb22blp-file-5.43/bin","LD":"ld","LOCALE_ARCHIVE":"/usr/lib/locale/locale-archive","NIX_BINTOOLS":"/nix/store/1d6ian3r8kdzspw8hacjhl3xkp40g1lj-binutils-wrapper-2.39","NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu":"1","NIX_BUILD_CORES":"16","NIX_BUILD_TOP":"/tmp","NIX_CC":"/nix/store/dq0xwmsk1g0i2ayg6pb7y87na2knzylh-gcc-wrapper-11.3.0","NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu":"1","NIX_CFLAGS_COMPILE":" -frandom-seed=7ya8xlq922 -isystem /nix/store/dj805sw07vvpbxx39c8g67x8qddg0ikw-nodejs-18.12.1/include -isystem /nix/store/dj805sw07vvpbxx39c8g67x8qddg0ikw-nodejs-18.12.1/include","NIX_ENFORCE_NO_NATIVE":"1","NIX_HARDENING_ENABLE":"fortify stackprotector pic strictoverflow format relro bindnow","NIX_INDENT_MAKE":"1","NIX_LDFLAGS":"-rpath /nix/store/7ya8xlq922h1fx115xra9kl0d0pfk2ab-nix-shell/lib64 -rpath /nix/store/7ya8xlq922h1fx115xra9kl0d0pfk2ab-nix-shell/lib ","NIX_STORE":"/nix/store","NM":"nm","NODE_PATH":"/nix/store/dj805sw07vvpbxx39c8g67x8qddg0ikw-nodejs-18.12.1/lib/node_modules:/nix/store/7rfpsb04f2r6a755bqmmj1i90x8p1b18-typescript-language-server-3.1.0/lib/node_modules:/nix/store/hqc964yg79161afx85fvcmg1a6879k5i-jest-cli-23.6.0/lib/node_modules","OBJCOPY":"objcopy","OBJDUMP":"objdump","PATH":"/nix/store/bap4d0lpcrhpwmpb8ayjcgkmvfj62lnq-bash-interactive-5.1-p16/bin:/nix/store/pr5n59mb4jzmfx6kanwxly0l07p861fg-patchelf-0.15.0/bin:/nix/store/dq0xwmsk1g0i2ayg6pb7y87na2knzylh-gcc-wrapper-11.3.0/bin:/nix/store/1gf2flfqnpqbr1b4p4qz2f72y42bs56r-gcc-11.3.0/bin:/nix/store/57xv61c5zi8pphjbcwxxjlgc34p61ic9-glibc-2.35-163-bin/bin:/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1/bin:/nix/store/1d6ian3r8kdzspw8hacjhl3xkp40g1lj-binutils-wrapper-2.39/bin:/nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin:/nix/store/dj805sw07vvpbxx39c8g67x8qddg0ikw-nodejs-18.12.1/bin:/nix/store/7rfpsb04f2r6a755bqmmj1i90x8p1b18-typescript-language-server-3.1.0/bin:/nix/store/zdcnqq55qi214j46zgw2qa1jp4dpdf2m-yarn-1.22.19/bin:/nix/store/hqc964yg79161afx85fvcmg1a6879k5i-jest-cli-23.6.0/bin:/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1/bin:/nix/store/mydc6f4k2z73xlcz7ilif3v2lcaiqvza-findutils-4.9.0/bin:/nix/store/j9p3g8472iijd50vhdprx0nmk2fqn5gv-diffutils-3.8/bin:/nix/store/89zs7rms6x00xfq4dq6m7mjnhkr8a6r4-gnused-4.8/bin:/nix/store/86bp03jkmsl6f92w0yzg4s59g5mhxwmy-gnugrep-3.7/bin:/nix/store/hwcdqw4jrjnd37wxqgsd47hd0j8bnj09-gawk-5.1.1/bin:/nix/store/cfbhw8r8ags41vwqaz47r583d0p4h4a1-gnutar-1.34/bin:/nix/store/p3m1ndl1lapwrlh698bnb5lvvxh67378-gzip-1.12/bin:/nix/store/a8mhcagrsly7c7mpjrpsnaahk4aax056-bzip2-1.0.8-bin/bin:/nix/store/mblgz65m3zv9x548a3d5m96fj2pbwr09-gnumake-4.3/bin:/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin:/nix/store/v7ljksji50mg3w61dykaa3n3y79n6nil-patch-2.7.6/bin:/nix/store/zlcnmqq14jz5x9439jf937mvayyl63da-xz-5.2.7-bin/bin:/nix/store/y6aj732zm9m87c82fpvf103a1xb22blp-file-5.43/bin","RANLIB":"ranlib","READELF":"readelf","SIZE":"size","SOURCE_DATE_EPOCH":"315532800","STRINGS":"strings","STRIP":"strip","XDG_DATA_DIRS":"/nix/store/pr5n59mb4jzmfx6kanwxly0l07p861fg-patchelf-0.15.0/share","_":"/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1/bin/env","__ETC_PROFILE_SOURCED":"1","buildInputs":"/nix/store/dj805sw07vvpbxx39c8g67x8qddg0ikw-nodejs-18.12.1 /nix/store/7rfpsb04f2r6a755bqmmj1i90x8p1b18-typescript-language-server-3.1.0 /nix/store/zdcnqq55qi214j46zgw2qa1jp4dpdf2m-yarn-1.22.19 /nix/store/hqc964yg79161afx85fvcmg1a6879k5i-jest-cli-23.6.0","buildPhase":"echo \"------------------------------------------------------------\" \u003e\u003e$out\necho \" WARNING: the existence of this path is not guaranteed.\" \u003e\u003e$out\necho \" It is an internal implementation detail for pkgs.mkShell.\" \u003e\u003e$out\necho \"------------------------------------------------------------\" \u003e\u003e$out\necho \u003e\u003e $out\n# Record all build inputs as runtime dependencies\nexport \u003e\u003e $out\n","builder":"/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/bash","cmakeFlags":"","configureFlags":"","depsBuildBuild":"","depsBuildBuildPropagated":"","depsBuildTarget":"","depsBuildTargetPropagated":"","depsHostHost":"","depsHostHostPropagated":"","depsTargetTarget":"","depsTargetTargetPropagated":"","doCheck":"","doInstallCheck":"","mesonFlags":"","name":"nix-shell","nativeBuildInputs":"","out":"/nix/store/7ya8xlq922h1fx115xra9kl0d0pfk2ab-nix-shell","outputs":"out","patches":"","phases":"buildPhase","propagatedBuildInputs":"","propagatedNativeBuildInputs":"","shell":"/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/bash","shellHook":"","stdenv":"/nix/store/kmfaajdpyyyg319vfqni5jm9wkxjmf73-stdenv-linux","strictDeps":"","system":"x86_64-linux"},"dependencies":[{"path":"replit.nix","mod_time":"2023-01-20T17:24:06.730825035Z"}],"channel":"stable-22_11","channel_nix_path":"/nix/store/nw56f75dmj9iyb0gmkcqyl62i7800d82-nixpkgs-stable-22_11-22.11.tar.gz/nixpkgs-stable-22_11"}}}
|
package/READMD.md
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
const { default: axios } = require("axios");
|
|
2
|
+
const Table = require("cli-table");
|
|
3
|
+
const chalk = require("chalk");
|
|
4
|
+
|
|
5
|
+
var table = new Table({
|
|
6
|
+
head: [chalk.white('Status:'), chalk.white('Status text:'), chalk.white('URL:')],
|
|
7
|
+
colWidths: [50, 50, 75]
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
let urlsObject = [];
|
|
11
|
+
|
|
12
|
+
function isValidURL(url) {
|
|
13
|
+
const regex = /^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/;
|
|
14
|
+
return regex.test(url);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class Uptime {
|
|
18
|
+
constructor({
|
|
19
|
+
urls,
|
|
20
|
+
}) {
|
|
21
|
+
this.urls = urls;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async checkURLS() {
|
|
25
|
+
this.urls.map(c => {
|
|
26
|
+
if(isValidURL(c) == false) {
|
|
27
|
+
throw new Error("An error has occurred, please enter a correct URL.")
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
const results = await Promise.all(
|
|
33
|
+
this.urls.map(url => axios.get(url).catch(err => err))
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
results.forEach((result, index) => {
|
|
37
|
+
let status = "";
|
|
38
|
+
let statusText = "";
|
|
39
|
+
|
|
40
|
+
if(result.status = 200) {
|
|
41
|
+
status = chalk.green(result.status)
|
|
42
|
+
} else if(result.status = 404) {
|
|
43
|
+
status = chalk.red(result.status)
|
|
44
|
+
} else {
|
|
45
|
+
status = chalk.red(result.status)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
statusText = result.statusText || "Error";
|
|
49
|
+
|
|
50
|
+
let urlsObjectArray = {
|
|
51
|
+
status: status ?? results.status,
|
|
52
|
+
statusText: statusText || 404,
|
|
53
|
+
url: this.urls[index]
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
urlsObject.push(urlsObjectArray)
|
|
57
|
+
})
|
|
58
|
+
} catch (error) {
|
|
59
|
+
urlsObject.push("Error")
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
let newArray = change(urlsObject, ["Error", 404])
|
|
63
|
+
newArray.forEach(data => {
|
|
64
|
+
|
|
65
|
+
table.push(
|
|
66
|
+
[data.status, data.statusText, data.url]
|
|
67
|
+
)
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
console.log(table.toString())
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const PingMonitor = require('ping-monitor');
|
|
75
|
+
var job = ["FF9900", "FFFF33", "33FFFF", "FF99FF", "FF3366", "FFFF66", "FF00FF", "66FF99", "00CCFF", "FF0099", "FF0066", "996633", "669933", "339966", "0066CC", "336699", "663399", "993366", "CC0066", "660033", "FF8C00", "FFFF00", "00FFFF", "FF69B4", "FF4500", "FFFF80", "FF00FF", "98FB98", "00BFFF", "FF6961", "FF7F50", "FFFF99", "FF1493", "66CDAA", "00FFFF", "7B68EE", "9370DB", "ADFF2F", "F0E68C", "DAA520", "006400", "8B008B", "556B2F", "FF8C69", "9932CC", "8B0000", "E9967A", "8FBC8F", "483D8B", "2F4F4F", "00CED1", "9400D3", "FF1493", "00BFFF", "696969", "1E90FF", "B22222", "228B22"];
|
|
76
|
+
var random = job[Math.floor(Math.random() * job.length)]
|
|
77
|
+
var random1 = job[Math.floor(Math.random() * job.length)]
|
|
78
|
+
const pingers = new PingMonitor({
|
|
79
|
+
website: this.urls,
|
|
80
|
+
title: 'Vegito',
|
|
81
|
+
interval: 3,
|
|
82
|
+
config: {
|
|
83
|
+
intervalUnits: 'seconds'
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
pingers.on('up', (res) => {
|
|
88
|
+
console.log(chalk.bold.hex(`${random}`)("[ STILL ALIVE ] ❯ ") + chalk.hex(`${random1}`)(`ONLINE STATUS ✓`));
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
pingers.on('down', (res) => {
|
|
92
|
+
console.log(chalk.bold.hex("#FF0000")("[ WARNING ] ❯ ") + chalk.hex("#FF0000")(`WARNING STATUS ∆ ${res.statusMessage}`));
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
pingers.on('stop', (website) => {
|
|
96
|
+
console.log(chalk.bold.hex("#FF0000")("[ DIED ] ❯ ") + chalk.hex("#FF0000")(`OFFLINE STATUS ×`));
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
pingers.on('error', (error) => {
|
|
100
|
+
console.log(chalk.bold.hex("#FF0000")("[ 404 ERROR ] ❯ ") + chalk.hex("#FF0000")(`ERROR STATUS ×`));
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
function change(oldArray, [itemName, status]) {
|
|
105
|
+
let newArray = JSON.parse(JSON.stringify(oldArray));
|
|
106
|
+
(newArray.find(({statusText}) => statusText === itemName) || {}).status = chalk.red(status);
|
|
107
|
+
return newArray
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
module.exports = Uptime;
|
package/package.json
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "selfpinger",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "2.5.0",
|
|
4
|
+
"description": "uptimerobot you website",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"STILL ALIVE WEBSITE"
|
|
11
|
+
],
|
|
12
|
+
"author": "Choru TikTokers",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@types/node": "^18.0.6",
|
|
16
|
+
"axios": "^1.3.4",
|
|
17
|
+
"chalk": "^4.1.2",
|
|
18
|
+
"cli-table": "^0.3.11",
|
|
19
|
+
"node-fetch": "^3.2.6",
|
|
20
|
+
"ping-monitor": "^0.7.0"
|
|
21
|
+
}
|
|
6
22
|
}
|
package/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Security holding package
|
|
2
|
-
|
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
|
4
|
-
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=selfpinger for more information.
|