Quantcast
Channel: Ocsinventory Q&A - Recent questions without answers
Viewing all articles
Browse latest Browse all 4604

New Plugin/Extension

$
0
0

Hello,
I made a new plugin, this is not an easy way, there is not so much documentation and I did'nt use perl and php from a long long time :)
but with exemple plugins and inspirited by some others, I think I'm close.
Agent get data, sent to server and I can see them in Miscellaneous tab: Great!
But, because there is always a but! I have 2 fields in database with an ARRAY value instead of string value, and no idea why.

here is what I have in agent log:

    <CVESCAN>
      <CVE_ID>CVE-2021-26937</CVE_ID>
      <FIXED_VERSION>4.8.0-1ubuntu0.1</FIXED_VERSION>
      <PACKAGE>screen</PACKAGE>
      <PRIORITY>medium</PRIORITY>
      <REPOSITORY>Ubuntu Archive</REPOSITORY>
    </CVESCAN>

and what I have in DB:

HARDWARE_IDCVE_ID       PRIORITYPACKAGE             FIXED_VERSION                  REPOSITORY          
1CVE-2021-26937medium ARRAY(0x55626ae70688)4.8.0-1ubuntu0.1ARRAY(0x55626ae706e8)

and the map file:
$DATA_MAP{cvescan} = {
    mask => 0,
    multi => 1,
    auto => 1,
    delOnReplace => 1,
    sortBy => 'ID',
    writeDiff => 0,
    cache => 0,
    fields => {
         CVE_ID => {},
         PRIORITY => {},
         PACKAGE => {},
         FIXED_VERSION => {},
         REPOSITORY => {},
    }
};

if someone have an idea!

the aims of this plugin is getting cve info with the Canonical tool and send the result in ocs, of course when the plugin will be functional, I will share it.

thanks for your help
Eric

 


Viewing all articles
Browse latest Browse all 4604

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>