mirror of https://github.com/captn3m0/Scripts.git
Some more scripts
This commit is contained in:
parent
375993cdd7
commit
f9d9af87cb
|
@ -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
|
|
@ -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()
|
Loading…
Reference in New Issue