Skip to content

Instantly share code, notes, and snippets.

@vicendominguez
Created February 4, 2014 13:26
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 vicendominguez/8803517 to your computer and use it in GitHub Desktop.
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)
#!/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