Monthly Archives: October 2012

Encrypted store with EncFs for GPG keys

Information is gathered from: here and here.

  1. Preparation
    1. Become a member of the fuse group
      sudo adduser your_username fuse
      newgrp - fuse
    2. Create a directory for the encrypted files (on the remote storage)
    3. Create a mount point (somewhere in home)
  2. Create the encrypted system/Mount the encrypted system
    encfs folder_to_mount mount_point
  3. Use it
  4. Umount
    fusermount -u mount_point
  1. Create signing subkey
    gpg --edit-key 0xFFFFFFFF
    addkey
  2. Backup the key
    gpg --export 0xFFFFFFFF > publickey.gpg
    gog --export-secret-keys > secretkeys.gpg
    gpg --export-secret-subkeys > secretsubkeys.gpg
  3. Set the gnupg environment to the encrypted location
    export GNUPGHOME=mount_point
  4. Unset the gnupg environment
    unset GNUPGHOME
  5. Remove the private key for the master
    gpg --delete-secret-keys 0xFFFFFFFF
  6. Check that the private key is removed
    gpg --edit-key 0xFFFFFFFF
    gpg addkey

    Adding the subkey should fail
  7. Re-import the secret key
    gpg --import secretkey.gpg
  8. Send the key to the keyserver
    gpg --send-key 0xFFFFFFFF

Downloaden van alle foto’s van mijnalbum.nl

Zie http://keeshink.blogspot.nl/2008/09/fotos-downloaden-van-mijnalbumnl.html voor het oorspronkelijke artikel

 

Installeren: python-lxml

Daarna dit script draaien met als argument het album-id (kijk in http://www.mijnalbum.nl/Album=[AlbumID]U&Foto=[FotoID])

#!/usr/bin/python

import sys
from lxml import etree
from lxml import objectify
from urllib import urlopen

# pass the album id as a command line argument
album_id = sys.argv[1]
thumbs_url = 'http://www.mijnalbum.nl/index.php?m=albumview&a=2&key='
thumbs_url += album_id

parser = etree.HTMLParser()
page = urlopen(thumbs_url)
html = page.read()

htmltree  = etree.HTML(html)

for element in htmltree.xpath("body/table/tr/td[@class='thumbfoto']"):
    id = element.get('id')
    to_be_stripped = 'thumbcont-'
    foto_id = id.replace(to_be_stripped,'',1)
    foto_url = 'http://www.mijnalbum.nl/GroteFoto-'+foto_id+'.jpg'
    print foto_url

Daarna de uitvoer omleiden met xargs wget