WebService::VirusTotal;
use 5.006;
use strict;
use warnings;
use Carp;
use LWP::UserAgent;
use JSON;
use Digest::SHA qw(sha1_hex sha256_hex);
use Digest::MD5 qw(md5_hex);
use List::Util qw(first);
lls the sha256 value out of the JSON response
# Note: there are many other values that could also be pulled out
my $json = JSON->new->allow_nonref;
my ($decjson, $sha, $respcode) = (undef, un
$decjson = $json->decode($results);
};
if (defined $decjson)
{
# if json->decode() fails it will call croak, so we catch it and display the returned text
$sha = $decjson->{"sha256"};