FusionInventory-Agent

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

AIX:
* minor fixes in LVM support

2.2.7  Tue, 13 Nov 2012

General:
* additional hack for LG screens (#1848)
* additional model for ACER screens hack (#1840)
* fix directory creation error handling with older File::Path versions (#1817)
* fix initial delay randomness (#1809)
* fix spurious null character in decoded strings (#1837)

Windows:
* fix missing bios release information on some machines (#1820, #1825)

2.2.6  Fri, 14 Sep 2012

Installation:
* fix installation with older MakeMaker versions
* do not generate html version of man pages
* minor fixes to dependencies list

lib/FusionInventory/Agent/Tools/License.pm  view on Meta::CPAN


    # product key available characters
    my @letters = qw(B C D F G H J K M P Q R T V W X Y 2 3 4 6 7 8 9);

    # extract relevant bytes
    my @bytes = @key_bytes[$first_byte .. $last_byte];

    # return immediatly for null keys
    return if all { $_ == 00 } @bytes;

    # decoded product key
    my @chars;

    for (my $i = $chars_length - 1; $i >= 0; $i--) {
        my $index = 0;
        for (my $j = $bytes_length - 1; $j >= 0; $j--) {
            my $value = ($index << 8) | $bytes[$j];
            $bytes[$j] = $value / scalar @letters;
            $index = $value % (scalar @letters);
        }
        $chars[$i] = $letters[$index];

lib/FusionInventory/Agent/Tools/License.pm  view on Meta::CPAN

=head2 getAdobeLicenses

Returns a structured view of Adobe license.

=head2 getAdobeLicensesWithoutSqlite

Returns a structured view of Adobe license without Sqlite.

=head2 decodeMicrosoftKey($string)

Return a decoded string from a binary binary microsoft product key (XP, office,
etc)

resources/generic/dmidecode/openbsd-3.7  view on Meta::CPAN

                External Connector Type: Other
                Port Type: USB
Handle 0x0028
        DMI type 13, 22 bytes.
        BIOS Language Information
                Installable Languages: 3
                        en|US|iso8859-1
                        fr|CA|iso8859-1
                        ja|JP|unicode
                Currently Installed Language: en|US|iso8859-1
Wrong DMI structures count: 41 announced, only 40 decoded.

t/agent/http/client/fusion/response.t  view on Meta::CPAN

# http connection tests
my ($server, $response);

$server = FusionInventory::Test::Server->new(
    port => $port,
);
my $header  = "HTTP/1.0 200 OK\r\n\r\n";
my $json_content  = '{"word":"hello"}';
my $bigkey = "a" x 128;
my $big_json_content  = '{"j":[{"c":[],"f":["'.$bigkey.'"],"a":[{"c":{"e":"xxx"}}],"u":"xxx"}],"f":{"'.$bigkey.'":{"n":"abc","p":1,"d":0,"c":0,"m":["here","there"],"x":["'.$bigkey.'"]}}}';
my $big_decoded = {
    "j" => [
        {
            "c" => [],
            "f" => [ $bigkey ],
            "a" => [
                {
                    "c" => { "e" => "xxx" }
                }
            ],
            "u" => "xxx"

t/agent/http/client/fusion/response.t  view on Meta::CPAN

subtest "big response" => sub {
    check_response_ok(
        scalar $client->send(
            url     => "http://127.0.0.1:$port/bigcontent",
            args    => {
                action    => "getConfig",
                machineid => 'foo',
                task      => {},
            }
        ),
        $big_decoded
    );
};

$server->stop();

sub check_response_ok {
    my ($response, $hash) = @_;

    plan tests => 3;
    ok(defined $response, "response from server");



( run in 0.500 second using v1.01-cache-2.11-cpan-0d8aa00de5b )