Initial Commit

This commit is contained in:
jsrobson10 2019-03-24 17:57:54 +11:00
commit e77a48ebb8
23 changed files with 271 additions and 0 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

9
README.md Normal file
View File

@ -0,0 +1,9 @@
# chat-server
An open source chat server for the chat client
# Required software
- NodeJs
# Required libraries
- net
- fs

21
main.js Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/node
// Get some libraries
const net = require("net");
const fs = require("fs");
// Create a server
var server = net.createServer(function(socket)
{
// Send back a connected message
socket.write(JSON.stringify({connected: true}));
console.log("connected");
socket.on('data', function(data)
{
console.log("recieved: "+data);
});
});
// Listen for data
server.listen(22068, '');

1
node_modules/.bin/electron generated vendored Symbolic link
View File

@ -0,0 +1 @@
../electron/cli.js

1
node_modules/.bin/electron-download generated vendored Symbolic link
View File

@ -0,0 +1 @@
../electron-download/lib/cli.js

1
node_modules/.bin/extract-zip generated vendored Symbolic link
View File

@ -0,0 +1 @@
../extract-zip/cli.js

1
node_modules/.bin/mkdirp generated vendored Symbolic link
View File

@ -0,0 +1 @@
../mkdirp/bin/cmd.js

1
node_modules/.bin/nugget generated vendored Symbolic link
View File

@ -0,0 +1 @@
../nugget/bin.js

1
node_modules/.bin/pretty-bytes generated vendored Symbolic link
View File

@ -0,0 +1 @@
../pretty-bytes/cli.js

1
node_modules/.bin/rc generated vendored Symbolic link
View File

@ -0,0 +1 @@
../rc/cli.js

1
node_modules/.bin/semver generated vendored Symbolic link
View File

@ -0,0 +1 @@
../semver/bin/semver

1
node_modules/.bin/sshpk-conv generated vendored Symbolic link
View File

@ -0,0 +1 @@
../sshpk/bin/sshpk-conv

1
node_modules/.bin/sshpk-sign generated vendored Symbolic link
View File

@ -0,0 +1 @@
../sshpk/bin/sshpk-sign

1
node_modules/.bin/sshpk-verify generated vendored Symbolic link
View File

@ -0,0 +1 @@
../sshpk/bin/sshpk-verify

1
node_modules/.bin/strip-indent generated vendored Symbolic link
View File

@ -0,0 +1 @@
../strip-indent/cli.js

1
node_modules/.bin/uuid generated vendored Symbolic link
View File

@ -0,0 +1 @@
../uuid/bin/uuid

9
node_modules/fs/README.md generated vendored Normal file
View File

@ -0,0 +1,9 @@
# Security holding package
This package name is not currently in use, but was formerly occupied
by another package. To avoid malicious use, npm is hanging on to the
package name, but loosely, and we'll probably give it to you if you
want it.
You may adopt this package by contacting support@npmjs.com and
requesting the name.

69
node_modules/fs/package.json generated vendored Normal file
View File

@ -0,0 +1,69 @@
{
"_args": [
[
"fs",
"/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-server"
]
],
"_from": "fs@latest",
"_id": "fs@0.0.1-security",
"_inCache": true,
"_installable": true,
"_location": "/fs",
"_nodeVersion": "4.1.2",
"_npmUser": {
"email": "ernie@npmjs.com",
"name": "ehsalazar"
},
"_npmVersion": "3.10.5",
"_phantomChildren": {},
"_requested": {
"name": "fs",
"raw": "fs",
"rawSpec": "",
"scope": null,
"spec": "latest",
"type": "tag"
},
"_requiredBy": [
"#USER"
],
"_resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
"_shasum": "8a7bd37186b6dddf3813f23858b57ecaaf5e41d4",
"_shrinkwrap": null,
"_spec": "fs",
"_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-server",
"author": "",
"bugs": {
"url": "https://github.com/npm/security-holder/issues"
},
"dependencies": {},
"description": "This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "8a7bd37186b6dddf3813f23858b57ecaaf5e41d4",
"tarball": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz"
},
"homepage": "https://github.com/npm/security-holder#readme",
"keywords": [],
"license": "ISC",
"main": "index.js",
"maintainers": [
{
"name": "ehsalazar",
"email": "ernie@npmjs.com"
}
],
"name": "fs",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/security-holder.git"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "0.0.1-security"
}

19
node_modules/net/LICENSE generated vendored Normal file
View File

@ -0,0 +1,19 @@
Copyright 2011 Sleepless Software Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

0
node_modules/net/README.md generated vendored Normal file
View File

28
node_modules/net/index.js generated vendored Normal file
View File

@ -0,0 +1,28 @@
/*
Copyright 2013 Sleepless Software Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
// yes, I know this seems stupid, but I have my reasons.
var net = require("net")
for(k in net)
global[k] = net[k]

76
node_modules/net/package.json generated vendored Normal file
View File

@ -0,0 +1,76 @@
{
"_args": [
[
"net",
"/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-server"
]
],
"_from": "net@latest",
"_id": "net@1.0.2",
"_inCache": true,
"_installable": true,
"_location": "/net",
"_npmUser": {
"email": "joe@sleepless.com",
"name": "sleeplessinc"
},
"_npmVersion": "1.2.11",
"_phantomChildren": {},
"_requested": {
"name": "net",
"raw": "net",
"rawSpec": "",
"scope": null,
"spec": "latest",
"type": "tag"
},
"_requiredBy": [
"#USER"
],
"_resolved": "https://registry.npmjs.org/net/-/net-1.0.2.tgz",
"_shasum": "d1757ec9a7fb2371d83cf4755ce3e27e10829388",
"_shrinkwrap": null,
"_spec": "net",
"_where": "/mnt/c/Users/Josua/Desktop/data/nodejs/electron/chat-project/chat-server",
"author": {
"email": "joe@sleepless.com",
"name": "Joe Hitchens",
"url": "sleepless.com"
},
"bugs": {
"url": "https://github.com/sleeplessinc/net/issues"
},
"dependencies": {},
"description": "Globalizes the 'net' module functions",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "d1757ec9a7fb2371d83cf4755ce3e27e10829388",
"tarball": "https://registry.npmjs.org/net/-/net-1.0.2.tgz"
},
"homepage": "https://github.com/sleeplessinc/net#readme",
"license": {
"type": "MIT",
"url": "https://github.com/sleeplessinc/net/raw/master/LICENSE"
},
"maintainers": [
{
"name": "sleeplessinc",
"email": "joe@sleepless.com"
}
],
"name": "net",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repositories": [
{
"type": "git",
"url": "git+https://sleeplessinc@github.com/sleeplessinc/net.git"
}
],
"repository": {
"type": "git",
"url": "git+https://sleeplessinc@github.com/sleeplessinc/net.git"
},
"version": "1.0.2"
}

6
node_modules/net/test.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
var i = require("./index.js")
console.log(Socket instanceof Function)