This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# | |
# | |
# If you don't have access to: | |
# * shell | |
# * varnishadm | |
# you can try this to pass the challenge in varnish auth-session console | |
# | |
# Vicente | |
use strict; | |
use warnings; | |
use Digest::SHA qw (sha256 sha256_hex); | |
my $challenge = $ARGV[0]; | |
my $key = $ARGV[1]; | |
my $result= sha256_hex($challenge . "\n" . $key . "\n" . $challenge . "\n"); | |
print $result ."\n"; |