diff --git a/github-team-ssh-keys.sh b/github-team-ssh-keys.sh new file mode 100755 index 0000000..25ef623 --- /dev/null +++ b/github-team-ssh-keys.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# http://redsymbol.net/articles/unofficial-bash-strict-mode/ +set -euo pipefail + +curl -u "$GITHUB_USER:$GITHUB_TOKEN" https://api.github.com/teams/847073/members | jq '.[] | .login' -r > list.txt + +rm authorized_keys || true +while read USERID +do + curl https://github.com/$USERID.keys >> authorized_keys +done < list.txt + +rm list.txt \ No newline at end of file diff --git a/gnome-keyring-dumper.py b/gnome-keyring-dumper.py new file mode 100755 index 0000000..0b78bb6 --- /dev/null +++ b/gnome-keyring-dumper.py @@ -0,0 +1,27 @@ +#! /usr/bin/env python + +# this is inspired by https://bitbucket.org/kang/python-keyring-lib/issue/151/how-is-it-possible-to-list-keyrings-keys + +import secretstorage + +def hackng(): + bus = secretstorage.dbus_init() + for keyring in secretstorage.get_all_collections(bus): + for item in keyring.get_all_items(): + attr = item.get_attributes() + if attr and 'username_value' in attr: + print('[%s] %s: %s = %s' % ( + keyring.get_label(), + item.get_label(), + attr['username_value'], + item.get_secret() + )) + else: + print('[%s] %s = %s' % ( + keyring.get_label(), + item.get_label(), + item.get_secret() + )) + +if __name__ == '__main__': + hackng() \ No newline at end of file