Skip to content

Instantly share code, notes, and snippets.

Frederik B freddyb

Block or report user

Report or block freddyb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@freddyb
freddyb / keybase.md
Created Sep 25, 2017
I am freddyb on keybase, twitter, github (and more)
View keybase.md

Keybase proof

I hereby claim:

  • I am freddyb on github.
  • I am freddyb (https://keybase.io/freddyb) on keybase.
  • I have a public key whose fingerprint is 1331 4246 981D 2C81 F3B2 EEDD 8874 58AD 404E 0968

To claim this, I am signing this object:

@freddyb
freddyb / squeezebox-radio-ssh.md
Last active Jul 25, 2019
SqueezeBox Radio Default SSH Passwort
View squeezebox-radio-ssh.md

Finding the SqueezeBox Radio Default SSH Passwort

Prelude

I have a SqueezeBox Radio at home. It does a nice job of playing music from the internet and my local network. The radio is clearly a linux device and it even listens on por 22. But I don't have the password and this always bummed me. I can stream music to the radio from my local network using the logitech media server software. When migrating server hardware, I looked around what to keep and noticed an updates folder in /var/lib/squeezeboxserver. It turns out, that when the radio asks for updates, the local server is in charge of getting the update file and providing it to the radio.

View enhanced-tls.md

Enhanced TLS Security for non-HTTP protocols

Goal

The goal is to transplant the concepts of HTTP Strict Transport Security (HSTS)[^1] and Public Key Pinning Extension for HTTP[^2] to other protocols that support TLS. We aim to do those for popular internet protocols like SMTP, POP, FTP, XMPP and IRC.

Strategy

  1. Identify status codes that are currently undefined and can be safely ignored by clients that do not support them
  2. In this status code, the server SHOULD send a list of tokens to describe it's Enhanced TLS Security settings. 2.1 foo
@freddyb
freddyb / twitter_gazebo.md
Last active Aug 29, 2015
The Twitter Gazebo
View twitter_gazebo.md

The Twitter Gazebo (DRAFT)

This post has been moved to my blog

################################################################################################################

@freddyb
freddyb / anonabox-is-not-a-magic-bullet.md
Last active Aug 29, 2015
My personal notes on Anonabox and anonymity with Tor
View anonabox-is-not-a-magic-bullet.md

The master version of this document has now been moved to my blog

Anonabox is not a magic bullet!

Yesterday, a lot of mainstream media (e.g., WIRED) started reporting about anonabox, an "an open source embedded networking device designed specifically to run Tor.", to quote their Kickstarter campaign.

For those of you who don't know what Tor is: It's a network run by volunteers that anonymizes your internet traffic. With everyone in the network using someone else's address from time to time, it is becoming harder for an observer (e.g. the websites you browse) to find out who is who.

Advertisements & Social Media kill Anonymity

@freddyb
freddyb / gist:7581901
Created Nov 21, 2013
join2Async, could be easily expanded to N-size. looked useful but then didn't solve the problem. dumping here so I may use it when in need. hopefully this makes it easier to find: join queue parallel asynchronous synchronous add flush empty enqueue dequeue
View gist:7581901
/* this queue-style thing accepts a callback
and calls it when it has two results attached
usage:
j2a = new join2Async(console.log);
setTimeout( 'j2a.addResult("foo")', Math.ceil(Math.random()*10));
setTimeout( 'j2a.addResult("var")', Math.ceil(Math.random()*10));
// enjoy the race and see who's first \o/
*/
function join2Async(cb) {
// join 2 async call and return once *both* are done.
@freddyb
freddyb / merge_into_png.py
Created Jan 23, 2013
merge a file as a text-chunk into a given png, Usage: merge_into_png.py <file> <png>
View merge_into_png.py
#!/usr/bin/env python
"""
Length Chunk type Chunk data CRC
4 bytes 4 bytes Length bytes 4 bytes
89 50 4E 47 0D 0A 1A 0A
@freddyb
freddyb / cidrator.py
Created Oct 6, 2012
python iterator that returns IP addresses (as strings) for given ip/cidr string
View cidrator.py
class cidrator():
def __init__(self, mask ="192.168.1.1/16", skip255=True, skip0=True):
self.skip255 = skip255
self.skip0 = skip0
addr, rng = mask.split("/")
addr_int = sum((256**(3-i) * int(b)) for i,b in enumerate(addr.split (".")))
self.start = addr_int & int("0b"+("1"*int(rng)) + "0"*(32-int(rng)),2)
self.stop = addr_int | int("0b"+("0"*int(rng)) + "1"*(32-int(rng)),2)
self.current = self.start
@freddyb
freddyb / pickle_compiler.py
Created Aug 15, 2012
compile arbitrary python source code into pickle format. will execute on unpickling
View pickle_compiler.py
## Frederik Braun, Jun 2011
## Contact: <fb(AT)frederik-braun.com>
## Licence: WTFPL
## Python 2.7x
try:
import cPickle as pickle
except ImportError:
import pickle
You can’t perform that action at this time.