[dns/SSHFP] Ajout des clef ecdsa et de l'algorithm de hash sha256 pour SSHFP (cf rfc6594)
This commit is contained in:
parent
1b44f5357d
commit
0587b59de9
3 changed files with 14 additions and 4 deletions
|
@ -31,8 +31,11 @@ def ip4_addresses():
|
|||
def ssh_keyscan(host,algo):
|
||||
p=subprocess.Popen(["/usr/bin/ssh-keyscan", "-t", "%s" % algo,"%s" % host],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
ret=p.communicate()[0].split()
|
||||
key=ret[2]
|
||||
return key
|
||||
if len(ret)>2:
|
||||
key=ret[2]
|
||||
return key
|
||||
else:
|
||||
sys.stderr.write("No key for algo %s used by host %s\n" % (algo, host))
|
||||
|
||||
def ssh_md5_hash(path):
|
||||
key=base64.b64decode(open(path).read().split()[1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue