Merge commit 'fe74577'
* commit 'fe74577': Use develop mode in tox issue #429: fix sudo regression. misc: rename to scripts. tab completion!! core: Latch._wake improvements issue #498: prevent crash on double 'disconnect' signal. issue #413: don't double-propagate DEL_ROUTE to parent. issue #498: wrap Router dict mutations in a lock issue #429: enable en_US locale to unbreak debops test. issue #499: fix another mind-numbingly stupid vanilla inconsistency issue #497: do our best to cope with crap upstream code ssh: fix test to match updated log format. issue #429: update Changelog. issue #429: update Changelog. issue #429: teach sudo about every know i18n password string. issue #429: install i18n-related bits in test images. ssh: tidy up logs and stream names. tests: ensure file is closed in connection_test. gcloud: small updates tests: give ansible/gcloud/ its own requirements file.issue510
commit
b161408598
@ -0,0 +1,40 @@
|
||||
|
||||
# issue #429: tool for extracting keys out of message catalogs and turning them
|
||||
# into the big gob of base64 as used in mitogen/sudo.py
|
||||
#
|
||||
# Usage:
|
||||
# - apt-get source libpam0g
|
||||
# - cd */po/
|
||||
# - python ~/pogrep.py "Password: "
|
||||
|
||||
import sys
|
||||
import shlex
|
||||
import glob
|
||||
|
||||
|
||||
last_word = None
|
||||
|
||||
for path in glob.glob('*.po'):
|
||||
for line in open(path):
|
||||
bits = shlex.split(line, comments=True)
|
||||
if not bits:
|
||||
continue
|
||||
|
||||
word = bits[0]
|
||||
if len(bits) < 2 or not word:
|
||||
continue
|
||||
|
||||
rest = bits[1]
|
||||
if not rest:
|
||||
continue
|
||||
|
||||
if last_word == 'msgid' and word == 'msgstr':
|
||||
if last_rest == sys.argv[1]:
|
||||
thing = rest.rstrip(': ').decode('utf-8').lower().encode('utf-8').encode('base64').rstrip()
|
||||
print ' %-60s # %s' % (repr(thing)+',', path)
|
||||
|
||||
last_word = word
|
||||
last_rest = rest
|
||||
|
||||
#ag -A 1 'msgid "Password: "'|less | grep msgstr | grep -v '""'|cut -d'"' -f2|cut -d'"' -f1| tr -d :
|
||||
|
@ -0,0 +1 @@
|
||||
google-api-python-client==1.6.5
|
@ -1,7 +1,6 @@
|
||||
ansible; python_version >= '2.7'
|
||||
ansible<2.7; python_version < '2.7'
|
||||
paramiko==2.3.2 # Last 2.6-compat version.
|
||||
google-api-python-client==1.6.5
|
||||
hdrhistogram==0.6.1
|
||||
PyYAML==3.11; python_version < '2.7'
|
||||
PyYAML==3.13; python_version >= '2.7'
|
||||
|
Loading…
Reference in New Issue