Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Index.html | |
<div> | |
<h1>File upload</h1> | |
<input type="file" multiple onChange={e => uploadFile(e)}/> | |
</div> | |
// Index.js | |
const uploadFile = async e => { | |
const files = e.target.files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VERY IMPORTANT! After each kernel update or dkms rebuild the modules must be signed again with the script | |
# ~/.ssl/sign-all-modules.sh | |
# Place all files in ~/.ssl folder | |
mkdir ~/.ssl | |
cd ~/.ssl | |
# Generate custom keys with openssl | |
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -subj "/CN=Owner/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"filebeat-6.2.3-2018.06.05": { | |
"mappings": { | |
"doc": { | |
"_meta": { | |
"version": "6.2.3" | |
}, | |
"dynamic_templates": [ | |
{ | |
"fields": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const crypto = require('crypto'); | |
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bytes (32 characters) | |
const IV_LENGTH = 16; // For AES, this is always 16 | |
function encrypt(text) { | |
let iv = crypto.randomBytes(IV_LENGTH); | |
let cipher = crypto.createCipheriv('aes-256-cbc', new Buffer(ENCRYPTION_KEY), iv); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* I used this web page as a basis: http://www.chovy.com/web-development/self-signed-certs-with-secure-websockets-in-node-js/ | |
1. I created the key and cert using the instructions. | |
2. I created a modified secure websocket server - included below | |
3. I created a simplified Scratch extension - included below. | |
4. I added the cert to firefox using the instructions in the article for Chrome. This worked | |
5. I tried to add the cert to chrome by accessing https://0.0.0.0:1234, but this brought me to a search page. | |
6. I then created a pkc12 cert and used the settings to add it to chrome, but could not get a wss connection. | |
Bottom line - I got Firefox to work, but not chrome |