Skip to content

Instantly share code, notes, and snippets.

View berlam's full-sized avatar

Matthias Rosenstock berlam

View GitHub Profile
@berlam
berlam / vpnc-split.sh
Created March 7, 2017 09:57
Debian VPNC split tunneling (add it to the `vpnc.conf` with the `Script` option)
#!/bin/sh
# Add one IP to the list of split tunnel
add_ip ()
{
export CISCO_SPLIT_INC_${CISCO_SPLIT_INC}_ADDR=$1
export CISCO_SPLIT_INC_${CISCO_SPLIT_INC}_MASK=255.255.255.255
export CISCO_SPLIT_INC_${CISCO_SPLIT_INC}_MASKLEN=32
export CISCO_SPLIT_INC=$(($CISCO_SPLIT_INC + 1))
}
@berlam
berlam / crypto.html
Created December 8, 2016 07:52
Browser AES
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow: hidden; height: 100%;">
<head>
<script type="text/javascript">
function sha256(str) {
var buffer = new TextEncoder("utf-8").encode(str);
return crypto.subtle.digest("SHA-256", buffer).then(function (hash) {
return hash;
});
}

Keybase proof

I hereby claim:

  • I am berlam on github.
  • I am berlam (https://keybase.io/berlam) on keybase.
  • I have a public key whose fingerprint is 2670 5ECF EC0E 268F 952C 954E 8B0B 3A7D 9DA8 9B7A

To claim this, I am signing this object:

@berlam
berlam / keepass.md
Last active March 19, 2023 14:52 — forked from ddotlic/gist:05772087c7abffe35141
KeePass file format specification (.kdb, .kdbx).

Keys

Multiple keys must be generated to get the final master key.

  1. Generate the composite key.
  2. Generate the transformed key from the composite key.
  3. Generate the master key from the transformed key.