HEX
Server: Apache/2.4.54 (Unix) OpenSSL/1.0.2k-fips
System: Linux f17.eelserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
User: zulfiqar (1155)
PHP: 8.2.0
Disabled: mail, exec, system, popen, proc_open, shell_exec, passthru, show_source
Upload Files
File: //usr/lib64/perl5/vendor_perl/Razor2/Engine/VR8.pm
package Razor2::Engine::VR8;
use Razor2::Signature::Whiplash;
use Razor2::String qw(hextobase64);
use Data::Dumper;

sub new {

    my ( $class, %args ) = @_;

    my $self = bless {
        description     => 'whiplash',
        has_greet_param => 0,
        whiplash        => new Razor2::Signature::Whiplash,
        rm              => $args{RM},
    }, $class;

    die unless $self;

    return $self;

}

sub signature {

    my ( $self, $text ) = @_;
    my ( $sigs, $meta ) = $self->{whiplash}->whiplash($$text);

    my @sigs_to_return;
    return unless $sigs;

    if ( scalar @$sigs ) {
        for (@$sigs) {
            push @sigs_to_return, hextobase64($_);
        }
    }
    else {
        return;
    }

    return \@sigs_to_return;

}

1;