Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan DeFelippi driverdan

View GitHub Profile
@driverdan
driverdan / netgear-private-key-disclosure.md
Created Jan 20, 2020 — forked from nstarke/netgear-private-key-disclosure.md
Netgear TLS Private Key Disclosure through Device Firmware Images
View netgear-private-key-disclosure.md

Netgear Signed TLS Cert Private Key Disclosure

Overview

There are at least two valid, signed TLS certificates that are bundled with publicly available Netgear device firmware.

These certificates are trusted by browsers on all platforms, but will surely be added to revocation lists shortly.

The firmware images that contained these certificates along with their private keys were publicly available for download through Netgear's support website, without authentication; thus anyone in the world could have retrieved these keys.

@driverdan
driverdan / gist:3edf529cffa183da94a78f3dad1983ca
Created Oct 29, 2019
Git command to get single line descriptions for recent commits
View gist:3edf529cffa183da94a78f3dad1983ca
git log --oneline HEAD...previous_hash
@driverdan
driverdan / runtime_logging_level.py
Created Oct 29, 2019
Runtime logging level change
View runtime_logging_level.py
# Source: https://stackoverflow.com/a/46710435
import logging
# Set level to the logging level you want to use.
# This will typically be INFO or DEBUG.
level = logging.INFO
logger = logging.getLogger()
logger.setLevel(level)
for handler in logger.handlers:
@driverdan
driverdan / model_list.py
Last active Jan 7, 2019
List of Django models and attributes
View model_list.py
import django.apps
for model in django.apps.apps.get_models():
print(model._meta.label)
for field in model._meta.get_fields():
print(f" {field.name}")
@driverdan
driverdan / Brewfile
Last active Sep 22, 2016
My Brewfile. Top section is mostly dev tools, cask items are standard GUI apps.
View Brewfile
cask_args appdir: '/Applications'
brew 'autoconf'
brew 'automake'
brew 'awscli'
brew 'bash-completion'
brew 'ctags'
brew 'curl'
brew 'git'
brew 'go'
@driverdan
driverdan / cpu_monitor.js
Last active Aug 29, 2015
Menubar load monitor using AnyBar and node
View cpu_monitor.js
console.log('Starting...');
var dgram = require('dgram');
var os = require('os');
// Create UDP client
var client = dgram.createSocket('udp4');
// Colors to use
var good = new Buffer('green');
@driverdan
driverdan / main.js
Created Mar 6, 2015
AnyBar node example - Set random colors
View main.js
var dgram = require('dgram');
// Create UDP client
var client = dgram.createSocket('udp4');
// Define all the colors
var colors = [
'black',
'blue',
'cyan',
'green',
@driverdan
driverdan / node-xhr-example-setting-global.js
Created Sep 18, 2010
Sets global var someGlobal to XHR response
View node-xhr-example-setting-global.js
var XMLHttpRequest = require("../XMLHttpRequest").XMLHttpRequest
,xhr
,someGlobal = "foo";
console.log("someGlobal: " + someGlobal);
xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (this.readyState == 4) {