]> git.pld-linux.org Git - packages/djbdns.git/commitdiff
- revert, tinydns already depends on perl, sigh
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 6 Aug 2010 08:37:09 +0000 (08:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    add-sshfp.pl -> 1.3

add-sshfp.pl [new file with mode: 0644]

diff --git a/add-sshfp.pl b/add-sshfp.pl
new file mode 100644 (file)
index 0000000..07ba5a8
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+
+use strict;
+
+open IN, "ssh-keygen -f /etc/ssh/ssh_host_rsa_key.pub -r $ARGV[0] |";
+my $FP = <IN>;
+close IN;
+chop $FP;
+my ($host, $in, $sshfp, $alg, $fptype, $fp) = split " ", $FP;
+my $out = sprintf("\\%03o\\%03o", $alg, $fptype);
+for (my $i = 0; $i < length($fp); $i += 2) {
+       $out .= sprintf("\\%03o", hex substr($fp, $i, 2));
+}
+printf(":%s:44:%s:\n", $host, $out);
This page took 0.145236 seconds and 4 git commands to generate.