RSA指紋PGPワード

RSA指紋PGPワード

私のSSH RSAキーフィンガープリントを表示できるプログラムはありますか?

43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8

〜のようにPGPワード


2012年10月16日に追加:

私は自分のコードを書くことにしました。 PGPの単語が見つかりました。ウィキペディア。ただし、一部の単語は大文字で表示され、他の単語は大文字で表示されません。太田ですか、それともそのまま使うべきですか?

答え1

以下は、指紋を最初の引数として受け入れ、pgp単語を印刷するPythonスクリプトです。

import sys
conv = {
'00': ['aardvark', 'adroitness'], '01': ['absurd', 'adviser'],
'02': ['accrue', 'aftermath'], '03': ['acme', 'aggregate'],
'04': ['adrift', 'alkali'], '05': ['adult', 'almighty'],
'06': ['afflict', 'amulet'], '07': ['ahead', 'amusement'],
'08': ['aimless', 'antenna'], '09': ['Algol', 'applicant'],
'0A': ['allow', 'Apollo'], '0B': ['alone', 'armistice'],
'0C': ['ammo', 'article'], '0D': ['ancient', 'asteroid'],
'0E': ['apple', 'Atlantic'], '0F': ['artist', 'atmosphere'],
'10': ['assume', 'autopsy'], '11': ['Athens', 'Babylon'],
'12': ['atlas', 'backwater'], '13': ['Aztec', 'barbecue'],
'14': ['baboon', 'belowground'], '15': ['backfield', 'bifocals'],
'16': ['backward', 'bodyguard'], '17': ['banjo', 'bookseller'],
'18': ['beaming', 'borderline'], '19': ['bedlamp', 'bottomless'],
'1A': ['beehive', 'Bradbury'], '1B': ['beeswax', 'bravado'],
'1C': ['befriend', 'Brazilian'], '1D': ['Belfast', 'breakaway'],
'1E': ['berserk', 'Burlington'], '1F': ['billiard', 'businessman'],
'20': ['bison', 'butterfat'], '21': ['blackjack', 'Camelot'],
'22': ['blockade', 'candidate'], '23': ['blowtorch', 'cannonball'],
'24': ['bluebird', 'Capricorn'], '25': ['bombast', 'caravan'],
'26': ['bookshelf', 'caretaker'], '27': ['brackish', 'celebrate'],
'28': ['breadline', 'cellulose'], '29': ['breakup', 'certify'],
'2A': ['brickyard', 'chambermaid'], '2B': ['briefcase', 'Cherokee'],
'2C': ['Burbank', 'Chicago'], '2D': ['button', 'clergyman'],
'2E': ['buzzard', 'coherence'], '2F': ['cement', 'combustion'],
'30': ['chairlift', 'commando'], '31': ['chatter', 'company'],
'32': ['checkup', 'component'], '33': ['chisel', 'concurrent'],
'34': ['choking', 'confidence'], '35': ['chopper', 'conformist'],
'36': ['Christmas', 'congregate'], '37': ['clamshell', 'consensus'],
'38': ['classic', 'consulting'], '39': ['classroom', 'corporate'],
'3A': ['cleanup', 'corrosion'], '3B': ['clockwork', 'councilman'],
'3C': ['cobra', 'crossover'], '3D': ['commence', 'crucifix'],
'3E': ['concert', 'cumbersome'], '3F': ['cowbell', 'customer'],
'40': ['crackdown', 'Dakota'], '41': ['cranky', 'decadence'],
'42': ['crowfoot', 'December'], '43': ['crucial', 'decimal'],
'44': ['crumpled', 'designing'], '45': ['crusade', 'detector'],
'46': ['cubic', 'detergent'], '47': ['dashboard', 'determine'],
'48': ['deadbolt', 'dictator'], '49': ['deckhand', 'dinosaur'],
'4A': ['dogsled', 'direction'], '4B': ['dragnet', 'disable'],
'4C': ['drainage', 'disbelief'], '4D': ['dreadful', 'disruptive'],
'4E': ['drifter', 'distortion'], '4F': ['dropper', 'document'],
'50': ['drumbeat', 'embezzle'], '51': ['drunken', 'enchanting'],
'52': ['Dupont', 'enrollment'], '53': ['dwelling', 'enterprise'],
'54': ['eating', 'equation'], '55': ['edict', 'equipment'],
'56': ['egghead', 'escapade'], '57': ['eightball', 'Eskimo'],
'58': ['endorse', 'everyday'], '59': ['endow', 'examine'],
'5A': ['enlist', 'existence'], '5B': ['erase', 'exodus'],
'5C': ['escape', 'fascinate'], '5D': ['exceed', 'filament'],
'5E': ['eyeglass', 'finicky'], '5F': ['eyetooth', 'forever'],
'60': ['facial', 'fortitude'], '61': ['fallout', 'frequency'],
'62': ['flagpole', 'gadgetry'], '63': ['flatfoot', 'Galveston'],
'64': ['flytrap', 'getaway'], '65': ['fracture', 'glossary'],
'66': ['framework', 'gossamer'], '67': ['freedom', 'graduate'],
'68': ['frighten', 'gravity'], '69': ['gazelle', 'guitarist'],
'6A': ['Geiger', 'hamburger'], '6B': ['glitter', 'Hamilton'],
'6C': ['glucose', 'handiwork'], '6D': ['goggles', 'hazardous'],
'6E': ['goldfish', 'headwaters'], '6F': ['gremlin', 'hemisphere'],
'70': ['guidance', 'hesitate'], '71': ['hamlet', 'hideaway'],
'72': ['highchair', 'holiness'], '73': ['hockey', 'hurricane'],
'74': ['indoors', 'hydraulic'], '75': ['indulge', 'impartial'],
'76': ['inverse', 'impetus'], '77': ['involve', 'inception'],
'78': ['island', 'indigo'], '79': ['jawbone', 'inertia'],
'7A': ['keyboard', 'infancy'], '7B': ['kickoff', 'inferno'],
'7C': ['kiwi', 'informant'], '7D': ['klaxon', 'insincere'],
'7E': ['locale', 'insurgent'], '7F': ['lockup', 'integrate'],
'80': ['merit', 'intention'], '81': ['minnow', 'inventive'],
'82': ['miser', 'Istanbul'], '83': ['Mohawk', 'Jamaica'],
'84': ['mural', 'Jupiter'], '85': ['music', 'leprosy'],
'86': ['necklace', 'letterhead'], '87': ['Neptune', 'liberty'],
'88': ['newborn', 'maritime'], '89': ['nightbird', 'matchmaker'],
'8A': ['Oakland', 'maverick'], '8B': ['obtuse', 'Medusa'],
'8C': ['offload', 'megaton'], '8D': ['optic', 'microscope'],
'8E': ['orca', 'microwave'], '8F': ['payday', 'midsummer'],
'90': ['peachy', 'millionaire'], '91': ['pheasant', 'miracle'],
'92': ['physique', 'misnomer'], '93': ['playhouse', 'molasses'],
'94': ['Pluto', 'molecule'], '95': ['preclude', 'Montana'],
'96': ['prefer', 'monument'], '97': ['preshrunk', 'mosquito'],
'98': ['printer', 'narrative'], '99': ['prowler', 'nebula'],
'9A': ['pupil', 'newsletter'], '9B': ['puppy', 'Norwegian'],
'9C': ['python', 'October'], '9D': ['quadrant', 'Ohio'],
'9E': ['quiver', 'onlooker'], '9F': ['quota', 'opulent'],
'A0': ['ragtime', 'Orlando'], 'A1': ['ratchet', 'outfielder'],
'A2': ['rebirth', 'Pacific'], 'A3': ['reform', 'pandemic'],
'A4': ['regain', 'Pandora'], 'A5': ['reindeer', 'paperweight'],
'A6': ['rematch', 'paragon'], 'A7': ['repay', 'paragraph'],
'A8': ['retouch', 'paramount'], 'A9': ['revenge', 'passenger'],
'AA': ['reward', 'pedigree'], 'AB': ['rhythm', 'Pegasus'],
'AC': ['ribcage', 'penetrate'], 'AD': ['ringbolt', 'perceptive'],
'AE': ['robust', 'performance'], 'AF': ['rocker', 'pharmacy'],
'B0': ['ruffled', 'phonetic'], 'B1': ['sailboat', 'photograph'],
'B2': ['sawdust', 'pioneer'], 'B3': ['scallion', 'pocketful'],
'B4': ['scenic', 'politeness'], 'B5': ['scorecard', 'positive'],
'B6': ['Scotland', 'potato'], 'B7': ['seabird', 'processor'],
'B8': ['select', 'provincial'], 'B9': ['sentence', 'proximate'],
'BA': ['shadow', 'puberty'], 'BB': ['shamrock', 'publisher'],
'BC': ['showgirl', 'pyramid'], 'BD': ['skullcap', 'quantity'],
'BE': ['skydive', 'racketeer'], 'BF': ['slingshot', 'rebellion'],
'C0': ['slowdown', 'recipe'], 'C1': ['snapline', 'recover'],
'C2': ['snapshot', 'repellent'], 'C3': ['snowcap', 'replica'],
'C4': ['snowslide', 'reproduce'], 'C5': ['solo', 'resistor'],
'C6': ['southward', 'responsive'], 'C7': ['soybean', 'retraction'],
'C8': ['spaniel', 'retrieval'], 'C9': ['spearhead', 'retrospect'],
'CA': ['spellbind', 'revenue'], 'CB': ['spheroid', 'revival'],
'CC': ['spigot', 'revolver'], 'CD': ['spindle', 'sandalwood'],
'CE': ['spyglass', 'sardonic'], 'CF': ['stagehand', 'Saturday'],
'D0': ['stagnate', 'savagery'], 'D1': ['stairway', 'scavenger'],
'D2': ['standard', 'sensation'], 'D3': ['stapler', 'sociable'],
'D4': ['steamship', 'souvenir'], 'D5': ['sterling', 'specialist'],
'D6': ['stockman', 'speculate'], 'D7': ['stopwatch', 'stethoscope'],
'D8': ['stormy', 'stupendous'], 'D9': ['sugar', 'supportive'],
'DA': ['surmount', 'surrender'], 'DB': ['suspense', 'suspicious'],
'DC': ['sweatband', 'sympathy'], 'DD': ['swelter', 'tambourine'],
'DE': ['tactics', 'telephone'], 'DF': ['talon', 'therapist'],
'E0': ['tapeworm', 'tobacco'], 'E1': ['tempest', 'tolerance'],
'E2': ['tiger', 'tomorrow'], 'E3': ['tissue', 'torpedo'],
'E4': ['tonic', 'tradition'], 'E5': ['topmost', 'travesty'],
'E6': ['tracker', 'trombonist'], 'E7': ['transit', 'truncated'],
'E8': ['trauma', 'typewriter'], 'E9': ['treadmill', 'ultimate'],
'EA': ['Trojan', 'undaunted'], 'EB': ['trouble', 'underfoot'],
'EC': ['tumor', 'unicorn'], 'ED': ['tunnel', 'unify'],
'EE': ['tycoon', 'universe'], 'EF': ['uncut', 'unravel'],
'F0': ['unearth', 'upcoming'], 'F1': ['unwind', 'vacancy'],
'F2': ['uproot', 'vagabond'], 'F3': ['upset', 'vertigo'],
'F4': ['upshot', 'Virginia'], 'F5': ['vapor', 'visitor'],
'F6': ['village', 'vocalist'], 'F7': ['virus', 'voyager'],
'F8': ['Vulcan', 'warranty'], 'F9': ['waffle', 'Waterloo'],
'FA': ['wallet', 'whimsical'], 'FB': ['watchword', 'Wichita'],
'FC': ['wayside', 'Wilmington'], 'FD': ['willow', 'Wyoming'],
'FE': ['woodlark', 'yesteryear'], 'FF': ['Zulu', 'Yucatan'],
}

for c,i in enumerate(sys.argv[1].upper().split(':')):
  print conv[i][c%2] 

答え2

20131029:今開いていますフラッグハブ

私のソリューション。まだ作業中です。どんなヒントでも役に立ちます。すべての承認を受けたら、それをgitに公開する予定です。コマンドcatラインとstdin

ssh-keygen -lf ~/.ssh/known_hosts | pgpWords.py

pgpWords.py 1:2:3

pgpWords.py 1:2またはpgpWords.py 1::1動作しません。また、シェルでジョブを自動化できるように、通常の戻りコード出力を提供する予定です。確認戻りコードの使用echo $?

#! /usr/bin/python3.2
import sys
import re
import fileinput

def getPGPWords(givenString):
    pgpWords=[['aardvark','adroitness'],['absurd','adviser'],['accrue','aftermath'],['acme','aggregate'],['adrift','alkali'],['adult','almighty'],['afflict','amulet'],['ahead','amusement'],['aimless','antenna'],['Algol','applicant'],['allow','Apollo'],['alone','armistice'],['ammo','article'],['ancient','asteroid'],['apple','Atlantic'],['artist','atmosphere'],['assume','autopsy'],['Athens','Babylon'],['atlas','backwater'],['Aztec','barbecue'],['baboon','belowground'],['backfield','bifocals'],['backward','bodyguard'],['banjo','bookseller'],['beaming','borderline'],['bedlamp','bottomless'],['beehive','Bradbury'],['beeswax','bravado'],['befriend','Brazilian'],['Belfast','breakaway'],['berserk','Burlington'],['billiard','businessman'],['bison','butterfat'],['blackjack','Camelot'],['blockade','candidate'],['blowtorch','cannonball'],['bluebird','Capricorn'],['bombast','caravan'],['bookshelf','caretaker'],['brackish','celebrate'],['breadline','cellulose'],['breakup','certify'],['brickyard','chambermaid'],['briefcase','Cherokee'],['Burbank','Chicago'],['button','clergyman'],['buzzard','coherence'],['cement','combustion'],['chairlift','commando'],['chatter','company'],['checkup','component'],['chisel','concurrent'],['choking','confidence'],['chopper','conformist'],['Christmas','congregate'],['clamshell','consensus'],['classic','consulting'],['classroom','corporate'],['cleanup','corrosion'],['clockwork','councilman'],['cobra','crossover'],['commence','crucifix'],['concert','cumbersome'],['cowbell','customer'],['crackdown','Dakota'],['cranky','decadence'],['crowfoot','December'],['crucial','decimal'],['crumpled','designing'],['crusade','detector'],['cubic','detergent'],['dashboard','determine'],['deadbolt','dictator'],['deckhand','dinosaur'],['dogsled','direction'],['dragnet','disable'],['drainage','disbelief'],['dreadful','disruptive'],['drifter','distortion'],['dropper','document'],['drumbeat','embezzle'],['drunken','enchanting'],['Dupont','enrollment'],['dwelling','enterprise'],['eating','equation'],['edict','equipment'],['egghead','escapade'],['eightball','Eskimo'],['endorse','everyday'],['endow','examine'],['enlist','existence'],['erase','exodus'],['escape','fascinate'],['exceed','filament'],['eyeglass','finicky'],['eyetooth','forever'],['facial','fortitude'],['fallout','frequency'],['flagpole','gadgetry'],['flatfoot','Galveston'],['flytrap','getaway'],['fracture','glossary'],['framework','gossamer'],['freedom','graduate'],['frighten','gravity'],['gazelle','guitarist'],['Geiger','hamburger'],['glitter','Hamilton'],['glucose','handiwork'],['goggles','hazardous'],['goldfish','headwaters'],['gremlin','hemisphere'],['guidance','hesitate'],['hamlet','hideaway'],['highchair','holiness'],['hockey','hurricane'],['indoors','hydraulic'],['indulge','impartial'],['inverse','impetus'],['involve','inception'],['island','indigo'],['jawbone','inertia'],['keyboard','infancy'],['kickoff','inferno'],['kiwi','informant'],['klaxon','insincere'],['locale','insurgent'],['lockup','integrate'],['merit','intention'],['minnow','inventive'],['miser','Istanbul'],['Mohawk','Jamaica'],['mural','Jupiter'],['music','leprosy'],['necklace','letterhead'],['Neptune','liberty'],['newborn','maritime'],['nightbird','matchmaker'],['Oakland','maverick'],['obtuse','Medusa'],['offload','megaton'],['optic','microscope'],['orca','microwave'],['payday','midsummer'],['peachy','millionaire'],['pheasant','miracle'],['physique','misnomer'],['playhouse','molasses'],['Pluto','molecule'],['preclude','Montana'],['prefer','monument'],['preshrunk','mosquito'],['printer','narrative'],['prowler','nebula'],['pupil','newsletter'],['puppy','Norwegian'],['python','October'],['quadrant','Ohio'],['quiver','onlooker'],['quota','opulent'],['ragtime','Orlando'],['ratchet','outfielder'],['rebirth','Pacific'],['reform','pandemic'],['regain','Pandora'],['reindeer','paperweight'],['rematch','paragon'],['repay','paragraph'],['retouch','paramount'],['revenge','passenger'],['reward','pedigree'],['rhythm','Pegasus'],['ribcage','penetrate'],['ringbolt','perceptive'],['robust','performance'],['rocker','pharmacy'],['ruffled','phonetic'],['sailboat','photograph'],['sawdust','pioneer'],['scallion','pocketful'],['scenic','politeness'],['scorecard','positive'],['Scotland','potato'],['seabird','processor'],['select','provincial'],['sentence','proximate'],['shadow','puberty'],['shamrock','publisher'],['showgirl','pyramid'],['skullcap','quantity'],['skydive','racketeer'],['slingshot','rebellion'],['slowdown','recipe'],['snapline','recover'],['snapshot','repellent'],['snowcap','replica'],['snowslide','reproduce'],['solo','resistor'],['southward','responsive'],['soybean','retraction'],['spaniel','retrieval'],['spearhead','retrospect'],['spellbind','revenue'],['spheroid','revival'],['spigot','revolver'],['spindle','sandalwood'],['spyglass','sardonic'],['stagehand','Saturday'],['stagnate','savagery'],['stairway','scavenger'],['standard','sensation'],['stapler','sociable'],['steamship','souvenir'],['sterling','specialist'],['stockman','speculate'],['stopwatch','stethoscope'],['stormy','stupendous'],['sugar','supportive'],['surmount','surrender'],['suspense','suspicious'],['sweatband','sympathy'],['swelter','tambourine'],['tactics','telephone'],['talon','therapist'],['tapeworm','tobacco'],['tempest','tolerance'],['tiger','tomorrow'],['tissue','torpedo'],['tonic','tradition'],['topmost','travesty'],['tracker','trombonist'],['transit','truncated'],['trauma','typewriter'],['treadmill','ultimate'],['Trojan','undaunted'],['trouble','underfoot'],['tumor','unicorn'],['tunnel','unify'],['tycoon','universe'],['uncut','unravel'],['unearth','upcoming'],['unwind','vacancy'],['uproot','vagabond'],['upset','vertigo'],['upshot','Virginia'],['vapor','visitor'],['village','vocalist'],['virus','voyager'],['Vulcan','warranty'],['waffle','Waterloo'],['wallet','whimsical'],['watchword','Wichita'],['wayside','Wilmington'],['willow','Wyoming'],['woodlark','yesteryear'],['Zulu','Yucatan']];
    matchedHexString=re.findall('[0-9a-fA-F]+:.*:[0-9a-fA-F]+',givenString);
    if (len(matchedHexString)>0):
        numStr=matchedHexString[0].split(':');
        try:
            PGPWordsString='';
            i=1;
            for hexNum in numStr:
                PGPWordsString=PGPWordsString+' '+pgpWords[int(hexNum,16)][i%2];
                i=i+1;
            PGPWordsString=PGPWordsString.strip();
        except:
            PGPWordsString=-2;
        return PGPWordsString;
    else:
        return -1;

def main():
    if (len(sys.argv)>1):
        pgpWords=getPGPWords(sys.argv[1]);
    else:
        for line in fileinput.input():
            pgpWords=getPGPWords(line);
    if (isinstance(pgpWords, int)):
        return pgpWords;
    else:
        print (pgpWords)
        return 0;

if __name__ == "__main__":
    r=main()
    sys.exit(r)

関連情報