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
DELETE: 6VQUjoo5smbnNvxtandOx0kz => {"fieldCount":0,"affectedRows":0,"insertId":0,"serverStatus":2,"warningCount":0,"message":"","protocol41":true,"changedRows":0} | |
GET / 304 1076ms | |
SEARCH: 6VQUjoo5smbnNvxtandOx0kz => [[{"sid":"6VQUjoo5smbnNvxtandOx0kz","session":{"type":"Buffer","data":[123,34,115,105,100,34,58,34,52,49,101,100,101,102,102,48,45,97,56,52,100,45,52,53,101,56,45,56,51,50,102,45,102,48,49,102,99,54,56,54,52,48,51,49,34,125]},"expires":1371139476,"agent":"ec0ff2af80b4e76fc39ddc1ab6d9899bc0371765b0ad51ead3f80574db86fbb6","ip":"f9292b96ff7d66abe0820bbe9bd022cb0abd37bd673d7b462e1bba84245a9f66","referer":"node.dev"}],{"fieldCount":0,"affectedRows":0,"insertId":0,"serverStatus":2,"warningCount":0,"message":"","protocol41":true,"changedRows":0}] | |
DELETE: bA-W_9KQYD9UwkSGfiMFyLV_ => {"fieldCount":0,"affectedRows":1,"insertId":0,"serverStatus":2,"warningCount":0,"message":"","protocol41":true,"changedRows":0} | |
DELETE: bA-W_9KQYD9UwkSGfiMFyLV_ => {"fieldCount":0,"affectedRows":0,"insertId":0,"serverStatus": |
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
#!/bin/bash | |
# requires the sshpass binary from http://en.sourceforge.jp/projects/sfnet_sshpass/releases/ | |
read -sp "Enter username: " user | |
read -sp "Enter password: " pass | |
read -sp "Enter command: " cmd | |
# define a list of machines | |
machines=array('192.168.1.10', '192.168.1.11', '192.168.1.12') |
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
#!/bin/bash | |
# VM launcher | |
# Jason Gerfen <jason.gerfen@gmail.com> | |
# Create new if asked | |
if [ "$1" == "install" ]; then | |
if [ -f "$3" ]; then | |
dd if=/dev/zero of=vm/$2 bs=516096 seek=9182 count=0 | |
qemu-system-x86_64 -m 2048 -boot d -cdrom $3 vm/$2 -net nic -net user |
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
Testing SPKAC data created with 1024 key size | |
Performing tests on SPKAC which used md4 hashing algorithm | |
Valid: true | |
Challenge: b5b36119-669a-4d9c-a2c7-0fc4aa25e2a6 | |
Public key: | |
-----BEGIN PUBLIC KEY----- | |
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDcvQh9SKOPv4DwI8LwSaFx02h7 | |
l9QCiDs6sF2GfsSTEUG61SnjQ/v4uJiLKBgbVOagj9rkSCwtTez23ATPeGaBj2Zg | |
ipv+tv5IXyqUP8ropXJQ5ELtaXPUN/gvw7cO5EbPHr/7eMhbpw8Gl+AfWxW5hLW8 | |
MGw/+AwwjHBOwong/QIDAQAB |
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 fs = require('fs') | |
var opts = { | |
host: 'node.dev', | |
port: 3000, | |
key: fs.readFileSync('certificate.key'), | |
cert: fs.readFileSync('certificate.crt'), | |
//ca: [fs.readFileSync('authority.cer')], | |
passphrase: 'password', | |
ciphers: 'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH', |
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 chai = require('chai'), | |
expect = chai.expect, | |
config = require('../config/settings'), | |
app = require('../libs/app'), | |
https = require('https'), | |
test = require('supertest') | |
describe('app.js', function(){ | |
describe('routes', function(){ |
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
# Define the encryption algo for gpg | |
algo="aes256" | |
# Define the gpg binary name (Solaris is gpg2) | |
gpg_name="gpg" | |
# Use ${gpg_name} to get full path of GPG | |
gpg=$(which ${gpg_name} 2>/dev/null) | |
# Validate GPG is installed |
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
dmesg | awk '{split($7, arr, "="); if (match(arr[2], /[0-9.]/)){print "\nHOST: " arr[2] " ================\n";system("host " arr[2]);system("whois " arr[2]);system("dig " arr[2]);}}' > log |
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
# Default path of UFW parser | |
parse_ufw=/path/to/parse-ufw.awk | |
# Default path of UFW log | |
log_ufw=/var/log/ufw.log | |
# Function for filtering outbound comms | |
function ufw_out | |
{ |
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
/* Bob's environment */ | |
var crypto = require('crypto'); | |
var rsa = require('ursa'); | |
crypto.DEFAULT_ENCODING = 'hex' | |
var dhBob = crypto.getDiffieHellman('modp18') | |
, kBob = dhBob.generateKeys() | |
, keysBob = { | |
pubKey: dhBob.getPublicKey(), |