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
var should = require('should'), | |
userAgentFilter = require('../../lib/userAgentFilter.js'); | |
describe("User Agent Filter logic", function(){ | |
it("should let chrome browser pass", function(done){ | |
var reqMock = {headers: {'user-agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1'}, url:'/session'}; | |
var resMock = {}; | |
userAgentFilter(reqMock, resMock, function(){ | |
true.should.equal(true); |
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
var should = require('should'), | |
userAgentFilter = require('../../lib/userAgentFilter.js'); | |
describe("User Agent Filter logic", function(){ | |
it("should let chrome browser pass", function(done){ | |
var reqMock = {headers: {'user-agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1'}, url:'/session'}; | |
var resMock = {}; | |
userAgentFilter(reqMock, resMock, function(){ | |
true.should.equal(true); |
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
Broad summary: | |
- Elections are on Sunday 5th, July. | |
- This is the first time an e-voting system is used in Buenos Aires city. | |
- Researchers and IT professionals had been warning about potential issues with the way the system works (short summary at the end). | |
- Government officials have said on-record that the machines are only "printers with no memory". There is video evidence that the machines are in fact standard PCs running Ubuntu. USB and VGA ports are located behind a lid on the side. See videos here: https://storify.com/mis2centavos/el-sistema-de-voto-electronico-usado-en-caba |
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
/* To run: | |
* mkfifo fifo | |
* node console-state.js | tee fifo | |
* Wait 2 seconds, then look for state.json in the same directory. | |
*/ | |
const fs = require('fs'); | |
const state = []; |
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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Network.Wreq | |
import qualified Text.HTML.DOM as H | |
import Text.XML | |
import Text.XML.Cursor | |
import Control.Lens hiding (element) | |
import Data.Aeson.Lens |
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
0xA86D1Ec6aC94d4dE92888cFE41C2C9fB33a89dBB |
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
0xA4074CB69fe1cf77E10EF736255AD29AD6036Bc1 |
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
const jwt = require('jsonwebtoken') | |
const forge = require('node-forge') | |
const payload = { | |
hello: 'world' | |
} | |
var keypair = forge.rsa.generateKeyPair({ bits: 2048 }); | |
keypair = { | |
public: forge.pki.publicKeyToPem(keypair.publicKey, 72), |