Created
February 4, 2014 13:26
-
-
Save vicendominguez/8803517 to your computer and use it in GitHub Desktop.
you can try this to pass the challenge in varnish auth-session (for testing purposes)
This file contains hidden or 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"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment