Detect-It-Easy/db/Binary/format_OpenSSH.1.sg
2026-04-18 09:09:23 +02:00

20 lines
No EOL
530 B
JavaScript

// Detect It Easy: detection rule file
// Author: BJNFNE <bjnfne@web.de>
// https://www.openssh.com/
meta("format", "OpenSSH");
function detect() {
if (Binary.compare("2d2d2d2d2d424547494e20'OPENSSH PRIVATE KEY'2d2d2d2d2d")) {
sOptions = "Private Key";
bDetected = true;
} else if (Binary.compare("'ssh-ed25519'20")) {
sOptions = "ed25519";
bDetected = true;
} else if (Binary.compare("'ssh-rsa'20")) {
sOptions = "RSA";
bDetected = true;
}
return result();
}