FusionInventory-Agent

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
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

151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# 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

203
204
205
206
207
208
209
210
211
212
213
214
=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

435
436
437
438
439
440
441
442
443
444
445
                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

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 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

163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
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.260 second using v1.01-cache-2.11-cpan-0d8aa00de5b )