Compare commits
38 Commits
1c32f1f2ca
...
main
Author | SHA1 | Date | |
---|---|---|---|
0b350cf771 | |||
80d7da0b07 | |||
927663a2ca | |||
7511ad9f11 | |||
f9c2f44d2e | |||
308c3c210b | |||
6390750ae5 | |||
7d3ab3e2ee | |||
cc3f62dfbf | |||
bedae93ae5 | |||
22928e3f9c | |||
7ed15be770 | |||
41959d0962 | |||
3acc1fb5e3 | |||
3eb745c483 | |||
c7f997ebe5 | |||
202a920815 | |||
4d31a133a9 | |||
0ba92e4b60 | |||
61a7e442c9 | |||
23b57275e5 | |||
aceead9064 | |||
da9f17117a | |||
8a13dd8e07 | |||
1efec85494 | |||
9a53fceaee | |||
13cb96af14 | |||
c671572572 | |||
7d0a31dab2 | |||
6177877c2b | |||
2a21b6fd3e | |||
b6c0327810 | |||
74ecb69e90 | |||
e2ee6d6c11 | |||
60bb59831e | |||
744ab922d6 | |||
aa70725eaa | |||
b8f039cb9e |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
old_code
|
21
README.md
21
README.md
@ -32,12 +32,12 @@ To install:
|
|||||||
|
|
||||||
To run a new topic (room):
|
To run a new topic (room):
|
||||||
|
|
||||||
`node sshchat.mjs`
|
`node sshchat.js`
|
||||||
|
|
||||||
This will give you a connection topic to share:
|
This will give you a connection topic to share:
|
||||||
|
|
||||||
```
|
```
|
||||||
/sshChat ❯ ✦ node sshChat.mjs
|
/sshChat ❯ ✦ node sshChat.js
|
||||||
joined topic: 6076c0903ad293e24c10fceb501fe7b02425f6d26c7a5b2d015abd07e3e6b17b
|
joined topic: 6076c0903ad293e24c10fceb501fe7b02425f6d26c7a5b2d015abd07e3e6b17b
|
||||||
(Share this key to others so they may join.)
|
(Share this key to others so they may join.)
|
||||||
You are now in a chatroom for your topic, feel free to chat.
|
You are now in a chatroom for your topic, feel free to chat.
|
||||||
@ -51,26 +51,27 @@ To connect to an altready made topic (room) pass the hash on start up:
|
|||||||
|
|
||||||
# Commands
|
# Commands
|
||||||
|
|
||||||
/login [API KEY] - Login to the API
|
\>login [API KEY] - Login to the API
|
||||||
|
|
||||||
\> command here - Send a command to your container
|
\> command here - Send a command to your container
|
||||||
|
|
||||||
/start - Start your container
|
\>cd /to/path - Change your working directory.
|
||||||
|
|
||||||
/stop - Stop your container
|
>start - Start your container
|
||||||
|
|
||||||
/restart - restart your container
|
>stop - Stop your container
|
||||||
|
|
||||||
/stats - Get the containers stats
|
>restart - restart your container
|
||||||
|
|
||||||
|
>stats - Get the containers stats
|
||||||
|
|
||||||
|
! [prompt] - Send a prompt to GPT3
|
||||||
|
|
||||||
## Screenshots:
|
## Screenshots:
|
||||||
|
|
||||||
A simple convo:
|
A simple convo:
|
||||||

|

|
||||||
|
|
||||||
Running commands while logged in:
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
If a user does not login they will have a random annon1234 username.
|
If a user does not login they will have a random annon1234 username.
|
||||||
|
14
commands/AI.js
Normal file
14
commands/AI.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// AI.js
|
||||||
|
var unirest = require('unirest');
|
||||||
|
|
||||||
|
async function AIRequest(prompt) {
|
||||||
|
console.log("Please wait while the AI thinks about this....\n")
|
||||||
|
let AIRequest = await unirest
|
||||||
|
.post('https://codex-ai-v9q6.onrender.com/')
|
||||||
|
.headers({ 'Accept': 'application/json', 'Content-Type': 'application/json' })
|
||||||
|
.send({ "prompt": prompt })
|
||||||
|
console.log(AIRequest.body.bot)
|
||||||
|
return AIRequest.body.bot
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { AIRequest }
|
14
commands/cd.js
Normal file
14
commands/cd.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
async function changeDir(commandArgs, USERPWD) {
|
||||||
|
let newDir;
|
||||||
|
if (commandArgs.startsWith("/")) {
|
||||||
|
newDir = commandArgs;
|
||||||
|
console.log("Directory Changed to: " + newDir)
|
||||||
|
} else {
|
||||||
|
newDir = USERPWD + "/" + commandArgs;
|
||||||
|
console.log("Directory Changed to: " + newDir)
|
||||||
|
}
|
||||||
|
return newDir;
|
||||||
|
}
|
||||||
|
module.exports = { changeDir }
|
||||||
|
|
||||||
|
|
25
commands/exec.js
Normal file
25
commands/exec.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// exec.js
|
||||||
|
const unirest = require("unirest");
|
||||||
|
|
||||||
|
async function runCMD(key, cmd, pwd) {
|
||||||
|
let requestData = await unirest
|
||||||
|
.post('https://api.discord-linux.com/exec')
|
||||||
|
.headers({
|
||||||
|
'Accept': 'application/json', 'Content-Type': 'application/json',
|
||||||
|
'x-discord-linux-auth': key
|
||||||
|
})
|
||||||
|
.send({ "cmd": cmd, "pwd": pwd })
|
||||||
|
return requestData.body.stdout
|
||||||
|
}
|
||||||
|
|
||||||
|
async function execute(key, cmd, pwd, conns, USERNAME) {
|
||||||
|
const stdout = await runCMD(key, cmd, pwd)
|
||||||
|
console.log(stdout)
|
||||||
|
if (stdout.length > 1800) return console.log("I cannot send stdout to the swarm, its too large!")
|
||||||
|
for (const conn of conns)
|
||||||
|
conn.write(`${USERNAME}: ran ${cmd}\n${stdout}`)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = { execute, runCMD }
|
42
commands/login.js
Normal file
42
commands/login.js
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
var unirest = require('unirest');
|
||||||
|
|
||||||
|
async function login(key, conns, MYKEY, USERNAME, DISCORD_USERID) {
|
||||||
|
getUSERNAME(key)
|
||||||
|
.then((data) => {
|
||||||
|
console.log("Hello, " + data + "\nYou are now logged in.\n\n\n")
|
||||||
|
USERNAME[0] = data
|
||||||
|
MYKEY.push(key)
|
||||||
|
LOGGEDIN = true
|
||||||
|
getDISCORDID(key)
|
||||||
|
.then((discord) => {
|
||||||
|
DISCORD_USERID[0] = [discord]
|
||||||
|
for (const conn of conns) {
|
||||||
|
conn.write(`${USERNAME} | <@${discord}> is now logged in.`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log("Invalid Key")
|
||||||
|
for (const conn of conns) {
|
||||||
|
conn.write("Invalid Key, please try again.")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// API Functions
|
||||||
|
async function getUSERNAME(key) {
|
||||||
|
let requestUSERNAME = await unirest
|
||||||
|
.get('https://api.discord-linux.com/name')
|
||||||
|
.headers({ 'Accept': 'application/json', 'Content-Type': 'application/json', 'x-discord-linux-auth': key })
|
||||||
|
return requestUSERNAME.body.message
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getDISCORDID(key) {
|
||||||
|
let requestUSERNAME = await unirest
|
||||||
|
.get('https://api.discord-linux.com/discordid')
|
||||||
|
.headers({ 'Accept': 'application/json', 'Content-Type': 'application/json', 'x-discord-linux-auth': key })
|
||||||
|
return requestUSERNAME.body.message
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { login }
|
20
commands/restart.js
Normal file
20
commands/restart.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// restart.js
|
||||||
|
const unirest = require("unirest");
|
||||||
|
|
||||||
|
async function restart(key) {
|
||||||
|
|
||||||
|
async function restartContainer(key) {
|
||||||
|
let restartContainer = await unirest
|
||||||
|
.get('https://api.discord-linux.com/restart')
|
||||||
|
.headers({
|
||||||
|
'Accept': 'application/json', 'Content-Type': 'application/json',
|
||||||
|
'x-discord-linux-auth': key
|
||||||
|
})
|
||||||
|
return restartContainer.body
|
||||||
|
}
|
||||||
|
|
||||||
|
const response = await restartContainer(key)
|
||||||
|
console.log(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { restart }
|
19
commands/start.js
Normal file
19
commands/start.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// start.js
|
||||||
|
const unirest = require("unirest");
|
||||||
|
|
||||||
|
async function startContainer(key) {
|
||||||
|
let startContainer = await unirest
|
||||||
|
.get('https://api.discord-linux.com/start')
|
||||||
|
.headers({
|
||||||
|
'Accept': 'application/json', 'Content-Type': 'application/json',
|
||||||
|
'x-discord-linux-auth': key
|
||||||
|
})
|
||||||
|
return startContainer.body
|
||||||
|
}
|
||||||
|
|
||||||
|
async function start(key) {
|
||||||
|
const response = await startContainer(key)
|
||||||
|
console.log(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { start, startContainer }
|
19
commands/stats.js
Normal file
19
commands/stats.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// stats.js
|
||||||
|
const unirest = require("unirest");
|
||||||
|
|
||||||
|
async function getStats(key) {
|
||||||
|
let requestData = await unirest
|
||||||
|
.get('https://api.discord-linux.com/stats')
|
||||||
|
.headers({
|
||||||
|
'Accept': 'application/json', 'Content-Type': 'application/json',
|
||||||
|
'x-discord-linux-auth': key
|
||||||
|
})
|
||||||
|
return requestData.body
|
||||||
|
}
|
||||||
|
|
||||||
|
async function stats(key) {
|
||||||
|
const response = await getStats(key)
|
||||||
|
console.log(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { stats, getStats }
|
19
commands/stop.js
Normal file
19
commands/stop.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// start.js
|
||||||
|
const unirest = require("unirest");
|
||||||
|
|
||||||
|
async function stopContainer(key) {
|
||||||
|
let stopContainer = await unirest
|
||||||
|
.get('https://api.discord-linux.com/stop')
|
||||||
|
.headers({
|
||||||
|
'Accept': 'application/json', 'Content-Type': 'application/json',
|
||||||
|
'x-discord-linux-auth': key
|
||||||
|
})
|
||||||
|
return stopContainer.body
|
||||||
|
}
|
||||||
|
|
||||||
|
async function stop(key) {
|
||||||
|
const response = await stopContainer(key)
|
||||||
|
console.log(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { stop, stopContainer }
|
967
package-lock.json
generated
967
package-lock.json
generated
@ -1,967 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "sshchat",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"lockfileVersion": 3,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"": {
|
|
||||||
"name": "sshchat",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.6.1",
|
|
||||||
"graceful-goodbye": "^1.2.0",
|
|
||||||
"hypercore-crypto": "^3.3.0",
|
|
||||||
"hyperswarm": "^4.3.5",
|
|
||||||
"readline": "^1.3.0",
|
|
||||||
"unirest": "^0.6.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@hyperswarm/dht": {
|
|
||||||
"version": "6.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@hyperswarm/dht/-/dht-6.4.1.tgz",
|
|
||||||
"integrity": "sha512-BoBZlcB5RZZYdvWslAN+ciJvk0+Ayq2Se0X6GKM3C08xafRPrifJ1Vw56X0K3KijJUVGct961L5HcqtkuHc7jQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"@hyperswarm/secret-stream": "^6.0.0",
|
|
||||||
"b4a": "^1.3.1",
|
|
||||||
"bogon": "^1.0.0",
|
|
||||||
"compact-encoding": "^2.4.1",
|
|
||||||
"compact-encoding-net": "^1.0.1",
|
|
||||||
"debugging-stream": "^2.0.0",
|
|
||||||
"dht-rpc": "^6.6.1",
|
|
||||||
"events": "^3.3.0",
|
|
||||||
"hypercore-crypto": "^3.3.0",
|
|
||||||
"noise-curve-ed": "^2.0.0",
|
|
||||||
"noise-handshake": "^3.0.0",
|
|
||||||
"record-cache": "^1.1.1",
|
|
||||||
"safety-catch": "^1.0.1",
|
|
||||||
"sodium-universal": "^3.0.4",
|
|
||||||
"xache": "^1.1.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"hyperswarm-dht": "bin.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@hyperswarm/secret-stream": {
|
|
||||||
"version": "6.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@hyperswarm/secret-stream/-/secret-stream-6.1.1.tgz",
|
|
||||||
"integrity": "sha512-xkdE6PfUT1bzBNp9oZU4hHGHb/zDgHte5kJju1qLWxr8k4NJJkVxa6jTPAcOipxIbXt4uT0fedVFT/iFg+R/MQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.1.0",
|
|
||||||
"hypercore-crypto": "^3.3.0",
|
|
||||||
"noise-curve-ed": "^2.0.0",
|
|
||||||
"noise-handshake": "^3.0.0",
|
|
||||||
"sodium-secretstream": "^1.0.0",
|
|
||||||
"sodium-universal": "^3.0.4",
|
|
||||||
"streamx": "^2.13.0",
|
|
||||||
"timeout-refresh": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ajv": {
|
|
||||||
"version": "6.12.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
|
||||||
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
|
|
||||||
"dependencies": {
|
|
||||||
"fast-deep-equal": "^3.1.1",
|
|
||||||
"fast-json-stable-stringify": "^2.0.0",
|
|
||||||
"json-schema-traverse": "^0.4.1",
|
|
||||||
"uri-js": "^4.2.2"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/epoberezkin"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/asn1": {
|
|
||||||
"version": "0.2.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
|
|
||||||
"integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"safer-buffer": "~2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/assert-plus": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/async": {
|
|
||||||
"version": "0.9.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
|
|
||||||
"integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw=="
|
|
||||||
},
|
|
||||||
"node_modules/asynckit": {
|
|
||||||
"version": "0.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
|
||||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
|
||||||
},
|
|
||||||
"node_modules/aws-sign2": {
|
|
||||||
"version": "0.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
|
||||||
"integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==",
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/aws4": {
|
|
||||||
"version": "1.12.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz",
|
|
||||||
"integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg=="
|
|
||||||
},
|
|
||||||
"node_modules/b4a": {
|
|
||||||
"version": "1.6.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.1.tgz",
|
|
||||||
"integrity": "sha512-AsKjNhz72yxteo/0EtQEiwkMUgk/tGmycXlbG4g3Ard2/ULtNLUykGOkeK0egmN27h0xMAhb76jYccW+XTBExA=="
|
|
||||||
},
|
|
||||||
"node_modules/bcrypt-pbkdf": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
|
|
||||||
"dependencies": {
|
|
||||||
"tweetnacl": "^0.14.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/blake2b": {
|
|
||||||
"version": "2.1.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.4.tgz",
|
|
||||||
"integrity": "sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A==",
|
|
||||||
"dependencies": {
|
|
||||||
"blake2b-wasm": "^2.4.0",
|
|
||||||
"nanoassert": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/blake2b-wasm": {
|
|
||||||
"version": "2.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-2.4.0.tgz",
|
|
||||||
"integrity": "sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.0.1",
|
|
||||||
"nanoassert": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/bogon": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/bogon/-/bogon-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-a6SnToksXHuUlgeMvI/txWmTcKz7c7iBa8f0HbXL4toN1Uza/CTQ4F7n9jSDX49TCpxv3KUP100q4sZfwLyLiw==",
|
|
||||||
"dependencies": {
|
|
||||||
"compact-encoding": "^2.11.0",
|
|
||||||
"compact-encoding-net": "^1.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/caseless": {
|
|
||||||
"version": "0.12.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
|
|
||||||
"integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw=="
|
|
||||||
},
|
|
||||||
"node_modules/chacha20-universal": {
|
|
||||||
"version": "1.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/chacha20-universal/-/chacha20-universal-1.0.4.tgz",
|
|
||||||
"integrity": "sha512-/IOxdWWNa7nRabfe7+oF+jVkGjlr2xUL4J8l/OvzZhj+c9RpMqoo3Dq+5nU1j/BflRV4BKnaQ4+4oH1yBpQG1Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"nanoassert": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/combined-stream": {
|
|
||||||
"version": "0.0.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz",
|
|
||||||
"integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==",
|
|
||||||
"dependencies": {
|
|
||||||
"delayed-stream": "0.0.5"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/compact-encoding": {
|
|
||||||
"version": "2.11.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/compact-encoding/-/compact-encoding-2.11.0.tgz",
|
|
||||||
"integrity": "sha512-CRfTuyy9Tg7EwxNKvIq3yFIr2JnJLyVr9Yj234VsDCL59hdXcZH3TdzY/2kwbAqVogIoRBJjnNKCEnXbxTIEeg==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/compact-encoding-net": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/compact-encoding-net/-/compact-encoding-net-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-LVXpNpF7PGQeHRVVLGgYWzuVoYAaDZvKUsUxRioGfkotzvOh4AzoQF1HBH3zMNaSnx7gJXuUr3hkjnijaH/Eng==",
|
|
||||||
"dependencies": {
|
|
||||||
"compact-encoding": "^2.4.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/core-util-is": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ=="
|
|
||||||
},
|
|
||||||
"node_modules/dashdash": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==",
|
|
||||||
"dependencies": {
|
|
||||||
"assert-plus": "^1.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/debugging-stream": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/debugging-stream/-/debugging-stream-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-xwfl6wB/3xc553uwtGnSa94jFxnGOc02C0WU2Nmzwr80gzeqn1FX4VcbvoKIhe8L/lPq4BTQttAbrTN94uN8rA==",
|
|
||||||
"dependencies": {
|
|
||||||
"streamx": "^2.12.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/delayed-stream": {
|
|
||||||
"version": "0.0.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz",
|
|
||||||
"integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/dht-rpc": {
|
|
||||||
"version": "6.6.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/dht-rpc/-/dht-rpc-6.6.1.tgz",
|
|
||||||
"integrity": "sha512-HPCB1e2PfNWklHaU8JPd8y+rFY0qUrQnRgx9HKYa5qyY6dVvsjNAo0xJ6S2bb2b0IEUTLEar1+X1Aqn8MGy7+Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.3.1",
|
|
||||||
"compact-encoding": "^2.1.0",
|
|
||||||
"compact-encoding-net": "^1.0.1",
|
|
||||||
"events": "^3.3.0",
|
|
||||||
"fast-fifo": "^1.0.0",
|
|
||||||
"kademlia-routing-table": "^1.0.0",
|
|
||||||
"nat-sampler": "^1.0.1",
|
|
||||||
"sodium-universal": "^3.0.4",
|
|
||||||
"streamx": "^2.10.3",
|
|
||||||
"time-ordered-set": "^1.0.2",
|
|
||||||
"udx-native": "^1.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ecc-jsbn": {
|
|
||||||
"version": "0.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
|
|
||||||
"integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==",
|
|
||||||
"dependencies": {
|
|
||||||
"jsbn": "~0.1.0",
|
|
||||||
"safer-buffer": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/events": {
|
|
||||||
"version": "3.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
|
|
||||||
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.8.x"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/extend": {
|
|
||||||
"version": "3.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
|
||||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
|
|
||||||
},
|
|
||||||
"node_modules/extsprintf": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
|
|
||||||
"integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==",
|
|
||||||
"engines": [
|
|
||||||
"node >=0.6.0"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"node_modules/fast-deep-equal": {
|
|
||||||
"version": "3.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
|
||||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
|
||||||
},
|
|
||||||
"node_modules/fast-fifo": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-Kl29QoNbNvn4nhDsLYjyIAaIqaJB6rBx5p3sL9VjaefJ+eMFBWVZiaoguaoZfzEKr5RhAti0UgM8703akGPJ6g=="
|
|
||||||
},
|
|
||||||
"node_modules/fast-json-stable-stringify": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
|
|
||||||
},
|
|
||||||
"node_modules/forever-agent": {
|
|
||||||
"version": "0.6.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
|
|
||||||
"integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==",
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/form-data": {
|
|
||||||
"version": "0.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz",
|
|
||||||
"integrity": "sha512-LkinaG6JazVhYj2AKi67NOIAhqXcBOQACraT0WdhWW4ZO3kTiS0X7C1nJ1jFZf6wak4bVHIA/oOzWkh2ThAipg==",
|
|
||||||
"dependencies": {
|
|
||||||
"async": "~0.9.0",
|
|
||||||
"combined-stream": "~0.0.4",
|
|
||||||
"mime-types": "~2.0.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/function-bind": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
|
||||||
},
|
|
||||||
"node_modules/getpass": {
|
|
||||||
"version": "0.1.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
|
|
||||||
"integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==",
|
|
||||||
"dependencies": {
|
|
||||||
"assert-plus": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/graceful-goodbye": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/graceful-goodbye/-/graceful-goodbye-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-o+H6xuufdpN3Qt2sXi5HLxIoW07cE/0zNccrmDajOyNnlVHHeDOp5Uvt3uZYTov/sSphcd0aZW5Y5GdvFpfKWg=="
|
|
||||||
},
|
|
||||||
"node_modules/har-schema": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/har-validator": {
|
|
||||||
"version": "5.1.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
|
|
||||||
"integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
|
|
||||||
"deprecated": "this library is no longer supported",
|
|
||||||
"dependencies": {
|
|
||||||
"ajv": "^6.12.3",
|
|
||||||
"har-schema": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/has": {
|
|
||||||
"version": "1.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
|
||||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
|
||||||
"dependencies": {
|
|
||||||
"function-bind": "^1.1.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/http-signature": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"assert-plus": "^1.0.0",
|
|
||||||
"jsprim": "^1.2.2",
|
|
||||||
"sshpk": "^1.7.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.8",
|
|
||||||
"npm": ">=1.3.7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/hypercore-crypto": {
|
|
||||||
"version": "3.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/hypercore-crypto/-/hypercore-crypto-3.3.0.tgz",
|
|
||||||
"integrity": "sha512-zAWbDqG7kWwS6rCxxTUeB/OeFAz3PoOmouKaoMubtDJYJsLHqXtA3wE2mLsw+E2+iYyom5zrFyBTFVYxmgwW6g==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.1.0",
|
|
||||||
"compact-encoding": "^2.5.1",
|
|
||||||
"sodium-universal": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/hyperswarm": {
|
|
||||||
"version": "4.3.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/hyperswarm/-/hyperswarm-4.3.5.tgz",
|
|
||||||
"integrity": "sha512-vX5VPpRmN9cbDOJ3p+Jn/+V8ilJmkBYkmehM9oZEZZdtXZV5SfIPA7OMaN9NfXTuRKlxVGHr00S724Ct7BGK/Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"@hyperswarm/dht": "^6.0.1",
|
|
||||||
"b4a": "^1.3.1",
|
|
||||||
"events": "^3.3.0",
|
|
||||||
"safety-catch": "^1.0.2",
|
|
||||||
"shuffled-priority-queue": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/is-core-module": {
|
|
||||||
"version": "2.11.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
|
|
||||||
"integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
|
|
||||||
"dependencies": {
|
|
||||||
"has": "^1.0.3"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/is-typedarray": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA=="
|
|
||||||
},
|
|
||||||
"node_modules/isstream": {
|
|
||||||
"version": "0.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
|
||||||
"integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g=="
|
|
||||||
},
|
|
||||||
"node_modules/jsbn": {
|
|
||||||
"version": "0.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
|
|
||||||
"integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg=="
|
|
||||||
},
|
|
||||||
"node_modules/json-schema": {
|
|
||||||
"version": "0.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
|
|
||||||
"integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA=="
|
|
||||||
},
|
|
||||||
"node_modules/json-schema-traverse": {
|
|
||||||
"version": "0.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
|
||||||
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
|
|
||||||
},
|
|
||||||
"node_modules/json-stringify-safe": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="
|
|
||||||
},
|
|
||||||
"node_modules/jsprim": {
|
|
||||||
"version": "1.4.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
|
|
||||||
"integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
|
|
||||||
"dependencies": {
|
|
||||||
"assert-plus": "1.0.0",
|
|
||||||
"extsprintf": "1.3.0",
|
|
||||||
"json-schema": "0.4.0",
|
|
||||||
"verror": "1.10.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.6.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/kademlia-routing-table": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/kademlia-routing-table/-/kademlia-routing-table-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-dKk19sC3/+kWhBIvOKCthxVV+JH0NrswSBq4sA4eOkkPMqQM1rRuOWte1WSKXeP8r9Nx4NuiH2gny3lMddJTpw=="
|
|
||||||
},
|
|
||||||
"node_modules/mime": {
|
|
||||||
"version": "2.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
|
|
||||||
"integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",
|
|
||||||
"bin": {
|
|
||||||
"mime": "cli.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/mime-db": {
|
|
||||||
"version": "1.12.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz",
|
|
||||||
"integrity": "sha512-5aMAW7I4jZoZB27fXRuekqc4DVvJ7+hM8UcWrNj2mqibE54gXgPSonBYBdQW5hyaVNGmiYjY0ZMqn9fBefWYvA==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/mime-types": {
|
|
||||||
"version": "2.0.14",
|
|
||||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz",
|
|
||||||
"integrity": "sha512-2ZHUEstNkIf2oTWgtODr6X0Cc4Ns/RN/hktdozndiEhhAC2wxXejF1FH0XLHTEImE9h6gr/tcnr3YOnSGsxc7Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"mime-db": "~1.12.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/nanoassert": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA=="
|
|
||||||
},
|
|
||||||
"node_modules/napi-macros": {
|
|
||||||
"version": "2.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz",
|
|
||||||
"integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g=="
|
|
||||||
},
|
|
||||||
"node_modules/nat-sampler": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/nat-sampler/-/nat-sampler-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-yQvyNN7xbqR8crTKk3U8gRgpcV1Az+vfCEijiHu9oHHsnIl8n3x+yXNHl42M6L3czGynAVoOT9TqBfS87gDdcw=="
|
|
||||||
},
|
|
||||||
"node_modules/node-gyp-build": {
|
|
||||||
"version": "4.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz",
|
|
||||||
"integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==",
|
|
||||||
"bin": {
|
|
||||||
"node-gyp-build": "bin.js",
|
|
||||||
"node-gyp-build-optional": "optional.js",
|
|
||||||
"node-gyp-build-test": "build-test.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/noise-curve-ed": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/noise-curve-ed/-/noise-curve-ed-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-DRMv6ciwQVDpDMMcNWyt20kLuAmXVYVJoPUhmvmIZkgSALA6a+OeNTrX35gt5vQ6LgE36DSOFMpGfdmWpBmjDg==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.1.0",
|
|
||||||
"nanoassert": "^2.0.0",
|
|
||||||
"sodium-universal": "^3.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/noise-handshake": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/noise-handshake/-/noise-handshake-3.0.1.tgz",
|
|
||||||
"integrity": "sha512-H5rHzYaCNTwCgCHUu2tJgkdKE9lpqyXVVxzGC9mRQrL+/uE1pgP7kUk21LVgEycmJqoPm0ltCzhZzo8EguD8pg==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.1.0",
|
|
||||||
"nanoassert": "^2.0.0",
|
|
||||||
"sodium-universal": "^3.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/oauth-sign": {
|
|
||||||
"version": "0.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
|
|
||||||
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/path-parse": {
|
|
||||||
"version": "1.0.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
|
||||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
|
|
||||||
},
|
|
||||||
"node_modules/performance-now": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="
|
|
||||||
},
|
|
||||||
"node_modules/psl": {
|
|
||||||
"version": "1.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
|
|
||||||
"integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
|
|
||||||
},
|
|
||||||
"node_modules/punycode": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/qs": {
|
|
||||||
"version": "6.5.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
|
|
||||||
"integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/queue-tick": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag=="
|
|
||||||
},
|
|
||||||
"node_modules/readline": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz",
|
|
||||||
"integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg=="
|
|
||||||
},
|
|
||||||
"node_modules/record-cache": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/record-cache/-/record-cache-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-kyy3HWCez2WrotaL3O4fTn0rsIdfRKOdQQcEJ9KpvmKmbffKVvwsloX063EgRUlpJIXHiDQFhJcTbZequ2uTZw==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.3.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/request": {
|
|
||||||
"version": "2.88.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
|
|
||||||
"integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
|
|
||||||
"deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
|
|
||||||
"dependencies": {
|
|
||||||
"aws-sign2": "~0.7.0",
|
|
||||||
"aws4": "^1.8.0",
|
|
||||||
"caseless": "~0.12.0",
|
|
||||||
"combined-stream": "~1.0.6",
|
|
||||||
"extend": "~3.0.2",
|
|
||||||
"forever-agent": "~0.6.1",
|
|
||||||
"form-data": "~2.3.2",
|
|
||||||
"har-validator": "~5.1.3",
|
|
||||||
"http-signature": "~1.2.0",
|
|
||||||
"is-typedarray": "~1.0.0",
|
|
||||||
"isstream": "~0.1.2",
|
|
||||||
"json-stringify-safe": "~5.0.1",
|
|
||||||
"mime-types": "~2.1.19",
|
|
||||||
"oauth-sign": "~0.9.0",
|
|
||||||
"performance-now": "^2.1.0",
|
|
||||||
"qs": "~6.5.2",
|
|
||||||
"safe-buffer": "^5.1.2",
|
|
||||||
"tough-cookie": "~2.5.0",
|
|
||||||
"tunnel-agent": "^0.6.0",
|
|
||||||
"uuid": "^3.3.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/request/node_modules/combined-stream": {
|
|
||||||
"version": "1.0.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
|
||||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
|
||||||
"dependencies": {
|
|
||||||
"delayed-stream": "~1.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/request/node_modules/delayed-stream": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/request/node_modules/form-data": {
|
|
||||||
"version": "2.3.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
|
|
||||||
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"asynckit": "^0.4.0",
|
|
||||||
"combined-stream": "^1.0.6",
|
|
||||||
"mime-types": "^2.1.12"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/request/node_modules/mime-db": {
|
|
||||||
"version": "1.52.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
|
||||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/request/node_modules/mime-types": {
|
|
||||||
"version": "2.1.35",
|
|
||||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
|
||||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
|
||||||
"dependencies": {
|
|
||||||
"mime-db": "1.52.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/resolve": {
|
|
||||||
"version": "1.22.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
|
|
||||||
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
|
|
||||||
"dependencies": {
|
|
||||||
"is-core-module": "^2.9.0",
|
|
||||||
"path-parse": "^1.0.7",
|
|
||||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"resolve": "bin/resolve"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/safe-buffer": {
|
|
||||||
"version": "5.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
|
||||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "patreon",
|
|
||||||
"url": "https://www.patreon.com/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "consulting",
|
|
||||||
"url": "https://feross.org/support"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"node_modules/safer-buffer": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
|
||||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
|
||||||
},
|
|
||||||
"node_modules/safety-catch": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/safety-catch/-/safety-catch-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-C1UYVZ4dtbBxEtvOcpjBaaD27nP8MlvyAQEp2fOTOEe6pfUpk1cDUxij6BR1jZup6rSyUTaBBplK7LanskrULA=="
|
|
||||||
},
|
|
||||||
"node_modules/sha256-universal": {
|
|
||||||
"version": "1.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/sha256-universal/-/sha256-universal-1.2.1.tgz",
|
|
||||||
"integrity": "sha512-ghn3muhdn1ailCQqqceNxRgkOeZSVfSE13RQWEg6njB+itsFzGVSJv+O//2hvNXZuxVIRyNzrgsZ37SPDdGJJw==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.0.1",
|
|
||||||
"sha256-wasm": "^2.2.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/sha256-wasm": {
|
|
||||||
"version": "2.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/sha256-wasm/-/sha256-wasm-2.2.2.tgz",
|
|
||||||
"integrity": "sha512-qKSGARvao+JQlFiA+sjJZhJ/61gmW/3aNLblB2rsgIxDlDxsJPHo8a1seXj12oKtuHVgJSJJ7QEGBUYQN741lQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.0.1",
|
|
||||||
"nanoassert": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/sha512-universal": {
|
|
||||||
"version": "1.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/sha512-universal/-/sha512-universal-1.2.1.tgz",
|
|
||||||
"integrity": "sha512-kehYuigMoRkIngCv7rhgruLJNNHDnitGTBdkcYbCbooL8Cidj/bS78MDxByIjcc69M915WxcQTgZetZ1JbeQTQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.0.1",
|
|
||||||
"sha512-wasm": "^2.3.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/sha512-wasm": {
|
|
||||||
"version": "2.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/sha512-wasm/-/sha512-wasm-2.3.4.tgz",
|
|
||||||
"integrity": "sha512-akWoxJPGCB3aZCrZ+fm6VIFhJ/p8idBv7AWGFng/CZIrQo51oQNsvDbTSRXWAzIiZJvpy16oIDiCCPqTe21sKg==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.0.1",
|
|
||||||
"nanoassert": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/shuffled-priority-queue": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/shuffled-priority-queue/-/shuffled-priority-queue-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-xhdh7fHyMsr0m/w2kDfRJuBFRS96b9l8ZPNWGaQ+PMvnUnZ/Eh+gJJ9NsHBd7P9k0399WYlCLzsy18EaMfyadA==",
|
|
||||||
"dependencies": {
|
|
||||||
"unordered-set": "^2.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/siphash24": {
|
|
||||||
"version": "1.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/siphash24/-/siphash24-1.3.1.tgz",
|
|
||||||
"integrity": "sha512-moemC3ZKiTzH29nbFo3Iw8fbemWWod4vNs/WgKbQ54oEs6mE6XVlguxvinYjB+UmaE0PThgyED9fUkWvirT8hA==",
|
|
||||||
"dependencies": {
|
|
||||||
"nanoassert": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/sodium-javascript": {
|
|
||||||
"version": "0.8.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/sodium-javascript/-/sodium-javascript-0.8.0.tgz",
|
|
||||||
"integrity": "sha512-rEBzR5mPxPES+UjyMDvKPIXy9ImF17KOJ32nJNi9uIquWpS/nfj+h6m05J5yLJaGXjgM72LmQoUbWZVxh/rmGg==",
|
|
||||||
"dependencies": {
|
|
||||||
"blake2b": "^2.1.1",
|
|
||||||
"chacha20-universal": "^1.0.4",
|
|
||||||
"nanoassert": "^2.0.0",
|
|
||||||
"sha256-universal": "^1.1.0",
|
|
||||||
"sha512-universal": "^1.1.0",
|
|
||||||
"siphash24": "^1.0.1",
|
|
||||||
"xsalsa20": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/sodium-native": {
|
|
||||||
"version": "3.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-3.4.1.tgz",
|
|
||||||
"integrity": "sha512-PaNN/roiFWzVVTL6OqjzYct38NSXewdl2wz8SRB51Br/MLIJPrbM3XexhVWkq7D3UWMysfrhKVf1v1phZq6MeQ==",
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"dependencies": {
|
|
||||||
"node-gyp-build": "^4.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/sodium-secretstream": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/sodium-secretstream/-/sodium-secretstream-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-AsWztbBHhHid+w5g28ftXA0mTrS52Dup7FYI0GR7ri1TQTlVsw0z//FNlhIqWsgtBctO/DxQosacbElCpmdcZw==",
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.1.1",
|
|
||||||
"sodium-universal": "^3.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/sodium-universal": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/sodium-universal/-/sodium-universal-3.1.0.tgz",
|
|
||||||
"integrity": "sha512-N2gxk68Kg2qZLSJ4h0NffEhp4BjgWHCHXVlDi1aG1hA3y+ZeWEmHqnpml8Hy47QzfL1xLy5nwr9LcsWAg2Ep0A==",
|
|
||||||
"dependencies": {
|
|
||||||
"blake2b": "^2.1.1",
|
|
||||||
"chacha20-universal": "^1.0.4",
|
|
||||||
"nanoassert": "^2.0.0",
|
|
||||||
"resolve": "^1.17.0",
|
|
||||||
"sha256-universal": "^1.1.0",
|
|
||||||
"sha512-universal": "^1.1.0",
|
|
||||||
"siphash24": "^1.0.1",
|
|
||||||
"sodium-javascript": "~0.8.0",
|
|
||||||
"sodium-native": "^3.2.0",
|
|
||||||
"xsalsa20": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/sshpk": {
|
|
||||||
"version": "1.17.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
|
|
||||||
"integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"asn1": "~0.2.3",
|
|
||||||
"assert-plus": "^1.0.0",
|
|
||||||
"bcrypt-pbkdf": "^1.0.0",
|
|
||||||
"dashdash": "^1.12.0",
|
|
||||||
"ecc-jsbn": "~0.1.1",
|
|
||||||
"getpass": "^0.1.1",
|
|
||||||
"jsbn": "~0.1.0",
|
|
||||||
"safer-buffer": "^2.0.2",
|
|
||||||
"tweetnacl": "~0.14.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"sshpk-conv": "bin/sshpk-conv",
|
|
||||||
"sshpk-sign": "bin/sshpk-sign",
|
|
||||||
"sshpk-verify": "bin/sshpk-verify"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/streamx": {
|
|
||||||
"version": "2.13.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.13.0.tgz",
|
|
||||||
"integrity": "sha512-9jD4uoX0juNSIcv4PazT+97FpM4Mww3cp7PM23HRTLANhgb7K7n1mB45guH/kT5F4enl04kApOM3EeoUXSPfvw==",
|
|
||||||
"dependencies": {
|
|
||||||
"fast-fifo": "^1.1.0",
|
|
||||||
"queue-tick": "^1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/supports-preserve-symlinks-flag": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.4"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/time-ordered-set": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/time-ordered-set/-/time-ordered-set-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-vGO99JkxvgX+u+LtOKQEpYf31Kj3i/GNwVstfnh4dyINakMgeZCpew1e3Aj+06hEslhtHEd52g7m5IV+o1K8Mw=="
|
|
||||||
},
|
|
||||||
"node_modules/timeout-refresh": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/timeout-refresh/-/timeout-refresh-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-SVqEcMZBsZF9mA78rjzCrYrUs37LMJk3ShZ851ygZYW1cMeIjs9mL57KO6Iv5mmjSQnOe/29/VAfGXo+oRCiVw=="
|
|
||||||
},
|
|
||||||
"node_modules/tough-cookie": {
|
|
||||||
"version": "2.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
|
|
||||||
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
|
|
||||||
"dependencies": {
|
|
||||||
"psl": "^1.1.28",
|
|
||||||
"punycode": "^2.1.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/tunnel-agent": {
|
|
||||||
"version": "0.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
|
||||||
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
|
|
||||||
"dependencies": {
|
|
||||||
"safe-buffer": "^5.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/tweetnacl": {
|
|
||||||
"version": "0.14.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
|
|
||||||
"integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA=="
|
|
||||||
},
|
|
||||||
"node_modules/udx-native": {
|
|
||||||
"version": "1.5.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/udx-native/-/udx-native-1.5.3.tgz",
|
|
||||||
"integrity": "sha512-xoMrEYR5Hahsvx04w06WSc52Sq0Xe2KQtbucyixhIlg/paWN+PXN1J3Ca6h/67K9fo1kB+j8C3fAik/Jv5Q1Mg==",
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"dependencies": {
|
|
||||||
"b4a": "^1.5.0",
|
|
||||||
"events": "^3.3.0",
|
|
||||||
"napi-macros": "^2.0.0",
|
|
||||||
"node-gyp-build": "^4.4.0",
|
|
||||||
"streamx": "^2.12.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/unirest": {
|
|
||||||
"version": "0.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/unirest/-/unirest-0.6.0.tgz",
|
|
||||||
"integrity": "sha512-BdYdcYJHXACqZ53k8Zz7QlNK/1W/HjCZlmg1OaaN/oTSp4FTWh0upXGSJsG88PljDBpSrNc2R649drasUA9NEg==",
|
|
||||||
"dependencies": {
|
|
||||||
"form-data": "^0.2.0",
|
|
||||||
"mime": "^2.4.0",
|
|
||||||
"request": "^2.88.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/unordered-set": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/unordered-set/-/unordered-set-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-eUmNTPzdx+q/WvOHW0bgGYLWvWHNT3PTKEQLg0MAQhc0AHASHVHoP/9YytYd4RBVariqno/mEUhVZN98CmD7bg=="
|
|
||||||
},
|
|
||||||
"node_modules/uri-js": {
|
|
||||||
"version": "4.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
|
|
||||||
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
|
|
||||||
"dependencies": {
|
|
||||||
"punycode": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/uuid": {
|
|
||||||
"version": "3.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
|
||||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
|
||||||
"deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
|
|
||||||
"bin": {
|
|
||||||
"uuid": "bin/uuid"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/verror": {
|
|
||||||
"version": "1.10.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
|
||||||
"integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==",
|
|
||||||
"engines": [
|
|
||||||
"node >=0.6.0"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"assert-plus": "^1.0.0",
|
|
||||||
"core-util-is": "1.0.2",
|
|
||||||
"extsprintf": "^1.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/xache": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/xache/-/xache-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-RQGZDHLy/uCvnIrAvaorZH/e6Dfrtxj16iVlGjkj4KD2/G/dNXNqhk5IdSucv5nSSnDK00y8Y/2csyRdHveJ+Q=="
|
|
||||||
},
|
|
||||||
"node_modules/xsalsa20": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-FIr/DEeoHfj7ftfylnoFt3rAIRoWXpx2AoDfrT2qD2wtp7Dp+COajvs/Icb7uHqRW9m60f5iXZwdsJJO3kvb7w=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -14,9 +14,12 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"b4a": "^1.6.1",
|
"b4a": "^1.6.1",
|
||||||
|
"blessed": "^0.1.81",
|
||||||
|
"circular-json": "^0.5.9",
|
||||||
"graceful-goodbye": "^1.2.0",
|
"graceful-goodbye": "^1.2.0",
|
||||||
"hypercore-crypto": "^3.3.0",
|
"hypercore-crypto": "^3.3.0",
|
||||||
"hyperswarm": "^4.3.5",
|
"hyperswarm": "^4.3.5",
|
||||||
|
"neo-blessed": "^0.2.0",
|
||||||
"readline": "^1.3.0",
|
"readline": "^1.3.0",
|
||||||
"unirest": "^0.6.0"
|
"unirest": "^0.6.0"
|
||||||
}
|
}
|
||||||
|
351
sshChat.js
Normal file
351
sshChat.js
Normal file
@ -0,0 +1,351 @@
|
|||||||
|
// Require the needed libs
|
||||||
|
const blessed = require('neo-blessed');
|
||||||
|
const Hyperswarm = require('hyperswarm')
|
||||||
|
const crypto = require('hypercore-crypto')
|
||||||
|
const b4a = require('b4a')
|
||||||
|
const readline = require('readline')
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
// Import our commands - You must add this line.
|
||||||
|
// Otherwise there is no access to the command functions
|
||||||
|
const { login } = require('./commands/login');
|
||||||
|
const { execute } = require('./commands/exec');
|
||||||
|
const { stop } = require('./commands/stop');
|
||||||
|
const { start } = require('./commands/start');
|
||||||
|
const { restart } = require('./commands/restart');
|
||||||
|
const { stats } = require('./commands/stats');
|
||||||
|
const { changeDir } = require('./commands/cd');
|
||||||
|
const { AIRequest } = require('./commands/AI');
|
||||||
|
|
||||||
|
// Generate a random number, this is used when generating a anon name
|
||||||
|
let rand = Math.floor(Math.random() * 99999).toString();
|
||||||
|
// Storage for our clients information
|
||||||
|
let USERPWD = "/"
|
||||||
|
let DAPI_KEY
|
||||||
|
let LOGGEDIN = false
|
||||||
|
let MYKEY = []
|
||||||
|
let conns = []
|
||||||
|
let connectedUsers = [];
|
||||||
|
let USERNAME = ["anon" + rand]
|
||||||
|
let DISCORD_USERID = []
|
||||||
|
// Sleep function used when closing connections.
|
||||||
|
function sleep(ms) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(resolve, ms);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// Adding a user to a peer and user MAP to keep track of peers.
|
||||||
|
function addUser(user, peerId) {
|
||||||
|
connectedUsers.push({ name: user, peerId: peerId });
|
||||||
|
sidebarBox.setContent(connectedUsers.map(user => `${user.peerId}`).join("\n"));
|
||||||
|
screen.render();
|
||||||
|
}
|
||||||
|
// Removing a user to a peer and user MAP to keep track of peers.
|
||||||
|
// TODO: Get this to work properly
|
||||||
|
function removeUser(peerId) {
|
||||||
|
connectedUsers = connectedUsers.filter(user => user.peerId !== peerId);
|
||||||
|
sidebarBox.setContent("Peers since connection: \n" + connectedUsers.map(user => `${user.peerId}`).join("\n"));
|
||||||
|
screen.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the screen for blessed
|
||||||
|
const screen = blessed.screen({
|
||||||
|
smartCSR: true,
|
||||||
|
fastCSR: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// Quit on Escape, q, or Control-C.
|
||||||
|
screen.key(['escape', 'q', 'C-c'], function (ch, key) {
|
||||||
|
console.log("Sending close message...")
|
||||||
|
for (let conn of conns) {
|
||||||
|
conn.write(`CLOSED: ${publicKey.toString('hex')}`)
|
||||||
|
}
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
await sleep(2000)
|
||||||
|
process.exit()
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// When users press ESC, you may press t or enter to go back
|
||||||
|
// to the chat input box
|
||||||
|
screen.key(['t', 'enter'], function (ch, key) {
|
||||||
|
stdinBox.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
// When users press ESC, you may press p to go to the mainbox
|
||||||
|
// This lets users scroll the chat feed.
|
||||||
|
screen.key(['p'], function (ch, key) {
|
||||||
|
sidebarBox.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Debug ONLY - Use this to capture keypress events
|
||||||
|
// screen.on('keypress', function(ch, key){
|
||||||
|
// console.log(JSON.stringify(key));
|
||||||
|
// });
|
||||||
|
|
||||||
|
// Creating the mainbox
|
||||||
|
let mainBox = blessed.box({
|
||||||
|
parent: screen,
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
width: '80%',
|
||||||
|
height: '80%',
|
||||||
|
border: {
|
||||||
|
type: 'line'
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fg: 'white',
|
||||||
|
bg: 'black'
|
||||||
|
},
|
||||||
|
keys: true,
|
||||||
|
vi: true,
|
||||||
|
alwaysScroll: true,
|
||||||
|
scrollable: true,
|
||||||
|
scrollbar: {
|
||||||
|
style: {
|
||||||
|
bg: 'yellow'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// A function to update the mainbox scroll per message.
|
||||||
|
async function updateScroll() {
|
||||||
|
mainBox.scrollTo(mainBox.getScrollHeight());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the STDIN box for chat input and command input
|
||||||
|
const stdinBox = blessed.textbox({
|
||||||
|
bottom: '0',
|
||||||
|
left: '0',
|
||||||
|
width: '80%',
|
||||||
|
height: '21%',
|
||||||
|
border: {
|
||||||
|
type: 'line'
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fg: 'white',
|
||||||
|
bg: 'black',
|
||||||
|
border: {
|
||||||
|
fg: '#f0f0f0'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inputOnFocus: true,
|
||||||
|
input: true
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Sidebar to display all peers that have been seen
|
||||||
|
let sidebarBox = blessed.box({
|
||||||
|
parent: screen,
|
||||||
|
top: '0',
|
||||||
|
right: '0',
|
||||||
|
width: '20%',
|
||||||
|
height: '100%',
|
||||||
|
border: {
|
||||||
|
type: 'line'
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fg: 'white',
|
||||||
|
bg: 'black'
|
||||||
|
},
|
||||||
|
keys: true,
|
||||||
|
vi: true,
|
||||||
|
alwaysScroll: true,
|
||||||
|
scrollable: true,
|
||||||
|
scrollbar: {
|
||||||
|
style: {
|
||||||
|
bg: 'yellow'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Setting the sidebar label.
|
||||||
|
sidebarBox.setLabel("Peers since connection: 0")
|
||||||
|
|
||||||
|
// Replacing the console.log function with our own
|
||||||
|
// This sends all console.log events to the main window.
|
||||||
|
const originalLog = console.log;
|
||||||
|
console.log = (...args) => {
|
||||||
|
mainBox.setContent(mainBox.getContent() + `\n${args.join(' ')}`);
|
||||||
|
updateScroll()
|
||||||
|
stdinBox.clearValue();
|
||||||
|
screen.render()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generate a random public key
|
||||||
|
const publicKey = crypto.randomBytes(32)
|
||||||
|
|
||||||
|
// Create the swarm and pass in the public key
|
||||||
|
const swarm = new Hyperswarm()
|
||||||
|
|
||||||
|
// Set up our commands
|
||||||
|
const commandDir = __dirname + '/commands/';
|
||||||
|
const commandFiles = fs.readdirSync(commandDir);
|
||||||
|
|
||||||
|
const commands = {}
|
||||||
|
|
||||||
|
// For each command lets add it to a var
|
||||||
|
for (const file of commandFiles) {
|
||||||
|
const commandName = file.split(".")[0]
|
||||||
|
require(`${commandDir}/${file}`)
|
||||||
|
const command = require(`${commandDir}/${file}`);
|
||||||
|
commands[commandName] = command;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// The command handler
|
||||||
|
async function handleCommand(input) {
|
||||||
|
if (input.startsWith("!") || input.startsWith(">")) {
|
||||||
|
const command = input.split(" ")
|
||||||
|
if (!command) return consoile.log("Please either send a message or enter a command.")
|
||||||
|
switch (command[0]) {
|
||||||
|
case "!":
|
||||||
|
AIRequest(command.slice(1).join(" "))
|
||||||
|
break;
|
||||||
|
case ">cd":
|
||||||
|
USERPWD = await changeDir(command[1], USERPWD);
|
||||||
|
console.log(USERPWD)
|
||||||
|
break;
|
||||||
|
case ">stats":
|
||||||
|
stats(MYKEY[0])
|
||||||
|
break;
|
||||||
|
case ">":
|
||||||
|
execute(MYKEY[0], command.slice(1).join(" "), USERPWD, conns, USERNAME);
|
||||||
|
break;
|
||||||
|
case ">restart":
|
||||||
|
restart(MYKEY[0])
|
||||||
|
break;
|
||||||
|
case ">stop":
|
||||||
|
stop(MYKEY[0])
|
||||||
|
break;
|
||||||
|
case ">start":
|
||||||
|
start(MYKEY[0])
|
||||||
|
break;
|
||||||
|
case ">login":
|
||||||
|
login(command[1], conns, MYKEY, USERNAME, DISCORD_USERID)
|
||||||
|
break;
|
||||||
|
case ">exit":
|
||||||
|
console.log("Sending close message...")
|
||||||
|
for (let conn of conns) {
|
||||||
|
conn.write(`CLOSED: ${publicKey.toString('hex')}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
await sleep(2000)
|
||||||
|
process.exit()
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
console.log("Command not found.")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (DISCORD_USERID.length !== 0) {
|
||||||
|
for (const conn of conns)
|
||||||
|
conn.write(`${DISCORD_USERID[0]}: ${input}`)
|
||||||
|
} else {
|
||||||
|
for (const conn of conns)
|
||||||
|
conn.write(`${USERNAME}: ${input}`)
|
||||||
|
}
|
||||||
|
if (DISCORD_USERID.length !== 0) {
|
||||||
|
console.log(`${DISCORD_USERID[0]}: ${input}`)
|
||||||
|
} else {
|
||||||
|
console.log(`${USERNAME}: ${input}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
swarm.on('connection', conn => {
|
||||||
|
|
||||||
|
process.on('SIGINT', async () => {
|
||||||
|
console.log("Sending close message...")
|
||||||
|
for (let conn of conns) {
|
||||||
|
conn.write(`CLOSED: ${publicKey.toString('hex')}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
await sleep(2000)
|
||||||
|
process.exit()
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
// Remote Connection Name
|
||||||
|
const name = b4a.toString(conn.remotePublicKey, 'hex')
|
||||||
|
console.log(`* got a connection from ${name} (${USERNAME[0]}) *`)
|
||||||
|
// Add the user to the MAP
|
||||||
|
addUser(USERNAME[0], name)
|
||||||
|
// Update the sidebar
|
||||||
|
sidebarBox.setLabel("Peers since connection: " + connectedUsers.length)
|
||||||
|
// Render the changes
|
||||||
|
screen.render()
|
||||||
|
// Add the connection to the conn list
|
||||||
|
conns.push(conn)
|
||||||
|
// IF the connection is closed, remove a connection
|
||||||
|
conn.once('close', () => conns.splice(conns.indexOf(conn), 1))
|
||||||
|
|
||||||
|
// Handle data as it comes in from the peer stream
|
||||||
|
conn.on('data', data => {
|
||||||
|
// If data shows that a peer has left, lets handle it and remove their key
|
||||||
|
if (data.toString().startsWith('CLOSED:')) {
|
||||||
|
// Extract the key from the message string
|
||||||
|
const key = data.toString().split(':')[1].trim();
|
||||||
|
removeUser(key)
|
||||||
|
console.log(`Removing peer ${key}`);
|
||||||
|
|
||||||
|
// Wait 5 seconds, remove the peer from the connections
|
||||||
|
// This stops timeouts which crashes all peers.
|
||||||
|
(async () => {
|
||||||
|
await sleep(5000)
|
||||||
|
conns = conns.filter(c => c !== conn);
|
||||||
|
conn.destroy();
|
||||||
|
})();
|
||||||
|
} else {
|
||||||
|
// If there is no actions detected, update chat.
|
||||||
|
console.log(`${data}`)
|
||||||
|
}
|
||||||
|
// Use the USERNAME if it has been set, otherwise use the public key
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
swarm.on('error', (err) => {
|
||||||
|
console.log('Error connecting to peer:', err);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Join a common topic
|
||||||
|
const topic = process.argv[2] ? b4a.from(process.argv[2], 'hex') : crypto.randomBytes(32)
|
||||||
|
|
||||||
|
// Join the topic with a timeout
|
||||||
|
setTimeout(() => {
|
||||||
|
const discovery = swarm.join(topic, {
|
||||||
|
lookup: true,
|
||||||
|
announce: true,
|
||||||
|
timeout: 300000
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// The flushed promise will resolve when the topic has been fully announced to the DHT
|
||||||
|
discovery.flushed().then(() => {
|
||||||
|
mainBox.setLabel("Topic: " + b4a.toString(topic, 'hex') + " (Share to connect)")
|
||||||
|
stdinBox.setLabel("To login: >login [TOKEN] | To quit: >exit")
|
||||||
|
screen.render()
|
||||||
|
})
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
// Append the boxes to the screen
|
||||||
|
screen.append(mainBox);
|
||||||
|
screen.append(stdinBox);
|
||||||
|
screen.append(sidebarBox);
|
||||||
|
|
||||||
|
// Handle input in the stdinBox
|
||||||
|
stdinBox.on('submit', (input) => {
|
||||||
|
// handle the input here
|
||||||
|
// for example :
|
||||||
|
handleCommand(input);
|
||||||
|
// clear the input field
|
||||||
|
stdinBox.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
stdinBox.focus();
|
||||||
|
// Render the screen
|
||||||
|
screen.render()
|
200
sshChat.mjs
200
sshChat.mjs
@ -1,200 +0,0 @@
|
|||||||
|
|
||||||
import Hyperswarm from 'hyperswarm'
|
|
||||||
import goodbye from 'graceful-goodbye'
|
|
||||||
import crypto from 'hypercore-crypto'
|
|
||||||
import b4a from 'b4a'
|
|
||||||
import readline from 'readline'
|
|
||||||
import unirest from "unirest";
|
|
||||||
let rand = Math.floor(Math.random() * 99999).toString();
|
|
||||||
|
|
||||||
// Generate a random public key
|
|
||||||
const publicKey = crypto.randomBytes(32)
|
|
||||||
|
|
||||||
// Create the swarm and pass in the public key
|
|
||||||
const swarm = new Hyperswarm()
|
|
||||||
goodbye(() => swarm.destroy())
|
|
||||||
|
|
||||||
// Keep track of all connections and USERNAMEs
|
|
||||||
const conns = []
|
|
||||||
const names = {}
|
|
||||||
let DAPI_KEY = {}
|
|
||||||
let USERNAME = "annon" + rand
|
|
||||||
let LOGGEDIN = false
|
|
||||||
|
|
||||||
async function clearCursor() {
|
|
||||||
readline.moveCursor(process.stdout, 0, -2) // up one line
|
|
||||||
readline.clearLine(process.stdout, 0) // from cursor to end
|
|
||||||
readline.moveCursor(process.stdout, 0, 2) // up one line
|
|
||||||
}
|
|
||||||
|
|
||||||
// API Functions
|
|
||||||
async function getUSERNAME(key) {
|
|
||||||
let requestUSERNAME = await unirest
|
|
||||||
.get('https://api.discord-linux.com/hello')
|
|
||||||
.headers({ 'Accept': 'application/json', 'Content-Type': 'application/json', 'x-discord-linux-auth': key })
|
|
||||||
return requestUSERNAME.body.message.replace("Hello, ", "").replace("!", "")
|
|
||||||
}
|
|
||||||
|
|
||||||
async function runCMD(key, cmd, pwd){
|
|
||||||
let requestData = await unirest
|
|
||||||
.post('https://api.discord-linux.com/exec')
|
|
||||||
.headers({'Accept': 'application/json', 'Content-Type': 'application/json',
|
|
||||||
'x-discord-linux-auth': key})
|
|
||||||
.send({"cmd": cmd, "pwd": pwd})
|
|
||||||
return requestData.body.stdout
|
|
||||||
}
|
|
||||||
|
|
||||||
async function startContainer(key){
|
|
||||||
let startContainer = await unirest
|
|
||||||
.get('https://api.discord-linux.com/start')
|
|
||||||
.headers({'Accept': 'application/json', 'Content-Type': 'application/json',
|
|
||||||
'x-discord-linux-auth': key})
|
|
||||||
return startContainer.body.completed
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async function stopContainer(key){
|
|
||||||
let stopContainer = await unirest
|
|
||||||
.get('https://api.discord-linux.com/stop')
|
|
||||||
.headers({'Accept': 'application/json', 'Content-Type': 'application/json',
|
|
||||||
'x-discord-linux-auth': key})
|
|
||||||
return stopContainer.body.completed
|
|
||||||
}
|
|
||||||
|
|
||||||
async function restartContainer(key){
|
|
||||||
let restartContainer = await unirest
|
|
||||||
.get('https://api.discord-linux.com/restart')
|
|
||||||
.headers({'Accept': 'application/json', 'Content-Type': 'application/json',
|
|
||||||
'x-discord-linux-auth': key})
|
|
||||||
return restartContainer.body.completed
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getStats(key){
|
|
||||||
let getStats = await unirest
|
|
||||||
.get('https://api.discord-linux.com/restart')
|
|
||||||
.headers({'Accept': 'application/json', 'Content-Type': 'application/json',
|
|
||||||
'x-discord-linux-auth': key})
|
|
||||||
console.log(getStats.body)
|
|
||||||
return getStats.body.data
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
swarm.on('connection', conn => {
|
|
||||||
const name = b4a.toString(conn.remotePublicKey, 'hex')
|
|
||||||
console.log(`* got a connection from ${name} (${USERNAME}) *`)
|
|
||||||
conns.push(conn)
|
|
||||||
conn.once('close', () => conns.splice(conns.indexOf(conn), 1))
|
|
||||||
conn.on('data', data => {
|
|
||||||
// Use the USERNAME if it has been set, otherwise use the public key
|
|
||||||
console.log(`${data}`)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// Use readline to accept input from the user
|
|
||||||
const rl = readline.createInterface({
|
|
||||||
input: process.stdin,
|
|
||||||
output: process.stdout
|
|
||||||
})
|
|
||||||
|
|
||||||
// When the user inputs a line of text, broadcast it to all connections
|
|
||||||
rl.on('line', input => {
|
|
||||||
|
|
||||||
|
|
||||||
const signIn = input.match(/^\/login (\S+)$/)
|
|
||||||
if (signIn) {
|
|
||||||
const APIKEY = signIn[1]
|
|
||||||
DAPI_KEY = { "key": APIKEY }
|
|
||||||
getUSERNAME(APIKEY).then((data) => {
|
|
||||||
USERNAME = data
|
|
||||||
// const name = b4a.toString(publicKey, 'hex')
|
|
||||||
// names[name] = USERNAME
|
|
||||||
for (const conn of conns) {
|
|
||||||
conn.write(`${USERNAME} has logged in!`)
|
|
||||||
}
|
|
||||||
clearCursor()
|
|
||||||
console.log(`Welcome ${USERNAME} you are now logged in!`)
|
|
||||||
return LOGGEDIN = true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const execute = input.startsWith(">")
|
|
||||||
if (execute) {
|
|
||||||
let inputdata = input.split(2)
|
|
||||||
const cmdToRun = inputdata.join(" ").replace("> ", "").replace(">","")
|
|
||||||
runCMD(DAPI_KEY.key, cmdToRun, "/").then((data) => {
|
|
||||||
console.log(data)
|
|
||||||
for (const conn of conns) {
|
|
||||||
conn.write(`${USERNAME} ran ${cmdToRun}: \n` + data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const start = input.match(/^\/start (\S+)$/)
|
|
||||||
if (start) {
|
|
||||||
const cmdToRun = start[1]
|
|
||||||
startContainer(DAPI_KEY.key).then((data) => {
|
|
||||||
for (const conn of conns) {
|
|
||||||
console.log(data)
|
|
||||||
conn.write(`${USERNAME} ran start: \n` + data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const stop = input.match(/^\/stop (\S+)$/)
|
|
||||||
if (stop) {
|
|
||||||
const cmdToRun = stop[1]
|
|
||||||
stopContainer(DAPI_KEY.key).then((data) => {
|
|
||||||
for (const conn of conns) {
|
|
||||||
console.log(data)
|
|
||||||
conn.write(`${USERNAME} ran stop: \n` + data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const restart = input.match(/^\/restart (\S+)$/)
|
|
||||||
if (restart) {
|
|
||||||
const restart = restart[1]
|
|
||||||
restartContainer(DAPI_KEY.key).then((data) => {
|
|
||||||
for (const conn of conns) {
|
|
||||||
console.log(data)
|
|
||||||
conn.write(`${USERNAME} ran restart: \n` + data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const stats = input.match(/^\/stats (\S+)$/)
|
|
||||||
if (stats) {
|
|
||||||
const stats = stats[1]
|
|
||||||
getStats(DAPI_KEY.key).then((data) => {
|
|
||||||
for (const conn of conns) {
|
|
||||||
console.log(data)
|
|
||||||
conn.write(`${USERNAME} ran stats: \n` + data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
// if (!LOGGEDIN) return console.log("Please login using /login [API KEY]")
|
|
||||||
if (input.match(/^\/login (\S+)$/)) return
|
|
||||||
for (const conn of conns) {
|
|
||||||
conn.write(`${USERNAME}: ${input}`)
|
|
||||||
}
|
|
||||||
console.log(`${USERNAME}: ${input}`)
|
|
||||||
// Clear the input line\
|
|
||||||
clearCursor()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Join a common topic
|
|
||||||
const topic = process.argv[2] ? b4a.from(process.argv[2], 'hex') : crypto.randomBytes(32)
|
|
||||||
const discovery = swarm.join(topic, { client: true, server: true })
|
|
||||||
|
|
||||||
// The flushed promise will resolve when the topic has been fully announced to the DHT
|
|
||||||
discovery.flushed().then(() => {
|
|
||||||
console.log(`joined topic: ${b4a.toString(topic, 'hex')}\n(Share this key to others so they may join.)`)
|
|
||||||
console.log('You are now in a chatroom for your topic, feel free to chat.\n')
|
|
||||||
console.log('Want to login to the SSH.SURF API? Type "/login [APIKEY]" to login.')
|
|
||||||
})
|
|
Reference in New Issue
Block a user