Skip to content

Instantly share code, notes, and snippets.

@epixoip
Last active June 15, 2019 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epixoip/2eb8866adf1b34c4fac01850b580b0cb to your computer and use it in GitHub Desktop.
Save epixoip/2eb8866adf1b34c4fac01850b580b0cb to your computer and use it in GitHub Desktop.
Oracle Transportation Management reference hash implementation
#!/usr/bin/env perl
# Oracle Transportation Management reference hash implementation
# Fri 14 Jun 2019 11:02:08 PM CDT, jgosney@terahash.com
use strict;
use warnings;
use Crypt::Digest::SHA256 qw(sha256);
use MIME::Base64;
my $iterations = 1000;
my $password = "hashcat";
my $salt = "1234567890";
my $hash = sha256($salt.$password);
for (my $i = 1; $i < $iterations; $i++) {
$hash = sha256($hash)
}
chomp($hash = encode_base64($hash));
printf("otm_sha256:%d:%s:%s\n", $iterations, $salt, $hash);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment