[Openvas-commits] r11631 - in trunk/openvas-plugins: . scripts

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Sep 19 11:59:29 CEST 2011


Author: hdoreau
Date: 2011-09-19 11:56:25 +0200 (Mon, 19 Sep 2011)
New Revision: 11631

Modified:
   trunk/openvas-plugins/ChangeLog
   trunk/openvas-plugins/scripts/AfterLogic_WebMail_Pro_detect.nasl
   trunk/openvas-plugins/scripts/FormMail_detect.nasl
   trunk/openvas-plugins/scripts/FreeWebShop_detect.nasl
   trunk/openvas-plugins/scripts/GlassFish_detect.nasl
   trunk/openvas-plugins/scripts/JBoss_enterprise_aplication_server_detect.nasl
   trunk/openvas-plugins/scripts/OpenX_detect.nasl
   trunk/openvas-plugins/scripts/PowerPhlogger_detect.nasl
   trunk/openvas-plugins/scripts/TinyPHPForum_detect.nasl
   trunk/openvas-plugins/scripts/TinyWebGallery_detect.nasl
   trunk/openvas-plugins/scripts/TorrentTrader_detect.nasl
   trunk/openvas-plugins/scripts/X.nasl
   trunk/openvas-plugins/scripts/aas_detect.nasl
   trunk/openvas-plugins/scripts/adaptbb_detect.nasl
   trunk/openvas-plugins/scripts/amanda_version.nasl
   trunk/openvas-plugins/scripts/atmail_detect.nasl
   trunk/openvas-plugins/scripts/axigen_web_detect.nasl
   trunk/openvas-plugins/scripts/barracuda_im_firewall_detect.nasl
   trunk/openvas-plugins/scripts/base_detect.nasl
   trunk/openvas-plugins/scripts/basilix_detect.nasl
   trunk/openvas-plugins/scripts/bloofoxCMS_detect.nasl
   trunk/openvas-plugins/scripts/bugzilla_detect.nasl
   trunk/openvas-plugins/scripts/cacti_detect.nasl
   trunk/openvas-plugins/scripts/checkpoint-vpn1-pat-information-disclosure.nasl
   trunk/openvas-plugins/scripts/chora_detect.nasl
   trunk/openvas-plugins/scripts/cisco_vpn_client_detect.nasl
   trunk/openvas-plugins/scripts/coppermine_detect.nasl
   trunk/openvas-plugins/scripts/cpe.inc
   trunk/openvas-plugins/scripts/cutenews_detect.nasl
   trunk/openvas-plugins/scripts/cvspserver_version.nasl
   trunk/openvas-plugins/scripts/cvstrac_detect.nasl
   trunk/openvas-plugins/scripts/cyrus_imap_prelogin_overflow.nasl
   trunk/openvas-plugins/scripts/deluxeBB_detect.nasl
   trunk/openvas-plugins/scripts/dnsmasq_version.nasl
   trunk/openvas-plugins/scripts/dokeos_detect.nasl
   trunk/openvas-plugins/scripts/domino_default_db.nasl
   trunk/openvas-plugins/scripts/drupal_detect.nasl
   trunk/openvas-plugins/scripts/e107_detect.nasl
   trunk/openvas-plugins/scripts/ePo_detect.nasl
   trunk/openvas-plugins/scripts/eggdrop_detect.nasl
   trunk/openvas-plugins/scripts/eliteCMS_detect.nasl
   trunk/openvas-plugins/scripts/family_connections_detect.nasl
   trunk/openvas-plugins/scripts/find_service2.nasl
   trunk/openvas-plugins/scripts/firestats_detect.nasl
   trunk/openvas-plugins/scripts/flatpress_detect.nasl
   trunk/openvas-plugins/scripts/freznoshop_detect.nasl
   trunk/openvas-plugins/scripts/gb_2532gigs_detect.nasl
   trunk/openvas-plugins/scripts/gb_7zip_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_adobe_captivate_detect.nasl
   trunk/openvas-plugins/scripts/gb_adobe_flash_player_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_adobe_flash_player_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_adobe_fms_detect.nasl
   trunk/openvas-plugins/scripts/gb_adobe_photoshop_detect.nasl
   trunk/openvas-plugins/scripts/gb_adobe_prdts_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_adobe_robohelp_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_aimp_detect.nasl
   trunk/openvas-plugins/scripts/gb_ajaxportal_detect.nasl
   trunk/openvas-plugins/scripts/gb_alleycode_html_editor_detect.nasl
   trunk/openvas-plugins/scripts/gb_an_guestbook_detect.nasl
   trunk/openvas-plugins/scripts/gb_aol_detect.nasl
   trunk/openvas-plugins/scripts/gb_apache_apr_detect.nasl
   trunk/openvas-plugins/scripts/gb_apache_mod_jk_detect.nasl
   trunk/openvas-plugins/scripts/gb_apache_roller_detect.nasl
   trunk/openvas-plugins/scripts/gb_apache_struts_detect.nasl
   trunk/openvas-plugins/scripts/gb_apache_tomcat_detect.nasl
   trunk/openvas-plugins/scripts/gb_arcavir_av_prdts_detect.nasl
   trunk/openvas-plugins/scripts/gb_aria2_detect.nasl
   trunk/openvas-plugins/scripts/gb_avant_browser_detect.nasl
   trunk/openvas-plugins/scripts/gb_avast_av_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_avast_av_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_avg_av_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_backuppc_detect.nasl
   trunk/openvas-plugins/scripts/gb_baofeng_storm_detect.nasl
   trunk/openvas-plugins/scripts/gb_barcode_detect.nasl
   trunk/openvas-plugins/scripts/gb_becky_internet_mail_detect.nasl
   trunk/openvas-plugins/scripts/gb_blazevideo_hdtv_detect.nasl
   trunk/openvas-plugins/scripts/gb_blob_blog_system_detect.nasl
   trunk/openvas-plugins/scripts/gb_bournal_detect.nasl
   trunk/openvas-plugins/scripts/gb_bozotic_http_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_bpftp_detect.nasl
   trunk/openvas-plugins/scripts/gb_bpsoft_hex_workshop_detect.nasl
   trunk/openvas-plugins/scripts/gb_bsplayer_detect.nasl
   trunk/openvas-plugins/scripts/gb_bugtracker_detect.nasl
   trunk/openvas-plugins/scripts/gb_buildbot_detect.nasl
   trunk/openvas-plugins/scripts/gb_ccproxy_detect.nasl
   trunk/openvas-plugins/scripts/gb_citrix_license_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_citrix_provisioning_services_detect.nasl
   trunk/openvas-plugins/scripts/gb_clamav_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_clamav_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_claroline_detect.nasl
   trunk/openvas-plugins/scripts/gb_clicknet_cms_detect.nasl
   trunk/openvas-plugins/scripts/gb_cmscout_detect.nasl
   trunk/openvas-plugins/scripts/gb_cpcreator_detect.nasl
   trunk/openvas-plugins/scripts/gb_crux_products_detect.nasl
   trunk/openvas-plugins/scripts/gb_cscope_detect.nasl
   trunk/openvas-plugins/scripts/gb_cuteftp_detect.nasl
   trunk/openvas-plugins/scripts/gb_designworks_professional_detect.nasl
   trunk/openvas-plugins/scripts/gb_django_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_dm_filemanager_detect.nasl
   trunk/openvas-plugins/scripts/gb_document_manager_detect.nasl
   trunk/openvas-plugins/scripts/gb_dokuwiki_detect.nasl
   trunk/openvas-plugins/scripts/gb_dotnetnuke_detect.nasl
   trunk/openvas-plugins/scripts/gb_dotproject_detect.nasl
   trunk/openvas-plugins/scripts/gb_elecard_mpeg_player_detect.nasl
   trunk/openvas-plugins/scripts/gb_electrasoft_32bit_ftp_detect.nasl
   trunk/openvas-plugins/scripts/gb_eureka_email_detect.nasl
   trunk/openvas-plugins/scripts/gb_evalsmsi_detect.nasl
   trunk/openvas-plugins/scripts/gb_evolution_data_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_expressionengine_detect.nasl
   trunk/openvas-plugins/scripts/gb_f-prot_av_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_ffftp_detect.nasl
   trunk/openvas-plugins/scripts/gb_ffmpeg_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_filecopa_ftp_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_firebird_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_firefox_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_firefox_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_firewall_builder_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_flashchat_detect.nasl
   trunk/openvas-plugins/scripts/gb_flashlight_detect.nasl
   trunk/openvas-plugins/scripts/gb_flatchat_detect.nasl
   trunk/openvas-plugins/scripts/gb_flock_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_flock_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_foswiki_detect.nasl
   trunk/openvas-plugins/scripts/gb_foxit_phantom_detect.nasl
   trunk/openvas-plugins/scripts/gb_foxit_reader_detect.nasl
   trunk/openvas-plugins/scripts/gb_foxmail_detect.nasl
   trunk/openvas-plugins/scripts/gb_free_download_mang_detect.nasl
   trunk/openvas-plugins/scripts/gb_fsecure_prdts_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_fsecure_prdts_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_ftpshell_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_gale_detect.nasl
   trunk/openvas-plugins/scripts/gb_gd_graphics_library_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_getsimple_cms_detect.nasl
   trunk/openvas-plugins/scripts/gb_gizmo5_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_gnutls_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_golden_ftp_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_google_chrome_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_google_chrome_detect_macosx.nasl
   trunk/openvas-plugins/scripts/gb_google_chrome_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_google_earth_detect.nasl
   trunk/openvas-plugins/scripts/gb_google_sketchup_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_gpg4win_detect.nasl
   trunk/openvas-plugins/scripts/gb_grabit_detect.nasl
   trunk/openvas-plugins/scripts/gb_graphicsmagick_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_gzip_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_gzip_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_hastymail2_detect.nasl
   trunk/openvas-plugins/scripts/gb_horde_gollem_detect.nasl
   trunk/openvas-plugins/scripts/gb_hp_storage_mirroring_detect.nasl
   trunk/openvas-plugins/scripts/gb_html_parser_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_httpdx_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_ibm_db2_remote_detect.nasl
   trunk/openvas-plugins/scripts/gb_ibm_db2mc_detect.nasl
   trunk/openvas-plugins/scripts/gb_ibm_install_manager_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_ibm_tivoli_dir_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_icq_detect.nasl
   trunk/openvas-plugins/scripts/gb_icq_toolbar_detect.nasl
   trunk/openvas-plugins/scripts/gb_ideal_administrator_detect.nasl
   trunk/openvas-plugins/scripts/gb_igss_detect.nasl
   trunk/openvas-plugins/scripts/gb_ikiwiki_detect.nasl
   trunk/openvas-plugins/scripts/gb_image_hosting_script_dpi_detect.nasl
   trunk/openvas-plugins/scripts/gb_ipsec-tools_detect.nasl
   trunk/openvas-plugins/scripts/gb_irssi_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_java_prdts_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_java_prdts_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_jetty_detect.nasl
   trunk/openvas-plugins/scripts/gb_jpgraph_detect.nasl
   trunk/openvas-plugins/scripts/gb_justsystems_ichitaro_prdts_detect.nasl
   trunk/openvas-plugins/scripts/gb_jv2_folder_gallery_detect.nasl
   trunk/openvas-plugins/scripts/gb_k-meleon_detect.nasl
   trunk/openvas-plugins/scripts/gb_kaspersky_av_detect.nasl
   trunk/openvas-plugins/scripts/gb_kerberos5_detect.nasl
   trunk/openvas-plugins/scripts/gb_kerio_mailserver_detect.nasl
   trunk/openvas-plugins/scripts/gb_ktorrent_detect.nasl
   trunk/openvas-plugins/scripts/gb_libesmtp_detect.nasl
   trunk/openvas-plugins/scripts/gb_limny_detect.nasl
   trunk/openvas-plugins/scripts/gb_linkspheric_detect.nasl
   trunk/openvas-plugins/scripts/gb_livezilla_detect.nasl
   trunk/openvas-plugins/scripts/gb_lunascape_detect.nasl
   trunk/openvas-plugins/scripts/gb_lussumo_vanilla_detect.nasl
   trunk/openvas-plugins/scripts/gb_magic_iso_maker_detect.nasl
   trunk/openvas-plugins/scripts/gb_maildrop_detect.nasl
   trunk/openvas-plugins/scripts/gb_mapserver_detect.nasl
   trunk/openvas-plugins/scripts/gb_maxthon_detect.nasl
   trunk/openvas-plugins/scripts/gb_mcafee_groupshield_detect.nasl
   trunk/openvas-plugins/scripts/gb_mdpro_detect.nasl
   trunk/openvas-plugins/scripts/gb_memcached_detect.nasl
   trunk/openvas-plugins/scripts/gb_merak_mail_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_moinmoin_wiki_detect.nasl
   trunk/openvas-plugins/scripts/gb_moodle_cms_detect.nasl
   trunk/openvas-plugins/scripts/gb_mozilla_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_mozilla_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_mrbs_detect.nasl
   trunk/openvas-plugins/scripts/gb_ms_ie_detect.nasl
   trunk/openvas-plugins/scripts/gb_ms_money_detect.nasl
   trunk/openvas-plugins/scripts/gb_ms_win_live_messenger_detect.nasl
   trunk/openvas-plugins/scripts/gb_mymsg_detect.nasl
   trunk/openvas-plugins/scripts/gb_n_13_news_detect.nasl
   trunk/openvas-plugins/scripts/gb_navicopa_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_netpbm_detect.nasl
   trunk/openvas-plugins/scripts/gb_netrisk_detect.nasl
   trunk/openvas-plugins/scripts/gb_novell_zhm_detect.nasl
   trunk/openvas-plugins/scripts/gb_ntp_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_nullftp_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_nulllogic_groupware_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_openfire_detect.nasl
   trunk/openvas-plugins/scripts/gb_openmairie_prdts_detect.nasl
   trunk/openvas-plugins/scripts/gb_openpro_detect.nasl
   trunk/openvas-plugins/scripts/gb_opensc_detect.nasl
   trunk/openvas-plugins/scripts/gb_openssl_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_openssl_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_opera_detect_macosx.nasl
   trunk/openvas-plugins/scripts/gb_orbis_cms_detect.nasl
   trunk/openvas-plugins/scripts/gb_orbit_downloader_detect.nasl
   trunk/openvas-plugins/scripts/gb_orca_browser_detect.nasl
   trunk/openvas-plugins/scripts/gb_ortro_detect.nasl
   trunk/openvas-plugins/scripts/gb_outreach_project_tool_detect.nasl
   trunk/openvas-plugins/scripts/gb_pacific_timesheet_detect.nasl
   trunk/openvas-plugins/scripts/gb_panda_prdts_detect.nasl
   trunk/openvas-plugins/scripts/gb_peazip_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_peazip_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_pecio_cms_detect.nasl
   trunk/openvas-plugins/scripts/gb_pegasus_mail_detect.nasl
   trunk/openvas-plugins/scripts/gb_perl_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_pgp_desktop_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_php_detect.nasl
   trunk/openvas-plugins/scripts/gb_php_quick_arcade_detect.nasl
   trunk/openvas-plugins/scripts/gb_phpbazar_detect.nasl
   trunk/openvas-plugins/scripts/gb_phpcoin_detect.nasl
   trunk/openvas-plugins/scripts/gb_phpgenealogie_detect.nasl
   trunk/openvas-plugins/scripts/gb_phpnagios_detect.nasl
   trunk/openvas-plugins/scripts/gb_pivotx_detect.nasl
   trunk/openvas-plugins/scripts/gb_pmwiki_detect.nasl
   trunk/openvas-plugins/scripts/gb_pyftpdlib_detect.nasl
   trunk/openvas-plugins/scripts/gb_python_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_qip_detect.nasl
   trunk/openvas-plugins/scripts/gb_qtweb_detect.nasl
   trunk/openvas-plugins/scripts/gb_quagga_detect.nasl
   trunk/openvas-plugins/scripts/gb_quixplorer_detect.nasl
   trunk/openvas-plugins/scripts/gb_realplayer_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_reflection_secureit_unix_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_rekonq_detect.nasl
   trunk/openvas-plugins/scripts/gb_rhinosoft_serv-u_detect.nasl
   trunk/openvas-plugins/scripts/gb_robo_ftp_client_detect.nasl
   trunk/openvas-plugins/scripts/gb_ruby_rails_detect.nasl
   trunk/openvas-plugins/scripts/gb_seamonkey_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_seamonkey_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_sendmail_detect.nasl
   trunk/openvas-plugins/scripts/gb_serenity_player_detect.nasl
   trunk/openvas-plugins/scripts/gb_shareaza_detect.nasl
   trunk/openvas-plugins/scripts/gb_shibboleth_sp_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_siestta_detect.nasl
   trunk/openvas-plugins/scripts/gb_sigplus_pro_activex_detect.nasl
   trunk/openvas-plugins/scripts/gb_simple_machines_forum_detect.nasl
   trunk/openvas-plugins/scripts/gb_simpleid_detect.nasl
   trunk/openvas-plugins/scripts/gb_sinecms_detect.nasl
   trunk/openvas-plugins/scripts/gb_siteengine_detect.nasl
   trunk/openvas-plugins/scripts/gb_skype_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_slysoft_prdts_detect.nasl
   trunk/openvas-plugins/scripts/gb_snipegallery_detect.nasl
   trunk/openvas-plugins/scripts/gb_snort_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_sonic_spot_audioactive_player_detect.nasl
   trunk/openvas-plugins/scripts/gb_south_river_webdrive_detect.nasl
   trunk/openvas-plugins/scripts/gb_squidguard_detect.nasl
   trunk/openvas-plugins/scripts/gb_stardict_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_ston3d_prdts_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_ston3d_prdts_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_strongswan_detect.nasl
   trunk/openvas-plugins/scripts/gb_sun_java_sys_web_proxy_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_sun_java_sys_web_serv_detect.nasl
   trunk/openvas-plugins/scripts/gb_sun_java_system_portal_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_sun_java_web_console_detect.nasl
   trunk/openvas-plugins/scripts/gb_swftools_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_symphony_cms_detect.nasl
   trunk/openvas-plugins/scripts/gb_tcexam_detect.nasl
   trunk/openvas-plugins/scripts/gb_tdiary_detect.nasl
   trunk/openvas-plugins/scripts/gb_telepark_wiki_detect.nasl
   trunk/openvas-plugins/scripts/gb_tematres_detect.nasl
   trunk/openvas-plugins/scripts/gb_thunderbird_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_thunderbird_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_titan_ftp_detect.nasl
   trunk/openvas-plugins/scripts/gb_tor_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_torrent_trader_classic_detect.nasl
   trunk/openvas-plugins/scripts/gb_trendmicro_internet_security_detect.nasl
   trunk/openvas-plugins/scripts/gb_trillian_detect.nasl
   trunk/openvas-plugins/scripts/gb_twiki_detect.nasl
   trunk/openvas-plugins/scripts/gb_typsoft_ftp_detect.nasl
   trunk/openvas-plugins/scripts/gb_ultraiso_detect.nasl
   trunk/openvas-plugins/scripts/gb_uniform_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_v-webmail_detect.nasl
   trunk/openvas-plugins/scripts/gb_varnish_detect.nasl
   trunk/openvas-plugins/scripts/gb_visualization_library_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_vmware_ovm_tools_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_vmware_prdts_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_vmware_prdts_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_wampserver_detect.nasl
   trunk/openvas-plugins/scripts/gb_webcamxp_detect.nasl
   trunk/openvas-plugins/scripts/gb_weborf_webserver_detect.nasl
   trunk/openvas-plugins/scripts/gb_winftp_serv_detect.nasl
   trunk/openvas-plugins/scripts/gb_wireshark_detect_lin.nasl
   trunk/openvas-plugins/scripts/gb_wireshark_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_xemacs_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_xerver_http_server_detect.nasl
   trunk/openvas-plugins/scripts/gb_xm_easy_personal_ftp_detect.nasl
   trunk/openvas-plugins/scripts/gb_xoops_celepar_detect.nasl
   trunk/openvas-plugins/scripts/gb_xvid_detect_win.nasl
   trunk/openvas-plugins/scripts/gb_xwiki_enterprise_detect.nasl
   trunk/openvas-plugins/scripts/gb_yabsoft_aihs_detect.nasl
   trunk/openvas-plugins/scripts/gb_yahoo_msg_detect.nasl
   trunk/openvas-plugins/scripts/gb_zenoss_serv_detect.nasl
   trunk/openvas-plugins/scripts/gb_zeuscart_detect.nasl
   trunk/openvas-plugins/scripts/gravity_board_x_detect.nasl
   trunk/openvas-plugins/scripts/horde_detect.nasl
   trunk/openvas-plugins/scripts/hp_data_protector_installed.nasl
   trunk/openvas-plugins/scripts/http_version.nasl
   trunk/openvas-plugins/scripts/idb_detect.nasl
   trunk/openvas-plugins/scripts/invision_power_board_detect.nasl
   trunk/openvas-plugins/scripts/jd_web_detect.nasl
   trunk/openvas-plugins/scripts/joomla_detect.nasl
   trunk/openvas-plugins/scripts/kerio_wrf_management_detection.nasl
   trunk/openvas-plugins/scripts/landesk_detect.nasl
   trunk/openvas-plugins/scripts/linpha_detect.nasl
   trunk/openvas-plugins/scripts/mambo_detect.nasl
   trunk/openvas-plugins/scripts/mantis_detect.nasl
   trunk/openvas-plugins/scripts/mldonkey_www.nasl
   trunk/openvas-plugins/scripts/modperl_version.nasl
   trunk/openvas-plugins/scripts/mozilloCMS_detect.nasl
   trunk/openvas-plugins/scripts/mssql_version.nasl
   trunk/openvas-plugins/scripts/nagios_detect.nasl
   trunk/openvas-plugins/scripts/nagios_statd_detect.nasl
   trunk/openvas-plugins/scripts/net2ftp_detect.nasl
   trunk/openvas-plugins/scripts/nginx_detect.nasl
   trunk/openvas-plugins/scripts/notftp_detect.nasl
   trunk/openvas-plugins/scripts/novell_edirectory_detect.nasl
   trunk/openvas-plugins/scripts/nsd_version.nasl
   trunk/openvas-plugins/scripts/ntop_detect.nasl
   trunk/openvas-plugins/scripts/ntp_open.nasl
   trunk/openvas-plugins/scripts/opencart_detect.nasl
   trunk/openvas-plugins/scripts/openoffice_CB-A08-0068.nasl
   trunk/openvas-plugins/scripts/oracle_tnslsnr_version.nasl
   trunk/openvas-plugins/scripts/osticket_detect.nasl
   trunk/openvas-plugins/scripts/patchlink_detection.nasl
   trunk/openvas-plugins/scripts/perforce_detect.nasl
   trunk/openvas-plugins/scripts/phorum_detect.nasl
   trunk/openvas-plugins/scripts/photopost_detect.nasl
   trunk/openvas-plugins/scripts/phpBugTracker_detect.nasl
   trunk/openvas-plugins/scripts/phpScheduleIt_detect.nasl
   trunk/openvas-plugins/scripts/phpWebThings_detect.nasl
   trunk/openvas-plugins/scripts/phpbb_detect.nasl
   trunk/openvas-plugins/scripts/phpgroupware_detect.nasl
   trunk/openvas-plugins/scripts/phpldapadmin_detect.nasl
   trunk/openvas-plugins/scripts/phplive_detect.nasl
   trunk/openvas-plugins/scripts/phpmyfaq_detect.nasl
   trunk/openvas-plugins/scripts/phpshop_detect.nasl
   trunk/openvas-plugins/scripts/podcast_generator_detect.nasl
   trunk/openvas-plugins/scripts/postgresql_detect.nasl
   trunk/openvas-plugins/scripts/prtg_traffic_grapher_detect.nasl
   trunk/openvas-plugins/scripts/punBB_detect.nasl
   trunk/openvas-plugins/scripts/realty_web_base_detect.nasl
   trunk/openvas-plugins/scripts/remote-detect-Leap_CMS.nasl
   trunk/openvas-plugins/scripts/remote-detect-MSdotNET-version.nasl
   trunk/openvas-plugins/scripts/remote-detect-WindowsSharepointServices.nasl
   trunk/openvas-plugins/scripts/rt_detect.nasl
   trunk/openvas-plugins/scripts/sahana_detect.nasl
   trunk/openvas-plugins/scripts/savce_installed.nasl
   trunk/openvas-plugins/scripts/secpod_admin_news_tools_detect.nasl
   trunk/openvas-plugins/scripts/secpod_adobe_dreamweaver_detect.nasl
   trunk/openvas-plugins/scripts/secpod_adobe_indesign_detect.nasl
   trunk/openvas-plugins/scripts/secpod_adobe_jrun_detect.nasl
   trunk/openvas-plugins/scripts/secpod_adobe_prdts_detect_macosx.nasl
   trunk/openvas-plugins/scripts/secpod_adobe_prdts_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_adobe_shockwave_detect_macosx.nasl
   trunk/openvas-plugins/scripts/secpod_adobe_shockwave_player_detect.nasl
   trunk/openvas-plugins/scripts/secpod_alefmentor_detect.nasl
   trunk/openvas-plugins/scripts/secpod_amarok_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_amsn_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_apache_apr-utils_detect.nasl
   trunk/openvas-plugins/scripts/secpod_apache_detect.nasl
   trunk/openvas-plugins/scripts/secpod_apache_tiles_detect.nasl
   trunk/openvas-plugins/scripts/secpod_aphpkb_detect.nasl
   trunk/openvas-plugins/scripts/secpod_apple_itunes_detection_win_900123.nasl
   trunk/openvas-plugins/scripts/secpod_apple_quicktime_detection_win_900124.nasl
   trunk/openvas-plugins/scripts/secpod_apple_safari_detect_win_900003.nasl
   trunk/openvas-plugins/scripts/secpod_asterisk_detect.nasl
   trunk/openvas-plugins/scripts/secpod_audacity_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_audacity_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_audistat_detect.nasl
   trunk/openvas-plugins/scripts/secpod_avahi_detection_lin.nasl
   trunk/openvas-plugins/scripts/secpod_avg_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_axon_virtual_pbx_detect.nasl
   trunk/openvas-plugins/scripts/secpod_b2evolution_detect.nasl
   trunk/openvas-plugins/scripts/secpod_beanstalkd_detect.nasl
   trunk/openvas-plugins/scripts/secpod_bitdefender_prdts_detect.nasl
   trunk/openvas-plugins/scripts/secpod_bitweaver_detect.nasl
   trunk/openvas-plugins/scripts/secpod_blackberry_desktop_software_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_blender_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_bopup_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ca_mult_prdts_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_campsite_detect.nasl
   trunk/openvas-plugins/scripts/secpod_changetrack_detect.nasl
   trunk/openvas-plugins/scripts/secpod_cmailserver_detect.nasl
   trunk/openvas-plugins/scripts/secpod_cowon_jetaudio_detect.nasl
   trunk/openvas-plugins/scripts/secpod_crawltrack_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ctorrent_detect.nasl
   trunk/openvas-plugins/scripts/secpod_cubecart_detect.nasl
   trunk/openvas-plugins/scripts/secpod_cups_detect.nasl
   trunk/openvas-plugins/scripts/secpod_cutenews_detect_win_900128.nasl
   trunk/openvas-plugins/scripts/secpod_cyrus_sasllib_detect.nasl
   trunk/openvas-plugins/scripts/secpod_datatrack_system_detect.nasl
   trunk/openvas-plugins/scripts/secpod_discloser_detect.nasl
   trunk/openvas-plugins/scripts/secpod_divx_web_player_detect.nasl
   trunk/openvas-plugins/scripts/secpod_dovecot_detect.nasl
   trunk/openvas-plugins/scripts/secpod_easy_rmtomp3_conv_detect.nasl
   trunk/openvas-plugins/scripts/secpod_efront_detect.nasl
   trunk/openvas-plugins/scripts/secpod_elecard_avchd_player_detect.nasl
   trunk/openvas-plugins/scripts/secpod_elog_detect.nasl
   trunk/openvas-plugins/scripts/secpod_eset_remote_administrator_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ezip_detect.nasl
   trunk/openvas-plugins/scripts/secpod_f-prot_av_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_faslo_player_detect.nasl
   trunk/openvas-plugins/scripts/secpod_fcms_detect.nasl
   trunk/openvas-plugins/scripts/secpod_filezilla_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_formmax_detect.nasl
   trunk/openvas-plugins/scripts/secpod_foxit_wac_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_freeradius_detect.nasl
   trunk/openvas-plugins/scripts/secpod_freesshd_detect.nasl
   trunk/openvas-plugins/scripts/secpod_freetype_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_freetype_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_frontaccounting_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ftpshell_client_detect.nasl
   trunk/openvas-plugins/scripts/secpod_fuzzylime_cms_detect.nasl
   trunk/openvas-plugins/scripts/secpod_g15daemon_detect.nasl
   trunk/openvas-plugins/scripts/secpod_geoserver_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ghostscript_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_ghostscript_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_gupnp_detect.nasl
   trunk/openvas-plugins/scripts/secpod_hamster_audio_player_detect.nasl
   trunk/openvas-plugins/scripts/secpod_home_ftp_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_hp_openview_nnm_detect.nasl
   trunk/openvas-plugins/scripts/secpod_hp_smh_detect.nasl
   trunk/openvas-plugins/scripts/secpod_hplip_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_hyleos_chemview_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ibm_db2_detect_linux_900217.nasl
   trunk/openvas-plugins/scripts/secpod_ibm_db2_detect_win_900218.nasl
   trunk/openvas-plugins/scripts/secpod_ibm_informix_dynamic_server_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_ibm_informix_dynamic_server_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_ibm_lotus_notes_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_ibm_lotus_notes_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_ida_pro_detect.nasl
   trunk/openvas-plugins/scripts/secpod_imagemagick_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_imagemagick_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_irfanview_detect.nasl
   trunk/openvas-plugins/scripts/secpod_isc_dhcp_client_detect.nasl
   trunk/openvas-plugins/scripts/secpod_jag_detect.nasl
   trunk/openvas-plugins/scripts/secpod_kde_konqueror_detect.nasl
   trunk/openvas-plugins/scripts/secpod_kvirc_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_labtam_proftp_detect.nasl
   trunk/openvas-plugins/scripts/secpod_libpng_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_libre_office_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_libre_office_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_lightneasy_detect.nasl
   trunk/openvas-plugins/scripts/secpod_limesurvey_detect.nasl
   trunk/openvas-plugins/scripts/secpod_mahara_detect.nasl
   trunk/openvas-plugins/scripts/secpod_mathematica_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_mcafee_saas_endpoint_protection_detect.nasl
   trunk/openvas-plugins/scripts/secpod_media_player_classic_detect.nasl
   trunk/openvas-plugins/scripts/secpod_mediawiki_detect.nasl
   trunk/openvas-plugins/scripts/secpod_metasploit_framework_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_mikmod_detect.nasl
   trunk/openvas-plugins/scripts/secpod_mini_stream_prdts_detect.nasl
   trunk/openvas-plugins/scripts/secpod_mpg123_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_ms_iis_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ms_office_detection_900025.nasl
   trunk/openvas-plugins/scripts/secpod_ms_visual_prdts_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ms_win_media_player_detect_900173.nasl
   trunk/openvas-plugins/scripts/secpod_ms_wpp_enterprise_library_detect.nasl
   trunk/openvas-plugins/scripts/secpod_mutt_detect.nasl
   trunk/openvas-plugins/scripts/secpod_nakid_cms_detect.nasl
   trunk/openvas-plugins/scripts/secpod_nasl_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_natterchat_detect.nasl
   trunk/openvas-plugins/scripts/secpod_neon_detect.nasl
   trunk/openvas-plugins/scripts/secpod_netdecision_tftp_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_netpet_cms_detect.nasl
   trunk/openvas-plugins/scripts/secpod_netscape_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_netscape_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_noticeware_mail_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_novell_prdts_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_novell_prdts_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_ocs_inventory_ng_detect.nasl
   trunk/openvas-plugins/scripts/secpod_office_products_version_900032.nasl
   trunk/openvas-plugins/scripts/secpod_opendocman_detect.nasl
   trunk/openvas-plugins/scripts/secpod_openforum_detect.nasl
   trunk/openvas-plugins/scripts/secpod_openjdk_detect.nasl
   trunk/openvas-plugins/scripts/secpod_openoffice_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_openoffice_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_opensc_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_openswan_detect.nasl
   trunk/openvas-plugins/scripts/secpod_opera_detection_linux_900037.nasl
   trunk/openvas-plugins/scripts/secpod_opera_detection_win_900036.nasl
   trunk/openvas-plugins/scripts/secpod_otrs_detect.nasl
   trunk/openvas-plugins/scripts/secpod_overlook_detect.nasl
   trunk/openvas-plugins/scripts/secpod_oxid_eshop_detect.nasl
   trunk/openvas-plugins/scripts/secpod_pango_detect.nasl
   trunk/openvas-plugins/scripts/secpod_php_address_book_detect.nasl
   trunk/openvas-plugins/scripts/secpod_php_calendar_detect.nasl
   trunk/openvas-plugins/scripts/secpod_php_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_php_fusion_detect.nasl
   trunk/openvas-plugins/scripts/secpod_php_icalendar_detect.nasl
   trunk/openvas-plugins/scripts/secpod_php_nuke_detect.nasl
   trunk/openvas-plugins/scripts/secpod_phpmyadmin_detect_900129.nasl
   trunk/openvas-plugins/scripts/secpod_pidgin_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_pidgin_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_pivot_detect.nasl
   trunk/openvas-plugins/scripts/secpod_postgresql_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_postgresql_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_powerzip_detect.nasl
   trunk/openvas-plugins/scripts/secpod_pplive_detect.nasl
   trunk/openvas-plugins/scripts/secpod_prochatrooms_detect.nasl
   trunk/openvas-plugins/scripts/secpod_proftpd_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_proftpd_server_remote_detect.nasl
   trunk/openvas-plugins/scripts/secpod_pumpkin_tftp_detect.nasl
   trunk/openvas-plugins/scripts/secpod_putty_version.nasl
   trunk/openvas-plugins/scripts/secpod_qemu_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_raidenftpd_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_realplayer_detect_macosx.nasl
   trunk/openvas-plugins/scripts/secpod_rosoft_audio_converter_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ruby_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_ruby_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_sdp_downloader_detect.nasl
   trunk/openvas-plugins/scripts/secpod_servu_ftp_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_silc_prdts_detect.nasl
   trunk/openvas-plugins/scripts/secpod_sjs_access_manager_detect.nasl
   trunk/openvas-plugins/scripts/secpod_slurm_detect.nasl
   trunk/openvas-plugins/scripts/secpod_smartermail_detect.nasl
   trunk/openvas-plugins/scripts/secpod_solarwinds_tftp_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_sql_ledger_detect.nasl
   trunk/openvas-plugins/scripts/secpod_squid_detect.nasl
   trunk/openvas-plugins/scripts/secpod_subversion_detect.nasl
   trunk/openvas-plugins/scripts/secpod_sun_java_app_serv_detect.nasl
   trunk/openvas-plugins/scripts/secpod_sun_java_dir_server_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_sun_java_dir_server_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_sun_opensso_detect.nasl
   trunk/openvas-plugins/scripts/secpod_sun_virtualbox_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_sun_virtualbox_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_surgemail_detect.nasl
   trunk/openvas-plugins/scripts/secpod_symantec_prdts_detect.nasl
   trunk/openvas-plugins/scripts/secpod_systemtap_detect.nasl
   trunk/openvas-plugins/scripts/secpod_task_freak_detect.nasl
   trunk/openvas-plugins/scripts/secpod_tcpdb_detect.nasl
   trunk/openvas-plugins/scripts/secpod_tembria_server_monitor_detect.nasl
   trunk/openvas-plugins/scripts/secpod_tfm_mmplayer_detect.nasl
   trunk/openvas-plugins/scripts/secpod_thegreenbow_ipsec_vpn_client_detect.nasl
   trunk/openvas-plugins/scripts/secpod_tightvnc_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_tightvnc_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_tikiwiki_detect.nasl
   trunk/openvas-plugins/scripts/secpod_tnftpd_detect.nasl
   trunk/openvas-plugins/scripts/secpod_tor_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_torrentvolve_detect.nasl
   trunk/openvas-plugins/scripts/secpod_transmission_detect.nasl
   trunk/openvas-plugins/scripts/secpod_trellian_ftp_detect.nasl
   trunk/openvas-plugins/scripts/secpod_tt_website_manager_detect.nasl
   trunk/openvas-plugins/scripts/secpod_tvp_detect.nasl
   trunk/openvas-plugins/scripts/secpod_uebimiau_webmail_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ultravnc_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_usebb_detect.nasl
   trunk/openvas-plugins/scripts/secpod_valarsoft_webmatic_detect.nasl
   trunk/openvas-plugins/scripts/secpod_viplay_detect.nasl
   trunk/openvas-plugins/scripts/secpod_vlc_media_player_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_vlc_media_player_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_vmware_springsource_tc_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_vuplayer_detect.nasl
   trunk/openvas-plugins/scripts/secpod_websvn_detect.nasl
   trunk/openvas-plugins/scripts/secpod_winamp_detect.nasl
   trunk/openvas-plugins/scripts/secpod_wingate_detect.nasl
   trunk/openvas-plugins/scripts/secpod_winrar_detect.nasl
   trunk/openvas-plugins/scripts/secpod_woltlab_burning_board_detect.nasl
   trunk/openvas-plugins/scripts/secpod_wordpress_detect_900182.nasl
   trunk/openvas-plugins/scripts/secpod_wow_raid_manager_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ws_ftp_client_detect.nasl
   trunk/openvas-plugins/scripts/secpod_wsftp_win_detect.nasl
   trunk/openvas-plugins/scripts/secpod_xampp_detect.nasl
   trunk/openvas-plugins/scripts/secpod_xilisoft_video_conv_detect.nasl
   trunk/openvas-plugins/scripts/secpod_xitami_server_detect.nasl
   trunk/openvas-plugins/scripts/secpod_xnview_detect_lin.nasl
   trunk/openvas-plugins/scripts/secpod_xnview_detect_win.nasl
   trunk/openvas-plugins/scripts/secpod_xoops_detect.nasl
   trunk/openvas-plugins/scripts/secpod_xpdf_detect.nasl
   trunk/openvas-plugins/scripts/secpod_xymon_monitor_detect.nasl
   trunk/openvas-plugins/scripts/secpod_zeuscms_detect.nasl
   trunk/openvas-plugins/scripts/secpod_zikula_detect.nasl
   trunk/openvas-plugins/scripts/secpod_ziproxy_server_detect.nasl
   trunk/openvas-plugins/scripts/serendipity_detect.nasl
   trunk/openvas-plugins/scripts/snitz_forums_2000_detect.nasl
   trunk/openvas-plugins/scripts/sonicwall_vpn_client_detect.nasl
   trunk/openvas-plugins/scripts/spysweeper_corp_installed.nasl
   trunk/openvas-plugins/scripts/squirrelmail_detect.nasl
   trunk/openvas-plugins/scripts/ssh_detect.nasl
   trunk/openvas-plugins/scripts/sybase_blank_password.nasl
   trunk/openvas-plugins/scripts/symantec_ws_detection.nasl
   trunk/openvas-plugins/scripts/sympa_detect.nasl
   trunk/openvas-plugins/scripts/tftgallery_detect.nasl
   trunk/openvas-plugins/scripts/vbulletin_detect.nasl
   trunk/openvas-plugins/scripts/ventrilo_detect.nasl
   trunk/openvas-plugins/scripts/viewvc_detect.nasl
   trunk/openvas-plugins/scripts/webapp_detect.nasl
   trunk/openvas-plugins/scripts/webcalendar_detect.nasl
   trunk/openvas-plugins/scripts/webfileexplorer_detect.nasl
   trunk/openvas-plugins/scripts/webmedia_explorer_detect.nasl
   trunk/openvas-plugins/scripts/webmin.nasl
   trunk/openvas-plugins/scripts/znc_detect.nasl
   trunk/openvas-plugins/scripts/zone_alarm_local_dos.nasl
Log:
Decentralized registration of CPEs from within application detection
NVTs [Mareike Piechowiak].

* scripts/gb_flock_detect_win.nasl,
scripts/secpod_ca_mult_prdts_detect_win.nasl,
scripts/secpod_powerzip_detect.nasl,
scripts/e107_detect.nasl,
scripts/gb_an_guestbook_detect.nasl,
scripts/gb_ktorrent_detect.nasl,
scripts/ntp_open.nasl,
scripts/gb_icq_detect.nasl,
scripts/secpod_fcms_detect.nasl,
scripts/sahana_detect.nasl,
scripts/gb_zenoss_serv_detect.nasl,
scripts/gb_avast_av_detect_lin.nasl,
scripts/secpod_sun_java_app_serv_detect.nasl,
scripts/gb_foswiki_detect.nasl,
scripts/secpod_cowon_jetaudio_detect.nasl,
scripts/secpod_ms_wpp_enterprise_library_detect.nasl,
scripts/gb_memcached_detect.nasl,
scripts/gb_magic_iso_maker_detect.nasl,
scripts/gb_k-meleon_detect.nasl,
scripts/nagios_detect.nasl,
scripts/secpod_proftpd_server_remote_detect.nasl,
scripts/secpod_apple_quicktime_detection_win_900124.nasl,
scripts/secpod_vmware_springsource_tc_server_detect.nasl,
scripts/secpod_mahara_detect.nasl,
scripts/nagios_statd_detect.nasl,
scripts/gb_fsecure_prdts_detect_lin.nasl,
scripts/gb_vmware_prdts_detect_lin.nasl,
scripts/secpod_zeuscms_detect.nasl,
scripts/find_service2.nasl,
scripts/secpod_tor_detect_lin.nasl,
scripts/secpod_elecard_avchd_player_detect.nasl,
scripts/gb_php_quick_arcade_detect.nasl,
scripts/gb_adobe_flash_player_detect_win.nasl,
scripts/eggdrop_detect.nasl,
scripts/notftp_detect.nasl,
scripts/webfileexplorer_detect.nasl,
scripts/phpBugTracker_detect.nasl,
scripts/gb_ms_ie_detect.nasl,
scripts/secpod_ida_pro_detect.nasl,
scripts/gb_jetty_detect.nasl,
scripts/gb_opensc_detect.nasl,
scripts/gb_wampserver_detect.nasl,
scripts/secpod_filezilla_server_detect.nasl,
scripts/gb_hp_storage_mirroring_detect.nasl,
scripts/secpod_xnview_detect_win.nasl,
scripts/gb_limny_detect.nasl,
scripts/TorrentTrader_detect.nasl,
scripts/hp_data_protector_installed.nasl,
scripts/gb_buildbot_detect.nasl,
scripts/secpod_ws_ftp_client_detect.nasl,
scripts/secpod_xymon_monitor_detect.nasl,
scripts/gb_openfire_detect.nasl,
scripts/secpod_ftpshell_client_detect.nasl,
scripts/gb_ortro_detect.nasl,
scripts/secpod_sql_ledger_detect.nasl,
scripts/gb_barcode_detect.nasl,
scripts/cvstrac_detect.nasl,
scripts/gb_ston3d_prdts_detect_win.nasl,
scripts/secpod_aphpkb_detect.nasl,
scripts/secpod_amsn_detect_win.nasl,
scripts/secpod_beanstalkd_detect.nasl,
scripts/cvspserver_version.nasl,
scripts/gb_blob_blog_system_detect.nasl,
scripts/gb_ibm_install_manager_detect_win.nasl,
scripts/family_connections_detect.nasl,
scripts/gb_panda_prdts_detect.nasl,
scripts/secpod_noticeware_mail_server_detect.nasl,
scripts/realty_web_base_detect.nasl,
scripts/secpod_subversion_detect.nasl,
scripts/secpod_cutenews_detect_win_900128.nasl,
scripts/secpod_tembria_server_monitor_detect.nasl,
scripts/gb_jpgraph_detect.nasl,
scripts/gb_wireshark_detect_lin.nasl,
scripts/jd_web_detect.nasl,
scripts/gb_google_chrome_detect_win.nasl,
scripts/gb_flashlight_detect.nasl,
scripts/secpod_proftpd_server_detect.nasl,
scripts/gb_maxthon_detect.nasl,
scripts/nsd_version.nasl,
scripts/gb_golden_ftp_server_detect.nasl,
scripts/secpod_openoffice_detect_lin.nasl,
scripts/secpod_tt_website_manager_detect.nasl,
scripts/gb_google_sketchup_detect_win.nasl,
scripts/gb_sinecms_detect.nasl,
scripts/horde_detect.nasl,
scripts/gb_kerberos5_detect.nasl,
scripts/gb_arcavir_av_prdts_detect.nasl,
scripts/secpod_limesurvey_detect.nasl,
scripts/secpod_mediawiki_detect.nasl,
scripts/gb_alleycode_html_editor_detect.nasl,
scripts/gb_linkspheric_detect.nasl,
scripts/gb_adobe_photoshop_detect.nasl,
scripts/secpod_postgresql_detect_win.nasl,
scripts/gb_varnish_detect.nasl,
scripts/gb_ruby_rails_detect.nasl,
scripts/secpod_openforum_detect.nasl,
scripts/secpod_ghostscript_detect_lin.nasl,
scripts/secpod_ms_office_detection_900025.nasl,
scripts/secpod_cmailserver_detect.nasl,
scripts/AfterLogic_WebMail_Pro_detect.nasl,
scripts/gb_sendmail_detect.nasl,
scripts/secpod_foxit_wac_server_detect.nasl,
scripts/secpod_apache_tiles_detect.nasl,
scripts/gb_aol_detect.nasl,
scripts/secpod_symantec_prdts_detect.nasl,
scripts/gb_gd_graphics_library_detect_lin.nasl,
scripts/secpod_mathematica_detect_lin.nasl,
scripts/secpod_gupnp_detect.nasl,
scripts/axigen_web_detect.nasl,
scripts/secpod_faslo_player_detect.nasl,
scripts/gb_ntp_detect_lin.nasl,
scripts/gb_strongswan_detect.nasl,
scripts/gb_php_detect.nasl,
scripts/secpod_websvn_detect.nasl,
scripts/phpWebThings_detect.nasl,
scripts/gb_orbit_downloader_detect.nasl,
scripts/secpod_wsftp_win_detect.nasl,
scripts/secpod_freetype_detect_lin.nasl,
scripts/barracuda_im_firewall_detect.nasl,
scripts/oracle_tnslsnr_version.nasl,
scripts/secpod_php_fusion_detect.nasl,
scripts/secpod_wingate_detect.nasl,
scripts/secpod_formmax_detect.nasl,
scripts/gb_trendmicro_internet_security_detect.nasl,
scripts/secpod_audistat_detect.nasl,
scripts/gb_sonic_spot_audioactive_player_detect.nasl,
scripts/linpha_detect.nasl,
scripts/gb_firewall_builder_detect_lin.nasl,
scripts/secpod_mikmod_detect.nasl,
scripts/secpod_apple_itunes_detection_win_900123.nasl,
scripts/secpod_libre_office_detect_lin.nasl,
scripts/secpod_pango_detect.nasl,
scripts/gb_yabsoft_aihs_detect.nasl,
scripts/gb_mrbs_detect.nasl,
scripts/gb_django_detect_lin.nasl,
scripts/gb_phpbazar_detect.nasl,
scripts/gb_icq_toolbar_detect.nasl,
scripts/cyrus_imap_prelogin_overflow.nasl,
scripts/secpod_hp_smh_detect.nasl,
scripts/gb_cscope_detect.nasl,
scripts/secpod_valarsoft_webmatic_detect.nasl,
scripts/gb_ibm_db2_remote_detect.nasl,
scripts/secpod_sun_virtualbox_detect_win.nasl,
scripts/secpod_axon_virtual_pbx_detect.nasl,
scripts/secpod_imagemagick_detect_win.nasl,
scripts/secpod_servu_ftp_server_detect.nasl,
scripts/gb_citrix_license_server_detect.nasl,
scripts/secpod_wordpress_detect_900182.nasl,
scripts/gb_filecopa_ftp_server_detect.nasl,
scripts/gb_xm_easy_personal_ftp_detect.nasl,
scripts/gb_image_hosting_script_dpi_detect.nasl,
scripts/gb_expressionengine_detect.nasl,
scripts/gb_thunderbird_detect_win.nasl,
scripts/gb_apache_apr_detect.nasl,
scripts/gb_pacific_timesheet_detect.nasl,
scripts/secpod_ruby_detect_lin.nasl,
scripts/eliteCMS_detect.nasl,
scripts/gb_igss_detect.nasl,
scripts/secpod_bitweaver_detect.nasl,
scripts/phorum_detect.nasl,
scripts/secpod_freeradius_detect.nasl,
scripts/secpod_trellian_ftp_detect.nasl,
scripts/ePo_detect.nasl,
scripts/gb_ibm_db2mc_detect.nasl,
scripts/secpod_tcpdb_detect.nasl,
scripts/cutenews_detect.nasl,
scripts/secpod_php_address_book_detect.nasl,
scripts/secpod_uebimiau_webmail_detect.nasl,
scripts/gb_seamonkey_detect_win.nasl,
scripts/secpod_sun_java_dir_server_detect_lin.nasl,
scripts/secpod_xitami_server_detect.nasl,
scripts/secpod_blackberry_desktop_software_detect_win.nasl,
scripts/gb_flashchat_detect.nasl,
scripts/gb_openssl_detect_win.nasl,
scripts/gb_f-prot_av_detect_lin.nasl,
scripts/gb_pegasus_mail_detect.nasl,
scripts/gb_serenity_player_detect.nasl,
scripts/gb_sun_java_sys_web_proxy_server_detect.nasl,
scripts/secpod_ms_iis_detect.nasl,
scripts/secpod_audacity_detect_lin.nasl,
scripts/secpod_adobe_jrun_detect.nasl,
scripts/gb_shareaza_detect.nasl,
scripts/invision_power_board_detect.nasl,
scripts/gb_xwiki_enterprise_detect.nasl,
scripts/secpod_efront_detect.nasl,
scripts/secpod_xilisoft_video_conv_detect.nasl,
scripts/gb_7zip_detect_lin.nasl,
scripts/gb_avast_av_detect_win.nasl,
scripts/secpod_netscape_detect_lin.nasl,
scripts/gb_peazip_detect_lin.nasl,
scripts/TinyWebGallery_detect.nasl,
scripts/secpod_office_products_version_900032.nasl,
scripts/gb_python_detect_win.nasl,
scripts/secpod_novell_prdts_detect_lin.nasl,
scripts/phpScheduleIt_detect.nasl,
scripts/gb_navicopa_server_detect.nasl,
scripts/gb_gale_detect.nasl,
scripts/gb_fsecure_prdts_detect_win.nasl,
scripts/secpod_squid_detect.nasl,
scripts/gb_vmware_prdts_detect_win.nasl,
scripts/secpod_thegreenbow_ipsec_vpn_client_detect.nasl,
scripts/gb_mozilla_detect_lin.nasl,
scripts/secpod_apple_safari_detect_win_900003.nasl,
scripts/secpod_ocs_inventory_ng_detect.nasl,
scripts/rt_detect.nasl,
scripts/gb_tematres_detect.nasl,
scripts/gb_pgp_desktop_detect_win.nasl,
scripts/gb_xemacs_detect_win.nasl,
scripts/gb_foxmail_detect.nasl,
scripts/gb_shibboleth_sp_detect_win.nasl,
scripts/sympa_detect.nasl,
scripts/secpod_php_icalendar_detect.nasl,
scripts/gb_torrent_trader_classic_detect.nasl,
scripts/secpod_f-prot_av_detect_win.nasl,
scripts/gb_dm_filemanager_detect.nasl,
scripts/secpod_ibm_informix_dynamic_server_detect_lin.nasl,
scripts/openoffice_CB-A08-0068.nasl,
scripts/gb_robo_ftp_client_detect.nasl,
scripts/webmin.nasl,
scripts/gb_winftp_serv_detect.nasl,
scripts/secpod_kvirc_detect_win.nasl,
scripts/gb_horde_gollem_detect.nasl,
scripts/phpbb_detect.nasl,
scripts/dnsmasq_version.nasl,
scripts/gb_getsimple_cms_detect.nasl,
scripts/gb_google_earth_detect.nasl,
scripts/secpod_avahi_detection_lin.nasl,
scripts/gb_twiki_detect.nasl,
scripts/webapp_detect.nasl,
scripts/TinyPHPForum_detect.nasl,
scripts/firestats_detect.nasl,
scripts/secpod_pidgin_detect_lin.nasl,
scripts/gb_adobe_fms_detect.nasl,
scripts/gb_ftpshell_server_detect.nasl,
scripts/mambo_detect.nasl,
scripts/gb_apache_mod_jk_detect.nasl,
scripts/mldonkey_www.nasl,
scripts/tftgallery_detect.nasl,
scripts/secpod_mini_stream_prdts_detect.nasl,
scripts/secpod_woltlab_burning_board_detect.nasl,
scripts/secpod_changetrack_detect.nasl,
scripts/gb_typsoft_ftp_detect.nasl,
scripts/secpod_sdp_downloader_detect.nasl,
scripts/gb_telepark_wiki_detect.nasl,
scripts/secpod_nasl_detect_lin.nasl,
scripts/postgresql_detect.nasl,
scripts/secpod_ezip_detect.nasl,
scripts/secpod_pivot_detect.nasl,
scripts/gb_xerver_http_server_detect.nasl,
scripts/phpldapadmin_detect.nasl,
scripts/secpod_sun_opensso_detect.nasl,
scripts/gb_wireshark_detect_win.nasl,
scripts/spysweeper_corp_installed.nasl,
scripts/gb_google_chrome_detect_macosx.nasl,
scripts/deluxeBB_detect.nasl,
scripts/gb_symphony_cms_detect.nasl,
scripts/phpgroupware_detect.nasl,
scripts/gb_tdiary_detect.nasl,
scripts/secpod_openoffice_detect_win.nasl,
scripts/secpod_usebb_detect.nasl,
scripts/gb_outreach_project_tool_detect.nasl,
scripts/FreeWebShop_detect.nasl,
scripts/secpod_elog_detect.nasl,
scripts/gb_dokuwiki_detect.nasl,
scripts/secpod_mpg123_detect_lin.nasl,
scripts/gb_n_13_news_detect.nasl,
scripts/gb_kerio_mailserver_detect.nasl,
scripts/novell_edirectory_detect.nasl,
scripts/gb_swftools_detect_lin.nasl,
scripts/gb_webcamxp_detect.nasl,
scripts/gb_blazevideo_hdtv_detect.nasl,
scripts/secpod_ziproxy_server_detect.nasl,
scripts/secpod_netdecision_tftp_server_detect.nasl,
scripts/gb_avant_browser_detect.nasl,
scripts/secpod_pplive_detect.nasl,
scripts/secpod_hamster_audio_player_detect.nasl,
scripts/secpod_ghostscript_detect_win.nasl,
scripts/secpod_winamp_detect.nasl,
scripts/basilix_detect.nasl,
scripts/secpod_xpdf_detect.nasl,
scripts/secpod_adobe_prdts_detect_win.nasl,
scripts/gb_pecio_cms_detect.nasl,
scripts/gb_tor_detect_win.nasl,
scripts/secpod_amarok_detect_lin.nasl,
scripts/secpod_torrentvolve_detect.nasl,
scripts/secpod_wow_raid_manager_detect.nasl,
scripts/podcast_generator_detect.nasl,
scripts/gb_stardict_detect_lin.nasl,
scripts/secpod_viplay_detect.nasl,
scripts/gb_orbis_cms_detect.nasl,
scripts/secpod_freetype_detect_win.nasl,
scripts/secpod_putty_version.nasl,
scripts/gb_bozotic_http_server_detect.nasl,
scripts/secpod_media_player_classic_detect.nasl,
scripts/secpod_adobe_prdts_detect_macosx.nasl,
scripts/gb_mymsg_detect.nasl,
scripts/secpod_libpng_detect_lin.nasl,
scripts/gb_sun_java_web_console_detect.nasl,
scripts/gb_moinmoin_wiki_detect.nasl,
scripts/gb_qip_detect.nasl,
scripts/remote-detect-Leap_CMS.nasl,
scripts/secpod_fuzzylime_cms_detect.nasl,
scripts/secpod_irfanview_detect.nasl,
scripts/gb_justsystems_ichitaro_prdts_detect.nasl,
scripts/secpod_otrs_detect.nasl,
scripts/secpod_openswan_detect.nasl,
scripts/kerio_wrf_management_detection.nasl,
scripts/secpod_b2evolution_detect.nasl,
scripts/gb_html_parser_detect_lin.nasl,
scripts/secpod_overlook_detect.nasl,
scripts/ssh_detect.nasl,
scripts/secpod_metasploit_framework_detect_win.nasl,
scripts/secpod_libre_office_detect_win.nasl,
scripts/gb_apache_roller_detect.nasl,
scripts/gb_clamav_detect_lin.nasl,
scripts/gb_maildrop_detect.nasl,
scripts/secpod_frontaccounting_detect.nasl,
scripts/gb_livezilla_detect.nasl,
scripts/secpod_asterisk_detect.nasl,
scripts/gb_adobe_prdts_detect_lin.nasl,
scripts/gb_bpftp_detect.nasl,
scripts/gb_evolution_data_server_detect.nasl,
scripts/gb_gnutls_detect_win.nasl,
scripts/gb_jv2_folder_gallery_detect.nasl,
scripts/secpod_opendocman_detect.nasl,
scripts/gb_phpgenealogie_detect.nasl,
scripts/secpod_admin_news_tools_detect.nasl,
scripts/gb_bsplayer_detect.nasl,
scripts/snitz_forums_2000_detect.nasl,
scripts/gb_baofeng_storm_detect.nasl,
scripts/secpod_natterchat_detect.nasl,
scripts/gb_phpcoin_detect.nasl,
scripts/PowerPhlogger_detect.nasl,
scripts/gb_java_prdts_detect_lin.nasl,
scripts/gb_gpg4win_detect.nasl,
scripts/FormMail_detect.nasl,
scripts/gb_merak_mail_server_detect.nasl,
scripts/symantec_ws_detection.nasl,
scripts/gravity_board_x_detect.nasl,
scripts/secpod_ruby_detect_win.nasl,
scripts/gb_eureka_email_detect.nasl,
scripts/secpod_oxid_eshop_detect.nasl,
scripts/gb_firebird_detect_win.nasl,
scripts/secpod_php_nuke_detect.nasl,
scripts/secpod_netpet_cms_detect.nasl,
scripts/gb_sun_java_system_portal_server_detect.nasl,
scripts/mantis_detect.nasl,
scripts/secpod_ibm_lotus_notes_detect_lin.nasl,
scripts/gb_nullftp_server_detect.nasl,
scripts/secpod_geoserver_detect.nasl,
scripts/nginx_detect.nasl,
scripts/secpod_slurm_detect.nasl,
scripts/secpod_ms_visual_prdts_detect.nasl,
scripts/secpod_prochatrooms_detect.nasl,
scripts/photopost_detect.nasl,
scripts/secpod_mcafee_saas_endpoint_protection_detect.nasl,
scripts/secpod_sun_java_dir_server_detect_win.nasl,
scripts/gb_squidguard_detect.nasl,
scripts/gb_adobe_robohelp_server_detect.nasl,
scripts/secpod_ibm_db2_detect_win_900218.nasl,
scripts/secpod_audacity_detect_win.nasl,
scripts/vbulletin_detect.nasl,
scripts/webcalendar_detect.nasl,
scripts/secpod_pumpkin_tftp_detect.nasl,
scripts/secpod_avg_detect_win.nasl,
scripts/gb_ipsec-tools_detect.nasl,
scripts/gb_becky_internet_mail_detect.nasl,
scripts/secpod_netscape_detect_win.nasl,
scripts/secpod_xampp_detect.nasl,
scripts/secpod_tightvnc_detect_lin.nasl,
scripts/gb_peazip_detect_win.nasl,
scripts/gb_ibm_tivoli_dir_server_detect.nasl,
scripts/gb_yahoo_msg_detect.nasl,
scripts/secpod_sjs_access_manager_detect.nasl,
scripts/mssql_version.nasl,
scripts/secpod_systemtap_detect.nasl,
scripts/gb_south_river_webdrive_detect.nasl,
scripts/gb_dotproject_detect.nasl,
scripts/gb_electrasoft_32bit_ftp_detect.nasl,
scripts/gb_vmware_ovm_tools_detect_lin.nasl,
scripts/gb_netpbm_detect.nasl,
scripts/secpod_bitdefender_prdts_detect.nasl,
scripts/secpod_novell_prdts_detect_win.nasl,
scripts/secpod_neon_detect.nasl,
scripts/ventrilo_detect.nasl,
scripts/gb_ffftp_detect.nasl,
scripts/secpod_kde_konqueror_detect.nasl,
scripts/secpod_transmission_detect.nasl,
scripts/secpod_adobe_indesign_detect.nasl,
scripts/gb_mozilla_detect_win.nasl,
scripts/gb_cmscout_detect.nasl,
scripts/gb_hastymail2_detect.nasl,
scripts/secpod_tvp_detect.nasl,
scripts/secpod_eset_remote_administrator_detect.nasl,
scripts/secpod_ctorrent_detect.nasl,
scripts/secpod_solarwinds_tftp_server_detect.nasl,
scripts/secpod_ibm_informix_dynamic_server_detect_win.nasl,
scripts/secpod_vlc_media_player_detect_lin.nasl,
scripts/gb_free_download_mang_detect.nasl,
scripts/secpod_easy_rmtomp3_conv_detect.nasl,
scripts/opencart_detect.nasl,
scripts/gb_tcexam_detect.nasl,
scripts/gb_cuteftp_detect.nasl,
scripts/viewvc_detect.nasl,
scripts/checkpoint-vpn1-pat-information-disclosure.nasl,
scripts/gb_moodle_cms_detect.nasl,
scripts/secpod_opera_detection_linux_900037.nasl,
scripts/gb_firefox_detect_lin.nasl,
scripts/gb_irssi_detect_lin.nasl,
scripts/secpod_pidgin_detect_win.nasl,
scripts/gb_aimp_detect.nasl,
scripts/landesk_detect.nasl,
scripts/chora_detect.nasl,
scripts/cisco_vpn_client_detect.nasl,
scripts/secpod_xoops_detect.nasl,
scripts/gb_quagga_detect.nasl,
scripts/gb_evalsmsi_detect.nasl,
scripts/gb_openpro_detect.nasl,
scripts/gb_ikiwiki_detect.nasl,
scripts/OpenX_detect.nasl,
scripts/gb_gzip_detect_lin.nasl,
scripts/gb_realplayer_detect_win.nasl,
scripts/drupal_detect.nasl,
scripts/gb_opera_detect_macosx.nasl,
scripts/gb_nulllogic_groupware_detect_win.nasl,
scripts/gb_flock_detect_lin.nasl,
scripts/gb_adobe_captivate_detect.nasl,
scripts/ntop_detect.nasl,
scripts/phpmyfaq_detect.nasl,
scripts/punBB_detect.nasl,
scripts/X.nasl,
scripts/secpod_campsite_detect.nasl,
scripts/gb_libesmtp_detect.nasl,
scripts/gb_simple_machines_forum_detect.nasl,
scripts/secpod_raidenftpd_server_detect.nasl,
scripts/secpod_dovecot_detect.nasl,
scripts/secpod_ms_win_media_player_detect_900173.nasl,
scripts/gb_clicknet_cms_detect.nasl,
scripts/idb_detect.nasl,
scripts/secpod_lightneasy_detect.nasl,
scripts/gb_kaspersky_av_detect.nasl,
scripts/secpod_mutt_detect.nasl,
scripts/amanda_version.nasl,
scripts/secpod_php_detect_win.nasl,
scripts/gb_bpsoft_hex_workshop_detect.nasl,
scripts/secpod_alefmentor_detect.nasl,
scripts/gb_adobe_flash_player_detect_lin.nasl,
scripts/gb_grabit_detect.nasl,
scripts/gb_cpcreator_detect.nasl,
scripts/gb_zeuscart_detect.nasl,
scripts/secpod_adobe_dreamweaver_detect.nasl,
scripts/gb_orca_browser_detect.nasl,
scripts/bugzilla_detect.nasl,
scripts/prtg_traffic_grapher_detect.nasl,
scripts/secpod_apache_detect.nasl,
scripts/secpod_apache_apr-utils_detect.nasl,
scripts/gb_foxit_reader_detect.nasl,
scripts/sonicwall_vpn_client_detect.nasl,
scripts/gb_snort_detect_lin.nasl,
scripts/secpod_smartermail_detect.nasl,
scripts/gb_aria2_detect.nasl,
scripts/secpod_hp_openview_nnm_detect.nasl,
scripts/gb_ideal_administrator_detect.nasl,
scripts/gb_xvid_detect_win.nasl,
scripts/gb_claroline_detect.nasl,
scripts/bloofoxCMS_detect.nasl,
scripts/savce_installed.nasl,
scripts/gb_dotnetnuke_detect.nasl,
scripts/gb_elecard_mpeg_player_detect.nasl,
scripts/zone_alarm_local_dos.nasl,
scripts/gb_graphicsmagick_detect_lin.nasl,
scripts/secpod_xnview_detect_lin.nasl,
scripts/gb_netrisk_detect.nasl,
scripts/gb_xoops_celepar_detect.nasl,
scripts/gb_mapserver_detect.nasl,
scripts/squirrelmail_detect.nasl,
scripts/gb_bugtracker_detect.nasl,
scripts/secpod_winrar_detect.nasl,
scripts/aas_detect.nasl,
scripts/domino_default_db.nasl,
scripts/secpod_adobe_shockwave_detect_macosx.nasl,
scripts/joomla_detect.nasl,
scripts/gb_siestta_detect.nasl,
scripts/gb_ajaxportal_detect.nasl,
scripts/http_version.nasl,
scripts/modperl_version.nasl,
scripts/secpod_tikiwiki_detect.nasl,
scripts/atmail_detect.nasl,
scripts/gb_clamav_detect_win.nasl,
scripts/gb_ms_win_live_messenger_detect.nasl,
scripts/gb_ston3d_prdts_detect_lin.nasl,
scripts/secpod_ibm_db2_detect_linux_900217.nasl,
scripts/gb_weborf_webserver_detect.nasl,
scripts/secpod_openjdk_detect.nasl,
scripts/gb_document_manager_detect.nasl,
scripts/gb_perl_detect_win.nasl,
scripts/gb_snipegallery_detect.nasl,
scripts/gb_crux_products_detect.nasl,
scripts/cacti_detect.nasl,
scripts/secpod_ultravnc_detect_win.nasl,
scripts/remote-detect-WindowsSharepointServices.nasl,
scripts/webmedia_explorer_detect.nasl,
scripts/net2ftp_detect.nasl,
scripts/secpod_php_calendar_detect.nasl,
scripts/gb_trillian_detect.nasl,
scripts/adaptbb_detect.nasl,
scripts/gb_ccproxy_detect.nasl,
scripts/perforce_detect.nasl,
scripts/dokeos_detect.nasl,
scripts/gb_simpleid_detect.nasl,
scripts/gb_java_prdts_detect_win.nasl,
scripts/gb_google_chrome_detect_lin.nasl,
scripts/gb_uniform_server_detect.nasl,
scripts/remote-detect-MSdotNET-version.nasl,
scripts/gb_slysoft_prdts_detect.nasl,
scripts/patchlink_detection.nasl,
scripts/gb_ffmpeg_detect_lin.nasl,
scripts/gb_ultraiso_detect.nasl,
scripts/freznoshop_detect.nasl,
scripts/base_detect.nasl,
scripts/secpod_rosoft_audio_converter_detect.nasl,
scripts/phpshop_detect.nasl,
scripts/secpod_ibm_lotus_notes_detect_win.nasl,
scripts/secpod_isc_dhcp_client_detect.nasl,
scripts/gb_rekonq_detect.nasl,
scripts/gb_pivotx_detect.nasl,
scripts/secpod_postgresql_detect_lin.nasl,
scripts/secpod_tnftpd_detect.nasl,
scripts/gb_flatchat_detect.nasl,
scripts/gb_bournal_detect.nasl,
scripts/mozilloCMS_detect.nasl,
scripts/znc_detect.nasl,
scripts/gb_lussumo_vanilla_detect.nasl,
scripts/gb_sun_java_sys_web_serv_detect.nasl,
scripts/gb_visualization_library_detect_win.nasl,
scripts/gb_quixplorer_detect.nasl,
scripts/sybase_blank_password.nasl,
scripts/JBoss_enterprise_aplication_server_detect.nasl,
scripts/secpod_task_freak_detect.nasl,
scripts/secpod_tightvnc_detect_win.nasl,
scripts/gb_avg_av_detect_lin.nasl,
scripts/secpod_tfm_mmplayer_detect.nasl,
scripts/secpod_cups_detect.nasl,
scripts/secpod_surgemail_detect.nasl,
scripts/gb_pmwiki_detect.nasl,
scripts/secpod_phpmyadmin_detect_900129.nasl,
scripts/secpod_vuplayer_detect.nasl,
scripts/gb_httpdx_server_detect.nasl,
scripts/gb_apache_struts_detect.nasl,
scripts/secpod_freesshd_detect.nasl,
scripts/gb_openmairie_prdts_detect.nasl,
scripts/secpod_blender_detect_lin.nasl,
scripts/secpod_adobe_shockwave_player_detect.nasl,
scripts/gb_titan_ftp_detect.nasl,
scripts/secpod_divx_web_player_detect.nasl,
scripts/GlassFish_detect.nasl,
scripts/secpod_datatrack_system_detect.nasl,
scripts/gb_foxit_phantom_detect.nasl,
scripts/gb_lunascape_detect.nasl,
scripts/gb_citrix_provisioning_services_detect.nasl,
scripts/gb_skype_detect_win.nasl,
scripts/coppermine_detect.nasl,
scripts/secpod_hyleos_chemview_detect.nasl,
scripts/serendipity_detect.nasl,
scripts/secpod_sun_virtualbox_detect_lin.nasl,
scripts/secpod_labtam_proftp_detect.nasl,
scripts/secpod_jag_detect.nasl,
scripts/osticket_detect.nasl,
scripts/secpod_realplayer_detect_macosx.nasl,
scripts/gb_pyftpdlib_detect.nasl,
scripts/secpod_vlc_media_player_detect_win.nasl,
scripts/secpod_imagemagick_detect_lin.nasl,
scripts/gb_sigplus_pro_activex_detect.nasl,
scripts/secpod_nakid_cms_detect.nasl,
scripts/gb_thunderbird_detect_lin.nasl,
scripts/secpod_cubecart_detect.nasl,
scripts/secpod_bopup_server_detect.nasl,
scripts/secpod_zikula_detect.nasl,
scripts/gb_backuppc_detect.nasl,
scripts/gb_firefox_detect_win.nasl,
scripts/gb_phpnagios_detect.nasl,
scripts/gb_apache_tomcat_detect.nasl,
scripts/secpod_g15daemon_detect.nasl,
scripts/secpod_opera_detection_win_900036.nasl,
scripts/gb_2532gigs_detect.nasl,
scripts/gb_novell_zhm_detect.nasl,
scripts/gb_rhinosoft_serv-u_detect.nasl,
scripts/secpod_discloser_detect.nasl,
scripts/secpod_hplip_detect_lin.nasl,
scripts/gb_qtweb_detect.nasl,
scripts/secpod_crawltrack_detect.nasl,
scripts/phplive_detect.nasl,
scripts/gb_designworks_professional_detect.nasl,
scripts/flatpress_detect.nasl,
scripts/secpod_qemu_detect_lin.nasl,
scripts/gb_mcafee_groupshield_detect.nasl,
scripts/gb_siteengine_detect.nasl,
scripts/gb_ms_money_detect.nasl,
scripts/gb_v-webmail_detect.nasl,
scripts/secpod_cyrus_sasllib_detect.nasl,
scripts/secpod_home_ftp_server_detect.nasl,
scripts/gb_seamonkey_detect_lin.nasl,
scripts/secpod_silc_prdts_detect.nasl,
scripts/gb_gzip_detect_win.nasl,
scripts/gb_mdpro_detect.nasl,
scripts/gb_reflection_secureit_unix_detect_lin.nasl,
scripts/secpod_opensc_detect_win.nasl,
scripts/gb_gizmo5_detect_lin.nasl,
scripts/gb_openssl_detect_lin.nasl:
Directly register CPEs for the detected applications.

* scripts/cpe.inc: Removed corresponding CPEs.


Modified: trunk/openvas-plugins/ChangeLog
===================================================================
--- trunk/openvas-plugins/ChangeLog	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/ChangeLog	2011-09-19 09:56:25 UTC (rev 11631)
@@ -1,5 +1,623 @@
 2011-09-19  Henri Doreau <henri.doreau at gmail.com>
 
+	Decentralized registration of CPEs from within application detection
+	NVTs [Mareike Piechowiak].
+
+	* scripts/gb_flock_detect_win.nasl,
+	scripts/secpod_ca_mult_prdts_detect_win.nasl,
+	scripts/secpod_powerzip_detect.nasl,
+	scripts/e107_detect.nasl,
+	scripts/gb_an_guestbook_detect.nasl,
+	scripts/gb_ktorrent_detect.nasl,
+	scripts/ntp_open.nasl,
+	scripts/gb_icq_detect.nasl,
+	scripts/secpod_fcms_detect.nasl,
+	scripts/sahana_detect.nasl,
+	scripts/gb_zenoss_serv_detect.nasl,
+	scripts/gb_avast_av_detect_lin.nasl,
+	scripts/secpod_sun_java_app_serv_detect.nasl,
+	scripts/gb_foswiki_detect.nasl,
+	scripts/secpod_cowon_jetaudio_detect.nasl,
+	scripts/secpod_ms_wpp_enterprise_library_detect.nasl,
+	scripts/gb_memcached_detect.nasl,
+	scripts/gb_magic_iso_maker_detect.nasl,
+	scripts/gb_k-meleon_detect.nasl,
+	scripts/nagios_detect.nasl,
+	scripts/secpod_proftpd_server_remote_detect.nasl,
+	scripts/secpod_apple_quicktime_detection_win_900124.nasl,
+	scripts/secpod_vmware_springsource_tc_server_detect.nasl,
+	scripts/secpod_mahara_detect.nasl,
+	scripts/nagios_statd_detect.nasl,
+	scripts/gb_fsecure_prdts_detect_lin.nasl,
+	scripts/gb_vmware_prdts_detect_lin.nasl,
+	scripts/secpod_zeuscms_detect.nasl,
+	scripts/find_service2.nasl,
+	scripts/secpod_tor_detect_lin.nasl,
+	scripts/secpod_elecard_avchd_player_detect.nasl,
+	scripts/gb_php_quick_arcade_detect.nasl,
+	scripts/gb_adobe_flash_player_detect_win.nasl,
+	scripts/eggdrop_detect.nasl,
+	scripts/notftp_detect.nasl,
+	scripts/webfileexplorer_detect.nasl,
+	scripts/phpBugTracker_detect.nasl,
+	scripts/gb_ms_ie_detect.nasl,
+	scripts/secpod_ida_pro_detect.nasl,
+	scripts/gb_jetty_detect.nasl,
+	scripts/gb_opensc_detect.nasl,
+	scripts/gb_wampserver_detect.nasl,
+	scripts/secpod_filezilla_server_detect.nasl,
+	scripts/gb_hp_storage_mirroring_detect.nasl,
+	scripts/secpod_xnview_detect_win.nasl,
+	scripts/gb_limny_detect.nasl,
+	scripts/TorrentTrader_detect.nasl,
+	scripts/hp_data_protector_installed.nasl,
+	scripts/gb_buildbot_detect.nasl,
+	scripts/secpod_ws_ftp_client_detect.nasl,
+	scripts/secpod_xymon_monitor_detect.nasl,
+	scripts/gb_openfire_detect.nasl,
+	scripts/secpod_ftpshell_client_detect.nasl,
+	scripts/gb_ortro_detect.nasl,
+	scripts/secpod_sql_ledger_detect.nasl,
+	scripts/gb_barcode_detect.nasl,
+	scripts/cvstrac_detect.nasl,
+	scripts/gb_ston3d_prdts_detect_win.nasl,
+	scripts/secpod_aphpkb_detect.nasl,
+	scripts/secpod_amsn_detect_win.nasl,
+	scripts/secpod_beanstalkd_detect.nasl,
+	scripts/cvspserver_version.nasl,
+	scripts/gb_blob_blog_system_detect.nasl,
+	scripts/gb_ibm_install_manager_detect_win.nasl,
+	scripts/family_connections_detect.nasl,
+	scripts/gb_panda_prdts_detect.nasl,
+	scripts/secpod_noticeware_mail_server_detect.nasl,
+	scripts/realty_web_base_detect.nasl,
+	scripts/secpod_subversion_detect.nasl,
+	scripts/secpod_cutenews_detect_win_900128.nasl,
+	scripts/secpod_tembria_server_monitor_detect.nasl,
+	scripts/gb_jpgraph_detect.nasl,
+	scripts/gb_wireshark_detect_lin.nasl,
+	scripts/jd_web_detect.nasl,
+	scripts/gb_google_chrome_detect_win.nasl,
+	scripts/gb_flashlight_detect.nasl,
+	scripts/secpod_proftpd_server_detect.nasl,
+	scripts/gb_maxthon_detect.nasl,
+	scripts/nsd_version.nasl,
+	scripts/gb_golden_ftp_server_detect.nasl,
+	scripts/secpod_openoffice_detect_lin.nasl,
+	scripts/secpod_tt_website_manager_detect.nasl,
+	scripts/gb_google_sketchup_detect_win.nasl,
+	scripts/gb_sinecms_detect.nasl,
+	scripts/horde_detect.nasl,
+	scripts/gb_kerberos5_detect.nasl,
+	scripts/gb_arcavir_av_prdts_detect.nasl,
+	scripts/secpod_limesurvey_detect.nasl,
+	scripts/secpod_mediawiki_detect.nasl,
+	scripts/gb_alleycode_html_editor_detect.nasl,
+	scripts/gb_linkspheric_detect.nasl,
+	scripts/gb_adobe_photoshop_detect.nasl,
+	scripts/secpod_postgresql_detect_win.nasl,
+	scripts/gb_varnish_detect.nasl,
+	scripts/gb_ruby_rails_detect.nasl,
+	scripts/secpod_openforum_detect.nasl,
+	scripts/secpod_ghostscript_detect_lin.nasl,
+	scripts/secpod_ms_office_detection_900025.nasl,
+	scripts/secpod_cmailserver_detect.nasl,
+	scripts/AfterLogic_WebMail_Pro_detect.nasl,
+	scripts/gb_sendmail_detect.nasl,
+	scripts/secpod_foxit_wac_server_detect.nasl,
+	scripts/secpod_apache_tiles_detect.nasl,
+	scripts/gb_aol_detect.nasl,
+	scripts/secpod_symantec_prdts_detect.nasl,
+	scripts/gb_gd_graphics_library_detect_lin.nasl,
+	scripts/secpod_mathematica_detect_lin.nasl,
+	scripts/secpod_gupnp_detect.nasl,
+	scripts/axigen_web_detect.nasl,
+	scripts/secpod_faslo_player_detect.nasl,
+	scripts/gb_ntp_detect_lin.nasl,
+	scripts/gb_strongswan_detect.nasl,
+	scripts/gb_php_detect.nasl,
+	scripts/secpod_websvn_detect.nasl,
+	scripts/phpWebThings_detect.nasl,
+	scripts/gb_orbit_downloader_detect.nasl,
+	scripts/secpod_wsftp_win_detect.nasl,
+	scripts/secpod_freetype_detect_lin.nasl,
+	scripts/barracuda_im_firewall_detect.nasl,
+	scripts/oracle_tnslsnr_version.nasl,
+	scripts/secpod_php_fusion_detect.nasl,
+	scripts/secpod_wingate_detect.nasl,
+	scripts/secpod_formmax_detect.nasl,
+	scripts/gb_trendmicro_internet_security_detect.nasl,
+	scripts/secpod_audistat_detect.nasl,
+	scripts/gb_sonic_spot_audioactive_player_detect.nasl,
+	scripts/linpha_detect.nasl,
+	scripts/gb_firewall_builder_detect_lin.nasl,
+	scripts/secpod_mikmod_detect.nasl,
+	scripts/secpod_apple_itunes_detection_win_900123.nasl,
+	scripts/secpod_libre_office_detect_lin.nasl,
+	scripts/secpod_pango_detect.nasl,
+	scripts/gb_yabsoft_aihs_detect.nasl,
+	scripts/gb_mrbs_detect.nasl,
+	scripts/gb_django_detect_lin.nasl,
+	scripts/gb_phpbazar_detect.nasl,
+	scripts/gb_icq_toolbar_detect.nasl,
+	scripts/cyrus_imap_prelogin_overflow.nasl,
+	scripts/secpod_hp_smh_detect.nasl,
+	scripts/gb_cscope_detect.nasl,
+	scripts/secpod_valarsoft_webmatic_detect.nasl,
+	scripts/gb_ibm_db2_remote_detect.nasl,
+	scripts/secpod_sun_virtualbox_detect_win.nasl,
+	scripts/secpod_axon_virtual_pbx_detect.nasl,
+	scripts/secpod_imagemagick_detect_win.nasl,
+	scripts/secpod_servu_ftp_server_detect.nasl,
+	scripts/gb_citrix_license_server_detect.nasl,
+	scripts/secpod_wordpress_detect_900182.nasl,
+	scripts/gb_filecopa_ftp_server_detect.nasl,
+	scripts/gb_xm_easy_personal_ftp_detect.nasl,
+	scripts/gb_image_hosting_script_dpi_detect.nasl,
+	scripts/gb_expressionengine_detect.nasl,
+	scripts/gb_thunderbird_detect_win.nasl,
+	scripts/gb_apache_apr_detect.nasl,
+	scripts/gb_pacific_timesheet_detect.nasl,
+	scripts/secpod_ruby_detect_lin.nasl,
+	scripts/eliteCMS_detect.nasl,
+	scripts/gb_igss_detect.nasl,
+	scripts/secpod_bitweaver_detect.nasl,
+	scripts/phorum_detect.nasl,
+	scripts/secpod_freeradius_detect.nasl,
+	scripts/secpod_trellian_ftp_detect.nasl,
+	scripts/ePo_detect.nasl,
+	scripts/gb_ibm_db2mc_detect.nasl,
+	scripts/secpod_tcpdb_detect.nasl,
+	scripts/cutenews_detect.nasl,
+	scripts/secpod_php_address_book_detect.nasl,
+	scripts/secpod_uebimiau_webmail_detect.nasl,
+	scripts/gb_seamonkey_detect_win.nasl,
+	scripts/secpod_sun_java_dir_server_detect_lin.nasl,
+	scripts/secpod_xitami_server_detect.nasl,
+	scripts/secpod_blackberry_desktop_software_detect_win.nasl,
+	scripts/gb_flashchat_detect.nasl,
+	scripts/gb_openssl_detect_win.nasl,
+	scripts/gb_f-prot_av_detect_lin.nasl,
+	scripts/gb_pegasus_mail_detect.nasl,
+	scripts/gb_serenity_player_detect.nasl,
+	scripts/gb_sun_java_sys_web_proxy_server_detect.nasl,
+	scripts/secpod_ms_iis_detect.nasl,
+	scripts/secpod_audacity_detect_lin.nasl,
+	scripts/secpod_adobe_jrun_detect.nasl,
+	scripts/gb_shareaza_detect.nasl,
+	scripts/invision_power_board_detect.nasl,
+	scripts/gb_xwiki_enterprise_detect.nasl,
+	scripts/secpod_efront_detect.nasl,
+	scripts/secpod_xilisoft_video_conv_detect.nasl,
+	scripts/gb_7zip_detect_lin.nasl,
+	scripts/gb_avast_av_detect_win.nasl,
+	scripts/secpod_netscape_detect_lin.nasl,
+	scripts/gb_peazip_detect_lin.nasl,
+	scripts/TinyWebGallery_detect.nasl,
+	scripts/secpod_office_products_version_900032.nasl,
+	scripts/gb_python_detect_win.nasl,
+	scripts/secpod_novell_prdts_detect_lin.nasl,
+	scripts/phpScheduleIt_detect.nasl,
+	scripts/gb_navicopa_server_detect.nasl,
+	scripts/gb_gale_detect.nasl,
+	scripts/gb_fsecure_prdts_detect_win.nasl,
+	scripts/secpod_squid_detect.nasl,
+	scripts/gb_vmware_prdts_detect_win.nasl,
+	scripts/secpod_thegreenbow_ipsec_vpn_client_detect.nasl,
+	scripts/gb_mozilla_detect_lin.nasl,
+	scripts/secpod_apple_safari_detect_win_900003.nasl,
+	scripts/secpod_ocs_inventory_ng_detect.nasl,
+	scripts/rt_detect.nasl,
+	scripts/gb_tematres_detect.nasl,
+	scripts/gb_pgp_desktop_detect_win.nasl,
+	scripts/gb_xemacs_detect_win.nasl,
+	scripts/gb_foxmail_detect.nasl,
+	scripts/gb_shibboleth_sp_detect_win.nasl,
+	scripts/sympa_detect.nasl,
+	scripts/secpod_php_icalendar_detect.nasl,
+	scripts/gb_torrent_trader_classic_detect.nasl,
+	scripts/secpod_f-prot_av_detect_win.nasl,
+	scripts/gb_dm_filemanager_detect.nasl,
+	scripts/secpod_ibm_informix_dynamic_server_detect_lin.nasl,
+	scripts/openoffice_CB-A08-0068.nasl,
+	scripts/gb_robo_ftp_client_detect.nasl,
+	scripts/webmin.nasl,
+	scripts/gb_winftp_serv_detect.nasl,
+	scripts/secpod_kvirc_detect_win.nasl,
+	scripts/gb_horde_gollem_detect.nasl,
+	scripts/phpbb_detect.nasl,
+	scripts/dnsmasq_version.nasl,
+	scripts/gb_getsimple_cms_detect.nasl,
+	scripts/gb_google_earth_detect.nasl,
+	scripts/secpod_avahi_detection_lin.nasl,
+	scripts/gb_twiki_detect.nasl,
+	scripts/webapp_detect.nasl,
+	scripts/TinyPHPForum_detect.nasl,
+	scripts/firestats_detect.nasl,
+	scripts/secpod_pidgin_detect_lin.nasl,
+	scripts/gb_adobe_fms_detect.nasl,
+	scripts/gb_ftpshell_server_detect.nasl,
+	scripts/mambo_detect.nasl,
+	scripts/gb_apache_mod_jk_detect.nasl,
+	scripts/mldonkey_www.nasl,
+	scripts/tftgallery_detect.nasl,
+	scripts/secpod_mini_stream_prdts_detect.nasl,
+	scripts/secpod_woltlab_burning_board_detect.nasl,
+	scripts/secpod_changetrack_detect.nasl,
+	scripts/gb_typsoft_ftp_detect.nasl,
+	scripts/secpod_sdp_downloader_detect.nasl,
+	scripts/gb_telepark_wiki_detect.nasl,
+	scripts/secpod_nasl_detect_lin.nasl,
+	scripts/postgresql_detect.nasl,
+	scripts/secpod_ezip_detect.nasl,
+	scripts/secpod_pivot_detect.nasl,
+	scripts/gb_xerver_http_server_detect.nasl,
+	scripts/phpldapadmin_detect.nasl,
+	scripts/secpod_sun_opensso_detect.nasl,
+	scripts/gb_wireshark_detect_win.nasl,
+	scripts/spysweeper_corp_installed.nasl,
+	scripts/gb_google_chrome_detect_macosx.nasl,
+	scripts/deluxeBB_detect.nasl,
+	scripts/gb_symphony_cms_detect.nasl,
+	scripts/phpgroupware_detect.nasl,
+	scripts/gb_tdiary_detect.nasl,
+	scripts/secpod_openoffice_detect_win.nasl,
+	scripts/secpod_usebb_detect.nasl,
+	scripts/gb_outreach_project_tool_detect.nasl,
+	scripts/FreeWebShop_detect.nasl,
+	scripts/secpod_elog_detect.nasl,
+	scripts/gb_dokuwiki_detect.nasl,
+	scripts/secpod_mpg123_detect_lin.nasl,
+	scripts/gb_n_13_news_detect.nasl,
+	scripts/gb_kerio_mailserver_detect.nasl,
+	scripts/novell_edirectory_detect.nasl,
+	scripts/gb_swftools_detect_lin.nasl,
+	scripts/gb_webcamxp_detect.nasl,
+	scripts/gb_blazevideo_hdtv_detect.nasl,
+	scripts/secpod_ziproxy_server_detect.nasl,
+	scripts/secpod_netdecision_tftp_server_detect.nasl,
+	scripts/gb_avant_browser_detect.nasl,
+	scripts/secpod_pplive_detect.nasl,
+	scripts/secpod_hamster_audio_player_detect.nasl,
+	scripts/secpod_ghostscript_detect_win.nasl,
+	scripts/secpod_winamp_detect.nasl,
+	scripts/basilix_detect.nasl,
+	scripts/secpod_xpdf_detect.nasl,
+	scripts/secpod_adobe_prdts_detect_win.nasl,
+	scripts/gb_pecio_cms_detect.nasl,
+	scripts/gb_tor_detect_win.nasl,
+	scripts/secpod_amarok_detect_lin.nasl,
+	scripts/secpod_torrentvolve_detect.nasl,
+	scripts/secpod_wow_raid_manager_detect.nasl,
+	scripts/podcast_generator_detect.nasl,
+	scripts/gb_stardict_detect_lin.nasl,
+	scripts/secpod_viplay_detect.nasl,
+	scripts/gb_orbis_cms_detect.nasl,
+	scripts/secpod_freetype_detect_win.nasl,
+	scripts/secpod_putty_version.nasl,
+	scripts/gb_bozotic_http_server_detect.nasl,
+	scripts/secpod_media_player_classic_detect.nasl,
+	scripts/secpod_adobe_prdts_detect_macosx.nasl,
+	scripts/gb_mymsg_detect.nasl,
+	scripts/secpod_libpng_detect_lin.nasl,
+	scripts/gb_sun_java_web_console_detect.nasl,
+	scripts/gb_moinmoin_wiki_detect.nasl,
+	scripts/gb_qip_detect.nasl,
+	scripts/remote-detect-Leap_CMS.nasl,
+	scripts/secpod_fuzzylime_cms_detect.nasl,
+	scripts/secpod_irfanview_detect.nasl,
+	scripts/gb_justsystems_ichitaro_prdts_detect.nasl,
+	scripts/secpod_otrs_detect.nasl,
+	scripts/secpod_openswan_detect.nasl,
+	scripts/kerio_wrf_management_detection.nasl,
+	scripts/secpod_b2evolution_detect.nasl,
+	scripts/gb_html_parser_detect_lin.nasl,
+	scripts/secpod_overlook_detect.nasl,
+	scripts/ssh_detect.nasl,
+	scripts/secpod_metasploit_framework_detect_win.nasl,
+	scripts/secpod_libre_office_detect_win.nasl,
+	scripts/gb_apache_roller_detect.nasl,
+	scripts/gb_clamav_detect_lin.nasl,
+	scripts/gb_maildrop_detect.nasl,
+	scripts/secpod_frontaccounting_detect.nasl,
+	scripts/gb_livezilla_detect.nasl,
+	scripts/secpod_asterisk_detect.nasl,
+	scripts/gb_adobe_prdts_detect_lin.nasl,
+	scripts/gb_bpftp_detect.nasl,
+	scripts/gb_evolution_data_server_detect.nasl,
+	scripts/gb_gnutls_detect_win.nasl,
+	scripts/gb_jv2_folder_gallery_detect.nasl,
+	scripts/secpod_opendocman_detect.nasl,
+	scripts/gb_phpgenealogie_detect.nasl,
+	scripts/secpod_admin_news_tools_detect.nasl,
+	scripts/gb_bsplayer_detect.nasl,
+	scripts/snitz_forums_2000_detect.nasl,
+	scripts/gb_baofeng_storm_detect.nasl,
+	scripts/secpod_natterchat_detect.nasl,
+	scripts/gb_phpcoin_detect.nasl,
+	scripts/PowerPhlogger_detect.nasl,
+	scripts/gb_java_prdts_detect_lin.nasl,
+	scripts/gb_gpg4win_detect.nasl,
+	scripts/FormMail_detect.nasl,
+	scripts/gb_merak_mail_server_detect.nasl,
+	scripts/symantec_ws_detection.nasl,
+	scripts/gravity_board_x_detect.nasl,
+	scripts/secpod_ruby_detect_win.nasl,
+	scripts/gb_eureka_email_detect.nasl,
+	scripts/secpod_oxid_eshop_detect.nasl,
+	scripts/gb_firebird_detect_win.nasl,
+	scripts/secpod_php_nuke_detect.nasl,
+	scripts/secpod_netpet_cms_detect.nasl,
+	scripts/gb_sun_java_system_portal_server_detect.nasl,
+	scripts/mantis_detect.nasl,
+	scripts/secpod_ibm_lotus_notes_detect_lin.nasl,
+	scripts/gb_nullftp_server_detect.nasl,
+	scripts/secpod_geoserver_detect.nasl,
+	scripts/nginx_detect.nasl,
+	scripts/secpod_slurm_detect.nasl,
+	scripts/secpod_ms_visual_prdts_detect.nasl,
+	scripts/secpod_prochatrooms_detect.nasl,
+	scripts/photopost_detect.nasl,
+	scripts/secpod_mcafee_saas_endpoint_protection_detect.nasl,
+	scripts/secpod_sun_java_dir_server_detect_win.nasl,
+	scripts/gb_squidguard_detect.nasl,
+	scripts/gb_adobe_robohelp_server_detect.nasl,
+	scripts/secpod_ibm_db2_detect_win_900218.nasl,
+	scripts/secpod_audacity_detect_win.nasl,
+	scripts/vbulletin_detect.nasl,
+	scripts/webcalendar_detect.nasl,
+	scripts/secpod_pumpkin_tftp_detect.nasl,
+	scripts/secpod_avg_detect_win.nasl,
+	scripts/gb_ipsec-tools_detect.nasl,
+	scripts/gb_becky_internet_mail_detect.nasl,
+	scripts/secpod_netscape_detect_win.nasl,
+	scripts/secpod_xampp_detect.nasl,
+	scripts/secpod_tightvnc_detect_lin.nasl,
+	scripts/gb_peazip_detect_win.nasl,
+	scripts/gb_ibm_tivoli_dir_server_detect.nasl,
+	scripts/gb_yahoo_msg_detect.nasl,
+	scripts/secpod_sjs_access_manager_detect.nasl,
+	scripts/mssql_version.nasl,
+	scripts/secpod_systemtap_detect.nasl,
+	scripts/gb_south_river_webdrive_detect.nasl,
+	scripts/gb_dotproject_detect.nasl,
+	scripts/gb_electrasoft_32bit_ftp_detect.nasl,
+	scripts/gb_vmware_ovm_tools_detect_lin.nasl,
+	scripts/gb_netpbm_detect.nasl,
+	scripts/secpod_bitdefender_prdts_detect.nasl,
+	scripts/secpod_novell_prdts_detect_win.nasl,
+	scripts/secpod_neon_detect.nasl,
+	scripts/ventrilo_detect.nasl,
+	scripts/gb_ffftp_detect.nasl,
+	scripts/secpod_kde_konqueror_detect.nasl,
+	scripts/secpod_transmission_detect.nasl,
+	scripts/secpod_adobe_indesign_detect.nasl,
+	scripts/gb_mozilla_detect_win.nasl,
+	scripts/gb_cmscout_detect.nasl,
+	scripts/gb_hastymail2_detect.nasl,
+	scripts/secpod_tvp_detect.nasl,
+	scripts/secpod_eset_remote_administrator_detect.nasl,
+	scripts/secpod_ctorrent_detect.nasl,
+	scripts/secpod_solarwinds_tftp_server_detect.nasl,
+	scripts/secpod_ibm_informix_dynamic_server_detect_win.nasl,
+	scripts/secpod_vlc_media_player_detect_lin.nasl,
+	scripts/gb_free_download_mang_detect.nasl,
+	scripts/secpod_easy_rmtomp3_conv_detect.nasl,
+	scripts/opencart_detect.nasl,
+	scripts/gb_tcexam_detect.nasl,
+	scripts/gb_cuteftp_detect.nasl,
+	scripts/viewvc_detect.nasl,
+	scripts/checkpoint-vpn1-pat-information-disclosure.nasl,
+	scripts/gb_moodle_cms_detect.nasl,
+	scripts/secpod_opera_detection_linux_900037.nasl,
+	scripts/gb_firefox_detect_lin.nasl,
+	scripts/gb_irssi_detect_lin.nasl,
+	scripts/secpod_pidgin_detect_win.nasl,
+	scripts/gb_aimp_detect.nasl,
+	scripts/landesk_detect.nasl,
+	scripts/chora_detect.nasl,
+	scripts/cisco_vpn_client_detect.nasl,
+	scripts/secpod_xoops_detect.nasl,
+	scripts/gb_quagga_detect.nasl,
+	scripts/gb_evalsmsi_detect.nasl,
+	scripts/gb_openpro_detect.nasl,
+	scripts/gb_ikiwiki_detect.nasl,
+	scripts/OpenX_detect.nasl,
+	scripts/gb_gzip_detect_lin.nasl,
+	scripts/gb_realplayer_detect_win.nasl,
+	scripts/drupal_detect.nasl,
+	scripts/gb_opera_detect_macosx.nasl,
+	scripts/gb_nulllogic_groupware_detect_win.nasl,
+	scripts/gb_flock_detect_lin.nasl,
+	scripts/gb_adobe_captivate_detect.nasl,
+	scripts/ntop_detect.nasl,
+	scripts/phpmyfaq_detect.nasl,
+	scripts/punBB_detect.nasl,
+	scripts/X.nasl,
+	scripts/secpod_campsite_detect.nasl,
+	scripts/gb_libesmtp_detect.nasl,
+	scripts/gb_simple_machines_forum_detect.nasl,
+	scripts/secpod_raidenftpd_server_detect.nasl,
+	scripts/secpod_dovecot_detect.nasl,
+	scripts/secpod_ms_win_media_player_detect_900173.nasl,
+	scripts/gb_clicknet_cms_detect.nasl,
+	scripts/idb_detect.nasl,
+	scripts/secpod_lightneasy_detect.nasl,
+	scripts/gb_kaspersky_av_detect.nasl,
+	scripts/secpod_mutt_detect.nasl,
+	scripts/amanda_version.nasl,
+	scripts/secpod_php_detect_win.nasl,
+	scripts/gb_bpsoft_hex_workshop_detect.nasl,
+	scripts/secpod_alefmentor_detect.nasl,
+	scripts/gb_adobe_flash_player_detect_lin.nasl,
+	scripts/gb_grabit_detect.nasl,
+	scripts/gb_cpcreator_detect.nasl,
+	scripts/gb_zeuscart_detect.nasl,
+	scripts/secpod_adobe_dreamweaver_detect.nasl,
+	scripts/gb_orca_browser_detect.nasl,
+	scripts/bugzilla_detect.nasl,
+	scripts/prtg_traffic_grapher_detect.nasl,
+	scripts/secpod_apache_detect.nasl,
+	scripts/secpod_apache_apr-utils_detect.nasl,
+	scripts/gb_foxit_reader_detect.nasl,
+	scripts/sonicwall_vpn_client_detect.nasl,
+	scripts/gb_snort_detect_lin.nasl,
+	scripts/secpod_smartermail_detect.nasl,
+	scripts/gb_aria2_detect.nasl,
+	scripts/secpod_hp_openview_nnm_detect.nasl,
+	scripts/gb_ideal_administrator_detect.nasl,
+	scripts/gb_xvid_detect_win.nasl,
+	scripts/gb_claroline_detect.nasl,
+	scripts/bloofoxCMS_detect.nasl,
+	scripts/savce_installed.nasl,
+	scripts/gb_dotnetnuke_detect.nasl,
+	scripts/gb_elecard_mpeg_player_detect.nasl,
+	scripts/zone_alarm_local_dos.nasl,
+	scripts/gb_graphicsmagick_detect_lin.nasl,
+	scripts/secpod_xnview_detect_lin.nasl,
+	scripts/gb_netrisk_detect.nasl,
+	scripts/gb_xoops_celepar_detect.nasl,
+	scripts/gb_mapserver_detect.nasl,
+	scripts/squirrelmail_detect.nasl,
+	scripts/gb_bugtracker_detect.nasl,
+	scripts/secpod_winrar_detect.nasl,
+	scripts/aas_detect.nasl,
+	scripts/domino_default_db.nasl,
+	scripts/secpod_adobe_shockwave_detect_macosx.nasl,
+	scripts/joomla_detect.nasl,
+	scripts/gb_siestta_detect.nasl,
+	scripts/gb_ajaxportal_detect.nasl,
+	scripts/http_version.nasl,
+	scripts/modperl_version.nasl,
+	scripts/secpod_tikiwiki_detect.nasl,
+	scripts/atmail_detect.nasl,
+	scripts/gb_clamav_detect_win.nasl,
+	scripts/gb_ms_win_live_messenger_detect.nasl,
+	scripts/gb_ston3d_prdts_detect_lin.nasl,
+	scripts/secpod_ibm_db2_detect_linux_900217.nasl,
+	scripts/gb_weborf_webserver_detect.nasl,
+	scripts/secpod_openjdk_detect.nasl,
+	scripts/gb_document_manager_detect.nasl,
+	scripts/gb_perl_detect_win.nasl,
+	scripts/gb_snipegallery_detect.nasl,
+	scripts/gb_crux_products_detect.nasl,
+	scripts/cacti_detect.nasl,
+	scripts/secpod_ultravnc_detect_win.nasl,
+	scripts/remote-detect-WindowsSharepointServices.nasl,
+	scripts/webmedia_explorer_detect.nasl,
+	scripts/net2ftp_detect.nasl,
+	scripts/secpod_php_calendar_detect.nasl,
+	scripts/gb_trillian_detect.nasl,
+	scripts/adaptbb_detect.nasl,
+	scripts/gb_ccproxy_detect.nasl,
+	scripts/perforce_detect.nasl,
+	scripts/dokeos_detect.nasl,
+	scripts/gb_simpleid_detect.nasl,
+	scripts/gb_java_prdts_detect_win.nasl,
+	scripts/gb_google_chrome_detect_lin.nasl,
+	scripts/gb_uniform_server_detect.nasl,
+	scripts/remote-detect-MSdotNET-version.nasl,
+	scripts/gb_slysoft_prdts_detect.nasl,
+	scripts/patchlink_detection.nasl,
+	scripts/gb_ffmpeg_detect_lin.nasl,
+	scripts/gb_ultraiso_detect.nasl,
+	scripts/freznoshop_detect.nasl,
+	scripts/base_detect.nasl,
+	scripts/secpod_rosoft_audio_converter_detect.nasl,
+	scripts/phpshop_detect.nasl,
+	scripts/secpod_ibm_lotus_notes_detect_win.nasl,
+	scripts/secpod_isc_dhcp_client_detect.nasl,
+	scripts/gb_rekonq_detect.nasl,
+	scripts/gb_pivotx_detect.nasl,
+	scripts/secpod_postgresql_detect_lin.nasl,
+	scripts/secpod_tnftpd_detect.nasl,
+	scripts/gb_flatchat_detect.nasl,
+	scripts/gb_bournal_detect.nasl,
+	scripts/mozilloCMS_detect.nasl,
+	scripts/znc_detect.nasl,
+	scripts/gb_lussumo_vanilla_detect.nasl,
+	scripts/gb_sun_java_sys_web_serv_detect.nasl,
+	scripts/gb_visualization_library_detect_win.nasl,
+	scripts/gb_quixplorer_detect.nasl,
+	scripts/sybase_blank_password.nasl,
+	scripts/JBoss_enterprise_aplication_server_detect.nasl,
+	scripts/secpod_task_freak_detect.nasl,
+	scripts/secpod_tightvnc_detect_win.nasl,
+	scripts/gb_avg_av_detect_lin.nasl,
+	scripts/secpod_tfm_mmplayer_detect.nasl,
+	scripts/secpod_cups_detect.nasl,
+	scripts/secpod_surgemail_detect.nasl,
+	scripts/gb_pmwiki_detect.nasl,
+	scripts/secpod_phpmyadmin_detect_900129.nasl,
+	scripts/secpod_vuplayer_detect.nasl,
+	scripts/gb_httpdx_server_detect.nasl,
+	scripts/gb_apache_struts_detect.nasl,
+	scripts/secpod_freesshd_detect.nasl,
+	scripts/gb_openmairie_prdts_detect.nasl,
+	scripts/secpod_blender_detect_lin.nasl,
+	scripts/secpod_adobe_shockwave_player_detect.nasl,
+	scripts/gb_titan_ftp_detect.nasl,
+	scripts/secpod_divx_web_player_detect.nasl,
+	scripts/GlassFish_detect.nasl,
+	scripts/secpod_datatrack_system_detect.nasl,
+	scripts/gb_foxit_phantom_detect.nasl,
+	scripts/gb_lunascape_detect.nasl,
+	scripts/gb_citrix_provisioning_services_detect.nasl,
+	scripts/gb_skype_detect_win.nasl,
+	scripts/coppermine_detect.nasl,
+	scripts/secpod_hyleos_chemview_detect.nasl,
+	scripts/serendipity_detect.nasl,
+	scripts/secpod_sun_virtualbox_detect_lin.nasl,
+	scripts/secpod_labtam_proftp_detect.nasl,
+	scripts/secpod_jag_detect.nasl,
+	scripts/osticket_detect.nasl,
+	scripts/secpod_realplayer_detect_macosx.nasl,
+	scripts/gb_pyftpdlib_detect.nasl,
+	scripts/secpod_vlc_media_player_detect_win.nasl,
+	scripts/secpod_imagemagick_detect_lin.nasl,
+	scripts/gb_sigplus_pro_activex_detect.nasl,
+	scripts/secpod_nakid_cms_detect.nasl,
+	scripts/gb_thunderbird_detect_lin.nasl,
+	scripts/secpod_cubecart_detect.nasl,
+	scripts/secpod_bopup_server_detect.nasl,
+	scripts/secpod_zikula_detect.nasl,
+	scripts/gb_backuppc_detect.nasl,
+	scripts/gb_firefox_detect_win.nasl,
+	scripts/gb_phpnagios_detect.nasl,
+	scripts/gb_apache_tomcat_detect.nasl,
+	scripts/secpod_g15daemon_detect.nasl,
+	scripts/secpod_opera_detection_win_900036.nasl,
+	scripts/gb_2532gigs_detect.nasl,
+	scripts/gb_novell_zhm_detect.nasl,
+	scripts/gb_rhinosoft_serv-u_detect.nasl,
+	scripts/secpod_discloser_detect.nasl,
+	scripts/secpod_hplip_detect_lin.nasl,
+	scripts/gb_qtweb_detect.nasl,
+	scripts/secpod_crawltrack_detect.nasl,
+	scripts/phplive_detect.nasl,
+	scripts/gb_designworks_professional_detect.nasl,
+	scripts/flatpress_detect.nasl,
+	scripts/secpod_qemu_detect_lin.nasl,
+	scripts/gb_mcafee_groupshield_detect.nasl,
+	scripts/gb_siteengine_detect.nasl,
+	scripts/gb_ms_money_detect.nasl,
+	scripts/gb_v-webmail_detect.nasl,
+	scripts/secpod_cyrus_sasllib_detect.nasl,
+	scripts/secpod_home_ftp_server_detect.nasl,
+	scripts/gb_seamonkey_detect_lin.nasl,
+	scripts/secpod_silc_prdts_detect.nasl,
+	scripts/gb_gzip_detect_win.nasl,
+	scripts/gb_mdpro_detect.nasl,
+	scripts/gb_reflection_secureit_unix_detect_lin.nasl,
+	scripts/secpod_opensc_detect_win.nasl,
+	scripts/gb_gizmo5_detect_lin.nasl,
+	scripts/gb_openssl_detect_lin.nasl:
+	Directly register CPEs for the detected applications.
+
+	* scripts/cpe.inc: Removed corresponding CPEs.
+
+2011-09-19  Henri Doreau <henri.doreau at gmail.com>
+
 	* scripts/smb_reg_service_pack.nasl: Directly register CPEs for
 	the detected operating system.
 

Modified: trunk/openvas-plugins/scripts/AfterLogic_WebMail_Pro_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/AfterLogic_WebMail_Pro_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/AfterLogic_WebMail_Pro_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,7 +55,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100313";
+SCRIPT_DESC = "AfterLogic WebMail Pro Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -88,8 +94,14 @@
          vers=chomp(version[1]);
       }
 
-      set_kb_item(name: string("www/", port, "/AfterLogicWebMailPro"), value: string(vers," under ",install));
+      tmp_version = string(vers," under ",install);
+      set_kb_item(name: string("www/", port, "/AfterLogicWebMailPro"), value: tmp_version);
 
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:afterlogic:mailbee_webmail_pro:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       info = string("None\n\nAfterLogic WebMail Pro Version '");
       info += string(vers);
       info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/FormMail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/FormMail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/FormMail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -59,7 +59,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100201";
+SCRIPT_DESC = "FormMail Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -95,9 +101,14 @@
       if ( !isnull(version[1]) ) {
          vers=version[1];
       } 
-
-      set_kb_item(name: string("www/", port, "/FormMail"), value: string(vers, " under ", install));	
+      tmp_version = string(vers, " under ", install);
+      set_kb_item(name: string("www/", port, "/FormMail"), value: tmp_version);	
       set_kb_item(name: string("www/", port, "/FormMail/file"), value: file);
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:matt_wright:formmail:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
       info = string("None\n\nFormMail Version '");
       info += string(vers);

Modified: trunk/openvas-plugins/scripts/FreeWebShop_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/FreeWebShop_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/FreeWebShop_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -59,7 +59,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100235";
+SCRIPT_DESC = "FreeWebShop Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -97,7 +103,13 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/FreeWebshop"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/FreeWebshop"), value: tmp_version);
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([r0-9]+)?", base:"cpe:/a:freewebshop:freewebshop:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nFreeWebshop Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/GlassFish_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/GlassFish_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/GlassFish_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -61,7 +61,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100190";
+SCRIPT_DESC = "GlassFish Server Detection";
+
 port = get_http_port(default:8080);
 
 if(!get_port_state(port))exit(0);
@@ -95,6 +101,12 @@
       set_kb_item(name: string("GlassFishAdminConsole/port"), value: port);
     }  else {
       set_kb_item(name: string("www/", port, "/GlassFish"), value: vers);	
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:vers, exp:"^([0-9.]+)", base:"cpe:/a:sun:glassfish");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }  
 
     info = string("None\n\nGlassFish Version '");

Modified: trunk/openvas-plugins/scripts/JBoss_enterprise_aplication_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/JBoss_enterprise_aplication_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/JBoss_enterprise_aplication_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,13 @@
 
 include("http_func.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100387";
+SCRIPT_DESC = "JBoss Enterprise Application Server Detection";
+
 port = get_http_port(default:8080);
 if(!get_port_state(port))exit(0);
 
@@ -68,6 +74,11 @@
 
      set_kb_item(name: string("www/", port, "/jboss_enterprise_application_server"), value: version[1]);
      set_kb_item(name: string("cpe:/a:jboss:enterprise_application_platform:",version[1]), value: TRUE);
+  
+     ## build cpe and store it as host_detail
+     cpe = build_cpe(value:version[1], exp:"^([0-9.]+)([GA_CP0-9]*)", base:"cpe:/a:redhat:jboss_enterprise_application_platform:");
+     if(!isnull(cpe))
+        register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
      info = string("None\n\nJBoss Enterprise Application Server Version '");
      info += string(vers);

Modified: trunk/openvas-plugins/scripts/OpenX_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/OpenX_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/OpenX_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -54,7 +54,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100363";
+SCRIPT_DESC = "OpenX Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -87,8 +93,14 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/openx"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/openx"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:openx:openx:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nOpenX Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/PowerPhlogger_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/PowerPhlogger_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/PowerPhlogger_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,7 +55,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100367";
+SCRIPT_DESC = "PowerPhlogger Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -87,8 +93,14 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/PowerPhlogger"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/PowerPhlogger"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:powerphlogger:powerphlogger:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nPowerPhlogger Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/TinyPHPForum_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/TinyPHPForum_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/TinyPHPForum_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100096";
+SCRIPT_DESC = "TinyPHPForum Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -90,7 +96,13 @@
        vers=version[1];
     } 
     
-    set_kb_item(name: string("www/", port, "/TinyPHPForum"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/TinyPHPForum"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:tinyphpforum:tinyphpforum:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nTinyPHPForum Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/TinyWebGallery_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/TinyWebGallery_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/TinyWebGallery_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -56,7 +56,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100192";
+SCRIPT_DESC = "TinyWebGallery Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -89,7 +95,13 @@
            vers = version[1];
 	 }  
 
-	 set_kb_item(name: string("www/", port, "/TinyWebGallery"), value: string(vers," under ",install));
+         tmp_version = string(vers," under ",install);
+	 set_kb_item(name: string("www/", port, "/TinyWebGallery"), value: tmp_version);
+   
+         ## build cpe and store it as host_detail
+         cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:tinywebgallery:tinywebgallery:");
+         if(!isnull(cpe))
+            register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
          info = string("None\n\nTinyWebGallery Version '");
          info += string(vers);

Modified: trunk/openvas-plugins/scripts/TorrentTrader_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/TorrentTrader_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/TorrentTrader_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,10 +55,16 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100180";
+SCRIPT_DESC = "TorrentTrader Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -90,8 +96,14 @@
      vers = version[1];
     }
 
-    set_kb_item(name: string("www/", port, "/torrenttrader"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/torrenttrader"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: tmp_version, exp:"^([0-9.]+)",base:"cpe:/a:torrenttrader:torrenttrader_classic:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nTorrentTrader Version '");
     info += vers;
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/X.nasl
===================================================================
--- trunk/openvas-plugins/scripts/X.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/X.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -79,6 +79,25 @@
 #
 # The script code starts here
 #
+
+include("cpe.inc");
+include("host_details.inc");
+include("misc_func.inc");
+
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.10407";
+SCRIPT_DESC = "X Server";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
 function riptext(data, begin, length)
 {
   count=begin;
@@ -93,8 +112,6 @@
   return(text);
 }
 
-include("misc_func.inc");
-
 ####   ##   # ###
 # # # #  #  # #  #
 # # #  ## # # #  #
@@ -150,6 +167,10 @@
             minor = ord(tcpresult[4]) + 256 * ord(tcpresult[5]);
             ver = strcat(major, ".", minor);
             set_kb_item(name: "X11/"+port+"/version", value: ver);
+
+            ## build cpe and store it as host_detail
+            register_cpe(tmpVers: ver, tmpExpr:"^([0-9.]+([a-z0-9]+)?)",tmpBase:"cpe:/a:x.org:x11:");
+
             textresult=riptext(data:tcpresult, begin:8, length:ord(tcpresult[1]));
             set_kb_item(name: "X11/"+port+"/answer", value: textresult);
             set_kb_item(name: "X11/"+port+"/open", value: FALSE);
@@ -172,6 +193,10 @@
             minor = ord(tcpresult[4]) + 256 * ord(tcpresult[5]);
             ver = strcat(major, ".", minor);
             set_kb_item(name: "X11/"+port+"/version", value: ver);
+
+            ## build cpe and store it as host_detail
+            register_cpe(tmpVers: ver, tmpExpr:"^([0-9.]+([a-z0-9]+)?)",tmpBase:"cpe:/a:x.org:x11:");
+
             textresult=riptext(data:tcpresult, begin:40, length:ord(tcpresult[24]));
             set_kb_item(name: "X11/"+port+"/answer", value: textresult);
             set_kb_item(name: "X11/"+port+"/open", value: TRUE);

Modified: trunk/openvas-plugins/scripts/aas_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/aas_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/aas_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -59,7 +59,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100196";
+SCRIPT_DESC = "A A S Application Access Server  Server Detection";
+
 port = get_http_port(default:6262);
 
 if(!get_port_state(port))exit(0);
@@ -82,6 +88,11 @@
     } 
 
     set_kb_item(name: string("www/", port, "/aas"), value: vers);	
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:vers, exp:"^([0-9.]+)", base:"cpe:/a:klinzmann:application_access_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nA A S Application Access Server Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/adaptbb_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/adaptbb_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/adaptbb_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100127";
+SCRIPT_DESC = "AdaptBB Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -89,8 +95,13 @@
     #if ( !isnull(version[1]) ) {
     #   vers=chomp(version[1]);
     #} 
-    
-    set_kb_item(name: string("www/", port, "/adaptbb"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);    
+    set_kb_item(name: string("www/", port, "/adaptbb"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    #cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:adaptbb:adaptbb:");
+    #if(!isnull(cpe))
+       register_host_detail(name:"App", value:"cpe:/a:adaptbb:adaptbb", nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nAdaptBB Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/amanda_version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/amanda_version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/amanda_version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -60,6 +60,13 @@
 # The script code starts here
 #
 include("misc_func.inc");
+include("cpe.inc");
+include("host_details.inc");
+
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.10742";
+SCRIPT_DESC = "Amanda Index Server version";
+
 register = 0;
 
 port = get_kb_item("Services/amandaidx");
@@ -86,6 +93,12 @@
 		"\n");
    set_kb_item(name:"Amanda/version", value:Amanda_version);
    if(register)register_service(port:port, proto:"amandaidx");
+
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:Amanda_version, exp:"^([0-9.]+)", base:"cpe:/a:amanda:amanda:");
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   } else {
    report = string("Amanda Server is running with banner:\n",result);
   }

Modified: trunk/openvas-plugins/scripts/atmail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/atmail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/atmail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -54,10 +54,16 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100148";
+SCRIPT_DESC = "Atmail Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -98,8 +104,14 @@
        }	 
      }  
     
-    set_kb_item(name: string("www/", port, "/atmail"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/atmail"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)",base:"cpe:/a:atmail:atmail:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+ 
     info = string("None\n\nAtmail Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");
@@ -115,7 +127,7 @@
          security_note(port:port,data:desc);
        }
        exit(0);
-  
+
  }
 }
 

Modified: trunk/openvas-plugins/scripts/axigen_web_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/axigen_web_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/axigen_web_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100176";
+SCRIPT_DESC = "Axigen Web Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -89,7 +95,13 @@
        vers=version[1];
     } 
 
-    set_kb_item(name: string("www/", port, "/axigen"), value: string(vers," under /"));
+    tmp_version = string(vers," under /");
+    set_kb_item(name: string("www/", port, "/axigen"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:gecad_technologies:axigen_mail_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nAxigen Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/barracuda_im_firewall_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/barracuda_im_firewall_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/barracuda_im_firewall_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -56,7 +56,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100392";
+SCRIPT_DESC = "Barracuda IM Firewall Detection";
+
 port = get_http_port(default:80);
 if(!get_port_state(port))exit(0);
 
@@ -79,6 +85,11 @@
     }
 
     set_kb_item(name: string("www/", port, "/barracuda_im_firewall"), value: vers);
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:vers, exp:"^([0-9.]+)", base:"cpe:/h:barracuda_networks:barracuda_im_firewall:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nBarracuda IM Firewall Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/base_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/base_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/base_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -61,7 +61,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100322";
+SCRIPT_DESC = "Basic Analysis and Security Engine Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -92,8 +98,14 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/BASE"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/BASE"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:secureideas:base:");
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nBasic Analysis and Security Engine (BASE) Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/basilix_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/basilix_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/basilix_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -76,8 +76,14 @@
 include("global_settings.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.14308";
+SCRIPT_DESC = "BasiliX Detection";
 
+
 port = get_http_port(default:80);
 if (!get_port_state(port)) exit(0);
 if (!can_host_php(port:port)) exit(0);
@@ -136,10 +142,16 @@
 
     # Handle reporting
     if (!isnull(ver)) {
+      tmp_version = string(ver, " under ", dir);
       set_kb_item(
         name:string("www/", port, "/basilix"), 
-        value:string(ver, " under ", dir)
-      );
+        value:tmp_version);
+  
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:basilix:basilix_webmail:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       installations[dir] = ver;
       ++installs;
     }

Modified: trunk/openvas-plugins/scripts/bloofoxCMS_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/bloofoxCMS_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/bloofoxCMS_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,7 +55,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100311";
+SCRIPT_DESC = "bloofoxCMS Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -91,7 +97,13 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/bloofoxCMS"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/bloofoxCMS"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:bloofox:bloofoxcms:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nbloofoxCMS Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/bugzilla_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/bugzilla_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/bugzilla_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -63,7 +63,24 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100093";
+SCRIPT_DESC = "Bugzilla Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -139,9 +156,17 @@
 	vers=version[1];
     }
 
-    set_kb_item(name: string("www/", port, "/bugzilla"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/bugzilla"), value: tmp_version);
+
+    ## build cpe and store it as host detail
+    register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9._]+)",tmpBase:"cpe:/a:mozilla:bugzilla:");
+
     set_kb_item(name:string("www/", port, "/bugzilla/version"),value:vers);
 
+    ## build cpe and store it as host detail
+    register_cpe(tmpVers:vers,tmpExpr:"^([0-9._]+)",tmpBase:"cpe:/a:mozilla:bugzilla:");
+
     info = string("None\n\nBugzilla Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/cacti_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/cacti_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/cacti_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -63,7 +63,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100204";
+SCRIPT_DESC = "Cacti Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -103,7 +109,13 @@
          vers=version[1];
       } 
 
-      set_kb_item(name: string("www/", port, "/cacti"), value: string(vers, " under ", install));	
+      tmp_version = string(vers, " under ", install);
+      set_kb_item(name: string("www/", port, "/cacti"), value: tmp_version);
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:cacti:cacti:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
       info = string("None\n\nCacti Version '");
       info += string(vers);

Modified: trunk/openvas-plugins/scripts/checkpoint-vpn1-pat-information-disclosure.nasl
===================================================================
--- trunk/openvas-plugins/scripts/checkpoint-vpn1-pat-information-disclosure.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/checkpoint-vpn1-pat-information-disclosure.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -69,6 +69,14 @@
 	exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
+
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800209";
+SCRIPT_DESC = "Microsoft Internet Explorer Version Detection (Win)";
+
+## functions for script
 function packet_construct(_ip_src, _ip_ttl)
 {
 	_ip_id = rand() % 65535;
@@ -92,10 +100,17 @@
 		_data = "Internal IP disclosed: " + _ip_dst2 + " (ttl: "+_ttl+")
 ";
 		set_kb_item(name:"Checkpoint/Manager/ipaddress", value:_ip_dst2);
+    
+                ## build cpe and store it as host_detail
+                cpe = build_cpe(value:_ip_dst2, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:checkpoint:vpn-1:");
+                if(!isnull(cpe))
+                   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 	}
 	return _data;
 }
 
+## start script
 if (islocalhost())
 {
 	exit(0);

Modified: trunk/openvas-plugins/scripts/chora_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/chora_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/chora_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -60,10 +60,16 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("global_settings.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.13849";
+SCRIPT_DESC = "Chora Detection";
+
 host = get_host_name();
 port = get_http_port(default:80);
 if (debug_level) display("debug: looking for Chora on ", host, ":", port, ".\n");
@@ -133,13 +139,19 @@
         if (debug_level) display("Chora version ", ver, " found in ", dir, ".\n");
 
         # Success!
+        tmp_version = string(ver, " under ", dir);
         set_kb_item(
           name:string("www/", port, "/chora"), 
-          value:string(ver, " under ", dir)
-        );
+          value:tmp_version);
+
         installations[dir] = ver;
         ++installs;
 
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value: tmp_version, exp:"^([0-9.]+)",base:"cpe:/a:horde:chora:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         # nb: only worried about the first match.
         break;
       }

Modified: trunk/openvas-plugins/scripts/cisco_vpn_client_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/cisco_vpn_client_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/cisco_vpn_client_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.80037";
+SCRIPT_DESC = "Cisco VPN Client Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
  exit(0);
 }
@@ -68,6 +74,12 @@
   version = GetVersionFromFile(file:file,verstr:"prod");
   if(!isnull(version)){
     set_kb_item(name:"SMB/CiscoVPNClient/Version", value:version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:llnl:slurm:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   } 
 }

Modified: trunk/openvas-plugins/scripts/coppermine_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/coppermine_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/coppermine_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -59,7 +59,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100174";
+SCRIPT_DESC = "Coppermine Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -120,9 +126,15 @@
        }  
      }  
    }
-    
-    set_kb_item(name: string("www/", port, "/coppermine"), value: string(vers," under ",install));
 
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/coppermine"), value:tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:coppermine:coppermine_photo_gallery:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nCoppermine Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/cpe.inc
===================================================================
--- trunk/openvas-plugins/scripts/cpe.inc	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/cpe.inc	2011-09-19 09:56:25 UTC (rev 11631)
@@ -160,756 +160,8 @@
 "ssh/login/release", "(HPUX11.23$)", "cpe:/o:hp:hp-ux:11.23",
 "ssh/login/solosversion", "^([0-9.]+)", "cpe:/o:sun:solaris:",  # What about Hardware type?
 "ssh/login/release", "Mac OS X (10\.[0-9]+\.[0-9]+)", "cpe:/o:apple:mac_os_x:",
-"MS/IE/Version", "^([0-9])\..*", "cpe:/a:microsoft:ie:",
-"Microsoft-IIS/version", "^([0-9.]+)", "cpe:/a:microsoft:iis:",
-"www/*/MLDonkey/version", "^([0-9.]+-?([a-z0-9]+)?)", "cpe:/a:mldonkey:mldonkey:",
-"eggdrop/version/*", "^([0-9.]+)", "cpe:/a:eggheads:eggdrop:",
-"www/*/GravityX", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:gravityboardx:gravity_board_x:",
-"www/*/WebmediaExplorer", "^([0-9.]+)", "cpe:/a:webmediaexplorer:webmedia_explorer:",
-"www/*/atmail", "^([0-9.]+)", "cpe:/a:atmail:atmail:",
-"www/*/dokeos", "^([0-9.]+)", "cpe:/a:dokeos:dokeos:",
-"www/*/nagios", "^([0-9.]+)", "cpe:/a:nagios:nagios:",
-"www/*/phpWebThings", "^([0-9.]+)", "cpe:/a:phpwebthings:phpwebthings:",
-"www/*/TorrentTraderClassic", "^([0-9.]+)", "cpe:/a:torrenttrader:torrenttrader_classic:",
-"www/*/torrenttrader", "^([0-9.]+)", "cpe:/a:torrenttrader:torrenttrader_classic:",
-"www/*/webfileexplorer", "^([0-9.]+)", "cpe:/a:webfileexplorer:web_file_explorer:",
-"znc/*/version", "^([0-9.]+)", "cpe:/a:znc:znc:",
-"www/*/chora", "^([0-9.]+)", "cpe:/a:horde:chora:",
-"www/*/horde", "^([0-9.]+)", "cpe:/a:horde:horde_groupware:",
-"www/*/squirrelmail", "^([0-9.])", "cpe:/a:squirrelmail:squirrelmail:",
-"www/*/osticket", "^([0-9.]+)", "cpe:/a:osticket:osticket:",
-"dnsmasq/version", "^([0-9.]+)", "cpe:/a:thekelleys:dnsmasq:",
-"Moodle/Version", "^([0-9.]+)", "cpe:/a:moodle:moodle:",
-"NoticeWare/Mail/Server/Ver", "^([0-9.]+)", "cpe:/a:noticeware:noticeware_email_server_ng:",
-"NetDecision/TFTP/Ver", "^([0-9.]+)", "cpe:/a:netmechanica:netdecision_tftp_server:",
-"NullFTP/Server/Ver", "^([0-9.]+)", "cpe:/a:vwsolutions:null_ftp:",
-"Openswan/Ver", "^([0-9.]+)(rc[0-9])?", "cpe:/a:openswan:openswan:",
-"ProFTPD/Ver", "^([0-9.]+)(rc[0-9]+)?", "cpe:/a:proftpd:proftpd:",
-"PostgreSQL/Remote/*/Ver", "^([0-9.]+)", "cpe:/a:postgresql:postgresql:",
-"PostgreSQL/Lin/Ver", "^([0-9.]+)", "cpe:/a:postgresql:postgresql:",
-"PostgreSQL/Win/Ver", "^([0-9.]+)", "cpe:/a:postgresql:postgresql:",
-"PumpKIN/TFTP/Ver", "^([0-9.]+)", "cpe:/a:klever:pumpkin:",
-"RaidenFTPD/Ver", "^([0-9.]+)", "cpe:/a:raidenftpd:raidenftpd:",
-"Reflection/SecureIT/Linux/Ver", "^([0-9.]+)", "cpe:/a:attachmate:reflection_for_secure_it:",
-"Ruby-Rails/Linux/Ver", "^([0-9.]+)", "cpe:/a:ruby_on_rails:ruby_on_rails:",
-"SMTP/*/Sendmail", "^([0-9.]+)", "cpe:/a:sendmail:sendmail:",
-"Services/www/*/kerio_wrf", "^([0-9.]+)", "cpe:/a:kerio:winroute_firewall:",
-"SurgeMail/Ver", "^([0-9.]+([a-z0-9])?)", "cpe:/a:netwin:surgemail:",
-"SolarWinds/TFTP/Ver", "^([0-9.]+)", "cpe:/a:solarwinds:tftp_server:",
-"StrongSwan/Ver", "^([0-9.]+)", "cpe:/a:strongswan:strongswan:",
-"Tor/Linux/Ver", "^([0-9.]+-?([a-z0-9]+)?)", "cpe:/a:tor:tor:",
-"Tor/Win/Ver", "^([0-9.]+)-?([a-z0-9]+)?", "cpe:/a:tor:tor:",
-"WoWRaidManager/Ver", "^([0-9.]+)", "cpe:/a:wowraidmanager:wowraidmanager:",
-"WinFTP/Server/Ver", "^([0-9.]+)", "cpe:/a:wftpserver:winftp_ftp_server:",
-"WSFTP/Win/Ver", "^([0-9.]+)", "cpe:/a:ipswitch:ws_ftp:",
-"X11/ */version", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:x.org:x11:",
-"Xitami/Ver", "^([0-9.]+([a-z][0-9]?)?)", "cpe:/a:imatix:xitami:",
-"imap/*/Cyrus", "^([0-9.]+)", "cpe:/a:cmu:cyrus_imap_server:",
-"nagios_statd/*/Version", "^([0-9.]+)", "cpe:/a:nagios:nagios:",
-"perforce/*/version", "^([0-9]{4}[.]{1}[0-9]+/[0-9]{6})", "cpe:/a:perforce:perforce_server:",
-"webmin/*/version","^([0-9.]+)", "cpe:/a:webmin:webmin:",
-"zebra/banner/*", "^([0-9.]+([a-z])?)", "cpe:/a:gnu:zebra:",
-"oracle_tnslsnr/*/version", "^([0-9.]+)", "cpe:/a:oracle:database_server:",
-"zonealarm/version", "^([0-9.]+)", "cpe:/a:zonelabs:zonealarm:",
-"www/KFWebServer", "^([0-9.]+)", "cpe:/a:key_focus:kf_web_server:",
-"www/OracleApache", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:oracle:http_server:",
-"OpenOffice.org/Build", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:openoffice:openoffice.org:",
-"/Adobe/JRun/Ver", "^([0-9.]+)", "cpe:/a:adobe:jrun:",
-"/tnftpd/Ver", "^([0-9.]+)", "cpe:/a:luke_mewburn:tnftpd:",
-"7zip/Lin/Ver", "^([0-9.]+)", "cpe:/a:7-zip:7-zip:",
-"AIMP/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:aimp:aimp2_audio_converter:",
-"AVG/AV/Linux/Ver", "^([0-9.]+)", "cpe:/a:avg:avg_anti-virus:",
-"AVG/AV/Win/Ver", "^([0-9.]+)", "cpe:/a:avg:avg_anti-virus:",
-"Adobe/Acrobat/Win/Ver", "^([0-9.]+)", "cpe:/a:adobe:acrobat:",
-"Adobe/Air/Linux/Ver", "^([0-9.]+)", "cpe:/a:adobe:air:",
-"Adobe/Air/Win/Ver", "^([0-9.]+)", "cpe:/a:adobe:air:",
-"Adobe/Flex/Win/Ver", "^([0-9.]+)", "cpe:/a:adobe:flex:",
-"Adobe/Reader/Win/Ver", "^([0-9.]+)", "cpe:/a:adobe:acrobat_reader:",
-"Adobe/Reader/Linux/Version", "^([0-9.]+)", "cpe:/a:adobe:acrobat_reader:",
-"Adobe/ShockwavePlayer/Ver", "^([0-9.]+)", "cpe:/a:adobe:shockwave_player:",
-"AdobeFlashPlayer/Win/Ver", "^([0-9.]+)", "cpe:/a:adobe:flash_player:",
-"AdobeFlashPlayer/Linux/Ver", "^([0-9.]+)", "cpe:/a:adobe:flash_player:",
-"Amanda/version", "^([0-9.]+)", "cpe:/a:amanda:amanda:",
-"Amarok/Linux/Ver", "^([0-9.]+)", "cpe:/a:amarok:amarok:",
-"Antivirus/SAVCE/version", "^([0-9.]+)", "cpe:/a:symantec:norton_antivirus:",
-"Antivirus/SpySweeperEnt/version", "^([0-9.]+)", "cpe:/a:webroot_software:spy_sweeper_enterprise:",
-"AnyDVD/Ver", "^([0-9.]+)", "cpe:/a:slysoft:anydvd:",
-"Apache/APR-Utils/Ver", "^([0-9.]+)", "cpe:/a:apache:apr-util:",
-"Apache/APR/Ver", "^([0-9.]+)", "cpe:/a:apache:portable_runtime:",
-"AppleSafari/Version", "^([0-9.]+)", "cpe:/a:apple:safari:",
-"ArcaVir/AntiVirus/Ver", "^(9\..*)", "cpe:/a:arcabit:arcavir_2009_antivirus_protection:",
-"Asterisk-PBX/Ver", "^([0-9.]+\.[0-9])\.?(rc[0-9]+)?", "cpe:/a:digium:asterisk:",
-"Audacity/Win/Ver", "^([0-9.]+)", "cpe:/a:audacity:audacity:",
-"Audacity/Linux/Ver", "^([0-9.]+)", "cpe:/a:audacity:audacity:",
-"Avahi/Linux/Ver", "^([0-9.]+)", "cpe:/a:avahi:avahi:",
-"AvantBrowser/Ver", "^([0-9.]+)", "cpe:/a:avant_force:avant_browser:",
-"Avast!/AV/Linux/Ver", "^([0-9.]+)", "cpe:/a:avast:avast_antivirus:",
-"Avast!/AV/Win/Ver", "^([0-9.]+)", "cpe:/a:avast:avast_antivirus:",
-"Banner/*", "220 .* ESMTP Postfix \(([.0-9]*)\)", "cpe:/a:postfix:postfix:",
-"BPSoft/HexWorkshop/Ver", "^([0-9.]+)", "cpe:/a:bpsoft:hex_workshop:",
-"BSPlayer/Ver", "^([0-9.]+)", "cpe:/a:bsplayer:bs.player:",
-"BaoFeng/Storm/Ver", "^([0-9.]+)", "cpe:/a:baofeng:storm:",
-"Becky/InternetMail/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:rimarts_inc.:becky_internet_mail:",
-"BitDefender/AV/Ver", "^([0-9.]+)", "cpe:/a:bitdefender:bitdefender_antivirus:",
-"BitDefender/InetSec/Ver", "^([0-9.]+)", "cpe:/a:bitdefender:internet_security:",
-"Blazevideo/HDTV/Ver", "^([0-9.]+)", "cpe:/a:blazevideo:hdtv_player:",
-"Bopup/Server/Ver", "^([0-9.]+)", "cpe:/a:blabsoft:bopup_communication_server:",
-"Buildbot/Ver", "^([0-9.]+\.[0-9])([a-z][0-9]+)?", "cpe:/a:buildbot:buildbot:",
-"BulletProof/Client/Ver", "^([0-9.]+)", "cpe:/a:bpftp:bulletproof_ftp_client:",
-"CCProxy/Ver", "^([0-9.]+)", "cpe:/a:youngzsoft:ccproxy:",
-"CMailServer/Ver", "^([0-9.]+)", "cpe:/a:youngzsoft:cmailserver:",
-"CTorrent/Ver", "^([0-9.]+)", "cpe:/a:rahul:dtorrent:",
-"Enhanced/CTorrent/Ver", "^([0-9.]+)", "cpe:/a:rahul:dtorrent:",
-"Checkpoint/Manager/ipaddress", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:checkpoint:vpn-1:",
-"ClamAV/Win/Ver", "^([0-9.]+)", "cpe:/a:clamav:clamav:",
-"ClamAV/Lin/Ver", "^([0-9.]+)", "cpe:/a:clamav:clamav:",
-"CloneCD/Ver", "^([0-9.]+)", "cpe:/a:slysoft:clonecd:",
-"CloneDVD/Ver", "^([0-9.]+)", "cpe:/a:slysoft:clonedvd:",
-"Cscope/Ver", "^([0-9a-z.]+)", "cpe:/a:cscope:cscope:",
-"Cyrus/SASL/Ver", "^([0-9.]+)", "cpe:/a:cmu:cyrus-sasl:",
-"DesignWorks/Prof/Ver", "^([0-9.]+)", "cpe:/a:capilano:designworks:",
-"DivX/Web/Player/Ver", "^([0-9.]+)", "cpe:/a:divx:divx_web_player:",
-"Django/Linux/Ver", "^([0-9.]+)", "cpe:/a:django_project:django:",
-"ESET/RemoteAdmin/Server/Ver", "^([0-9.]+)", "cpe:/a:eset:remote_administrator:",
-"ESET/RemoteAdmin/Console/Ver", "^([0-9.]+)", "cpe:/a:eset:remote_administrator:",
-"EasyRmtoMp3/Conv/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:mini-stream:easy_rm-mp3_converter:",
-"Elecard/AVC/HD/Ver", "^([0-9.]+)", "cpe:/a:elecard:elecard_avc_hd_player:",
-"Elecard/Player/Ver", "^([0-9.]+)", "cpe:/a:elecard:elecard_mpeg_player:",
-"ElectraSoft/FTP/Ver", "^([0-9.]+)", "cpe:/a:electrasoft:32bit_ftp:",
-"Evolution/Ver", "^([0-9.]+)", "cpe:/a:gnome:evolution:",
-"F-Prot/AV/Win/Ver", "^([0-9.]+)", "cpe:/a:f-prot:f-prot_antivirus:",
-"F-Prot/AV/Linux/Ver", "^([0-9.]+)", "cpe:/a:f-prot:f-prot_antivirus:",
-"F-Sec/AV/ClientSecurity/Ver", "^([0-9]+\.[0-9]+)", "cpe:/a:f-secure:f-secure_client_security:",
-"F-Sec/AV/IntGatekeeper/Win/Ver", "^([0-9]+\.[0-9]+)", "cpe:/a:f-secure:f-secure_internet_gatekeeper_for_windows:",
-"F-Sec/IntGatekeeper/Lnx/Ver",  "^([0-9]+\.[0-9]+)", "cpe:/a:f-secure:f-secure_internet_gatekeeper_for_linux:",
-"F-Sec/AV/LnxClntSec/Ver", "^([0-9]+\.[0-9]+)", "cpe:/a:f-secure:f-secure_anti-virus_linux_client_security:",
-"F-Sec/AV/LnxSec/Ver", "^([0-9]+\.[0-9]+)", "cpe:/a:f-secure:f-secure_linux_security:",
-"F-Sec/AV/LnxSerSec/Ver", "^([0-9]+\.[0-9]+)", "cpe:/a:f-secure:f-secure_anti-virus_linux_server_security:",
-"F-Sec/AV/MSExchange/Ver", "^([0-9]+\.[0-9]+)", "cpe:/a:f-secure:f-secure_anti-virus_for_microsoft_exchange:",
-"F-Sec/AV/Win/Ver", "^([0-9]+\.[0-9]+)", "cpe:/a:f-secure:f-secure_anti-virus:",
-"F-Sec/AV/WindowsServers/Ver", "^([0-9]+\.[0-9]+)", "cpe:/a:f-secure:f-secure_anti-virus_for_windows_servers:",
-"FFFTP/Ver", "^([0-9.]+)", "cpe:/a:jun_sota:ffftp:",
-"FTPShell/Version", "^([0-9.]+)", "cpe:/a:ftpshell:ftpshell_server:",
-"FileZilla/Serv/Ver", "^([0-9.]+([a-z])?)", "cpe:/a:filezilla:filezilla_server:",
-"Firebird-SQL/Ver", "^([0-9.]+)", "cpe:/a:firebirdsql:firebird:",
-"Firefox/Linux/Ver", "^([0-9.a-z]+)", "cpe:/a:mozilla:firefox:",
-"Firefox/Win/Ver", "^([0-9.a-z]+)", "cpe:/a:mozilla:firefox:",
-"Flock/Win/Ver", "^([0-9.]+)", "cpe:/a:flock:flock:",
-"Flock/Linux/Ver", "^([0-9.]+)", "cpe:/a:flock:flock:",
-"Foxit-WAC-Server/Ver", "^([0-9.]+)", "cpe:/a:foxitsoftware:wac_server:",
-"Foxit/Reader/Ver", "^([0-9.]+)", "cpe:/a:foxitsoftware:reader:",
-"Foxmail/Win/Ver", "^([0-9]\.[0-9])", "cpe:/a:foxmail:foxmail:",
-"FreeDownloadManager/Ver", "^([0-9]\.[0-9])", "cpe:/a:free_download_manager:free_download_manager:",
-"FreeType/Linux/Ver", "^([0-9.]+)", "cpe:/a:freetype:freetype:",
-"G15Daemon/Ver", "^([0-9.]+)", "cpe:/a:g15tools:g15daemon:",
-"GUPnP/Ver", "^([0-9.]+)", "cpe:/a:gupnp:gupnp:",
-"Gale/Linux/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:gale:gale:",
-"Ghostscript/Win/Ver", "^([0-9.]+)", "cpe:/a:ghostscript:ghostscript:",
-"Ghostscript/Linux/Ver", "^([0-9.]+)", "cpe:/a:ghostscript:ghostscript:",
-"Gizmo5/Linux/Ver", "^([0-9.]+)", "cpe:/a:gizmo5:gizmo:",
-"GnuTLS/Win/Ver", "^([0-9.]+)", "cpe:/a:gnu:gnutls:",
-"GoogleChrome/Win/Ver", "^([0-9.]+)", "cpe:/a:google:chrome:",
-"GrabIt/Ver", "^([0-9]\.[0-9]+\.[0-9]+)", "cpe:/a:shemes:grabit:",
-"GraphicsMagick/Linux/Ver", "^([0-9.]+)", "cpe:/a:graphicsmagick:graphicsmagick:",
-"HP-LIP/Linux/Ver", "^([0-9.]+)", "cpe:/a:hp:hplip:",
-"Hamster/Audio-Player/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:ondanera.net:hamster_audio_player:",
-"IBM/LotusNotes/Win/Ver", "^([0-9]\.[0-9]+\.[0-9]+)", "cpe:/a:ibm:lotus_notes:",
-"IBM/LotusNotes/Linux/Ver", "^([0-9]\.[0-9]+\.[0-9]+)", "cpe:/a:ibm:lotus_notes:",
-"ICQ/Toolbar/Ver", "^([0-9.]+)", "cpe:/a:icq:icq_toolbar:",
-"ICQ/Ver", "^([0-9]\.[0-9])", "cpe:/a:icq:icq:",
-"IPSec/Tools/Ver", "^([0-9.]+)", "cpe:/a:ipsec-tools:ipsec-tools:",
-"ISC/DHCP-Client/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:isc:dhcp:",
-"Ichitaro/Ver", "^([0-9.]+)", "cpe:/a:ichitaro:ichitaro:",
-"Ichitaro/Viewer/Ver", "^(19\..*)", "cpe:/a:justsystem:ichitaro_viewer:5.1",
-"ImageMagick/Win/Ver", "^([0-9.]+)", "cpe:/a:imagemagick:imagemagick:",
-"ImageMagick/Lin/Ver", "^([0-9.]+)", "cpe:/a:imagemagick:imagemagick:",
-"IrfanView/Ver", "^([0-9.]+)", "cpe:/a:irfanview:irfanview:",
-"Irssi/Lin/Ver", "^([0-9.]+)", "cpe:/a:irssi:irssi:",
-"Java/WebStart/Linux/Ver", "^([0-9]\.[0-9_.]+)", "cpe:/a:sun:java_web_start:",
-"K-Meleon/Ver", "^([0-9.]+)", "cpe:/a:christophe_thibault:k-meleon:",
-"KDE/Konqueror/Ver", "^([0-9.]+)", "cpe:/a:kde:konqueror:",
-"KTorrent/Linux/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:ktorrent:ktorrent:",
-"Kaspersky/AV-Workstation/Ver", "^(6\.0)", "cpe:/a:kaspersky_lab:kaspersky_anti-virus:6.0::workstations",
-"Kaspersky/AV-FileServer/Ver",  "^(6\.0)", "cpe:/a:kaspersky_lab:kaspersky_anti-virus:6.0.3.837::windows_file_servers:",
-"Kaspersky/IntNetSec/Ver", "^(7\..*)", "cpe:/a:kaspersky_lab:kaspersky_internet_security:",
-"Kaspersky/IntNetSec/Ver", "^(8\..*)", "cpe:/a:kaspersky_lab:kaspersky_internet_security_2009:", 
-"Kaspersky/IntNetSec/Ver", "^(9\..*)", "cpe:/a:kaspersky_lab:kaspersky_internet_security_2010:",
-"Kaspersky/AV/Ver", "^(9\..*)", "cpe:/a:kaspersky:kaspersky_anti-virus:2010",
-"Kaspersky/AV/Ver", "^(8\..*)", "cpe:/a:kaspersky:kaspersky_anti-virus:2009",
-"Kaspersky/AV/Ver", "^(7\..*)", "cpe:/a:kaspersky:kaspersky_anti-virus:2008",
-"Kaspersky/AV/Ver", "^(6\..*)", "cpe:/a:kaspersky:kaspersky_anti-virus:2007",
-"KerioMailServer/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:kerio:kerio_mailserver:",
-"Kvirc/Win/Ver", "^([0-9.]+)", "cpe:/a:kvirc:kvirc:",
-"LeapCMS/version", "^([0-9.]+)", "cpe:/a:gowondesigns:leap:",
-"Libpng/Version", "^([0-9.]+)", "cpe:/a:libpng:libpng:",
-"Linux/IBM_db2/Ver", "^([0-9]\.[0-9])", "cpe:/a:ibm:db2:",
-"Lunascape/Ver", "^([0-9.]+)", "cpe:/a:lunascape:lunascape:",
-"MS/IE/EXE/Ver", "^([0-9])\..*", "cpe:/a:microsoft:ie:",
-"MS/LiveMessenger/Ver", "^([0-9]\.[0-9]\.[0-9])", "cpe:/a:microsoft:windows_live_messenger:",
-"MS/MessengerPlus/Ver", "^([0-9.]+)", "cpe:/a:microsoft:messenger_plus%21_live:",
-"MS/Money/Version", "^([0-9]+)", "cpe:/a:microsoft:money:",
-"MS/Office/Ver", "^(9\..*)", "cpe:/a:microsoft:office:2000",
-"MS/Office/Ver", "^(10\..*)", "cpe:/a:microsoft:office:2002",
-"MS/Office/Ver", "^(11\..*)", "cpe:/a:microsoft:office:2003",
-"MS/Office/Ver", "^(12\..*)", "cpe:/a:microsoft:office:2007",
-"MS/Office/Viewer/Ver", "^([0-9.]+)", "",
-"MagicISOMaker/Ver", "^([0-9]\.[0-9])", "cpe:/a:magic_iso_maker:magic_iso_maker:",
-"Maxthon/Ver", "^([0-9.]+)", "cpe:/a:maxthon:maxthon_browser:",
-"McAfee/GroupShield/Exchange/Ver", "^([0-9.]+)", "cpe:/a:mcafee:groupshield:",
-"MediaPlayerClassic/Ver", "^([0-9.]+)", "cpe:/a:rob_schultz:media_player_classic:",
-"MediaWiki/Version", "^([0-9.]+)", "cpe:/a:mediawiki:mediawiki:",
-"MemCached/Ver", "^([0-9.]+)", "cpe:/a:memcachedb:memcached:",
-"MerakMailServer/Ver", "^([0-9.]+)", "cpe:/a:icewarp:merak_mail_server:",
-"NTP/Linux/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:ntp:ntp:",
-"Microsoft/VisualStudio.Net/Ver", "^(7\..*)", "cpe:/a:microsoft:visual_studio_.net:2003",
-"Microsoft/VisualStudio.Net/Ver", "^(8\..*)", "cpe:/a:microsoft:visual_studio_.net:2005",
-"Microsoft/VisualStudio.Net/Ver", "^(9\..*)", "cpe:/a:microsoft:visual_studio_.net:2008",
-"Microsoft/VisualStudio/Ver", "^(7\..*)", "cpe:/a:microsoft:visual_studio:2003",
-"Microsoft/VisualStudio/Ver", "^(8\..*)", "cpe:/a:microsoft:visual_studio:2005",
-"Microsoft/VisualStudio/Ver", "^(9\..*)", "cpe:/a:microsoft:visual_studio:2008",
-"MicrosoftSharePointTeamServices/version", "^(12\..*)", "cpe:/a:microsoft:sharepoint_team_services:2007",
-"MikMod/Linux/Ver", "^([0-9.]+)", "cpe:/a:igno_saitz:libmikmod:",
-"MiniStream/AsxToMp3/Conv/Ver", "^([0-9.]+)", "cpe:/a:mini-stream:mini-stream_to_mp3_converter:",
-"MiniStream/CastRipper/Ver", "^([0-9.]+)", "cpe:/a:mini-stream:castripper:",
-"MiniStream/RMDown/Ver", "^([0-9.]+)", "cpe:/a:mini-stream:mini-stream_rm_downloader:",
-"MiniStream/Ripper/Ver", "^([0-9.]+)", "cpe:/a:mini-stream:ripper:",
-"MiniStream/RmToMp3/Conv/Ver", "^([0-9.]+)", "cpe:/a:mini-stream:easy_rm-mp3_converter:",
-"MiniStream/SSRecorder/Ver", "^([0-9.]+)", "cpe:/a:mini-stream:shadow_stream_recorder:",
-"MiniStream/WMDown/Ver", "^([0-9.]+)", "cpe:/a:mini-stream:wm_downloader:",
-"Mozilla/Linux/Ver", "^([0-9.]+)", "cpe:/a:mozilla:mozilla:",
-"Mozilla/Win/Ver", "^([0-9.]+)", "cpe:/a:mozilla:mozilla:",
-"Mutt/Ver", "^([0-9.]+)", "cpe:/a:mutt:mutt:",
-"Netscape/Linux/Ver", "^([0-9]+)", "cpe:/a:netscape:navigator:",
-"Netscape/Win/Ver", "^([0-9]+)", "cpe:/a:netscape:navigator:",
-"Norton/InetSec/Ver", "^(15\..*)", "cpe:/a:symantec:norton_internet_security:2008",
-"Novell/Client/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:novell:client:",
-"Novell/NetIdentity/Ver", "^([0-9.]+)", "cpe:/a:novell:netidentity_client:",
-"Novell/eDir/Lin/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:novell:edirectory:",
-"Novell/eDir/Win/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:novell:edirectory:",
-"Novell/iPrint/Ver", "^([0-9]\.[0-9]+)", "cpe:/a:novell:iprint:",
-"Novell/iPrint/Client/Linux/Ver","^([0-9]\.[0-9]+)", "cpe:/a:novell:iprint_client:",
-"NullLogic-Groupware/Ver", "^([0-9.]+)", "cpe:/a:nulllogic:groupware:",
-"OpenJDK/Ver", "^([0-9.]+)", "cpe:/a:sun:openjdk:",
-"OpenOffice/Linux/Ver", "^([0-9.]+)", "cpe:/a:openoffice:openoffice.org:",
-"OpenOffice/Win/Ver", "^([0-9.]+)", "cpe:/a:openoffice:openoffice.org:",
-"OpenSC/Ver", "^([0-9.]+)", "cpe:/a:opensc-project:opensc:",
-"OpenSSL/Linux/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:openssl:openssl:",
-"OpenSSL/Win/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:openssl:openssl:",
-"Opera/Linux/Version", "^([0-9.]+)", "cpe:/a:opera:opera:",
-"Opera/Win/Version", "^([0-9.]+)", "cpe:/a:opera:opera:",
-"OrcaBrowser/Ver", "^([0-9]\.[0-9])", "cpe:/a:orcabrowser:orca_browser:",
-"PGPDesktop/Win/Ver", "^([0-9]\.[0-9]\.[0-9])", "cpe:/a:pgp:desktop:",
-"PHP/iCalendar/Ver", "^([0-9.]+)", "cpe:/a:phpicalendar:phpicalendar:",
-"PPLive/Ver", "^([0-9.]+)", "cpe:/a:pplive:pplive:",
-"Pango/Ver", "^([0-9.]+)", "cpe:/a:pango:pango:",
-"PeaZIP/Lin/Ver", "^([0-9.]+)", "cpe:/a:giorgio_tani:peazip:",
-"PeaZIP/Win/Ver", "^([0-9.]+)", "cpe:/a:giorgio_tani:peazip:",
-"Pidgin/Lin/Ver", "^([0-9.]+)", "cpe:/a:pidgin:pidgin:",
-"Pidgin/Win/Ver", "^([0-9.]+)", "cpe:/a:pidgin:pidgin:",
-"PowerZip/Ver", "^([0-9.]+)", "cpe:/a:powerzip:powerzip:",
-"PuTTY/Version", "^([0-9.]+)", "cpe:/a:putty:putty:",
-"QIP/Version", "^(8\.0\..*)", "cpe:/a:qip:qip:2005",
-"QtWeb/Ver", "^([0-9]\.[0-9])", "cpe:/a:qtweb:qtwe:",
-"Quagga/Ver", "^([0-9.]+)", "cpe:/a:quagga:quagga_routing_software_suite:",
-"QuickTime/Win/Ver", "^([0-9.]+)", "cpe:/a:apple:quicktime:",
-"RealPlayer/Win/Ver", "^([0-9.]+)", "cpe:/a:realnetworks:realplayer:",
-"Ruby/Lin/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:ruby-lang:ruby:",
-"SDP/Downloader/Ver", "^([0-9.]+)", "cpe:/a:sdp_multimedia:streaming_download_project:",
-"SLURM/Ver", "^([0-9.]+)", "cpe:/a:llnl:slurm:",
-"SMB/CiscoVPNClient/Version", "^([0-9.]+)", "cpe:/a:cisco:vpn_client:",
-"SMB/Office/Access/Version", "^(9\..*)", "cpe:/a:microsoft:access:2000",
-"SMB/Office/Access/Version", "^(10\..*)", "cpe:/a:microsoft:access:2002",
-"SMB/Office/Access/Version", "^(11\..*)", "cpe:/a:microsoft:access:2003",
-"SMB/Office/Access/Version", "^(12\..*)", "cpe:/a:microsoft:access:2007",
-"SMB/Office/ComptPack/Version", "^(12\..)*", "cpe:/a:microsoft:compatibility_pack_word_excel_powerpoint:2007:",
-"SMB/Office/Groove/Version", "^(12\..*)", "cpe:/a:microsoft:office_groove:2007:",
-"SMB/Office/VisioViewer/Ver", "^(9\..*)", "cpe:/a:microsoft:visio_viewer:2000",
-"SMB/Office/VisioViewer/Ver", "^(10\..*)", "cpe:/a:microsoft:visio_viewer:2002",
-"SMB/Office/VisioViewer/Ver", "^(11\..*)", "cpe:/a:microsoft:visio_viewer:2003",
-"SMB/Office/VisioViewer/Ver", "^(12\..*)", "cpe:/a:microsoft:visio_viewer:2007",
-"SMB/Office/Outloook/Version", "^(9\..*)", "cpe:/a:microsoft:outlook:2000",
-"SMB/Office/Outloook/Version", "^(10\..*)", "cpe:/a:microsoft:outlook:2002",
-"SMB/Office/Outloook/Version", "^(11\..*)", "cpe:/a:microsoft:outlook:2003",
-"SMB/Office/Outloook/Version", "^(12\..*)", "cpe:/a:microsoft:outlook:2007",
-"SMB/Office/Excel/Version", "^(9\..*)", "cpe:/a:microsoft:office_excel:2000",
-"SMB/Office/Excel/Version", "^(10\..*)", "cpe:/a:microsoft:office_excel:2002",
-"SMB/Office/Excel/Version", "^(11\..*)", "cpe:/a:microsoft:office_excel:2003",
-"SMB/Office/Excel/Version", "^(12\..*)", "cpe:/a:microsoft:office_excel:2007",
-"SMB/Office/PPView/Version", "^(9\..*)", "cpe:/a:microsoft:office_powerpoint_viewer:2000",
-"SMB/Office/PPView/Version", "^(10\..*)", "cpe:/a:microsoft:office_powerpoint_viewer:2002",
-"SMB/Office/PPView/Version", "^(11\..*)", "cpe:/a:microsoft:office_powerpoint_viewer:2003",
-"SMB/Office/PPView/Version", "^(12\..*)", "cpe:/a:microsoft:office_powerpoint_viewer:2007",
-"SMB/Office/PowerPnt/Version", "^(9\..*)", "cpe:/a:microsoft:office_powerpoint:2000",
-"SMB/Office/PowerPnt/Version", "^(10\..*)", "cpe:/a:microsoft:office_powerpoint:2002",
-"SMB/Office/PowerPnt/Version", "^(11\..*)", "cpe:/a:microsoft:office_powerpoint:2003",
-"SMB/Office/PowerPnt/Version", "^(12\..*)", "cpe:/a:microsoft:office_powerpoint:2007",
-"SMB/Office/PowerPntCnv/Version", "^(12\..)", "",
-"SMB/Office/Publisher/Version", "^(9\..*)", "cpe:/a:microsoft:office_publisher:2000",
-"SMB/Office/Publisher/Version", "^(10\..*)", "cpe:/a:microsoft:office_publisher:2002",
-"SMB/Office/Publisher/Version", "^(11\..*)", "cpe:/a:microsoft:office_publisher:2003",
-"SMB/Office/Publisher/Version", "^(12\..*)", "cpe:/a:microsoft:office_publisher:2007",
-"SMB/Office/Word/Version", "^(9\..*)", "cpe:/a:microsoft:office_word:2000",
-"SMB/Office/Word/Version", "^(10\..*)", "cpe:/a:microsoft:office_word:2002",
-"SMB/Office/Word/Version", "^(11\..*)", "cpe:/a:microsoft:office_word:2003",
-"SMB/Office/Word/Version", "^(12\..*)", "cpe:/a:microsoft:office_word:2007",
-"SMB/Office/WordCnv/Version", "^(12\..*)", "",
-"SMB/Office/WordView/Version", "^(9\..*)", "cpe:/a:microsoft:office_word_viewer:2000",
-"SMB/Office/WordView/Version", "^(10\..*)", "cpe:/a:microsoft:office_word_viewer:2002",
-"SMB/Office/WordView/Version", "^(11\..*)", "cpe:/a:microsoft:office_word_viewer:2003",
-"SMB/Office/WordView/Version", "^(12\..*)", "cpe:/a:microsoft:office_word_viewer:2007",
-"SMB/Office/XLCnv/Version", "^(12\..*)", "",
-"SMB/Office/XLView/Version", "^(9\..*)", "cpe:/a:microsoft:office_excel_viewer:2000",
-"SMB/Office/XLView/Version", "^(10\..*)", "cpe:/a:microsoft:office_excel_viewer:2002",
-"SMB/Office/XLView/Version", "^(11\..*)", "cpe:/a:microsoft:office_excel_viewer:2003",
-"SMB/Office/XLView/Version", "^(12\..*)", "cpe:/a:microsoft:office_excel_viewer:2007",
-"SMB/SonicWallGlobalVPNClient/Version", "^([0-9.]+)", "cpe:/a:sonicwall:global_vpn_client:",
-"Seamonkey/Linux/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:mozilla:seamonkey:",
-"Seamonkey/Win/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:mozilla:seamonkey:",
-"Serv-U/FTPServ/Ver", "^([0-9.]+)", "cpe:/a:rhinosoft:serv-u:",
-"Services/data_protector/version", "^([0-9]\.[0-9]+)", "cpe:/a:hp:openview_storage_data_protector:",
-"SonicSpot/Audoiactive/Player/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:sonicspot:audioactive_player:",
-"StarDict/Linux/Ver", "^([0-9.]+)", "cpe:/a:stardict:stardict:",
-"Ston3D/Standalone/Player/Lin/Ver", "^([0-9.]+)", "cpe:/a:stonetrip:s3dplayer_standalone:",
-"Ston3D/Standalone/Player/Win/Ver", "^([0-9.]+)", "cpe:/a:stonetrip:s3dplayer_standalone:",
-"Ston3D/Web/Player/Ver", "^([0-9.]+)", "cpe:/a:stonetrip:s3dplayer_web:",
-"Subversion/Ver", "^([0-9.]+)", "cpe:/a:subversion:subversion:",
-"Sun/Java/AppServer/Ver", "^([0-9.]+)", "cpe:/a:sun:java_system_application_server:",
-"Sun/Java/JDK/Win/Ver", "^([0-9._]+)", "cpe:/a:sun:jdk:",
-"Sun/Java/JRE/Linux/Ver", "^([0-9._]+)", "cpe:/a:sun:jre:",
-"Sun/Java/JRE/Win/Ver", "^([0-9._]+)", "cpe:/a:sun:jre:",
-"Sun/JavaDirServer/Linux/Ver", "^([0-9.]+)", "cpe:/a:sun:java_system_directory_server:",
-"Sun/JavaDirServer/Win/Ver", "^([0-9.]+)", "cpe:/a:sun:java_system_directory_server:",
-"Sun/JavaSysWebServ/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:sun:java_system_web_server:",
-"Sun/JavaWebConsole/Ver", "^([0-9.]+)", "cpe:/a:sun:java_web_console:",
-"Sun/JavaWebProxyServ/Ver", "^([0-9.]+)", "cpe:/a:sun:java_system_web_proxy_server:",
-"Symantec/pcAnywhere/Ver", "^([0-9]+\.[0-9])", "cpe:/a:symantec:pcanywhere:",
-"TFM/MMPlayer/Ver", "^([0-9]\.[0-9])", "cpe:/a:tfm:mmplayer:",
-"TheGreenBow-IPSec-VPN-Client/Ver", "^([0-9.]+)", "cpe:/a:thegreenbow:thegreenbow_vpn_client:",
-"Thunderbird/Linux/Ver", "^([0-9.]+)", "cpe:/a:mozilla:thunderbird:",
-"Thunderbird/Win/Ver", "^([0-9.]+)", "cpe:/a:mozilla:thunderbird:",
-"TightVNC/Linux/Ver", "^([0-9.]+)", "cpe:/a:tightvnc:tightvnc:",
-"TightVNC/Win/Ver", "^([0-9.]+)", "cpe:/a:tightvnc:tightvnc:",
-"TitanFTP/Server/Ver", "^([0-9.]+)", "cpe:/a:southrivertech:titan_ftp_server:",
-"TotalVideo/Player/Ver", "^([0-9.]+?)", "cpe:/a:effectmatrix:total_video_player:",
-"Transmission/Ver", "^([0-9.]+)", "cpe:/a:transmissionbt:transmission:",
-"Trillian/Ver", "^([0-9.]+)", "cpe:/a:ceruleanstudios:trillian:",
-"UltraISO/Ver", "^([0-9.]+)", "cpe:/a:ezbsystems:ultraiso:",
-"UltraVNC/Win/Ver", "^([0-9]\.[0-9]\.[0-9])", "cpe:/a:ultravnc:ultravnc:",
-"VLCPlayer/Lin/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:videolan:vlc_media_player:",
-"VLCPlayer/Win/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:videolan:vlc_media_player:",
-"VMware/*/Win/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:vmware:ace:",
-"VMware/Player/Win/Ver", "^([0-9.]+)", "cpe:/a:vmware:player:",
-"VMware/Server/Win/Ver", "^([0-9.]+)", "cpe:/a:vmware:server:",
-"VMware/Workstation/Win/Ver", "^([0-9.]+)", "cpe:/a:vmware:workstation:",
-"VMware/ACE/Win/Ver", "^([0-9.]+)", "cpe:/a:vmware:ace:",
-"VMware/ACE\Dormant/Win/Ver", "^([0-9.]+)", "cpe:/a:vmware:ace:",
-"VMware/GSX-Server/Linux/Ver", "^([0-9.]+)", "cpe:/a:vmware:gsx_server:",
-"VMware/Player/Linux/Ver", "^([0-9.]+)", "cpe:/a:vmware:player:",
-"VMware/Server/Linux/Ver", "^([0-9.]+)", "cpe:/a:vmware:server:",
-"VMware/Workstation/Linux/Ver", "^([0-9.]+)", "cpe:/a:vmware:workstation:",
-"VUPlayer/Version", "^([0-9.]+)", "cpe:/a:vuplayer:vuplayer:",
-"Ventrilo/version", "^([0-9.]+)", "cpe:/a:flagship_industries:ventrilo:",
-"ViPlay/MediaPlayer/Ver", "^([0-9.]+)", "cpe:/a:urusoft:viplay3:",
-"VirtualCloneDrive/Ver", "^([0-9.]+)", "cpe:/a:slysoft:virtualclonedrive:",
-"WebDAV/Neon/Ver", "^([0-9.]+)", "cpe:/a:webdav:neon:",
-"WebcamXP/Version", "^([0-9.]+)", "cpe:/a:webcamxp:webcamxp:",
-"Win/IBM-db2/Ver", "^([0-9]\.[0-9])", "cpe:/a:ibm:db2:",
-"Win/MediaPlayer/Ver", "^([0-9.]+)", "cpe:/a:microsoft:windows_media_player:",
-"WinGate/Ver", "^([0-9.]+)", "cpe:/a:qbik:wingate:",
-"WinRAR/Ver", "^([0-9.]+)", "cpe:/a:rarlab:winrar:",
-"Winamp/Version", "^([0-9.]+)", "cpe:/a:nullsoft:winamp:",
-"WindowsSharePointServices/version", "^([0-9]\.[0-9])", "cpe:/a:microsoft:sharepoint_services:",
-"Wireshark/Linux/Ver", "^([0-9.]+)", "cpe:/a:wireshark:wireshark:",
-"Wireshark/Win/Ver", "^([0-9.]+)", "cpe:/a:wireshark:wireshark:",
-"XEmacs/Win/Ver", "^([0-9.]+)", "cpe:/a:xemacs:xemacs:",
-"Xilisoft/Video/Conv/Ver", "^([0-9]\.[0-9]\.[0-9]+)", "cpe:/a:xilisoft:xilisoft_video_converter:",
-"Xpdf/Linux/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:foolabs:xpdf:",
-"Xvid/Win/Ver", "^([0-9.]+)", "cpe:/a:xvid:xvid:",
-"eZip/Version", "^([0-9.]+)", "cpe:/a:edisys:ezip_wizard:",
-"dotNet/version", "^([0-9.]+)", "cpe:/a:microsoft:.net_framework:",
-"iTunes/Win/Ver", "^([0-9]\.[0-9]\.[0-9])", "cpe:/a:apple:itunes:",
-"ikiwiki/Ver", "^([0-9.]+)", "cpe:/a:ikiwiki:ikiwiki:",
-"mpg123/Linux/Ver", "^([0-9.]+)", "cpe:/a:mpg123:mpg123:",
-"mssql/SQLVersion","^(8\..*)", "cpe:/a:microsoft:sql_server:2000",
-"mssql/SQLVersion","^(9\..*)", "cpe:/a:microsoft:sql_server:2005",
-"nsd/version","^([0-9.]+)", "cpe:/a:nlnetlabs:nsd:",
-"sybase/version", "^([0-9.]+)", "cpe:/a:sybase:",
-"FTPShell/Client/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:ftpshell:ftpshell:",
-"SILC/Client/Ver", "^([0-9.]+)", "cpe:/a:silcnet:silc_client:",
-"MS/WPP/EntLib/Ver", "^([0-9]\.[0-9])", "cpe:/a:microsoft:enterprise_library:",
-"Changetrack/Ver", "^([0-9.]+)", "cpe:/a:cameron_morland:changetrack:",
-"FreeRADIUS/Ver", "^([0-9.]+)", "cpe:/a:freeradius:freeradius:",
-"freeSSHd/Ver", "^([0-9.]+)", "cpe:/a:freesshd:freesshd:",
-"Dovecot/Ver", "^([0-9.]+)", "cpe:/a:dovecot:dovecot:",
-"IIS/*/Ver", "^([0-9])\..*", "cpe:/a:microsoft:iis:",
-"www/*/AjaxPortal", "^([0-9.]+)", "cpe:/a:myiosoft.com:ajaxportal:",
-"www/*/Admin-New-Tools", "^([0-9.]+)", "cpe:/a:adminnewstools:",
-"www/*/Apache/Struts", "^([0-9.]+)", "cpe:/a:apache:struts:",
-"www/*/b2evolution", "^([0-9.]+)", "cpe:/a:b2evolution:b2evolution:",
-"www/*/Clicknet-CMS", "^([0-9.]+)", "cpe:/a:clicknet:",
-"www/*/IBM/DB2MC","^([0-9.]+)", "cpe:/a:peter_kohlmann:db2_monitoring_console:",
-"www/*/DM-Albums", "^([0-9.]+)", "cpe:/a:dutchmonkey:dm_album:",
-"www/*/DM-FileManager", "^([0-9.]+)", "cpe:/a:dutchmonkey:dm_filemanager:",
-"www/*/DokuWiki", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:dokuwiki:dokuwiki:",
-"www/*/ELOG", "^([0-9]+\.[0-9]+\.[0-9]+)", "cpe:/a:stefan_ritt:elog_web_logbook:",
-"www/*/OXID-eShop", "^([0-9.]+)", "cpe:/a:oxid:eshop:",
-"www/*/Openfire", "^([0-9.]+)", "cpe:/a:igniterealtime:openfire:",
-"www/*/FlashChat", "^([0-9.]+)", "cpe:/a:tufat:flashchat:",
-"www/*/Flatchat", "^([0-9.]+)", "cpe:/a:ninjadesigns:flatchat:",
-"www/*/Adobe/FMS", "^([0-9.]+)", "cpe:/a:adobe:flash_media_server:",
-"www/*/Foswiki", "^([0-9.]+)", "cpe:/a:foswiki:foswiki:",
-"www/*/2532|Gigs", "^([0-9.]+)", "cpe:/a:2532gigs:2532gigs:",
-"www/*/ExpEngine", "^([0-9.]+)", "cpe:/a:expressionengine:expressionengine:",
-"www/*/MapServer", "^([0-9.]+)", "cpe:/a:umn:mapserver:",
-"www/*/MDPro", "^([0-9.]+)", "cpe:/a:maxdev:mdpro:",
-"www/*/NetRisk", "^([0-9.]+)", "cpe:/a:phprisk:netrisk:",
-"www/*/OpenPro", "^([0-9.]+)", "cpe:/a:openpro:openpro:",
-"www/*/OpenForum", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:2enetworx:openforum:",
-"www/*/PHP", "^([0-9.]+)", "cpe:/a:php:php:",
-"www/*/Pivot", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:pivot:pivot:",
-"www/*/Apache", "^([0-9.]+)", "cpe:/a:apache:http_server:",
-"www/*/Apache/Mod_Jk", "^([0-9.]+)", "cpe:/a:apache:mod_jk:",
-"www/*/Apache/Tiles", "^([0-9.]+)", "cpe:/a:apache:tiles:",
-"www/*/ApacheTomcat", "^([0-9.]+)", "cpe:/a:apache:tomcat:",
-"www/*/HP/SMH", "^([0-9.]+)", "cpe:/a:hp:system_management_homepage:",
-"www/*/SMF", "^([0-9.]+)(RC[0-9])?", "cpe:/a:simplemachines:smf:",
-"www/*/Squid", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:squid-cache:squid:",
-"www/*/punBB", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:punbb:punbb:",
-"www/*/webmin", "^([0-9.]+)", "cpe:/a:webmin:usermin:",
-"www/*/RoboHelpServer", "^([0-9.]+)", "cpe:/a:adobe:robohelp_server:",
-"www/*/ApacheRoller", "^([0-9.]+)", "cpe:/a:apache:roller:",
-"www/*/Shareaza", "^([0-9.]+)", "cpe:/a:ryo-oh-ki:shareaza:",
-"www/*/SineCMS", "^([0-9.]+)", "cpe:/a:sinecms:sinecms:",
-"www/*/LimeSurvey", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:limesurvey:limesurvey:",
-"www/*/TemaTres", "^([0-9.]+)", "cpe:/a:r020:tematres:",
-"www/*/TWiki", "^([0-9.]+)", "cpe:/a:twiki:twiki:",
-"www/*/Lussumo/Vanilla", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:lussumo:vanilla:",
-"www/*/V-webmail", "^([0-9.]+)", "cpe:/a:christof_bruyland:v-webmail:",
-"www/*/BurningBoard", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:woltlab:burning_board:",
-"www/*/WebSVN", "^([0-9.]+)", "cpe:/a:tigris:websvn:",
-"www/*/WordPress", "^([0-9.]+)", "cpe:/a:wordpress:wordpress:",
-"www/*/WordPress-Mu", "^([0-9.]+)", "cpe:/a:wordpress:wordpress_mu:",
-"www/*/AN-Guestbook", "^([0-9.]+)", "cpe:/a:an_guestbook:an_guestbook:",
-"www/*/TCPDB", "^([0-9.]+)", "cpe:/a:tcpdb:tcpdb:",
-"www/*/dotProject", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:dotproject:dotproject:",
-"www/*/XAMPP", "^([0-9.]+)", "cpe:/a:apachefriends:xampp:",
-"www/*/Ziproxy", "^([0-9.]+)", "cpe:/a:ziproxy:ziproxy:",
-"www/*/Sun/JavaSysAccessMang", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:sun:java_system_access_manager:",
-"www/*/Sun/OpenSSO", "^([0-9.]+)", "cpe:/a:sun:opensso_enterprise:",
-"www/*/Bitweaver", "^([0-9.]+)", "cpe:/a:bitweaver:bitweaver:",
-"www/*/Campsite", "^([0-9]\.[0-9]\.[0-9]+)\.?([a-z0-9]+)?", "cpe:/a:campware.org:campsite:",
-"www/*/Claroline", "^([0-9.]+)", "cpe:/a:claroline:claroline:",
-"www/*/Fuzzylime(cms)", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:fuzzylime:fuzzylime_cms:",
-"www/*/CUPS", "^([0-9.]+\.[0-9])\.([a-z0-9]+)?", "cpe:/a:apple:cups:",
-"www/*/DotNetNuke", "^([0-9.]+)", "cpe:/a:dotnetnuke:dotnetnuke:",
-"www/*/LightNEasy/NoDB", "^([0-9.]+)", "cpe:/a:lightneasy:lightneasy:",
-"www/*/LightNEasy/Sqlite", "^([0-9.]+)", "cpe:/a:sqlite:sqlite:",
-"www/*/Mahara", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:mahara:mahara:",
-"www/*/NatterChat", "^([0-9.]+)", "cpe:/a:natterchat:natterchat:",
-"www/*/php-nuke", "^([0-9.]+)", "cpe:/a:phpnuke:php-nuke:",
-"www/*/ProChatRooms", "^([0-9.]+)", "cpe:/a:pro_chat_rooms:pro_chat_rooms:",
-"www/*/CuteNews", "^([0-9.]+)", "cpe:/a:cutephp:cutenews:",
-"www/*/PHP-Address-Book", "^([0-9.]+)", "cpe:/a:chatelao:php_address_book:",
-"www/*/cubecart","^([0-9.]+)", "cpe:/a:cubecart:cubecart:",
-"www/*/php-fusion","^([0-9.]+)","cpe:/a:php-fusion:php-fusion:",
-"www/*/phpMyAdmin", "^([0-9.]+).*([rc0-9]*)?", "cpe:/a:phpmyadmin:phpmyadmin:",
-"www/*/postnuke", "^([0-9.]+)", "cpe:/a:postnuke:postnuke:",
-"www/*/QuiXplorer", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:claudio_klingler:quixplorer:",
-"www/*/TikiWiki", "^([0-9.]+)", "cpe:/a:tikiwiki:tikiwiki:",
-"www/*/TorrentTraderClassic", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:torrenttrader:torrenttrader_classic:",
-"www/*/TorrentVolve", "^([0-9.]+)", "cpe:/a:castro_xl:torrentvolve:",
-"www/*/FireStats", "^([0-9.]+)[. ]?([a-z0-9]+)?", "cpe:/a:firestats:firestats:",
-"www/*/FormMail", "^([0-9.]+)","cpe:/a:matt_wright:formmail:",
-"www/*/FreeWebshop", "^([0-9.]+\.[0-9])\.?([r0-9]+)?", "cpe:/a:freewebshop:freewebshop:",
-"www/*/GlassFish", "^([0-9.]+)", "cpe:/a:sun:glassfish",
-"www/*/MLDonkey/remote/", "^([0-9.]+\.[0-9]).*([r0-9]+)?", "cpe:/a:mldonkey:mldonkey:",
-"www/*/PRTGTrafficGrapher", "^([0-9.]+)", "cpe:/a:paessler:prtg_traffic_grapher:",
-"www/*/RealtyWebBase", "^([0-9.]+)", "cpe:/a:realtywebware:realty_web-base:",
-"www/*/SWS", "^([0-9.]+)", "cpe:/a:symantec:web_security:",
-"www/*/SnitzForums", "^([0-9.]+)", "cpe:/a:snitz_forums_2000:snitz_forums:",
-"www/*/TinyPHPForum", "^([0-9.]+)", "cpe:/a:tinyphpforum:tinyphpforum:",
-"www/*/TinyWebGallery", "^([0-9.]+)", "cpe:/a:tinywebgallery:tinywebgallery:",
-"www/*/aas", "^([0-9.]+)", "cpe:/a:klinzmann:application_access_server:",
-"www/*/adaptbb", "^([0-9.]+)", "cpe:/a:adaptbb:adaptbb:",
-"www/*/axigen", "^([0-9.]+)", "cpe:/a:gecad_technologies:axigen_mail_server:",
-"www/*/bugzilla", "^([0-9._]+)", "cpe:/a:mozilla:bugzilla:",
-"www/*/bugzilla/version", "^([0-9._]+)", "cpe:/a:mozilla:bugzilla:",
-"www/*/cacti", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:cacti:cacti:",
-"www/*/coppermine", "^([0-9.]+)", "cpe:/a:coppermine:coppermine_photo_gallery:",
-"www/*/cutenews", "^([0-9.]+)", "cpe:/a:cutephp:cutenews:",
-"www/*/cvstrac", "^([0-9.]+)", "cpe:/a:cvstrac:cvstrac:",
-"www/*/deluxeBB", "^([0-9.]+)", "cpe:/a:deluxebb:deluxebb:",
-"www/*/drupal", "^([0-9.]+)", "cpe:/a:drupal:drupal:",
-"www/*/e107", "^([0-9.]+)", "cpe:/a:e107:e107:",
-"www/*/eliteCMS", "^([0-9.]+)", "cpe:/a:elitecms:elitecms:",
-"www/*/freznoshop", "^([0-9.]+)", "cpe:/a:freznoshop:freznoshop:",
-"www/*/iDB", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:idb:idb:",
-"www/*/invision_power_board", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:invision_power_services:invision_power_board:",
-"www/*/linpha", "^([0-9.]+)", "cpe:/a:linpha:linpha:",
-"www/*/mambo_mos", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:mambo-foundation:mambo:",
-"www/*/mantis", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:mantis:mantis:",
-"www/*/mod_perl", "^([0-9.]+)", "cpe:/a:apache:mod_perl:",
-"www/*/moodle", "^([0-9.]+)", "cpe:/a:moodle:moodle:",
-"www/*/moziloCMS", "^([0-9.]+)", "cpe:/a:mozilo:mozilocms:",
-"www/*/net2ftp"," ^([0-9.]+)", "cpe:/a:net2ftp:net2ftp:",
-"www/*/notftp", "^([0-9.]+)", "cpe:/a:wonko:notftp:",
-"www/*/ntop", "^([0-9.]+)", "cpe:/a:ntop:ntop:",
-"www/*/opencart", "^([0-9.]+)", "cpe:/a:opencart:opencart:",
-"www/*/phorum", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:phorum:phorum:",
-"www/*/phpBB", "^([0-9.]+)", "cpe:/a:phpbb:phpbb:",
-"www/*/phpBugTracker", "^([0-9.]+?)", "cpe:/a:benjamin_curtis:phpbugtracker:",
-"www/*/phpGroupWare", "^([0-9.]+)", "cpe:/a:phpgroupware:phpgroupware:",
-"www/*/phpScheduleIt", "^([0-9.]+)", "cpe:/a:php.brickhost:phpscheduleit:",
-"www/*/phpmyfaq", "^([0-9.]+)", "cpe:/a:phpmyfaq:phpmyfaq:",
-"www/*/podcast_generator", "^([0-9.]+)([a-z 0-9]+)?", "cpe:/a:podcast_generator:podcast_generator:",
-"www/*/serendipity", "^([0-9.]+)([-a-z0-9]+)?", "cpe:/a:s9y:serendipity:",
-"www/*/vBulletin", "^([0-9.]+)","cpe:/a:vbulletin:vbulletin:",
-"www/*/viewvc", "^([0-9.]+-?([a-z0-9]+)?)", "cpe:/a:viewvc:viewvc:",
-"www/*/webapp","^([0-9.]+)", "cpe:/a:web_app.net:webapp:",
-"www/*/webcalendar", "^([0-9.]+)", "cpe:/a:webcalendar:webcalendar:",
-"www/domino/*/db", "^([0-9.]+)", "cpe:/a:lotus:domino_server:",
-"cvs/*/version", "^([0-9.]+)", "cpe:/a:cvs:cvs:",
-"www/*/cPCreator", "^([0-9.]+)", "cpe:/a:cpecreator:cp_creator:",
-"www/*/photopost", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:photopost:photopost_php_pro:",
-"www/*/Uebimiau/Webmail", "^([0-9.]+)", "cpe:/a:uebimiau:uebimiau:",
-"nginx/*/version", "^([0-9.]+)", "cpe:/a:nginx:nginx:",
-"www/*/sympa", "^([0-9.]+)", "cpe:/a:sympa:sympa:",
-"www/*/GeoServer", "^([0-9.]+)", "cpe:/a:geoserver:geoserver:",
-"www/*/linkSpheric", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:dataspheric:linkspheric:",
-"www/*/flatpress", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:flatpress:flatpress:",
-"www/*/PHPGenealogie", "^([0-9.]+)", "cpe:/a:phpgenealogy:phpgenealogy:",
-"www/*/OPT", "^([0-9.]+)", "cpe:/a:lanifex:outreach_project_tool:",
-"www/*/Flashlight/Free", "^([0-9.]+)", "cpe:/a:ringsworld:flashlight_free_edition:",
-"BackupPC/Ver", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:craig_barratt:backuppc:",
-"www/*/MRBS", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:john_beranek:meeting_room_booking_system:",
-"IBM/InstallMang/Win/Ver", "^([0-9.]+)", "cpe:/a:ibm:installation_manager:",
-"www/*/phplive", "^([0-9.]+)", "cpe:/a:phplivesupport.:phplive!:",
-"Shibboleth/SP/Win/Ver", "^([0-9.]+)", "cpe:/a:internet2:shibboleth-sp:",
-"www/*/MyMsg", "^([0-9.]+)", "cpe:/a:al4us:mymsg:",
-"www/*/Jetty", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:mortbay:jetty:",
-"Serv-U/FTP/Ver", "^([0-9.]+)", "cpe:/a:rhinosoft:serv-u:",
-"www/*/BLOB-Blog-System", "^([0-9.]+)", "cpe:/a:blob:blog_system:",
-"CuteFTP/Home/Ver", "^([0-9.]+)", "cpe:/a:globalscape:cuteftp:",
-"CuteFTP/Lite/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:globalscape:cuteftp:",
-"CuteFTP/Professional/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:globalscape:cuteftp:",
-"www/*/AfterLogicWebMailPro", "^([0-9.]+)", "cpe:/a:afterlogic:mailbee_webmail_pro:",
-"SonicSpot/Audoiactive/Player/Ver", "^([0-9.]+)", "cpe:/a:sonicspot:audioactive_player:",
-"www/*/bloofoxCMS", "^([0-9.]+)", "cpe:/a:bloofox:bloofoxcms:",
-"www/*/Xerver", "^([0-9.]+)", "cpe:/a:xerver:xerver:",
-"AOL/Ver", "^([0-9.]+)", "cpe:/a:aol:internet_software:",
-"XM-Easy-Personal-FTP/Ver", "^([0-9.]+)", "cpe:/a:dxmsoft:xm_easy_personal_ftp_server:",
-"FileCOPA-FTP-Server/Ver", "^([0-9.]+)", "cpe:/a:filecopa-ftpserver:ftp_server:",
-"Alleycode-HTML-Editor/Ver", "^([0-9.]+)", "cpe:/a:konae:alleycode_html_editor:",
-"GD-Graphics-Lib/Lin/Ver", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:libgd:gd_graphics_library:",
-"httpdx/*/Ver", "^([0-9.]+([a-z]+)?)", "cpe:/a:jasper:httpdx:",
-"NaviCOPA/*/Ver", "^([0-9.]+)", "cpe:/a:intervations:navicopa_web_server:",
-"www/*/OpenDocMan", "^([0-9.]+)", "cpe:/a:opendocman:opendocman:",
-"CA/AV/Win/Ver", "^([0-9.]+)", "cpe:/a:ca:anti-virus:",
-"CA/ISS/Win/Ver", "^([0-9.]+)", "cpe:/a:ca:internet_security_suite",
-"CA/eTrust-EZ-AV/Win/Ver", "^([0-9.]+)", "cpe:/a:ca:etrust_ez_antivirus:",
-"SystemTap/Ver", "^([0-9.]+)", "cpe:/a:systemtap:systemtap:",
-"FormMax/Evaluation/Ver", "^([0-9.]+)", "cpe:/a:cutepdf:formmax:",
-"www/*/eFront", "^([0-9.]+)", "cpe:/a:efrontlearning:efront:",
-"QEMU/Lin/Ver", "^([0-9.]+)", "cpe:/a:qemu:qemu:",
-"Gpg4win/Win/Ver", "^([0-9.]+)", "cpe:/a:gpg4win:gpg4win:",
-"Kleopatra/Win/Ver", "^([0-9.]+)", "cpe:/a:kde-apps:kleopatra:",
-"www/*/landesk", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:landesk:landesk_management_suite:",
-"Snort/Linux/Ver", "^([0-9.]+)", "cpe:/a:snort:snort:",
-"www/*/joomla", "^([0-9.]+)", "cpe:/a:joomla:joomla",
-"www/*/tftgallery", "^([0-9.]+)", "cpe:/a:tftgallery:tftgallery:",
-"SquidGuard/Ver", "^([0-9.]+)", "cpe:/a:squidguard:squidguard:",
-"EurekaEmail/Ver", "^([0-9.]+)", "cpe:/a:eureka-email:eureka_email:",
-"Pegasus/Mail/Ver", "^([0-9.]+)", "cpe:/a:pmail:pegasus_mail:",
-"Strawberry/Perl/Ver", "^([0-9.]+)", "cpe:/a:perl:perl:",
-"ActivePerl/Ver", "^([0-9.]+)", "cpe:/a:perl:perl:",
-"www/*/sahana", "^([0-9.]+)", "cpe:/a:sahana:sahana:",
-"Novell/Groupwise/Client/Win/Ver", "^([0-9.]+)", "cpe:/a:novell:groupwise:",
-"ldap/*/eDirectory", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:novell:edirectory:",
-"ftp/*/Serv-U", "^([0-9.]+)","cpe:/a:rhinosoft:serv-u:",
-"www/*/XOOPS", "^([0-9.]+\.[0-9])\.?([a-z0-9])?", "cpe:/a:xoops:xoops:",
-"HTML-Parser/Linux/Ver", "^([0-9.]+)", "cpe:/a:derrick_oswald:html-parser:",
-"JetAudio/Ver", "^([0-9.]+)", "cpe:/a:cowonamerica:cowon_media_center-jetaudio:",
-"Blender/Lin/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:blender:blender:",
-"FasloPlayer/Ver", "^([0-9.]+)", "cpe:/a:faslo:faslo_player:",
-"Labtam/ProFTP/Ver", "^([0-9.]+)", "cpe:/a:proftpd:proftpd:",
-"Sun/VirtualBox/Win/Ver", "^3\.0\..*", "cpe:/a:sun:virtualbox:",
-"Sun/xVM-VirtualBox/Win/Ver", "^[0-2]\..*", "cpe:/a:sun:xvm_virtualbox:",
-"Sun/VirtualBox/Lin/Ver", "^(3\..*)", "cpe:/a:sun:virtualbox:",
-"Sun/VirtualBox/Lin/Ver", "^([0-2]\..*)", "cpe:/a:sun:xvm_virtualbox:",
-"Axon-Virtual-PBX/Ver", "^([0-9.]+)", "cpe:/a:nch:axon_virtual_pbx:",
-"www/*/UseBB", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:usebb:usebb:",
-"www/*/FrontAccounting", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?",  "cpe:/a:frontaccounting:frontaccounting:",
-"HomeFTPServer/Ver", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:downstairs.dnsalias:home_ftp_server:",
-"Robo/FTP/Ver", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?" , "cpe:/a:robo-ftp:robo-ftp:",
-"TYPSoft/FTP/Ver", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:typsoft:typsoft_ftp_server:",
-"Golden/FTP/Pro/Ver", "^([0-9.]+)", "cpe:/a:kmint21:golden_ftp_server:",
-"Golden/FTP/Free/Ver", "^([0-9.]+)", "cpe:/a:kmint21:golden_ftp_server:",
-"YahooMessenger/Ver", "^([0-9.]+)", "cpe:/a:yahoo:messenger:",
-"Serenity/Audio/Player/Ver", "^([0-9.]+)", "cpe:/a:malsmith:serenity_audio_player:",
-"Mplay/Audio/Player/Ver", "^([0-9.]+)", "cpe:/a:malsmith:serenity_audio_player:",
-"www/*/Telepark.wiki", "^([0-9.]+)", "cpe:/a:telepark:telepark.wiki:",
-"www/*/ImageHostingScript/DPI", "^([0-9.]+)", "cpe:/a:image-host-script:image_hosting_script:",
-"IDEAL/Admin/Ver", "^(9\.[0-9.]+)", "cpe:/a:pointdev:ideal_administration_2009:",
-"Panda/InternetSecurity/Ver", "^(15\.0)", "cpe:/a:pandasecurity:panda_internet_security:2010::pro",
-"Panda/GlobalProtection/Ver", "^(3\.0)", "cpe:/a:pandasecurity:panda_global_protection:2010",
-"Panda/Antivirus/Ver", "^(9\.0)", "cpe:/a:pandasecurity:panda_antivirus::2010::pro",
-"www/*/YABSoft/AIHS", "^([0-9.]+)", "cpe:/a:yabsoft:advanced_image_hosting_script:",
-"NASL/Linux/Ver", "^([0-9.]+)", "cpe:/a:nessus:nessus:",
-"www/*/ePoAgent/Version","^([0-9.]+([a-z0-9]+)?)","cpe:/a:mcafee:epolicy_orchestrator:",
-"www/*/barracuda_im_firewall", "^([0-9.]+)", "cpe:/h:barracuda_networks:barracuda_im_firewall:",
-"www/*/jboss_enterprise_application_server", "^([0-9.]+)([GA_CP0-9]*)", "cpe:/a:redhat:jboss_enterprise_application_platform:",
-"www/*/basilix", "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", "cpe:/a:basilix:basilix_webmail:",
-"SMB/Patchlink/version", "^([0-9]+\.[0-9]+)", "cpe:/a:lumension_security:patchlink_update:",
-"www/*/jdwebinterface", "^([0-9.]+)", "",
-"www/*/openx", "^([0-9.]+)", "cpe:/a:openx:openx:",
-"www/*/PowerPhlogger", "^([0-9.]+)", "cpe:/a:powerphlogger:powerphlogger:",
-"www/*/phpshop", "^([0-9.]+)", "cpe:/a:edikon:phpshop:",
-"www/*/rt_tracker", "^([0-9.]+)", "cpe:/a:best_practical_solutions:request_tracker:",
-"SSH/banner/*", "OpenSSH[_ ]([.a-zA-Z0-9]*)[- ]?.*", "cpe:/a:openbsd:openssh:",
-"www/*/phpldapadmin", "^([0-9.]+)", "cpe:/a:phpldapadmin:phpldapadmin:",
-"www/*/AlefMentor", "^([0-9.]+)", "cpe:/a:findmysoft:alefmentor:",
-"www/*/FamilyConnections", "^([0-9.]+)", "cpe:/a:haudenschilt:family_connections_cms:",
-"Ruby/Win/Ver", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:ruby-lang:ruby:",
-"www/*/Valarsoft/Webmatic", "^([0-9.]+)", "cpe:/a:valarsoft:webmatic:",
-"www/*/SQL-Ledger", "^([0-9.]+)","cpe:/a:sql-ledger:sql-ledger:",
-"www/*/PHP-Calendar", "^([0-9.]+)", "cpe:/a:php-calendar:php-calendar:",
-"www/*/JpGraph", "^([0-9.]+)", "cpe:/a:aditus:jpgraph:",
-"www/*/Ortro", "^([0-9.]+([a-z0-9]+)?)", "cpe:/a:ortro:ortro:",
-"www/*/LiveZilla", "^([0-9.]+)", "cpe:/a:livezilla:livezilla:",
-"Kerberos5/Ver", "^([0-9.]+)", "cpe:/a:mit:kerberos:",
-"Google/SketchUp/Win/Ver", "^([0-9.]+)", "cpe:/a:google:google_sketchup:",
-"www/*/phpNagios", "^([0-9.]+)", "cpe:/a:phpnagios:phpnagios:",
-"SouthRiverWebDrive/Win/Ver", "^([0-9.]+)", "cpe:/a:south_river_technologies:webdrive:",
-"Varnish/Ver", "^([0-9.]+)", "cpe:/a:varnish.projects.linpro:varnish:",
-"GZip/Win/Ver", "^([0-9.]+)", "cpe:/a:gnu:gzip:",
-"GZip/Linux/Ver", "^([0-9.]+)", "cpe:/a:gnu:gzip:",
-"Maildrop/Linux/Ver", "^([0-9.]+)", "cpe:/a:maildrop:maildrop:",
-"FFmpeg/Linux/Ver", "^([0-9.]+)", "cpe:/a:ffmpeg:ffmpeg:",
-"NetPBM/Ver", "^([0-9.]+)", "cpe:/a:netpbm:netpbm:",
-"www/*/evalSMSI", "^([0-9.]+)", "cpe:/a:myshell:evalsmsi:",
-"www/*/phpBazar", "^([0-9.]+)", "cpe:/a:smartisoft:phpbazar:",
-"www/*/DocManager", "^([0-9.]+)", "cpe:/a:dmanager:documentmanager:",
-"www/*/BASE", "^([0-9.]+)", "cpe:/a:secureideas:base:",
-"www/*/OTRS", "^([0-9.]+)", "cpe:/a:otrs:otrs:",
-"www/*/JAG", "^([0-9.]+)", "cpe:/a:xs4all:jag:",
-"www/*/ZeusCMS", "^([0-9.]+)", "cpe:/a:zeuscms:zeuscms:",
-"www/*/Limny", "^([0-9.]+)", "cpe:/a:limny:limny:",
-"Hyleos/ChemViewX/Ver", "^([0-9.]+)", "cpe:/a:hyleos:chemview:",
-"www/*/WampServer", "^([0-9.]+)", "cpe:/a:wampserver:wampserver:",
-"Bournal/Ver", "^([0-9.]+)", "cpe:/a:becauseinter:bournal:",
-"www/*/Zenoss", "^([0-9.]+)", "cpe:/a:zenoss:zenoss:",
-"www/*/moinmoinWiki", "^([0-9.]+)", "cpe:/a:moinmo:moinmoin:",
-"www/*/tdiary", "^([0-9.]+)", "cpe:/a:tdiary:tdiary:",
-"FirewallBuilder/Linux/Ver", "^([0-9.]+)", "cpe:/a:fwbuilder:firewall_builder:",
-"www/*/phpCOIN", "^([0-9.]+)", "cpe:/a:phpcoin:phpcoin:",
-"VisualizationLibrary/Win/Ver", "^([0-9.]+)", "cpe:/a:visualizationlibrary:visualization_library:",
-"www/*/TTWebsiteManager", "^([0-9.]+)", "cpe:/a:technotoad:tt_web_site_manager:",
-"www/*/Discloser", "^([0-9.]+)", "cpe:/a:bob_jewell:discloser:",
-"www/*/XoopsCelepar", "^([0-9.]+)", "cpe:/a:alexandre_amaral:xoops_celepar:",
-"www/*/NetpetCMS", "^([0-9.]+)", "cpe:/a:netpet:netpet_cms:",
-"XnView/Linux/Ver", "^([0-9.]+)", "cpe:/a:xnview:xnview:",
-"XnView/Win/Ver", "^([0-9.]+)", "cpe:/a:xnview:xnview:",
-"www/*/Audistat", "^([0-9.]+)", "cpe:/a:alexandre_dubus:audistat:",
-"libESMTP/Ver", "^([0-9.]+)", "cpe:/a:stafford.uklinux:libesmtp:",
-"Skype/Win/Ver", "^([0-9.]+)", "",
-"www/*/tembria", "^([0-9.]+)", "cpe:/a:tembria:server_monitor:",
-"Ipswitch/WS_FTP_Pro/Client/Ver", "^([0-9.]+)", "cpe:/a:ipswitch:ws_ftp:12.0:",
-"TrellianFTP/Version", "^([0-9.]+)", "cpe:/a:trellian:ftp:",
-"aMSN/Win/Ver", "^([0-9.]+)", "cpe:/a:amsn:amsn:",
-"www/*/Siestta", "^([0-9.]+)", "cpe:/a:ramoncastro:siestta:",
-"www/*/PmWiki", "^([0-9.]+)", "cpe:/a:pmwiki:pmwiki:",
-"Aria2/Ver", "^([0-9.]+)", "cpe:/a:tatsuhiro_tsujikawa:aria2:",
-"www/*/OpenMairie/Open_Annuaire", "^([0-9.]+)", "cpe:/a:openmairie:openannuaire:",
-"www/*/OpenMairie/Open_Courrier", "^([0-9.]+)", "cpe:/a:openmairie:opencourrier:",
-"www/*/OpenMairie/Open_Presse", "^([0-9.]+)", "cpe:/a:openmairie:openpresse:",
-"www/*/OpenMairie/Open_Planning", "^([0-9.]+)", "cpe:/a:openmairie:openplanning:",
-"www/*/OpenMairie/Open_ComInterne", "^([0-9.]+)", "cpe:/a:openmairie:opencominterne:",
-"www/*/OpenMairie/Open_Registre_CIL", "^([0-9.]+)", "cpe:/a:openmairie:openregistrecil:",
-"www/*/OpenMairie/Open_Foncier", "^([0-9.]+)", "cpe:/a:openmairie:openfoncier:",
-"www/*/OpenMairie/Open_Catalogue", "^([0-9.]+)", "cpe:/a:openmairie:opencatalogue:",
-"www/*/OpenMairie/Open_Cimetiere", "^([0-9.]+)", "cpe:/a:openmairie:opencimetiere:",
-"www/*/TaskFreak", "^([0-9.]+)", "cpe:/a:taskfreak:taskfreak%21:",
-"www/*/Vmware/SSTC/Runtime", "^([0-9.]+)", "cpe:/a:vmware:tc_server:",
-"www/*/DataTrack_System", "^([0-9.]+)", "cpe:/a:magnoware:datatrack_system:",
-"www/*/OCS_Inventory_NG", "^([0-9.]+)", "cpe:/a:ocsinventory-ng:ocs_inventory_ng:",
-"www/*/HP/OVNNM/Ver", "^([0-9.]+)", "cpe:/a:hp:openview_network_node_manager:",
-"Mathematica/Ver", "^([0-9.]+)", "cpe:/a:wolfram_research:mathematica:",
-"OrbitDownloader/Ver", "^([0-9.]+)", "cpe:/a:orbitdownloader:orbit_downloader:",
-"www/*/Uniform-Server", "^([0-9.]+)", "cpe:/a:uniformserver:uniformserver:",
-"www/*/JV2/Folder/Gallery", "^([0-9.]+)", "cpe:/a:jv2design:jv2_folder_gallery:",
-"www/*/snipegallery", "^([0-9.]+)", "cpe:/a:snipegallery:snipe_gallery:",
-"www/*/pacificTimeSheet/Ver", "^([0-9.]+)", "cpe:/a:pacifictimesheet:pacific_timesheet:",
-"www/*/CMScout", "^([0-9.]+)", "cpe:/a:cmscout:cmscout:",
-"www/*/symphony", "^([0-9.]+)", "cpe:/a:symphony-cms:symphony_cms:",
-"www/*/Weborf", "^([0-9.]+)", "cpe:/a:galileo_students:team_weborf:",
-"www/*/TCExam", "^([0-9.]+)", "cpe:/a:tecnick:tcexam:",
-"emesene/ver", "^([0-9.]+)", "cpe:/a:emesene:emesene:",
-"Adobe/Photoshop/Ver", "^([0-9.]+)", "cpe:/a:adobe:photoshop_cs4:",
-"HP/SWSM", "^([0-9.]+)", "cpe:/a:hp:storageworks_storage_mirroring:",
-"www/*/PHP-Quick-Arcade", "^([0-9.]+)", "cpe:/a:jcink:php-quick-arcade:",
-"Beanstalkd/Ver", "^([0-9.]+)", "cpe:/a:wildbit:beanstalkd:",
-"Rosoft/Audio/Converter/Ver", "^([0-9.]+)", "cpe:/a:rosoftengineering:rosoft_audio_converter:",
-"www/*/Nakid/CMS/Ver", "^([0-9.]+)", "cpe:/a:jeffkilroy:nakid_cms:",
-"Adobe/InDesign/Ver", "^([0-9.]+)", "cpe:/a:adobe:indesign_cs3:",
-"www/*/Orbis/CMS/Ver", "^([0-9.]+)", "cpe:/a:novo-ws:orbis_cms:",
-"www/*/CruxCMS", "^([0-9.]+)","cpe:/a:cruxsoftware:cruxcms:",
-"www/*/CruxPA", "^([0-9.]+)", "cpe:/a:cruxsoftware:cruxpa:",
-"www/*/SimpleID/Ver", "^([0-9.]+)", "cpe:/a:kelvin_mo:simpleid:",
-"BarCodeWiz/Barcode/AX", "^([0-9.]+)", "cpe:/a:barcodewiz:barcode_activex_control:",
-"www/*/Sun/Java/Portal/Server", "^([0-9.]+)", "cpe:/a:sun:java_system_portal_server:",
-"www/*/bozohttpd", "^([0-9.]+)", "cpe:/a:eterna:bozohttpd:",
-"www/*/ZeusCart", "^([0-9.]+)", "cpe:/a:zeuscart:zeuscart:",
-"rekonq/Linux/Ver", "^([0-9.]+)", "cpe:/a:adjam:rekonq:",
-"SigPlus/Ver", "^([0-9.]+)", "cpe:/a:topazsystems:sigplus_pro_activex_control:",
-"SWFTools/Ver", "^([0-9.]+)", "cpe:/a:swftools:swftools:",
-"FreeType/Win/Ver", "^([0-9.]+)", "cpe:/a:freetype:freetype:",
-"Adobe/Dreamweaver/Ver", "^([0-9.]+)", "cpe:/a:adobe:dreamweaver:",
-"TrendMicro/Ver", "^([0-9.]+)", "cpe:/a:trendmicro:internet_security:",
-"Adobe/Captivate/Ver", "^([0-9.]+)", "cpe:/a:adobe:captivate:",
-"IBM-DB2/Remote/ver", "^([0-9.]+)", "cpe:/a:ibm:db2:",
-"Google/Earth/Ver", "^([0-9.]+)", "cpe:/a:google:earth:",
-"www/*/Pecio_CMS", "^([0-9.]+)", "cpe:/a:pecio-cms:pecio_cms:",
-"www/*/btnet", "^([0-9.]+)", "",
-"Google-Chrome/Linux/Ver", "^([0-9.]+)", "cpe:/a:google:chrome:",
-"BlackBerry/Desktop/Win/Ver", "^([0-9.]+)", "cpe:/a:rim:blackberry_desktop_software:",
-"www/*/FCMS", "^([0-9.]+)", "cpe:/a:haudenschilt:family_connections_cms:",
-"SmartMail/Ver", "^([0-9.]+)", "cpe:/a:smartertools:smartermail:",
-"pyftpdlib/Ver", "^([0-9.]+)", "cpe:/a:g.rodola:pyftpdlib:",
-"www/*/GetSimple_cms", "^([0-9.]+)", "cpe:/a:getsimple:getsimple:",
-"Novell/ZHM/Ver", "^([0-9.]+)", "cpe:/a:novell:zenworks_handheld_management:",
-"www/*/SiteEngine", "^([0-9.]+)", "cpe:/a:boka:siteengine:",
-"www/*/Hastymail2", "^([0-9.]+)", "cpe:/a:hastymail:hastymail2:",
-"IBM/TDS/Ver", "^([0-9.]+)", "cpe:/a:ibm:tivoli_directory_server:",
-"OpenSC/Win/Ver", "^([0-9.]+)", "cpe:/a:opensc-project:opensc:",
-"www/*/CrawlTrack", "^([0-9.]+)", "cpe:/a:crawltrack:crawltrack:",
-"www/*/PivotX", "^([0-9.]+)", "cpe:/a:pivotx:pivotx:",
-"www/*/N-13/News", "^([0-9.]+)", "cpe:/a:network-13:n-13_news:",
-"www/*/XWiki", "^([0-9.]+)", "cpe:/a:xwiki:xwiki:",
-"Metasploit/Framework/Win/Ver", "^([0-9.]+)", "cpe:/a:metasploit:metasploit_framework:",
-"IDA/Pro/Ver", "^([0-9.]+)", "cpe:/a:hex-rays:ida:5.7::",
-"Foxit/Phantom/Ver", "^([0-9.]+)", "cpe:/a:foxitsoftware:reader:",
-"Citrix/License/Server/Ver", "^([0-9.]+)", "cpe:/a:citrix:licensing_administration_console:",
-"www/*/gollem", "^([0-9.]+)", "cpe:/a:horde:gollem:",
-"VMware/OVM/Tools/Ver", "^([0-9.]+)", "cpe:/a:vmware:open-vm-tools:",
-"www/*/Xymon", "^([0-9.]+)", "cpe:/a:xymon:xymon:",
-"www/*/OverLook", "^([0-9.]+)", "cpe:/a:openit:overlook:",
-"www/*/aphpkb", "^([0-9.]+)", "cpe:/a:aphpkb:aphpkb:",
-"Adobe/Audition/Win/Ver", "^([0-9.]+)", "cpe:/a:adobe:audition:",
-"PHP/Ver/win", "^([0-9.]+)", "cpe:/a:php:php:",
-"Python/Win/Ver", "^([0-9.]+)", "cpe:/a:python:python:",
-"Citrix/Provisioning/Services/Ver", "^([0-9.]+)", "cpe:/a:citrix:citrix_provisioning_server:",
-"LibreOffice/Linux/Ver", "^([0-9.]+)", "cpe:/a:libreoffice:libreoffice:",
-"LibreOffice/Win/Ver", "^([0-9.]+)", "cpe:/a:libreoffice:libreoffice:",
-"IBM/Informix/Dynamic/Server/Lin/Ver", "^([0-9.]+)", "cpe:/a:ibm:informix_dynamic_server:",
-"IBM/Informix/Dynamic/Server/Win/Ver", "^([0-9.]+)", "cpe:/a:ibm:informix_dynamic_server:",
-"GoogleChrome/MacOSX/Version", "^([0-9.]+)", "cpe:/a:google:chrome:",
-"Opera/MacOSX/Version", "^([0-9.]+)", "cpe:/a:opera:opera_browser:",
-"IGSS/Win/Ver", "^([0-9.]+)", "cpe:/a:7t:igss:",
-"Adobe/Shockwave/MacOSX/Version", "^([0-9.]+)", "cpe:/a:adobe:shockwave_player:",
-"McAfee/SaaS/Win/Ver", "^([0-9.]+)", "cpe:/a:mcafee:saas_endpoint_protection:",
-"Adobe/Flash/Player/MacOSX/Version", "^([0-9.]+)", "cpe:/a:adobe:flash_player:",
-"Adobe/Air/MacOSX/Version", "^([0-9.]+)", "cpe:/a:adobe:adobe_air:",
-"RealPlayer/MacOSX/Version", "^([0-9.]+)", "cpe:/a:realnetworks:realplayer:",
+
+# TODO register those CPEs from corresponding NVTs
 "Tcptrack/Ver", "^([0-9.]+)", "cpe:/a:rhythm:tcptrack:",
 "www/*/IBM/Open/Admin/Tool", "^([0-9.]+)", "cpe:/a:ibm:openadmin_tool:"
 );

Modified: trunk/openvas-plugins/scripts/cutenews_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/cutenews_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/cutenews_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -61,7 +61,24 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100105";
+SCRIPT_DESC = "CuteNews Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -95,7 +112,12 @@
          vers=version[1];
        }
 
-       set_kb_item(name: string("www/", port, "/cutenews"), value: string(vers," under ",install));
+       tmp_version = string(vers," under ",install);
+       set_kb_item(name: string("www/", port, "/cutenews"), value: tmp_version);
+    
+       ## build cpe and store it as host detail
+       register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:cutephp:cutenews:");
+
      }
 
      else if("<title>UTF-8 CuteNews</title>" >< buf)
@@ -105,7 +127,12 @@
          vers=version[1];
        }
 
-       set_kb_item(name: string("www/", port, "/UTF-8/cutenews"), value: string(vers," under ",install));
+       tmp_version = string(vers," under ",install);
+       set_kb_item(name: string("www/", port, "/UTF-8/cutenews"), value: tmp_version);
+
+       ## build cpe and store it as host detail
+       register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:cutephp:cutenews:");
+
      }
 
      info = string("None\n\nCuteNews Version '");

Modified: trunk/openvas-plugins/scripts/cvspserver_version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/cvspserver_version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/cvspserver_version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,6 +48,13 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
+
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100288";
+SCRIPT_DESC = "CVS pserver version";
+
 port = get_kb_item("Services/cvspserver");
 if(!port)port = 2401;
 if(!get_port_state(port))exit(0);
@@ -179,6 +186,12 @@
 
 	if(!isnull(version[1])) {
             set_kb_item(name:string("cvs/", port, "/version"), value:version[1]);
+   
+            ## build cpe and store it as host_detail
+            cpe = build_cpe(value:version[1], exp:"^([0-9.]+)", base:"cpe:/a:cvs:cvs:");
+            if(!isnull(cpe))
+               register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 	    exit(0);
 	} else {
             exit(0);;

Modified: trunk/openvas-plugins/scripts/cvstrac_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/cvstrac_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/cvstrac_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100091";
+SCRIPT_DESC = "CVSTrac Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -88,7 +94,13 @@
         vers=version[1];
       }  
     
-    set_kb_item(name: string("www/", port, "/cvstrac"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/cvstrac"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:cvstrac:cvstrac:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nCVSTrac Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/cyrus_imap_prelogin_overflow.nasl
===================================================================
--- trunk/openvas-plugins/scripts/cyrus_imap_prelogin_overflow.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/cyrus_imap_prelogin_overflow.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -67,7 +67,13 @@
 #
 # The script code starts here
 #
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.11196";
+SCRIPT_DESC = "Cyrus IMAP pre-login buffer overrun";
+
 port = get_kb_item("Services/imap");
 if(!port) port = 143;
 
@@ -92,6 +98,11 @@
   version = ereg_replace(pattern:".* v(.*) server.*", string:banner, replace:"\1");
   set_kb_item (name:"imap/" + port + "/Cyrus", value:version);
 
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value: version, exp:"^([0-9.]+)",base:"cpe:/a:cmu:cyrus_imap_server:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   if(egrep(pattern:"^(1\.*|2\.0\.*|2\.1\.[1-9][^0-9]|2\.1\.10)[0-9]*$", string:version))
   {
     security_hole(port);

Modified: trunk/openvas-plugins/scripts/deluxeBB_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/deluxeBB_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/deluxeBB_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100063";
+SCRIPT_DESC = "deluxeBB Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -95,7 +101,13 @@
         vers=version[1];
       }  
     
-    set_kb_item(name: string("www/", port, "/deluxeBB"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/deluxeBB"), value:tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:deluxebb:deluxebb:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\ndeluxeBB Version (");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/dnsmasq_version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/dnsmasq_version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/dnsmasq_version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,9 +49,15 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("global_settings.inc");
 include("misc_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100266";
+SCRIPT_DESC = "Dnsmasq Detection";
+
  soctcp53 = 0;
  
  if(get_port_state(53))
@@ -129,6 +135,12 @@
 		   security_note(port:53, data:desc, protocol:proto);
                 }
 		close(soc);
+
+                ## build cpe and store it as host_detail
+                cpe = build_cpe(value: hole_data, exp:"^([0-9.]+)",base:"cpe:/a:thekelleys:dnsmasq:");
+                if(!isnull(cpe))
+                   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 		exit(0);
 		}
 	   }

Modified: trunk/openvas-plugins/scripts/dokeos_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/dokeos_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/dokeos_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -54,10 +54,16 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100154";
+SCRIPT_DESC = "Dokeos Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -92,8 +98,14 @@
        vers=chomp(version[2]);
     } 
     
-    set_kb_item(name: string("www/", port, "/dokeos"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/dokeos"), value:tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)",base:"cpe:/a:dokeos:dokeos:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+ 
     info = string("None\n\nDokeos Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");
@@ -109,7 +121,7 @@
          security_note(port:port,data:desc);
        }
        exit(0);
-  
+ 
  }
 }
 exit(0);

Modified: trunk/openvas-plugins/scripts/domino_default_db.nasl
===================================================================
--- trunk/openvas-plugins/scripts/domino_default_db.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/domino_default_db.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -81,7 +81,13 @@
 #
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.10629";
+SCRIPT_DESC = "Lotus Domino administration databases";
+
 auth = NULL;
 
 function test_cgi(port, db, output)
@@ -99,6 +105,12 @@
 		{
 		report = string(report, ". ", db, " this must be considered a security risk since ", output,"\n");
 		set_kb_item(name:string("www/domino/", port, "/db"), value:db);
+   
+                ## build cpe and store it as host_detail
+                cpe = build_cpe(value:db, exp:"^([0-9.]+)", base:"cpe:/a:lotus:domino_server:");
+                if(!isnull(cpe))
+                   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 		}
 	else auth += ". " + db + '\n';
   }

Modified: trunk/openvas-plugins/scripts/drupal_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/drupal_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/drupal_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100169";
+SCRIPT_DESC = "Drupal Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -98,8 +104,14 @@
       vers=chomp(version[1]);
     }
 
+    tmp_version = string(vers," under ",install);
     set_kb_item(name:string("www/", port, "/drupal"),
-                value:string(vers," under ",install));
+                value:tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:drupal:drupal:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nDrupal Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/e107_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/e107_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/e107_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -59,7 +59,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100133";
+SCRIPT_DESC = "e107 Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -89,7 +95,13 @@
     #   vers=chomp(version[1]);
     #} 
     
-    set_kb_item(name: string("www/", port, "/e107"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/e107"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:e107:e107:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\ne107 Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/ePo_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/ePo_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/ePo_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 include("http_keepalive.inc");
 include("global_settings.inc");
 include("misc_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100329";
+SCRIPT_DESC = "ePo Agent Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 port = get_http_port(default:8081);
 
 if(!get_port_state(port))exit(0);
@@ -115,9 +132,17 @@
       info += string("ClientVersion: ", vers, "\n");
       set_kb_item(name: string("www/", port, "/ePoAgent/Version"), value: vers);
       set_kb_item(name: string("cpe:/a:mcafee:agent:",vers), value: TRUE);
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:vers, tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:mcafee:epolicy_orchestrator:");
+
     } else {
       set_kb_item(name: string("www/", port, "/ePoAgent/Version"), value: string("unknown"));
       set_kb_item(name: string("cpe:/a:mcafee:agent"), value: TRUE);
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:string("unknown"), tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:mcafee:epolicy_orchestrator:");
+
     }  
  
     if(!isnull(rserver)) {

Modified: trunk/openvas-plugins/scripts/eggdrop_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/eggdrop_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/eggdrop_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,9 +53,15 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("global_settings.inc");
 include("telnet_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100206";
+SCRIPT_DESC = "Eggdrop Detection";
+
 port = get_kb_item("Services/eggdrop");
 
 if(!port) {
@@ -80,6 +86,11 @@
 
       set_kb_item(name: string("eggdrop/version/", port), value: vers);
 
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: vers, exp:"^([0-9.]+)",base:"cpe:/a:eggheads:eggdrop:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       info = string("None\n\nEggdrop Version '");
       info += string(vers);
       info += string("' was detected on the remote host\n");

Modified: trunk/openvas-plugins/scripts/eliteCMS_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/eliteCMS_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/eliteCMS_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100221";
+SCRIPT_DESC = "eliteCMS Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -91,7 +97,13 @@
        vers=chomp(version[1]);
     } 
     
-    set_kb_item(name: string("www/", port, "/eliteCMS"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/eliteCMS"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:elitecms:elitecms:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\neliteCMS Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/family_connections_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/family_connections_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/family_connections_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100407";
+SCRIPT_DESC = "Family Connections Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -90,8 +96,14 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/FamilyConnections"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/FamilyConnections"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:haudenschilt:family_connections_cms:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nFamily Connections Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/find_service2.nasl
===================================================================
--- trunk/openvas-plugins/scripts/find_service2.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/find_service2.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -64,10 +64,15 @@
  exit(0);
 }
 
-#
+include("cpe.inc");
+include("host_details.inc");
 include("misc_func.inc");
 include("global_settings.inc");
 
+##Constant values
+SCRIPT_OID = "1.3.6.1.4.1.25623.1.0.11153";
+SCRIPT_DESC="Identify unknown services with 'HELP'";
+
 port = get_kb_item("Services/unknown");
 if (! port) exit(0);
 if (! get_port_state(port)) exit(0);
@@ -1550,6 +1555,12 @@
   register_service(port: port, proto: "zebra");
   set_kb_item(name: "zebra/banner/"+port, value: r);
   report_and_exit(port: port, data: "A zebra daemon is running on this port");
+
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value: r, exp:"^([0-9.]+([a-z])?)",base:"cpe:/a:gnu:zebra:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }
 
 # IMAP4

Modified: trunk/openvas-plugins/scripts/firestats_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/firestats_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/firestats_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100226";
+SCRIPT_DESC = "FireStats Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -100,8 +106,13 @@
      }  
 
     }  
-    
-    set_kb_item(name: string("www/", port, "/FireStats"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/FireStats"), value:tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)[. ]?([a-z0-9]+)?", base:"cpe:/a:firestats:firestats:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nFireStats Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/flatpress_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/flatpress_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/flatpress_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,7 +55,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100294";
+SCRIPT_DESC = "Flatpress Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -86,9 +92,15 @@
     if ( !isnull(version[1]) ) {
        vers=chomp(version[1]);
     }
+ 
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/flatpress"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:flatpress:flatpress:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
-    set_kb_item(name: string("www/", port, "/flatpress"), value: string(vers," under ",install));
-
     info = string("None\n\nFlatPress Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/freznoshop_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/freznoshop_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/freznoshop_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100142";
+SCRIPT_DESC = "FreznoShop Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -89,7 +95,13 @@
         vers=chomp(version[1]);
      } 
     
-    set_kb_item(name: string("www/", port, "/freznoshop"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/freznoshop"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:freznoshop:freznoshop:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nFreznoShop Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/gb_2532gigs_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_2532gigs_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_2532gigs_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800681";
+SCRIPT_DESC = "2532|Gigs Version Detection";
+
 gigsPort = get_http_port(default:80);
 
 if(!gigsPort){
@@ -72,10 +78,16 @@
 
     if(gigsVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + gigsPort + "/2532|Gigs", value:gigsVer[1] +
-                       " under " + dir);
+      tmp_version = gigsVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + gigsPort + "/2532|Gigs", value:tmp_version);
       security_note(data:"2532Gigs version " + gigsVer[1] + " running at location "
                          + dir +  " was detected on the host"); 
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:2532gigs:2532gigs:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_7zip_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_7zip_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_7zip_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800255";
+SCRIPT_DESC = "7zip Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +70,12 @@
     set_kb_item(name:"7zip/Lin/Ver", value:zipVer[1]);
     security_note(data:"7zip version " + zipVer[1] + " was detected on the host");
     ssh_close_connection();
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: zipVer[1], exp:"^([0-9.]+)",base:"cpe:/a:7-zip:7-zip:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_adobe_captivate_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_adobe_captivate_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_adobe_captivate_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801266";
+SCRIPT_DESC = "Adobe Captivate Version Detection";
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -80,4 +86,10 @@
   security_note(data:"Adobe Captivate version " + capVer +
                      " installed at location " + capPath +
                      " was detected on the host");
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:capVer, exp:"^([0-9.]+)", base:"cpe:/a:adobe:captivate:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_adobe_flash_player_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_adobe_flash_player_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_adobe_flash_player_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800032";
+SCRIPT_DESC = "Adobe Flash Player Version Detection (Linux)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 air_sock = ssh_login_or_reuse_connection();
 if(!air_sock){
   exit(0);
@@ -84,6 +101,9 @@
       set_kb_item(name:"AdobeFlashPlayer/Linux/Ver", value:flashVer[0]);
       security_note(data:"Adobe Flash Player version " + flashVer[0] +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:flashVer[0], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:adobe:flash_player:");
     }
   }
 }
@@ -105,6 +125,9 @@
         set_kb_item(name:"Adobe/Air/Linux/Ver", value:airVer[1]);
         security_note(data:"Adobe Air version " + airVer[1] +
                            " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:airVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:adobe:air:");
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_adobe_flash_player_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_adobe_flash_player_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_adobe_flash_player_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,26 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID = "1.3.6.1.4.1.25623.1.0.800029";
+SCRIPT_DESC= "Adobe Flash Player Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -76,6 +92,9 @@
       security_note(data:"Adobe Air version " + airVer + 
                          " was detected on the host");
 
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:airVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:adobe:air:");
+
       airFlag = 1;
     }
   }
@@ -99,6 +118,10 @@
       set_kb_item(name:"AdobeFlashPlayer/Win/Ver", value:playerVer);
       security_note(data:"Adobe Flash Player version " + playerVer +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:playerVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:adobe:flash_player:");
+
       playerFlag = 1;
     }
   }
@@ -112,6 +135,10 @@
       set_kb_item(name:"Adobe/Flex/Win/Ver", value:flexVer);
       security_note(data:"Adobe Flex version " + flexVer + 
                          " was detected on the host"); 
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:flexVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:adobe:flex:");
+
       flexFlag = 1;
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_adobe_fms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_adobe_fms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_adobe_fms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800559";
+SCRIPT_DESC = "Adobe Flash Media Server Detection";
+
 fmsPort = get_http_port(default:1111);
 if(!fmsPort){
   fmsPort = 1111;
@@ -68,5 +74,11 @@
   {
     set_kb_item(name:"www/" + fmsPort + "/Adobe/FMS", value:fmsVer[1]);
     security_note(data:"FlashCom version " + fmsVer[1] + " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:fmsVer[1], exp:"^([0-9.]+)", base:"cpe:/a:adobe:flash_media_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_adobe_photoshop_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_adobe_photoshop_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_adobe_photoshop_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801224";
+SCRIPT_DESC = "Adobe Photoshop Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -71,9 +77,16 @@
     ver = registry_get_sz(key:key + item, item:"DisplayVersion");
     if(ver != NULL)
     {
-      set_kb_item(name:"Adobe/Photoshop/Ver", value:ver + " " +name);
+      tmp_version = ver + " " +name;
+      set_kb_item(name:"Adobe/Photoshop/Ver", value:tmp_version);
       security_note(data:name + " version " + ver +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:adobe:photoshop_cs4:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_adobe_prdts_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_adobe_prdts_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_adobe_prdts_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800108";
+SCRIPT_DESC = "Adobe products version detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +71,12 @@
     security_note(data:" Adobe Reader version " +  adobeVer[0] +
                        " was detected on the host");
     ssh_close_connection();
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: adobeVer[0], exp:"^([0-9.]+)",base:"cpe:/a:adobe:acrobat_reader:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_adobe_robohelp_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_adobe_robohelp_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_adobe_robohelp_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801102";
+SCRIPT_DESC = "Adobe RoboHelp Server Version Detection";
+
 robohelpPort = get_http_port(default:8080);
 if(!robohelpPort){
   robohelpPort = 8080;
@@ -70,10 +76,17 @@
 
     if(robohelpVer[1] != NULL)
     {
+      tmp_version = robohelpVer[1] + " under " + dir;
       set_kb_item(name:"www/" + robohelpPort + "/RoboHelpServer",
-                  value:robohelpVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"RoboHelp Server version " + robohelpVer[1] + " running" + 
                          " at location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:adobe:robohelp_server:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
    }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_aimp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_aimp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_aimp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,10 +50,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800590";
+SCRIPT_DESC = "AIMP Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion"))
 {
   exit(0);
@@ -77,6 +82,12 @@
     {
       set_kb_item(name:"AIMP/Ver", value:aimpVer);
       security_note(data:"AIMP2 version " + aimpVer + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: aimpVer, exp:"[0-9.]+([a-z0-9]+)?)",base:"cpe:/a:aimp:aimp2_audio_converter:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ajaxportal_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ajaxportal_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ajaxportal_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,9 +47,14 @@
   exit(0);
 }
 
-
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800816";
+SCRIPT_DESC = "AjaxPortal Version Detection";
+
 ajaxPort = get_http_port(default:80);
 if(!ajaxPort){
   ajaxPort = 80;
@@ -74,7 +79,12 @@
                   value:ajaxVer[1] + " under " + dir);
       security_note(data:"Ajax Portal version " + ajaxVer[1] + " running at" + 
                          " location " + dir +  " was detected on the host");
-  
+     
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ajaxVer[1], exp:"^([0-9.]+)", base:"cpe:/a:myiosoft.com:ajaxportal:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_alleycode_html_editor_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_alleycode_html_editor_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_alleycode_html_editor_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("smb_nt.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801126";
+SCRIPT_DESC = "Alleycode HTML Editor Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -65,6 +71,11 @@
     set_kb_item(name:"Alleycode-HTML-Editor/Ver", value:aheVer[1]);
     security_note(data:"Alleycode HTML Editor version " + aheVer[1] +
                        " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:aheVer[1], exp:"^([0-9.]+)", base:"cpe:/a:konae:alleycode_html_editor:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
  
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_an_guestbook_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_an_guestbook_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_an_guestbook_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800523";
+SCRIPT_DESC = "AN Guestbook Version Detection";
+
 wwwPort = get_http_port(default:80);
 if(!wwwPort){
   exit(0);
@@ -72,10 +78,17 @@
 
   if(angVer[2]!= NULL)
   {
+    tmp_version = angVer[2] + " under " + dir;
     set_kb_item(name:"www/" + wwwPort + "/AN-Guestbook",
-                value:angVer[2] + " under " + dir);
+                value:tmp_version);
     security_note(data:"An Guest Book version " + angVer[2] + " running at" + 
                  "location " + dir +  " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:an_guestbook:an_guestbook:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_aol_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_aol_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_aol_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801025";
+SCRIPT_DESC = "America Online (AOL) Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,5 +79,11 @@
     set_kb_item(name:"AOL/Ver", value:version);
     security_note(data:"AOL version " + version + " running at location "
                        + appPath +  " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:aol:internet_software:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_apache_apr_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_apache_apr_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_apache_apr_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800680";
+SCRIPT_DESC = "Apache APR Version Detection";
+
 apr_sock = ssh_login_or_reuse_connection();
 if(!apr_sock){
   exit(0);
@@ -68,6 +74,12 @@
       set_kb_item(name:"Apache/APR/Ver", value:aprVer[0]);
       security_note(data:"Apache APR version " + aprVer[0] + " running at location "
                          + binaryFile +  " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:aprVer[0], exp:"^([0-9.]+)", base:"cpe:/a:apache:portable_runtime:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_apache_mod_jk_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_apache_mod_jk_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_apache_mod_jk_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800279";
+SCRIPT_DESC = "Apache mod_jk Module Version Detection";
+
 port = get_http_port(default:80);
 if(!get_port_state(port)){
   exit(0);
@@ -63,6 +69,12 @@
   {
     set_kb_item(name:"www/" + port + "/Apache/Mod_Jk", value:version[1]);
     security_note(data:"Mod JK version " + version[1] + " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:version[1], exp:"^([0-9.]+)", base:"cpe:/a:apache:mod_jk:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_apache_roller_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_apache_roller_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_apache_roller_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800677";
+SCRIPT_DESC = "Apache Roller Version Detection";
+
 rollerPort = get_http_port(default:8080);
 if(!rollerPort){
   rollerPort = 8080;
@@ -70,5 +76,11 @@
    set_kb_item(name:"www/" + rollerPort + "/ApacheRoller", value:rollerVer[1]);
    security_note(data:"Apache Roller version " + rollerVer[1] + " was detected" + 
                       " on the host");
+   
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:rollerVer[1], exp:"^([0-9.]+)", base:"cpe:/a:apache:roller:");
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_apache_struts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_apache_struts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_apache_struts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,10 +48,15 @@
   exit(0);
 }
 
-
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800276";
+SCRIPT_DESC = "Apache Struts Version Detection";
+
 asPort = get_http_port(default:8080);
 if(!asPort){
   asPort = 8080;
@@ -97,9 +102,16 @@
 
     if(strutsVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + asPort + "/Apache/Struts", value:strutsVer[1] + " under " + dir);
+      tmp_version = strutsVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + asPort + "/Apache/Struts", value:tmp_version);
       security_note(data:"Apache Struts version " + strutsVer[1] + " running" +
                          " at location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:apache:struts:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_apache_tomcat_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_apache_tomcat_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_apache_tomcat_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,15 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+
+## Constant values
+SCRIPT_OID = "1.3.6.1.4.1.25623.1.0.800371";
+SCRIPT_DESC = "Apache Tomcat Version Detection";
+
+
 port = get_http_port(default:8080);
 if(!port){
   port = 8080;
@@ -84,7 +92,12 @@
 if("Apache Tomcat" >< tomcatVer[0] && tomcatVer[2] != NULL)
 {
   set_kb_item(name:"www/" + port + "/ApacheTomcat", value:tomcatVer[2]);
-  security_note(port:port, data:"Apache Tomcat version " + tomcatVer[2] + " was detected" + " on the host");
+  security_note(port:port, data:"Apache Tomcat version " + tomcatVer[2] + " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:tomcatVer[2], exp:"^([0-9.]+)", base:"cpe:/a:apache:tomcat:");
+  if(!isnull(cpe))
+    register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 }
 
 

Modified: trunk/openvas-plugins/scripts/gb_arcavir_av_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_arcavir_av_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_arcavir_av_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800719";
+SCRIPT_DESC = "ArcaVir AntiVirus Products Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"ArcaVir/AntiVirus/Ver", value:arcaVer);
       security_note(data:"Arca Bit Anti Virus version " + arcaVer +
                          " was detected on the host");
+ 
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:arcaVer, exp:"^(9\..*)", base:"cpe:/a:arcabit:arcavir_2009_antivirus_protection:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_aria2_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_aria2_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_aria2_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,7 +44,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801340";
+SCRIPT_DESC = "Aria2 Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -60,6 +66,12 @@
     set_kb_item(name:"Aria2/Ver", value:aria2Ver[1]);
     security_note(data:"Aria2 version " + aria2Ver[1] +
                  " running at location " + aria2bin + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:aria2Ver[1], exp:"^([0-9.]+)", base:"cpe:/a:tatsuhiro_tsujikawa:aria2:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_avant_browser_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_avant_browser_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_avant_browser_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,12 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800870";
+SCRIPT_DESC = "Avant Browser Version Detection";
 
 function AvantGetVersion(file, share)
 {
@@ -142,6 +147,12 @@
       set_kb_item(name:"AvantBrowser/Ver", value:avantVer);
       security_note(data:"Avant Browser version " + avantVer + 
                          " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:avantVer, exp:"^([0-9.]+)", base:"cpe:/a:avant_force:avant_browser:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_avast_av_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_avast_av_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_avast_av_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800598";
+SCRIPT_DESC = "avast! AntiVrius Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +72,12 @@
     security_note(data:"Avast! Anti Virus version " + avVer[1] + " running at" +
                        " location " + binaryFile +  " was detected on the host");
     ssh_close_connection();
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:avVer[1], exp:"^([0-9.]+)", base:"cpe:/a:avast:avast_antivirus:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_avast_av_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_avast_av_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_avast_av_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801110";
+SCRIPT_DESC = "avast! AntiVirus Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -77,6 +83,12 @@
       set_kb_item(name:"Avast!/AV/Win/Ver", value:avastVer);
       security_note(data:"Avast! Anti virus version " + avastVer +
                          " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:avastVer, exp:"^([0-9.]+)", base:"cpe:/a:avast:avast_antivirus:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_avg_av_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_avg_av_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_avg_av_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800394";
+SCRIPT_DESC = "AVG Anti-Virus Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -76,6 +81,12 @@
       security_note(data:"AVG Anti-Virus version " + avgVer + " running at" +
                          " location " + avgBin +  " was detected on the host");
       ssh_close_connection();
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: avgVer, exp:"^([0-9.]+)",base:"cpe:/a:avg:avg_anti-virus:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_backuppc_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_backuppc_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_backuppc_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801106";
+SCRIPT_DESC = "BackupPC Version Detection";
+
 backupSock = ssh_login_or_reuse_connection();
 if(!backupSock){
   exit(0);
@@ -64,6 +70,12 @@
     set_kb_item(name:"BackupPC/Ver", value:backupVer[1]);
     security_note(data:"Backup PC version " + backupVer[1] + " running at" +
                        " location " + binName +  " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:backupVer[1], exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:craig_barratt:backuppc:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_baofeng_storm_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_baofeng_storm_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_baofeng_storm_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800913";
+SCRIPT_DESC = "BaoFeng Storm Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -66,5 +72,11 @@
     set_kb_item(name:"BaoFeng/Storm/Ver", value:stormVer);
     security_note(data:"BaoFeng Storm version " + stormVer + " was detected" + 
                        " on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:stormVer, exp:"^([0-9.]+)", base:"cpe:/a:baofeng:storm:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_barcode_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_barcode_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_barcode_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801394";
+SCRIPT_DESC = "BarCodeWiz Barcode Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"BarCodeWiz/Barcode/AX", value:bcVer);
       security_note(data:"BarCodeWiz ActiveX version " + bcVer +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:bcVer, exp:"^([0-9.]+)", base:"cpe:/a:barcodewiz:barcode_activex_control:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_becky_internet_mail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_becky_internet_mail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_becky_internet_mail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800518";
+SCRIPT_DESC = "Becky Internet Mail Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -78,6 +84,12 @@
         set_kb_item(name:"Becky/InternetMail/Ver", value: bimVer);
         security_note(data:"Becky Internet Mail version " + bimVer + " running" + 
                            " at location " + bimPath + " was detected on the host"); 
+    
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:bimVer, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:rimarts_inc.:becky_internet_mail:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
     exit(0);

Modified: trunk/openvas-plugins/scripts/gb_blazevideo_hdtv_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_blazevideo_hdtv_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_blazevideo_hdtv_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800512";
+SCRIPT_DESC = "Blazevideo HDTV Player Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,6 +78,12 @@
       set_kb_item(name:"Blazevideo/HDTV/Ver", value:bvVer[1]);
       security_note(data:"Blaze Video HDTV version " + bvVer[1] +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:bvVer[1], exp:"^([0-9.]+)", base:"cpe:/a:blazevideo:hdtv_player:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_blob_blog_system_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_blob_blog_system_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_blob_blog_system_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800955";
+SCRIPT_DESC = "BLOB Blog System Version Detection";
+
 bbsPort = get_http_port(default:80);
 if(!bbsPort){
   bbsPort = 80;
@@ -69,10 +75,17 @@
     bbsVer = eregmatch(pattern:"Version ([0-9.]+)", string:rcvRes);
     if(!isnull(bbsVer[1]))
     {
+      tmp_version = bbsVer[1] + " under " + dir;
       set_kb_item(name:"www/" + bbsPort + "/BLOB-Blog-System",
-                  value:bbsVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"BLOB Blog System version " + bbsVer[1] + " running" + 
                          " at location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:blob:blog_system:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_bournal_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_bournal_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_bournal_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800300";
+SCRIPT_DESC = "Bournal Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -63,6 +69,12 @@
     set_kb_item(name:"Bournal/Ver", value:bourVer[1]);
     security_note(data:"Bournal version " + bourVer[1] + " running at location "
                        + binary_bourName + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:bourVer[1], exp:"^([0-9.]+)", base:"cpe:/a:becauseinter:bournal:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_bozotic_http_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_bozotic_http_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_bozotic_http_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801244";
+SCRIPT_DESC = "bozotic HTTP server Version Detection";
+
 ## Get Http Port
 port = get_http_port(default:80);
 if(!port){
@@ -69,5 +75,11 @@
     set_kb_item(name:"www/" + port + "/bozohttpd", value:ver[1]);
     security_note(data:"bozotic HTTP server version " + ver[1] +
                        " was detected on the host", port:port);
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ver[1], exp:"^([0-9.]+)", base:"cpe:/a:eterna:bozohttpd:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_bpftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_bpftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_bpftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800329";
+SCRIPT_DESC = "BulletProof FTP Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -74,5 +80,11 @@
     set_kb_item(name:"BulletProof/Client/Ver", value:bpftpVer);
     security_note(data:"Bullet Proof FTP Client version " + bpftpVer + " running"+ 
                        " at location " + exePath + " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:bpftpVer, exp:"^([0-9.]+)", base:"cpe:/a:bpftp:bulletproof_ftp_client:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_bpsoft_hex_workshop_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_bpsoft_hex_workshop_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_bpsoft_hex_workshop_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800326";
+SCRIPT_DESC = "BreakPoint Software Hex Workshop Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,6 +78,12 @@
       set_kb_item(name:"BPSoft/HexWorkshop/Ver", value:hwVer);
       security_note(data:"BPSoft HexWork shop version " + hwVer + " was" + 
                          " detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:hwVer, exp:"^([0-9.]+)", base:"cpe:/a:bpsoft:hex_workshop:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_bsplayer_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_bsplayer_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_bsplayer_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,24 @@
 include("smb_nt.inc");
 include("secpod_reg.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800209";
+SCRIPT_DESC = "Microsoft Internet Explorer Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,6 +89,10 @@
         set_kb_item(name:"BSPlayer/Ver", value:bsVer);
         security_note(data:" BS Player version " + bsVer + " was detected" + 
                            " on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:bsVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:bsplayer:bs.player:");
+
         exit(0);
       }
     }
@@ -152,6 +173,10 @@
       set_kb_item(name:"BSPlayer/Ver", value:v);
       security_note(data:" BS Player version " + v + " was detected" +
                            " on the host"); 
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:v, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:bsplayer:bs.player:");
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_bugtracker_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_bugtracker_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_bugtracker_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801278";
+SCRIPT_DESC = "BugTracker.NET Version Detection";
+
 ## Get http port
 port = get_http_port(default:80);
 if(!port){
@@ -69,10 +75,17 @@
     {
       ## Set the KB value
       ## BugTracker.NET 3.4.4 showing its version as 3.4.3
-      set_kb_item(name:"www/" + port + "/btnet", value:ver[1] +" under "+ dir);
+      tmp_version = ver[1] +" under "+ dir;
+      set_kb_item(name:"www/" + port + "/btnet", value:tmp_version);
       security_note(data:"BugTracker.NET Version " + ver[1] +
                          " running at location "  + dir +
                          " was detected on the host", port:port);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_buildbot_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_buildbot_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_buildbot_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800933";
+SCRIPT_DESC = "Buildbot Version Detection";
+
 buildbotPort = get_http_port(default:8010);
 if(!buildbotPort){
   buildbotPort = 8010;
@@ -78,6 +84,12 @@
       set_kb_item(name:"Buildbot/Ver", value:buildbotVer);
       security_note(data:"Build bot version " + buildbotVer + " running at" + 
                          " location " + dir + " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:builbotVer, exp:"^([0-9.]+\.[0-9])([a-z][0-9]+)?", base:"cpe:/a:buildbot:buildbot:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ccproxy_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ccproxy_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ccproxy_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800538";
+SCRIPT_DESC = "CCProxy Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,6 +78,12 @@
       set_kb_item(name:"CCProxy/Ver", value:ccproxyVer[1]);
       security_note(data:"CCProxy version " + ccproxyVer[1] + " was detected" + 
                          " on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ccproxyVer[1], exp:"^([0-9.]+)", base:"cpe:/a:youngzsoft:ccproxy:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_citrix_license_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_citrix_license_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_citrix_license_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801853";
+SCRIPT_DESC = "Citrix License Server Version Detection";
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -67,4 +73,10 @@
   set_kb_item(name:"Citrix/License/Server/Ver", value:version);
   security_note(data:"Citrix License Server version " + version +
                      " was detected on the host");
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:citrix:licensing_administration_console:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_citrix_provisioning_services_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_citrix_provisioning_services_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_citrix_provisioning_services_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.802220";
+SCRIPT_DESC = "Citrix Provisioning Services Version Detection";
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -77,6 +83,12 @@
       set_kb_item(name:"Citrix/Provisioning/Services/Ver", value:version);
       security_note(data:"Citrix Provisioning Services version " + version +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:citrix:citrix_provisioning_server:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_clamav_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_clamav_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_clamav_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800553";
+SCRIPT_DESC = "ClamAV Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -64,6 +70,12 @@
     security_note(data:"Clam Anti Virus version " + avVer[1] + " running at" + 
                        " location " + binaryFile + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:avVer[1], exp:"^([0-9.]+)", base:"cpe:/a:clamav:clamav:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_clamav_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_clamav_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_clamav_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -56,7 +56,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800555";
+SCRIPT_DESC = "ClamAV Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -78,6 +95,10 @@
       set_kb_item(name:"ClamAV/Win/Ver", value:clamVer[1]);
       security_note(data:"Clam Anti Virus version " + clamVer[1] + " was detected" +
                          " on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:clamVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:clamav:clamav:");
+
       exit(0);
     }
   }
@@ -93,5 +114,9 @@
     set_kb_item(name:"ClamAV/Win/Ver", value:clamVer);
     security_note(data:"Clam Anti Virus version " + clamVer + " was detected" +
                          " on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:clamVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:clamav:clamav:");
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_claroline_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_claroline_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_claroline_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800627";
+SCRIPT_DESC = "Claroline Version Detection";
+
 clarolinPort = get_http_port(default:80);
 
 
@@ -76,10 +82,16 @@
       }
       else
         clarolineVer = clarolineVer[1];
-      set_kb_item(name:"www/"+ clarolinPort + "/Claroline", value:clarolineVer +
-                       " under " + dir);
-      security_note(data:"Claroline version " + clarolineVer + " running at" + 
+        tmp_version = clarolineVer + " under " + dir; 
+        set_kb_item(name:"www/"+ clarolinPort + "/Claroline", value:tmp_version);
+        security_note(data:"Claroline version " + clarolineVer + " running at" + 
                          " location " + dir +  " was detected on the host"); 
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:claroline:claroline:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_clicknet_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_clicknet_cms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_clicknet_cms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800901";
+SCRIPT_DESC = "Clicknet CMS Version Detection";
+
 clickPort = get_http_port(default:80);
 if(!clickPort){
   clickPort = 80;
@@ -68,10 +74,17 @@
     clickVer = eregmatch(pattern:"Clicknet CMS v([0-9.]+)", string:rcvRes);
     if(clickVer[1] != NULL)
     {
+      tmp_version = clickVer[1] + " under " + dir;
       set_kb_item(name:"www/" + clickPort + "/Clicknet-CMS",
-                  value:clickVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"Clicknet CMS version " + clickVer[1] + " running at" + 
                          " location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:clicknet:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_cmscout_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_cmscout_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_cmscout_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800790";
+SCRIPT_DESC = "CMScout Version Detection";
+
 cmsPort = get_http_port(default:80);
 if(!cmsPort){
   exit(0);
@@ -65,10 +71,16 @@
     if(cmsVer[1] != NULL)
     {
       ## Set the KB value
-      set_kb_item(port:cmsPort, name:"www/" + cmsPort + "/CMScout", value:cmsVer[1] 
-                                                 + " under " + path);
+      tmp_version = cmsVer[1] + " under " + path;
+      set_kb_item(port:cmsPort, name:"www/" + cmsPort + "/CMScout", value:tmp_version);
       security_note(data:"CMScout version " + cmsVer[1] + 
                    " running at location " + path + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:cmscout:cmscout:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_cpcreator_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_cpcreator_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_cpcreator_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801005";
+SCRIPT_DESC = "cP Creator Version Detection";
+
 cpcreatPort = get_http_port(default:80);
 if(!cpcreatPort){
   exit(0);
@@ -63,10 +69,17 @@
     cpcreatVer = eregmatch(pattern:"[V|v]([0-9.]+)", string:rcvRes);
     if(cpcreatVer[1] != NULL)
     {
+      tmp_version = cpcreatVer[1] + " under " + path;
       set_kb_item(name:"www/" + cpcreatPort + "/cPCreator",
-                  value:cpcreatVer[1] + " under " + path);
+                  value:tmp_version);
       security_note(data:"Cp Creator version " + cpcreatVer[1] + " running at" + 
                          " location " + path + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:cpecreator:cp_creator:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_crux_products_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_crux_products_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_crux_products_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,24 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801381";
+SCRIPT_DESC = "CruxSoftware Products Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 cmsPort = get_http_port(default:80);
 if(!cmsPort){
   cmsPort = 80;
@@ -78,10 +95,14 @@
          cmsVer = eregmatch(pattern:"Version ([0-9.]+)", string:rcvRes);
          if(cmsVer[1] != NULL)
          {
-           set_kb_item(name:"www/" + cmsPort + "/CruxCMS", value:cmsVer[1]
-                   + " under " + dir);
+           tmp_version = cmsVer[1] + " under " + dir;
+           set_kb_item(name:"www/" + cmsPort + "/CruxCMS", value:tmp_version);
            security_note(data:"CruxCMS version " + cmsVer[1] + " running at location "
                          + dir + " was detected on the host");
+
+           ## build cpe and store it as host_detail
+           register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:cruxsoftware:cruxcms:");
+
 	   break;
          }
        }
@@ -106,10 +127,14 @@
         cmspaVer = eregmatch(pattern:"Version ([0-9.]+)", string:rcvRes);
         if(cmspaVer[1] != NULL)
         {
-          set_kb_item(name:"www/" + cmsPort + "/CruxPA", value:cmspaVer[1]
-                  + " under " + dir);
+          tmp_version = cmspaVer[1] + " under " + dir;
+          set_kb_item(name:"www/" + cmsPort + "/CruxPA", value:tmp_version);
           security_note(data:"CruxPA version " + cmspaVer[1] + " running at location "
                          + dir + " was detected on the host");
+
+          ## build cpe and store it as host_detail
+          register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:cruxsoftware:cruxpa:");
+
 	  break;
         }
       }

Modified: trunk/openvas-plugins/scripts/gb_cscope_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_cscope_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_cscope_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800610";
+SCRIPT_DESC = "Cscope Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +72,12 @@
     security_note(data:"Cscope version " + cscopeVer[1] + " running at location "
                        + cscopebin + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:cscopeVer[1], exp:"^([0-9a-z.]+)", base:"cpe:/a:cscope:cscope:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_cuteftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_cuteftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_cuteftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,25 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800947";
+SCRIPT_DESC = "CuteFTP Version Detection";
+
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -81,6 +99,14 @@
       set_kb_item(name:"CuteFTP/"+string(cftpName[1])+"/Ver", value:cftpVer); 
       security_note(data:"Cute FTP version " + cftpVer + " running at location "
                          + cPath + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      # Home
+      register_cpe(tmpVers:cftpVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:globalscape:cuteftp:");
+      # Lite
+      register_cpe(tmpVers:cftpVer, tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:globalscape:cuteftp:");
+      # Pro
+      register_cpe(tmpVers:cftpVer, tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:globalscape:cuteftp:");
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_designworks_professional_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_designworks_professional_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_designworks_professional_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800367";
+SCRIPT_DESC = "DesignWorks Professional Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -129,6 +135,12 @@
       set_kb_item(name:"DesignWorks/Prof/Ver", value:dwpVer);
       security_note(data:"DesignWorks Professional version " + dwpVer + " was" + 
                          " detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:dwpVer, exp:"^([0-9.]+)", base:"cpe:/a:capilano:designworks:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_django_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_django_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_django_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("version_func.inc");
 include("ssh_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800923";
+SCRIPT_DESC = "Django Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +73,12 @@
     set_kb_item(name:"Django/Linux/Ver", value:djangoVer[0]);
     security_note(data:"Django version " + djangoVer[0] + " running at location " 
                        + binaryFile + " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:djangoVer[0], exp:"^([0-9.]+)", base:"cpe:/a:django_project:django:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_dm_filemanager_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_dm_filemanager_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_dm_filemanager_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800818";
+SCRIPT_DESC = "DM FileManager Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 dmfPort = get_http_port(default:80);
 if(!dmfPort){
   dmfPort = 80;
@@ -73,10 +90,14 @@
                        string:rcvRes1);
     if(dmfVer[1] != NULL)
     {
+      tmp_version = dmfVer[1] + " under " + dir1;
       set_kb_item(name:"www/" + dmfPort + "/DM-FileManager",
-                  value:dmfVer[1] + " under " + dir1);
+                  value:tmp_version);
       security_note(data:"DM FileManager version " + dmfVer[1] + " running at" + 
                          " location " + dir1 + " was detected on the host");
+
+      ## build ccpe and store it as host detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:dutchmonkey:dm_filemanager:");
     }
 
     foreach dir2 (make_list("/dm-albums", "/albums"))
@@ -90,11 +111,14 @@
         dmaVer = eregmatch(pattern:"Stable tag: ([0-9.]+)", string:rcvRes2);
         if(dmaVer[1] != NULL)
         {
+          tmp_version = dmaVer[1] + " under " + dir2;
           set_kb_item(name:"www/" + dmfPort + "/DM-Albums",
-                      value:dmaVer[1] + " under " + dir2);
+                      value:tmp_version);
           security_note(data:"DM Albums version " + dmaVer[1] + " running at" + 
                          " location " + dir2 + " was detected on the host");
 
+          ## build ccpe and store it as host detail
+          register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:dutchmonkey:dm_album:");
         }
       }
     }

Modified: trunk/openvas-plugins/scripts/gb_document_manager_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_document_manager_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_document_manager_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800477";
+SCRIPT_DESC = "Document Manager Version Detection";
+
 dmPort = get_http_port(default:80);
 if(!dmPort){
   exit(0);
@@ -79,9 +85,16 @@
       }
     }
 
+    tmp_version = dmVer + " under " + path;
     set_kb_item(name:"www/" + dmPort + "/DocManager",
-                value:dmVer + " under " + path);
+                value:tmp_version);
     security_note(data:"Document Manager version " + dmVer + " running at" + 
                        " location " + path + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+#    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:dmanager:documentmanager:");
+#    if(!isnull(cpe))
+       register_host_detail(name:"App", value:"cpe:/a:dmanager:documentmanager:"+dmVer, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_dokuwiki_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_dokuwiki_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_dokuwiki_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -52,7 +52,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800587";
+SCRIPT_DESC = "DokuWiki Version Detection";
+
 dokuwikiPort = get_http_port(default:80);
 if(!dokuwikiPort){
   dokuwikiPort = 80;
@@ -78,10 +84,17 @@
     dokuVer = ereg_replace(pattern:"-", string:dokuwikiVer[2], replace: ".");
     if(dokuVer)
     {
+      tmp_version = dokuVer + " under " + dir;
       set_kb_item(name:"www/" + dokuwikiPort + "/DokuWiki",
-                  value:dokuVer + " under " + dir);
+                  value:tmp_version);
       security_note(data:"Dokuwiki version " + dokuVer + " running at location " 
                          + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:dokuwiki:dokuwiki:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_dotnetnuke_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_dotnetnuke_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_dotnetnuke_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800683";
+SCRIPT_DESC = "DotNetNuke Version Detection";
+
 dnnPort = get_http_port(default:80);
 if(!dnnPort){
   dnnPort = 80;
@@ -67,10 +73,17 @@
     dnnver = eregmatch(pattern:"DNN ([0-9.]+)", string:rcvRes);
     if(dnnVer[1] != NULL)
     {
+      tmp_version = dnnVer[1] + " under " + dir;
       set_kb_item(name:"www/"+ dnnPort + "/DotNetNuke",
-                  value:dnnVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"Dot Net Nuke version " + dnnVer[1] + " running at" + 
                          " location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:dotnetnuke:dotnetnuke:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_dotproject_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_dotproject_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_dotproject_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800564";
+SCRIPT_DESC = "dotProject Version Detection";
+
 wwwPort = get_http_port(default:80);
 if(!wwwPort){
   exit(0);
@@ -73,9 +79,16 @@
       else
         dotVer = version[1];
 
-      set_kb_item(name:"www/" + wwwPort + "/dotProject", value:dotVer + " under " + dir);
-      security_note(data:"Dot Project version " + dotVer + " running at location "
+        tmp_version = dotVer + " under " + dir;
+        set_kb_item(name:"www/" + wwwPort + "/dotProject", value:tmp_version);
+        security_note(data:"Dot Project version " + dotVer + " running at location "
                          + dir + " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:dotproject:dotproject:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_elecard_mpeg_player_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_elecard_mpeg_player_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_elecard_mpeg_player_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800510";
+SCRIPT_DESC = "Elecard MPEG Player Application Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -134,5 +140,11 @@
   set_kb_item(name:"Elecard/Player/Ver", value:eleVer);
   security_note(data:"Elecard Player version " + eleVer +
                      " was detected on the host");
+    
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:eleVer, exp:"^([0-9.]+)", base:"cpe:/a:elecard:elecard_mpeg_player:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   exit(0);
 }

Modified: trunk/openvas-plugins/scripts/gb_electrasoft_32bit_ftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_electrasoft_32bit_ftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_electrasoft_32bit_ftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800568";
+SCRIPT_DESC = "ElectraSoft 32bit FTP Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -76,5 +82,11 @@
     set_kb_item(name:"ElectraSoft/FTP/Ver", value:ftpVer[1]);
     security_note(data:"ElectraSoft FTP version " +ftpVer[1] + " running at" + 
                        " location " + readmePath + " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ftpVer[1], exp:"^([0-9.]+)", base:"cpe:/a:electrasoft:32bit_ftp:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_eureka_email_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_eureka_email_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_eureka_email_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801040";
+SCRIPT_DESC = "Eureka Email Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -78,6 +84,12 @@
       {
         set_kb_item(name:"EurekaEmail/Ver", value:eeVer);
         security_note(data:"Eureka Email version " + eeVer + " was detected on the host"); 
+  
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:eeVer, exp:"^([0-9.]+)", base:"cpe:/a:eureka-email:eureka_email:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_evalsmsi_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_evalsmsi_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_evalsmsi_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800165";
+SCRIPT_DESC = "evalSMSI Version Detection";
+
 ## Get the port where evalSMSI application is running
 evalSMSIPort = get_http_port(default:80);
 if(!evalSMSIPort){
@@ -70,10 +76,17 @@
                             string:rcvRes);
     if(evalSMSIVer[1] != NULL)
     {
+      tmp_version = evalSMSIVer[1] + " under " + path;
       set_kb_item(name:"www/" + evalSMSIPort + "/evalSMSI",
-                        value:evalSMSIVer[1] + " under " + path);
+                        value:tmp_version);
       security_note(data:"Eval SMSI version " + evalSMSIVer[1] + " running at" + 
                          " location " + path + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:myshell:evalsmsi:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_evolution_data_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_evolution_data_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_evolution_data_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800253";
+SCRIPT_DESC = "Evolution Data Server Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -68,6 +74,12 @@
     security_note(data:"Evolution Data Server version " + evolutionVer[1] +
                   " running at location " + binaryName + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:evolutionVer[1], exp:"^([0-9.]+)", base:"cpe:/a:gnome:evolution:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_expressionengine_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_expressionengine_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_expressionengine_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800262";
+SCRIPT_DESC = "ExpressionEngine CMS Version Detection";
+
 httpPort = get_kb_item("Services/www");
 if(!httpPort){
   exit(0);
@@ -72,6 +78,12 @@
       set_kb_item(name:"www/" + httpPort + "/ExpEngine", value:cmsVer[1]);
       security_note(data:"Expression Engine version " + cmsVer[1] + " running" + 
                          " at location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:cmsVer[1], exp:"^([0-9.]+)", base:"cpe:/a:expressionengine:expressionengine:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_f-prot_av_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_f-prot_av_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_f-prot_av_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800324";
+SCRIPT_DESC = "F-PROT Antivirus Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +72,12 @@
     security_note(data:"F-Prot Anti Virus version " + fprotVer[1] + " running" +
                       " at location " + fprotBin + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:fprotVer[1], exp:"^([0-9.]+)", base:"cpe:/a:f-prot:f-prot_antivirus:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ffftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ffftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ffftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800532";
+SCRIPT_DESC = "FFFTP Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -69,5 +75,11 @@
     set_kb_item(name:"FFFTP/Ver", value:ffftpVer);
     security_note(data:"FFFTP Client version " + ffftpVer + " running at location "
                        + exePath + " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ffftpVer, exp:"^([0-9.]+)", base:"cpe:/a:jun_sota:ffftp:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ffmpeg_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ffmpeg_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ffmpeg_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800467";
+SCRIPT_DESC = "FFmpeg Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +71,12 @@
     security_note(data:"FFmpeg version " + ffmpegVer[1] + " running at location "
                        + ffmpegbin + " was detected on the host");
     ssh_close_connection();
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ffmpegVer[1], exp:"^([0-9.]+)", base:"cpe:/a:ffmpeg:ffmpeg:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_filecopa_ftp_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_filecopa_ftp_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_filecopa_ftp_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("ftp_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801124";
+SCRIPT_DESC = "FileCopa FTP Server Version Detection";
+
 filecopePort = get_kb_item("Services/ftp");
 if(!filecopePort){
   filecopePort = 21;
@@ -68,5 +74,11 @@
     set_kb_item(name:"FileCOPA-FTP-Server/Ver", value:filecopeVer[1]);
     security_note(data:"FileCOPA FTP Server version " + filecopeVer[1] +
                        " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:filecopeVer[1], exp:"^([0-9.]+)", base:"cpe:/a:filecopa-ftpserver:ftp_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_firebird_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_firebird_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_firebird_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800851";
+SCRIPT_DESC = "Firebird SQL Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -90,6 +96,12 @@
       set_kb_item(name:"Firebird-SQL/Ver", value:firebirdVer);
       security_note(data:"Firebird SQL version " + firebirdVer + " running at" + 
                           " location " + firePath + " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:firebirdVer, exp:"^([0-9.]+)", base:"cpe:/a:firebirdsql:firebird:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_firefox_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_firefox_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_firefox_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800017";
+SCRIPT_DESC = "Mozilla Firefox Version Detection (Linux)";
+
 fox_sock = ssh_login_or_reuse_connection();
 if(!fox_sock)
 {
@@ -72,6 +78,12 @@
     set_kb_item(name:"Firefox/Linux/Ver", value:foxVer[1]);
     security_note(data:"Firefox Browser version " + foxVer[1] + " running at" + 
                        " location " + binary_foxName +  " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:foxVer[1], exp:"^([0-9.a-z]+)", base:"cpe:/a:mozilla:firefox:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_firefox_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_firefox_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_firefox_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800209";
+SCRIPT_DESC = "Microsoft Internet Explorer Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,6 +89,9 @@
      security_note(data:"Firefox Browser version " + foxVer[0] + 
                         " was detected on the host");
 
+     ## build cpe and store it as host_detail
+     register_cpe(tmpVers:foxVer[0], tmpExpr:"^([0-9.a-z]+)", tmpBase:"cpe:/a:mozilla:firefox:");
+
   }
 
   # Detect Firefox Version 1.5.x series
@@ -140,6 +160,10 @@
     {
       set_kb_item(name:"Firefox/Win/Ver",value:fileVer);
       security_note(data:"Firefox Browser version " + fileVer + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:fileVer, tmpExpr:"^([0-9.a-z]+)", tmpBase:"cpe:/a:mozilla:firefox:");
+
     }
   }
 }
@@ -153,5 +177,9 @@
     set_kb_item(name:"Firefox/Win/Ver", value:foxVer[0]);
     security_note(data:"Firefox Browser version " + foxVer[0] +
                         " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:foxVer[0], tmpExpr:"^([0-9.a-z]+)", tmpBase:"cpe:/a:mozilla:firefox:");
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_firewall_builder_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_firewall_builder_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_firewall_builder_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800995";
+SCRIPT_DESC = "Firewall Builder Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -61,9 +67,15 @@
                               version_argv:"-v", ver_pattern:"([0-9.]+)");
   if(fwbuildVer[1] != NULL)
    {
-    set_kb_item(name:"FirewallBuilder/Linux/Ver", value:fwbuildVer[1]);
+     set_kb_item(name:"FirewallBuilder/Linux/Ver", value:fwbuildVer[1]);
      security_note(data:"Firewall Builder version " + fwbuildVer[1] + " running" + 
                         " at location " + fwbuildbin + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:fwbuildVer[1], exp:"^([0-9.]+)", base:"cpe:/a:fwbuilder:firewall_builder:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_flashchat_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_flashchat_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_flashchat_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800617";
+SCRIPT_DESC = "FlashChat Version Detection";
+
 flashport = get_http_port(default:80);
 if(!flashport){
   exit(0);
@@ -65,10 +71,18 @@
     {
       flashchatVer = eregmatch(pattern:"FlashChat v([0-9.]+)", string:rcvRes);
       if(flashchatVer[1] != NULL){
+
+        tmp_version = flashchatVer[1] + " under " + dir;
         set_kb_item(name:"www/" + flashport + "/FlashChat",
-                    value:flashchatVer[1] + " under " + dir);
+                    value:tmp_version);
         security_note(data:"Flash Chat version " + flashchatVer[1] + " running" + 
                            " at location " + dir +  " was detected on the host"); 
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:tufat:flashchat:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
       exit(0);
     }

Modified: trunk/openvas-plugins/scripts/gb_flashlight_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_flashlight_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_flashlight_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801074";
+SCRIPT_DESC = "Flashlight Version Detection";
+
 flightPort = get_http_port(default:80);
 if(!flightPort){
   exit(0);
@@ -63,10 +69,17 @@
     flightVer = eregmatch(pattern:"[V|v]ersion: ([0-9.]+)", string:rcvRes);
     if(flightVer[1] != NULL)
     {
+      tmp_version = flightVer[1] + " under " + path;
       set_kb_item(name:"www/" + flightPort + "/Flashlight/Free",
-                         value:flightVer[1] + " under " + path);
+                         value:tmp_version);
       security_note(data:"Flash light version " + flightVer[1] + " running at" + 
                          " location " + path + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:ringsworld:flashlight_free_edition:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_flatchat_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_flatchat_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_flatchat_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800317";
+SCRIPT_DESC = "Flatchat Version Detection";
+
 flatchatPort = get_http_port(default:80);
 if(!get_port_state(flatchatPort)){
   exit(0);
@@ -65,10 +71,16 @@
     fcVer = eregmatch(pattern:"Flat Chat (v )?([0-9.]+)", string:rcvRes);
     if(fcVer[2] != NULL)
     {
-      set_kb_item(name:"www/" + flatchatPort + "/Flatchat", value:fcVer[2] +
-                       " under " + dir);
+      tmp_version = fcVer[2] + " under " + dir;
+      set_kb_item(name:"www/" + flatchatPort + "/Flatchat", value:tmp_version);
       security_note(data:"Flat Chat version " + fcVer[2] + " running at location "
                          + dir +  " was detected on the host"); 
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:ninjadesigns:flatchat:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_flock_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_flock_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_flock_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800878";
+SCRIPT_DESC = "Flock Version Detection (Linux)";
+
 f_soc = ssh_login_or_reuse_connection();
 if(!f_soc){
   exit(0);
@@ -68,6 +74,12 @@
       {
         set_kb_item(name:"Flock/Linux/Ver", value:flockVer[1]);
         security_note(data:"Flock Browser version " + flockVer[1] + " was detected on the host");
+    
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:fockVer[1], exp:"^([0-9.]+)", base:"cpe:/a:flock:flock:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_flock_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_flock_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_flock_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800877";
+SCRIPT_DESC = "Flock Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion"))
 {
   exit(0);
@@ -136,5 +142,11 @@
 if(version != NULL){
   set_kb_item(name:"Flock/Win/Ver", value:version);
   security_note(data:"Flock version " + version + " was detected on the host");
+    
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:flock:flock:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }
 

Modified: trunk/openvas-plugins/scripts/gb_foswiki_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_foswiki_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_foswiki_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800612";
+SCRIPT_DESC = "Foswiki Version Detection";
+
 foswikiPort = get_http_port(default:80);
 
 if(!foswikiPort){
@@ -69,10 +75,16 @@
     foswikiVer = eregmatch(pattern:"Foswiki-([0-9.]+),", string:rcvRes);
     if(foswikiVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + foswikiPort + "/Foswiki", value:foswikiVer[1] +
-                      " under " + dir);
+      tmp_version = foswikiVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + foswikiPort + "/Foswiki", value:tmp_version);
       security_note(data:"Foswiki version " + foswikiVer[1] + " running at" + 
                          " location " + dir +  " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:foswiki:foswiki:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_foxit_phantom_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_foxit_phantom_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_foxit_phantom_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801754";
+SCRIPT_DESC = "Foxit Phantom Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -74,3 +80,9 @@
 
 set_kb_item(name:"Foxit/Phantom/Ver", value:foxitVer);
 security_note(data:"Foxit Phantom version " + foxitVer + " was detected on the host");
+      
+## build cpe and store it as host_detail
+cpe = build_cpe(value:foxitVer, exp:"^([0-9.]+)", base:"cpe:/a:foxitsoftware:reader:");
+if(!isnull(cpe))
+   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+

Modified: trunk/openvas-plugins/scripts/gb_foxit_reader_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_foxit_reader_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_foxit_reader_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800536";
+SCRIPT_DESC = "Foxit Reader Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,3 +81,9 @@
 }
 set_kb_item(name:"Foxit/Reader/Ver", value:foxitVer);
 security_note(data:"Foxit Reader version " + foxitVer + " was detected on the host"); 
+    
+## build cpe and store it as host_detail
+cpe = build_cpe(value:foxitVer, exp:"^([0-9.]+)", base:"cpe:/a:foxitsoftware:reader:");
+if(!isnull(cpe))
+   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+

Modified: trunk/openvas-plugins/scripts/gb_foxmail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_foxmail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_foxmail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800219";
+SCRIPT_DESC = "FoxMail Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -68,6 +74,12 @@
     set_kb_item(name:"Foxmail/Win/Ver", value:foxmailVer[1]);
     security_note(data:"Fox mail version " + foxmailVer[1] +
                        " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:foxmailVer[1], exp:"^([0-9]\.[0-9])", base:"cpe:/a:foxmail:foxmail:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
   exit(0);
 }

Modified: trunk/openvas-plugins/scripts/gb_free_download_mang_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_free_download_mang_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_free_download_mang_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800348";
+SCRIPT_DESC = "Free Download Manager Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,4 +79,10 @@
   set_kb_item(name:"FreeDownloadManager/Ver", value:fdmVer);
   security_note(data:"Free Download Manager version " + fdmVer + " running at" + 
                      " location " + regPath + " was detected on the host");
+    
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:fdmVer, exp:"^([0-9]\.[0-9])", base:"cpe:/a:free_download_manager:free_download_manager:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_fsecure_prdts_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_fsecure_prdts_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_fsecure_prdts_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,24 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800357";
+SCRIPT_DESC = "F-Secure Multiple Products Version Detection (Linux)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -80,18 +97,30 @@
         set_kb_item(name:"F-Sec/AV/LnxSec/Ver", value:fsavVer);
         security_note(data:"F-Secure Anti Virus version " + fsavVer + 
                            " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:fsavVer, tmpExpr:"^([0-9]+\.[0-9]+)", tmpBase:"cpe:/a:f-secure:f-secure_linux_security:");
+
       }
       if(fsavName[0] =~ "Linux Client Security")
       {
         set_kb_item(name:"F-Sec/AV/LnxClntSec/Ver", value:fsavVer);
         security_note(data:"F-Secure Anti Virus Client Security version " + fsavVer +
                            " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:fsavVer, tmpExpr:"^([0-9]+\.[0-9]+)", tmpBase:"cpe:/a:f-secure:f-secure_anti-virus_linux_client_security:");
+
       }
       if(fsavName[0] =~ "Linux Server Security")
       {
         set_kb_item(name:"F-Sec/AV/LnxSerSec/Ver", value:fsavVer);
         security_note(data:"F-Secure Server Security version " + fsavVer +
                            " was detected on the host"); 
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:fsavVer, tmpExpr:"^([0-9]+\.[0-9]+)", tmpBase:"cpe:/a:f-secure:f-secure_anti-virus_linux_server_security:");
+
       }
       break;
     }
@@ -129,6 +158,10 @@
         set_kb_item(name:"F-Sec/IntGatekeeper/Lnx/Ver", value:fsigkVer);
         security_note(data:"F-Secure Internet Gate Keeper version " + fsigkVer + 
                            " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:fsigkVer, tmpExpr:"^([0-9]+\.[0-9]+)", tmpBase:"cpe:/a:f-secure:f-secure_internet_gatekeeper_for_linux:");
+
        }
       ssh_close_connection();
       exit(0);

Modified: trunk/openvas-plugins/scripts/gb_fsecure_prdts_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_fsecure_prdts_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_fsecure_prdts_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800355";
+SCRIPT_DESC = "F-Secure Multiple Products Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -67,6 +84,10 @@
 {
   set_kb_item(name:"F-Sec/AV/Win/Ver", value:fsavVer);
   security_note(data:"F-secure Anti Virus version " + fsavVer + " was detected on the host"); 
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:fsavVer, tmpExpr:"^([0-9]+\.[0-9]+)", tmpBase:"cpe:/a:f-secure:f-secure_anti-virus:");
+
 }
 
 # Set the Version for F-Secure Anti-Virus for Internet Gatekeeper
@@ -78,6 +99,10 @@
   set_kb_item(name:"F-Sec/AV/IntGatekeeper/Win/Ver", value:fsigkVer);
   security_note(data:"F-secure Anti Virus Intrnet Gate Keeper version " 
                       + fsigkVer +  " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:fsigkVer, tmpExpr:"^([0-9]+\.[0-9]+)", tmpBase:"cpe:/a:f-secure:f-secure_internet_gatekeeper_for_windows:");
+
 }
 
 # Set the Version for F-Secure Anti-Virus for Microsoft Exchange
@@ -89,6 +114,10 @@
   set_kb_item(name:"F-Sec/AV/MSExchange/Ver", value:fsavmeVer);
   security_note(data:"F-secure Anti Virus MS Exhange version " + fsavmeVer +
                      " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:fsavmeVer, tmpExpr:"^([0-9]+\.[0-9]+)", tmpBase:"cpe:/a:f-secure:f-secure_anti-virus_for_microsoft_exchange:");
+
 }
 
 # Set the Version for F-Secure Anti-Virus for Client Security
@@ -99,6 +128,10 @@
   set_kb_item(name:"F-Sec/AV/ClientSecurity/Ver", value:fsavcsVer);
   security_note(data:"F-secure Anti Virus Client Security version " + fsavcsVer + 
                      " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:fsavcsVer, tmpExpr:"^([0-9]+\.[0-9]+)", tmpBase:"cpe:/a:f-secure:f-secure_client_security:");
+
 }
 
 # Set the Version for F-Secure Anti-Virus for Windows Servers
@@ -115,6 +148,10 @@
       set_kb_item(name:"F-Sec/AV/WindowsServers/Ver", value:fsavwsVer);
       security_note(data:"F-secure Anti Virus Windows Server version " + fsavwsVer +
                      " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:fsavwsVer, tmpExpr:"^([0-9]+\.[0-9]+)", tmpBase:"cpe:/a:f-secure:f-secure_anti-virus_for_windows_servers:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ftpshell_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ftpshell_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ftpshell_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -52,7 +52,13 @@
 include("smb_nt.inc");
 include("ftp_func.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800225";
+SCRIPT_DESC = "FTPShell Server Version Detection";
+
 ftpPort = get_kb_item("Services/ftp");
 if(!ftpPort){
   ftpPort = 21;
@@ -86,6 +92,12 @@
     {
       set_kb_item(name:"FTPShell/Version", value:ftpVer);
       security_note(data:"FTPShell version " + ftpVer + " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ftpVer, exp:"^([0-9.]+)", base:"cpe:/a:ftpshell:ftpshell_server:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_gale_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_gale_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_gale_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800339";
+SCRIPT_DESC = "Gale Version Detection";
+
 galePort = 11512;
 if(!get_udp_port_state(galePort)){
   exit(0);
@@ -70,6 +76,12 @@
     set_kb_item(name:"Gale/Linux/Ver", value:galeVer[0]);
     security_note(data:"Gale version " + galeVer[0] + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:galeVer[0], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:gale:gale:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_gd_graphics_library_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_gd_graphics_library_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_gd_graphics_library_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801121";
+SCRIPT_DESC = "GD Graphics Library Version Detection (Linux)";
+
 gd_sock = ssh_login_or_reuse_connection();
 if(!gd_sock){
   exit(0);
@@ -65,6 +71,12 @@
     set_kb_item(name:"GD-Graphics-Lib/Lin/Ver", value:gdVer[1]);
     security_note(data:"GD Graphics Library version " + gdVer[1] + 
                        " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:gdVer[1], exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:libgd:gd_graphics_library:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_getsimple_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_getsimple_cms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_getsimple_cms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 include("http_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801550";
+SCRIPT_DESC = "GetSimple CMS version detection";
+
 ## Get HTTP Port
 cmsPort = get_http_port(default:80);
 if(!cmsPort){
@@ -66,10 +72,17 @@
     cmsVer = eregmatch(pattern:"> Version ([0-9.]+)<" , string:rcvRes);
     if(cmsVer[1] != NULL)
     {
+      tmp_version = cmsVer[1] + " under " + dir;
       set_kb_item(name:"www/" + cmsPort + "/GetSimple_cms",
-                value:cmsVer[1] + " under " + dir);
+                value:tmp_version);
       security_note(data:"GetSimple version " + cmsVer[1] + " running at location "
                     + dir + " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:getsimple:getsimple:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_gizmo5_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_gizmo5_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_gizmo5_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800832";
+SCRIPT_DESC = "Gizmo5 Version Detection (Linux)";
+
 gizmo_sock = ssh_login_or_reuse_connection();
 if(!gizmo_sock){
   exit(0);
@@ -88,6 +94,12 @@
     {
       set_kb_item(name:"Gizmo5/Linux/Ver", value:gizmoVer[1]);
       security_note(data:"Gizmo5 version " + gizmoVer[1] + " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:gizmoVer[1], exp:"^([0-9.]+)", base:"cpe:/a:gizmo5:gizmo:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       break;
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_gnutls_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_gnutls_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_gnutls_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800916";
+SCRIPT_DESC = "GnuTLS Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -70,6 +76,12 @@
     {
       set_kb_item(name:"GnuTLS/Win/Ver", value:gnutlsVer);
       security_note(data:"GnuTLS version " + gnutlsVer + " was detected on the host"); 
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:gnutlsVer, exp:"^([0-9.]+)", base:"cpe:/a:gnu:gnutls:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_golden_ftp_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_golden_ftp_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_golden_ftp_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,24 @@
 
 
 include("ftp_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801072";
+SCRIPT_DESC = "Golden FTP Server Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 port = get_kb_item("Services/ftp");
 if(!port){
   port = 21;
@@ -71,6 +88,10 @@
     set_kb_item(name:"Golden/FTP/Pro/Ver", value:gftpVer[1]);
     security_note(data:"Golden FTP Pro version " + gftpVer[1] + 
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:gftpVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:kmint21:golden_ftp_server:");
+
     break;
   }
 }
@@ -83,5 +104,9 @@
     set_kb_item(name:"Golden/FTP/Free/Ver", value:gfftpVer[1]);
     security_note(data:"Golden FTP Free version " + gfftpVer[1] +         
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:gfftpVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:kmint21:golden_ftp_server:");
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_google_chrome_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_google_chrome_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_google_chrome_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801446";
+SCRIPT_DESC = "Google Chrome Version Detection (Linux)";
+
 ## Checking OS
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -97,6 +103,12 @@
   set_kb_item(name:"Google-Chrome/Linux/Ver", value:chromeVer);
   security_note(data:"Google Chrome version " + chromeVer +
                                " was detected on the host");
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:chromeVer, exp:"^([0-9.]+)", base:"cpe:/a:google:chrome:");
+  if(!isnull(cpe))
+    register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }
 
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_google_chrome_detect_macosx.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_google_chrome_detect_macosx.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_google_chrome_detect_macosx.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.802318";
+SCRIPT_DESC = "Google Chrome Version Detection (MacOSX)";
+
 ## Checking OS
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -74,3 +80,9 @@
 set_kb_item(name: "GoogleChrome/MacOSX/Version", value:chromeVer);
 security_note(data:"Google Chrome version " + chromeVer +
                   " was detected on this host");
+  
+## build cpe and store it as host_detail
+cpe = build_cpe(value:chromeVer, exp:"^([0-9.]+)", base:"cpe:/a:google:chrome:");
+if(!isnull(cpe))
+   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+

Modified: trunk/openvas-plugins/scripts/gb_google_chrome_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_google_chrome_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_google_chrome_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800120";
+SCRIPT_DESC = "Google Chrome Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -165,6 +171,12 @@
     set_kb_item(name:"GoogleChrome/Win/Ver", value:chromeVer);
     security_note(data:"Google Chrome Browser version " + chromeVer + 
                        " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:chromeVer, exp:"^([0-9.]+)", base:"cpe:/a:google:chrome:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_google_earth_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_google_earth_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_google_earth_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801272";
+SCRIPT_DESC = "Google Earth Version Detection";
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -76,6 +82,12 @@
       set_kb_item(name:"Google/Earth/Ver", value:ver);
       security_note(data:name + " version " + ver +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:google:earth:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_google_sketchup_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_google_sketchup_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_google_sketchup_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800434";
+SCRIPT_DESC = "Google SketchUp Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -80,6 +86,12 @@
       set_kb_item(name:"Google/SketchUp/Win/Ver", value:gsVer);
       security_note(data:"Google SketchUp version " + gsVer + " running at" + 
                          " location " + path +  " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:gsVer, exp:"^([0-9.]+)", base:"cpe:/a:google:google_sketchup:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_gpg4win_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_gpg4win_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_gpg4win_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801128";
+SCRIPT_DESC = "Gpg4win And Components Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -67,7 +84,11 @@
   if(gpgVer != NULL)
   {
     set_kb_item(name:"Gpg4win/Win/Ver", value:gpgVer);
+ 
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:gpgVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:gpg4win:gpg4win:");
 
+
     gpgPath = registry_get_sz(key:key, item:"InstallLocation");
     if(gpgPath)
     {
@@ -83,6 +104,10 @@
         set_kb_item(name:"Kleopatra/Win/Ver", value:kleoVer[1]);
         security_note(data:"Kleopatra version " + kleoVer[1] + 
                            " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:kleoVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:kde-apps:kleopatra:");
+
       }
 
       # Set KB for GNU Privacy Assistant

Modified: trunk/openvas-plugins/scripts/gb_grabit_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_grabit_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_grabit_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800712";
+SCRIPT_DESC = "Grabit Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,11 @@
 
   set_kb_item(name:"GrabIt/Ver", value:appVer);
   security_note(data:" version " + appVer + " was detected on the host");
+    
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:appVer, exp:"^([0-9]\.[0-9]+\.[0-9]+)", base:"cpe:/a:shemes:grabit:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
   if(build[1] != NULL){
     set_kb_item(name:"GrabIt/Build/Ver", value:build[1]); # Sets for Build Version.

Modified: trunk/openvas-plugins/scripts/gb_graphicsmagick_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_graphicsmagick_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_graphicsmagick_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800516";
+SCRIPT_DESC = "GraphicsMagick Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +73,12 @@
     security_note(data:"Graphics Magick version " + gmVer[0] + " running at" + 
                        " location " + binary_gmName +  " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:gmVer[0], exp:"^([0-9.]+)", base:"cpe:/a:graphicsmagick:graphicsmagick:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_gzip_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_gzip_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_gzip_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800450";
+SCRIPT_DESC = "GZip Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +71,12 @@
     security_note(data:"GZip version " + gzipVer[1] + " running at location "
                        + gzipbin + " was detected on the host");
     ssh_close_connection();
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:gzipVer[1], exp:"^([0-9.]+)", base:"cpe:/a:gnu:gzip:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_gzip_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_gzip_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_gzip_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800451";
+SCRIPT_DESC = "GZip Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       gzipVer = ereg_replace(pattern:"-", string:gzipVer, replace: ".");
       set_kb_item(name:"GZip/Win/Ver", value:gzipVer);
       security_note(data:"Gzip version " + gzipVer + " was detected on the host"); 
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:gzipVer, exp:"^([0-9.]+)", base:"cpe:/a:gnu:gzip:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_hastymail2_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_hastymail2_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_hastymail2_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801575";
+SCRIPT_DESC = "Hastymail2 Version Detection";
+
 ## Get HTTP Port
 port = get_http_port(default:80);
 if(!port){
@@ -83,11 +89,14 @@
 
     if(vers)
     {
+      tmp_version = vers + " under " + dir;
       ## Set the version of Hastymail2 in KB
-      set_kb_item(name:"www/" + port + "/Hastymail2", value: vers +
-                                                       " under " + dir);
+      set_kb_item(name:"www/" + port + "/Hastymail2", value: tmp_version);
       security_note(data:"Hastymail2 version " + vers +
                  " running at location " + dir +  " was detected on the host");
+
+      register_host_detail(name:"App", value:"cpe:/a:hastymail:hastymail2:"+vers, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_horde_gollem_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_horde_gollem_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_horde_gollem_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+nclude("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801869";
+SCRIPT_DESC = "Horde Gollem Version Detection";
+
 ## Get http port
 port = get_http_port(default:80);
 if(!port){
@@ -81,9 +87,16 @@
     if(ver[1])
     {
       ## Set the KB value
-      set_kb_item(name:"www/" + port + "/gollem", value:ver[1] + " under " + dir);
+      tmp_version = ver[1] + " under " + dir;
+      set_kb_item(name:"www/" + port + "/gollem", value:tmp_version);
       security_note(data:"Horde Gollem version " + ver[1] + " running at location "
                          + dir +" was detected on the host", port:port);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:horde:gollem:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_hp_storage_mirroring_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_hp_storage_mirroring_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_hp_storage_mirroring_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801356";
+SCRIPT_DESC = "HP StorageWorks Storage Mirroring Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -70,6 +76,12 @@
       ## Set HP StorageWorks Storage Mirroring version in KB
       set_kb_item(name:"HP/SWSM", value:hpsmVer);
       security_note(data:"HP Storage Mirroring " + hpsmVer + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:hpsmVer, exp:"^([0-9.]+)", base:"cpe:/a:hp:storageworks_storage_mirroring:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     } 
   }

Modified: trunk/openvas-plugins/scripts/gb_html_parser_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_html_parser_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_html_parser_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801038";
+SCRIPT_DESC = "HTML Parser Version Detection (Linux)";
+
 parserSock = ssh_login_or_reuse_connection();
 if(!parserSock){
   exit(0);
@@ -91,6 +97,12 @@
       {
         set_kb_item(name:"HTML-Parser/Linux/Ver", value:parserVer[1]);
         security_note(data:"HTML-Parser version " + parserVer[1] + " was detected on the host");
+  
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:parserVer[1], exp:"^([0-9.]+)", base:"cpe:/a:derrick_oswald:html-parser:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_httpdx_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_httpdx_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_httpdx_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("ftp_func.inc");
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800960";
+SCRIPT_DESC = "httpdx Server Version Detection";
+
 httpPort = get_kb_item("Services/www");
 if(!httpPort){
   httpPort = 80;
@@ -76,6 +82,12 @@
       {
         set_kb_item(name:"httpdx/" + port + "/Ver", value:httpdxVer[1]);
          security_note(data:"httpdx version " + httpdxVer[1] + " was detected on the host");
+  
+         ## build cpe and store it as host_detail
+         cpe = build_cpe(value:httpdxVer[1], exp:"^([0-9.]+([a-z]+)?)", base:"cpe:/a:jasper:httpdx:");
+         if(!isnull(cpe))
+            register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_ibm_db2_remote_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ibm_db2_remote_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ibm_db2_remote_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,7 +44,13 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801502";
+SCRIPT_DESC = "IBM DB2 Remote Version Detection";
+
 port = 523;
 if(!get_udp_port_state(port)){
   exit(0);
@@ -78,6 +84,11 @@
       set_kb_item(name:"IBM-DB2/Remote/ver",value:ver[1]);
       security_note(port:port, data:"IBM DB2 version " + ver[1] +
                     " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver[1], exp:"^([0-9.]+)", base:"cpe:/a:ibm:db2:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_ibm_db2mc_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ibm_db2mc_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ibm_db2mc_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800690";
+SCRIPT_DESC = "DB2 Monitoring Console Version Detection";
+
 dmcPort = get_http_port(default:80);
 if(!dmcPort){
   dmcPort = 80;
@@ -68,9 +74,16 @@
     dmcVer = eregmatch(pattern:'"IBM">v([0-9.]+)', string:rcvRes);
     if(dmcVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + dmcPort + "/IBM/DB2MC",value:dmcVer[1] + " under " + path);
+      tmp_version = dmcVer[1] + " under " + path;
+      set_kb_item(name:"www/" + dmcPort + "/IBM/DB2MC",value:tmp_version);
       security_note(data:"IBM DB2 Monitoring Console version " + dmcVer[1] +
                           " running at location " + path + " was detected on the host"); 
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:peter_kohlmann:db2_monitoring_console:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ibm_install_manager_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ibm_install_manager_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ibm_install_manager_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801010";
+SCRIPT_DESC = "IBM Installation Manager Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -62,4 +68,9 @@
   set_kb_item(name:"IBM/InstallMang/Win/Ver", value:iimVer);
   security_note(data:"IBM Install Maneger version " + iimVer +
                      " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:iimVer, exp:"^([0-9.]+)", base:"cpe:/a:ibm:installation_manager:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 }

Modified: trunk/openvas-plugins/scripts/gb_ibm_tivoli_dir_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ibm_tivoli_dir_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ibm_tivoli_dir_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801812";
+SCRIPT_DESC = "IBM Tivoli Directory Server Version Detection";
+
 ## LDAP Port
 port = get_kb_item("Services/ldap");
 if(!port) {
@@ -102,5 +108,11 @@
     set_kb_item(name:"IBM/TDS/Ver",value:tdsVer);
     security_note(port:port, data:"Tivoli Directory Server version " + tdsVer +
                        " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tdsVer, exp:"^([0-9.]+)", base:"cpe:/a:ibm:tivoli_directory_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_icq_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_icq_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_icq_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800807";
+SCRIPT_DESC = "ICQ Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -78,4 +84,10 @@
   set_kb_item(name:"ICQ/Ver", value:icqVer);
   security_note(data:"ICQ version " + icqVer + " running at location" + icqPath +
                      " was detected on the host");
+    
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:icqVer, exp:"^([0-9]\.[0-9])", base:"cpe:/a:icq:icq:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_icq_toolbar_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_icq_toolbar_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_icq_toolbar_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800693";
+SCRIPT_DESC = "ICQ Toolbar version detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -80,6 +86,12 @@
       {
         set_kb_item(name:"ICQ/Toolbar/Ver", value:icqVer);
         security_note(data:"ICQ Toolbar version " + icqVer + " was detected on the host");
+    
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:icqVer, exp:"^([0-9.]+)", base:"cpe:/a:icq:icq_toolbar:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_ideal_administrator_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ideal_administrator_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ideal_administrator_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801087";
+SCRIPT_DESC = "Ideal Administration Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
     {
       set_kb_item(name:"IDEAL/Admin/Ver", value:iadmVer);
       security_note(data:"IDEAL Administration version " + iadmVer + " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:iadmVer, exp:"^(9\.[0-9.]+)", base:"cpe:/a:pointdev:ideal_administration_2009:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_igss_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_igss_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_igss_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.802240";
+SCRIPT_DESC = "7-Technologies Interactive Graphical SCADA System Version Detection";
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -77,6 +83,12 @@
       set_kb_item(name:"IGSS/Win/Ver", value:version);
       security_note(data:"Interactive Graphical SCADA System version " +
                     version + " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:7t:igss:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ikiwiki_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ikiwiki_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ikiwiki_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800688";
+SCRIPT_DESC = "ikiwiki Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock)
 {
@@ -65,6 +70,12 @@
     security_note(data:"ikiwiki version " + ikiwikiVer[1] + " running at location "
                         + ikiwikibin + " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ikiwikiVer[1], exp:"^([0-9.]+)", base:"cpe:/a:ikiwiki:ikiwiki:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_image_hosting_script_dpi_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_image_hosting_script_dpi_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_image_hosting_script_dpi_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801081";
+SCRIPT_DESC = "Clixint Image Hosting Script DPI Version Detection";
+
 dpiPort = get_http_port(default:80);
 if(!dpiPort){
   exit(0);
@@ -64,10 +70,17 @@
     if(dpiVer[1] != NULL)
     {
       version = ereg_replace(pattern:" ", replace:".", string:dpiVer[1]);
+      tmp_version = version + " under " + path;
       set_kb_item(name:"www/" + dpiPort + "/ImageHostingScript/DPI",
-           value:version + " under " + path);
+           value:tmp_version);
       security_note(data:"Clixint Image Hosting Script version " + version +
                          " running at location " + path + " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:image-host-script:image_hosting_script:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ipsec-tools_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ipsec-tools_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ipsec-tools_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800707";
+SCRIPT_DESC = "IPSec Tools Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +72,12 @@
     set_kb_item(name:"IPSec/Tools/Ver", value:ipsecVer[1]);
     security_note(data:" IPSec Tools version " + ipsecVer[1] + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ipsecVer[1], exp:"^([0-9.]+)", base:"cpe:/a:ipsec-tools:ipsec-tools:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_irssi_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_irssi_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_irssi_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800633";
+SCRIPT_DESC = "Irssi Version Detection (Linux)";
+
 irrsi_sock = ssh_login_or_reuse_connection();
 if(!irrsi_sock){
   exit(0);
@@ -70,6 +76,13 @@
       security_note(data:"Irssi version " + irssiVer + " running at location "
                          + irssibin +  " was detected on the host");
       ssh_close_connection();
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:irssiVer, exp:"^([0-9.]+)", base:"cpe:/a:irssi:irssi:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_java_prdts_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_java_prdts_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_java_prdts_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,24 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800385";
+SCRIPT_DESC = "Sun Java Products Version Detection (Linux)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +83,10 @@
     {
       set_kb_item(name:"Java/WebStart/Linux/Ver", value:jwsVer[1]);
       security_note(data:"Java WebStart version " + jwsVer[1] + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:jwsVer[1], tmpExpr:"^([0-9]\.[0-9_.]+)", tmpBase:"cpe:/a:sun:java_web_start:");
+
     }
   }
 }
@@ -104,6 +125,10 @@
     {
       set_kb_item(name:"Sun/Java/JRE/Linux/Ver", value:javaVer[1]);
       security_note(data:"Sun Java JRE version " + javaVer[1] + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:javaVer[1], tmpExpr:"^([0-9._]+)", tmpBase:"cpe:/a:sun:jre:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_java_prdts_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_java_prdts_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_java_prdts_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800383";
+SCRIPT_DESC = "Sun Java Products Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -74,6 +91,9 @@
     {
       set_kb_item(name:"Sun/Java/JRE/Win/Ver", value:jreVer[1]);
       security_note(data:" Sun Java JRE version " + jreVer[1] + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:jreVer[1], tmpExpr:"^([0-9._]+)", tmpBase:"cpe:/a:sun:jre:");
     }
   }
 }
@@ -91,6 +111,8 @@
       set_kb_item(name:"Sun/Java/JDK/Win/Ver", value:jdkVer[1]);
       security_note(data:"Sun Java JDK version " + jdkVer[1] + " was detected on the host");
 
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:jdkVer[1], tmpExpr:"^([0-9._]+)", tmpBase:"cpe:/a:sun:jdk:");
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_jetty_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_jetty_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_jetty_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800953";
+SCRIPT_DESC = "Jetty Version Detection";
+
 jettyPort = get_http_port(default:8080);
 if(!jettyPort){
   jettyPort = 8080;
@@ -74,5 +80,11 @@
 
     set_kb_item(name:"www/" + jettyPort + "/Jetty", value:jettyVer);
     security_note(data:"Jetty Server version " + jettyVer + " was detected on the host"); 
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:jettyVer, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:mortbay:jetty:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_jpgraph_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_jpgraph_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_jpgraph_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800413";
+SCRIPT_DESC = "JpGraph Version Detection";
+
 jgphPort = get_http_port(default:80);
 if(!jgphPort){
   exit(0);
@@ -68,10 +74,17 @@
       jgphVer = eregmatch(pattern:"v([0-9.]+)",string:rcvRes);
       if(jgphVer[1] != NULL)
       {
+        tmp_version = jgphVer[1] + " under " + path;
         set_kb_item(name:"www/" + jgphPort + "/JpGraph",
-                    value:jgphVer[1] + " under " + path);
+                    value:tmp_version);
         security_note(data:" Jp Graphversion " + jgphVer[1] + " running at" + 
                            " location " + path + " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:aditus:jpgraph:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_justsystems_ichitaro_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_justsystems_ichitaro_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_justsystems_ichitaro_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800542";
+SCRIPT_DESC = "JustSystems Ichitaro Product(s) Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -74,6 +91,10 @@
     set_kb_item(name:"Ichitaro/Viewer/Ver", value:viewerVer);
     security_note(data:"Ichitaro Viewer version " + viewerVer + " running at" + 
                        " location " + viewerPath + " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:viewerVer, tmpExpr:"^(19\..*)", tmpBase:"cpe:/a:justsystem:ichitaro_viewer:5.1");
+
   }
 }
 
@@ -93,6 +114,10 @@
       set_kb_item(name:"Ichitaro/Ver", value:appVer[1]);
       security_note(data:"Ichitaro version " + appVer[1] +
                          " was detected on the host");
+ 
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:appVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:ichitaro:ichitaro:");
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_jv2_folder_gallery_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_jv2_folder_gallery_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_jv2_folder_gallery_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801350";
+SCRIPT_DESC = "JV2 Folder Gallery Version Detection";
+
 jfgPort = get_http_port(default:80);
 
 if(!jfgPort){
@@ -66,11 +72,17 @@
     jfgVer = eregmatch(pattern:"> v ([0-9.]+)",  string:rcvRes);
     if(jfgVer[1] != NULL)
     {
+      tmp_version = jfgVer[1] + " under " + dir;
       set_kb_item(port:jfgPort, name:"www/" + jfgPort + "/JV2/Folder/Gallery",
-                  value:jfgVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"JV2 Folder Gallery version " + jfgVer[1] +
                    " running at location " + dir + " was detected on the host");
-                                       
+                                         
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:jv2design:jv2_folder_gallery:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+    
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_k-meleon_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_k-meleon_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_k-meleon_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800891";
+SCRIPT_DESC = "K-Meleon Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion"))
 {
   exit(0);
@@ -80,5 +86,11 @@
   {
     set_kb_item(name:"K-Meleon/Ver", value:kmeleonVer);
     security_note(data:"K-Meleon version " + kmeleonVer + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:kmeleonVer, exp:"^([0-9.]+)", base:"cpe:/a:christophe_thibault:k-meleon:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_kaspersky_av_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_kaspersky_av_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_kaspersky_av_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -54,7 +54,35 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800241";
+SCRIPT_DESC = "Kaspersky AntiVirus Version Detection";
+
+INTNETSEC_LIST = make_list( "^(7\..*)", "cpe:/a:kaspersky_lab:kaspersky_internet_security:",
+                         "^(8\..*)", "cpe:/a:kaspersky_lab:kaspersky_internet_security_2009:",
+                         "^(9\..*)", "cpe:/a:kaspersky_lab:kaspersky_internet_security_2010:");
+INTNETSEC_MAX = max_index(INTNETSEC_LIST);
+
+AV_LIST = make_list("^(9\..*)", "cpe:/a:kaspersky:kaspersky_anti-virus:2010",
+                    "^(8\..*)", "cpe:/a:kaspersky:kaspersky_anti-virus:2009",
+                    "^(7\..*)", "cpe:/a:kaspersky:kaspersky_anti-virus:2008", 
+                    "^(6\..*)", "cpe:/a:kaspersky:kaspersky_anti-virus:2007");
+AV_MAX = max_index(AV_LIST);
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -83,6 +111,10 @@
         set_kb_item(name:"Kaspersky/AV-Workstation/Ver", value:kavwVer);
         security_note(data:"Kaspersky Anti-Virus version " + kavwVer +
                                    " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:kavwVer, tmpExpr:"^(6\.0)", tmpBase:"cpe:/a:kaspersky_lab:kaspersky_anti-virus:6.0::workstations");
+
       }
       exit(0);
     }
@@ -96,6 +128,10 @@
         set_kb_item(name:"Kaspersky/AV-FileServer/Ver", value:kavsVer);
         security_note(data:"Kaspersky Anti-Virus version " + kavsVer +
                          " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:kavsVer, tmpExpr:"^(6\.0)", tmpBase:"cpe:/a:kaspersky_lab:kaspersky_anti-virus:6.0.3.837::windows_file_servers:");
+
       }
       exit(0);
     }
@@ -109,6 +145,12 @@
         set_kb_item(name:"Kaspersky/AV/Ver", value:kavVer);
         security_note(data:"Kaspersky Anti-Virus version " + kavVer +
                          " was detected on the host");
+
+        ## build cpe and store it as host_detail  
+        for (i = 0; i < AV_MAX-1; i = i + 2) {
+ 
+          register_cpe(tmpVers:kavVer, tmpExpr:AV_LIST[i], tmpBase:AV_LIST[i+1]);
+        }
       }
       exit(0);
     }
@@ -122,6 +164,12 @@
         set_kb_item(name:"Kaspersky/IntNetSec/Ver", value:kisVer);
         security_note(data:" Kaspersky Internet Security version " + kisVer
                                      + " was detected on the host");
+
+        ## build cpe and store it as host_detail  
+        for (i = 0; i < INTNETSEC_MAX-1; i = i + 2) {
+
+          register_cpe(tmpVers:kisVer, tmpExpr:INTNETSEC_LIST[i], tmpBase:INTNETSEC_LIST[i+1]);
+        }
       }
       exit(0);
     }

Modified: trunk/openvas-plugins/scripts/gb_kerberos5_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_kerberos5_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_kerberos5_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800432";
+SCRIPT_DESC = "Kerberos5 Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -64,5 +70,11 @@
     set_kb_item(name:"Kerberos5/Ver", value:krbVer[1]);
     security_note(data:"Kerberos5 version " + krbVer[1] + " running at location "
                          + krbFile + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:krbVer[1], exp:"^([0-9.]+)", base:"cpe:/a:mit:kerberos:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_kerio_mailserver_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_kerio_mailserver_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_kerio_mailserver_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800098";
+SCRIPT_DESC = "Kerio Mail Server Version Detection";
+
 smtpPort = get_kb_item("Services/smtp");
 if(!smtpPort){
   smtpPort = 25;
@@ -94,6 +100,12 @@
       set_kb_item(name:"KerioMailServer/Ver", value:kerioVer);
       security_note(data:"Kerio " + server  + " version " + kerioVer +
                              " was detected on the host");
+     
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:kerioVer, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:kerio:kerio_mailserver:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_ktorrent_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ktorrent_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ktorrent_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800341";
+SCRIPT_DESC = "KTorrent Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +72,12 @@
     security_note(data:"KTorrent version " + ktVer[1] + " running at location "
                       + ktBin + " was detected on the host");
     ssh_close_connection();
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ktVer[1], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:ktorrent:ktorrent:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_libesmtp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_libesmtp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_libesmtp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800496";
+SCRIPT_DESC = "libESMTP Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +71,12 @@
       set_kb_item(name:"libESMTP/Ver", value:libesmtpVer);
       security_note(data:"libESMTP version " + libesmtpVer +
                           " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:libesmtpVer, exp:"^([0-9.]+)", base:"cpe:/a:stafford.uklinux:libesmtp:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_limny_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_limny_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_limny_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800295";
+SCRIPT_DESC = "Limny Version Detection";
+
 limPort = get_http_port(default:80);
 if(!limPort){
   limPort = 80;
@@ -66,10 +72,16 @@
     limVer = eregmatch(pattern:"Limny ([0-9.]+)" , string:rcvRes);
     if(limVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + limPort + "/Limny", value:limVer[1]
-                   + " under " + dir);
+       tmp_version = limVer[1] + " under " + dir;
+       set_kb_item(name:"www/" + limPort + "/Limny", value:tmp_version);
        security_note(data:"Limny version " + limVer[1] + " running at location "
                     + dir + " was detected on the host");
+      
+       ## build cpe and store it as host_detail
+       cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:limny:limny:");
+       if(!isnull(cpe))
+          register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_linkspheric_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_linkspheric_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_linkspheric_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801112";
+SCRIPT_DESC = "linkSpheric Version Detection";
+
 spheric_port = get_http_port(default:80);
 if(!spheric_port){
   spheric_port = 80;
@@ -80,10 +86,17 @@
 
     if(!isnull(spheric_ver[1]))
     {
+      tmp_version = spheric_ver[1] + " under " + dir;
       set_kb_item(name:"www/" + spheric_port + "/linkSpheric",
-                  value:spheric_ver[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"linkSpheric version " + spheric_ver[1] +
                    " running at location " + dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:dataspheric:linkspheric:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_livezilla_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_livezilla_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_livezilla_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800417";
+SCRIPT_DESC = "LiveZilla Version Detection";
+
 lzillaPort = get_http_port(default:80);
 if(!lzillaPort){
   exit(0);
@@ -64,10 +70,16 @@
     lzillaVer = eregmatch(pattern:">[Vv]ersion ([0-9.]+)", string:rcvRes);
     if(lzillaVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + lzillaPort + "/LiveZilla", value:lzillaVer[1]
-                           + " under " + path);
+      tmp_version = lzillaVer[1] + " under " + path; 
+      set_kb_item(name:"www/" + lzillaPort + "/LiveZilla", value:tmp_version);
       security_note(data:"LiveZilla version " + lzillaVer[1] + " running at location "
                      + path + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:livezilla:livezilla:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_lunascape_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_lunascape_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_lunascape_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800893";
+SCRIPT_DESC = "Lunascape Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion"))
 {
   exit(0);
@@ -76,6 +82,12 @@
     {
      set_kb_item(name:"Lunascape/Ver", value:lunaVer);
      security_note(data:"Lunascape version " + lunaVer + " was detected on the host");
+     
+     ## build cpe and store it as host_detail
+     cpe = build_cpe(value:lunaVer, exp:"^([0-9.]+)", base:"cpe:/a:lunascape:lunascape:");
+     if(!isnull(cpe))
+        register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_lussumo_vanilla_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_lussumo_vanilla_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_lussumo_vanilla_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800622";
+SCRIPT_DESC = "Vanilla Version Detection";
+
 vanillaPort = get_http_port(default:80);
 if(!vanillaPort){
   exit(0);
@@ -65,10 +71,17 @@
                            string:rcvRes);
     if(vanillaVer[1] != NULL)
     {
+      tmp_version = vanillaVer[1] + " under " + path;
       set_kb_item(name:"www/" + vanillaPort + "/Lussumo/Vanilla",
-                  value:vanillaVer[1] + " under " + path);
+                  value:tmp_version);
       security_note(data:"Vanilla version " + vanillaVer[1] + " running at location "
                           + path + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:lussumo:vanilla:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_magic_iso_maker_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_magic_iso_maker_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_magic_iso_maker_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800272";
+SCRIPT_DESC = "Magic ISO Maker Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -69,9 +75,16 @@
     ver = eregmatch(pattern:"v([0-9.]+) \(build ([0-9]{3,})\)", string:name);
     if((ver[1] != NULL && ver[2] != NULL))
     {
-      set_kb_item(name:"MagicISOMaker/Ver", value:ver[1] + "." + ver[2]);
+      tmp_version = ver[1] + "." + ver[2];
+      set_kb_item(name:"MagicISOMaker/Ver", value:tmp_version);
       security_note(data:"Magic ISO Maker version " + ver[1] + "." + ver[2] +
                       " was detected on the host");
+     
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9]\.[0-9])", base:"cpe:/a:magic_iso_maker:magic_iso_maker:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_maildrop_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_maildrop_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_maildrop_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800291";
+SCRIPT_DESC = "Maildrop Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -64,6 +70,12 @@
     set_kb_item(name:"Maildrop/Linux/Ver", value:mailVer[1]);
     security_note(data:"Maildrop version " + mailVer[1] + " running at location " 
                           + binary_mailName + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:mailVer[1], exp:"^([0-9.]+)", base:"cpe:/a:maildrop:maildrop:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_mapserver_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_mapserver_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_mapserver_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800547";
+SCRIPT_DESC = "MapServer Version Detection";
+
 mapPort = get_kb_item("Services/www");
 if(!mapPort){
   mapPort = 80;
@@ -77,4 +83,10 @@
 {
   set_kb_item(name:"www/" + mapPort + "/MapServer", value:mapVer[1]);
   security_note(data:"MapServer version " + mapVer[1] + " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:mapVer[1], exp:"^([0-9.]+)", base:"cpe:/a:umn:mapserver:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_maxthon_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_maxthon_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_maxthon_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800895";
+SCRIPT_DESC = "Maxthon Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion"))
 {
   exit(0);
@@ -79,6 +85,12 @@
     {
       set_kb_item(name:"Maxthon/Ver", value:maxthonVer);
       security_note(data:"Maxthon version " + maxthonVer + " was detected on the host");
+     
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:maxthonVer, exp:"^([0-9.]+)", base:"cpe:/a:maxthon:maxthon_browser:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_mcafee_groupshield_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_mcafee_groupshield_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_mcafee_groupshield_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800618";
+SCRIPT_DESC = "McAfee GroupShield Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"McAfee/GroupShield/Exchange/Ver", value:groupshieldVer);
       security_note(data:"McAfee GroupShield version " + groupshieldVer +
                          " was detected on the host");
+     
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:groupshieldVer, exp:"^([0-9.]+)", base:"cpe:/a:mcafee:groupshield:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_mdpro_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_mdpro_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_mdpro_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800918";
+SCRIPT_DESC = "MDPro Version Detection";
+
 mdpro_port = get_http_port(default:80);
 if(!mdpro_port){
   mdpro_port = 80;
@@ -70,10 +76,17 @@
     mdproVer = eregmatch(pattern:"MD-?Pro ([0-9.]+)", string:rcvRes);
     if(mdproVer[1]!= NULL)
     {
+      tmp_version = mdproVer[1] + " under " + dir;
       set_kb_item(name:"www/" + mdpro_port + "/MDPro",
-                  value:mdproVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"MDPro version " + mdproVer[1] + " running at location "
                       + dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:maxdev:mdpro:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_memcached_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_memcached_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_memcached_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800714";
+SCRIPT_DESC = "Memcached Version Detection";
+
 # Port used by Memcached Daemon
 memcachedPort = 11211;
 if(!get_port_state(memcachedPort)){
@@ -68,6 +74,12 @@
       set_kb_item(name:"MemCached/Ver", value:version[1]);
       security_note(data:"Memcached version " + version[1] +
             " was detected on the host");
+     
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:version[1], exp:"^([0-9.]+)", base:"cpe:/a:memcachedb:memcached:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_merak_mail_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_merak_mail_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_merak_mail_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800096";
+SCRIPT_DESC = "Merak Mail Server Web Mail Version Detection";
+
 port = 32000;
 banner = get_http_banner(port);
 
@@ -82,6 +88,12 @@
       set_kb_item(name:"MerakMailServer/Ver", value:ver[2]);
       security_note(data:"Merak Mail Server Web Mail version " + ver[2] +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver[2], exp:"^([0-9.]+)", base:"cpe:/a:icewarp:merak_mail_server:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_moinmoin_wiki_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_moinmoin_wiki_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_moinmoin_wiki_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800170";
+SCRIPT_DESC = "MoinMoin Wiki Version Detection";
+
 ## Get MoinMoin Wiki port
 moinWikiPort = get_http_port(default:80);
 if(!moinWikiPort){
@@ -75,10 +81,17 @@
                             string:rcvRes);
     if(moinWikiVer[1] != NULL)
     {
+      tmp_version = moinWikiVer[1] + " under " + path;
       set_kb_item(name:"www/" + moinWikiPort + "/moinmoinWiki",
-                        value:moinWikiVer[1] + " under " + path);
+                        value:tmp_version);
       security_note(data:"MoinMoin Wiki version " + moinWikiVer[1] +
                    " running at location " + path + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:moinmo:moinmoin:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_moodle_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_moodle_cms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_moodle_cms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,9 +58,26 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800239";
+SCRIPT_DESC = "Moodle CMS Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -106,9 +123,17 @@
 	}  
        }
 
-       set_kb_item(name:string("www/", port, "/moodle"), value:string(version, " under ", install));
+       tmp_version = string(version, " under ", install);
+       set_kb_item(name:string("www/", port, "/moodle"), value:tmp_version);
+
+       ## build cpe and store it as host_detail
+       register_cpe(tmpVers: tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:moodle:moodle:");
+
        set_kb_item(name:"Moodle/Version", value:version);
 
+       ## build cpe and store it as host_detail
+       register_cpe(tmpVers: version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:moodle:moodle:");
+
        info = string("None\n\nmoodle Version '");
        info += string(version);
        info += string("' was detected on the remote host in the following directory:\n\n");
@@ -127,5 +152,3 @@
        exit(0);
   }	
 }
-
-exit(0);

Modified: trunk/openvas-plugins/scripts/gb_mozilla_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_mozilla_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_mozilla_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800884";
+SCRIPT_DESC = "Mozilla Version Detection (Linux)";
+
 mozilla_sock = ssh_login_or_reuse_connection();
 if(!mozilla_sock){
   exit(0);
@@ -71,6 +77,12 @@
       set_kb_item(name:"Mozilla/Build/Linux/Ver", value:ver);
       security_note(data:"Mozilla version " + ver + " running at location " + 
                         binary_name + " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:mozilla:mozilla:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_mozilla_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_mozilla_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_mozilla_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800883";
+SCRIPT_DESC = "Mozilla Version Detection (Win)";
+
 function mozillaGetVersion(file, share)
 {
   mshare = ereg_replace(pattern:"([A-Z]):.*", replace:"\1$", string:file);
@@ -122,5 +128,11 @@
   {
     set_kb_item(name:"Mozilla/Win/Ver", value:mozillaVer);
     security_note(data:"Mozilla Browser version " + mozillaVer + " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:mozillaVer, exp:"^([0-9.]+)", base:"cpe:/a:mozilla:mozilla:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_mrbs_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_mrbs_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_mrbs_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800949";
+SCRIPT_DESC = "Meeting Room Booking System Version Detection";
+
 mrbsPort = get_http_port(default:80);
 if(!mrbsPort){
   mrbsPort = 80;
@@ -76,10 +82,16 @@
       }
       else
         mrbsVer = mrbsVer[1];
-      set_kb_item(name:"www/" + mrbsPort + "/MRBS", value:mrbsVer + " under "
-                                                                      + dir);
-      security_note(data:"Meeting Room Booking System version " + mrbsVer +
+        tmp_version = mrbsVer + " under " + dir;
+        set_kb_item(name:"www/" + mrbsPort + "/MRBS", value: tmp_version);
+        security_note(data:"Meeting Room Booking System version " + mrbsVer +
                    " running at location " + dir + " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:john_beranek:meeting_room_booking_system:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ms_ie_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ms_ie_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ms_ie_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -52,10 +52,26 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800209";
+SCRIPT_DESC = "Microsoft Internet Explorer Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,6 +88,10 @@
 # Set KB from Registry Entry version
 if(ver != NULL){
   set_kb_item(name:"MS/IE/Version", value:ver);
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:ver, tmpExpr:"^([0-9.])\..*", tmpBase:"cpe:/a:microsoft:ie:");
+
 }
 
 # Get for IE Installed Path
@@ -91,5 +111,9 @@
     security_note(data:"Microsoft Internet Explorer version " + ieVer +
                        " running at location " + exePath +
                        " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:ieVer, tmpExpr:"^([0-9.])\..*", tmpBase:"cpe:/a:microsoft:ie:");
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ms_money_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ms_money_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ms_money_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800217";
+SCRIPT_DESC = "Microsoft Money Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"MS/Money/Version", value:ver[1]);
       security_note(data:"Microsoft Money version " + ver[1] + " was detected"
                                         + " on the host");
+     
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver[1], exp:"^([0-9]+)", base:"cpe:/a:microsoft:money:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_ms_win_live_messenger_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ms_win_live_messenger_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ms_win_live_messenger_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800331";
+SCRIPT_DESC = "Microsoft Windows Live Messenger Client Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -78,6 +95,10 @@
     # Set KB for Windows Live Messenger
     if(!isnull(livemgrVer)){
       set_kb_item(name:"MS/LiveMessenger/Ver", value:livemgrVer);
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:livemgrVer, tmpExpr:"^([0-9]\.[0-9]\.[0-9])", tmpBase:"cpe:/a:microsoft:windows_live_messenger:");
+
     }
   }
 
@@ -109,6 +130,10 @@
       set_kb_item(name:"MS/MessengerPlus/Path", value:plusPath[1]);
       security_note(data:"Microsoft Windows Live Messenger Client version " + msgPlusVer 
                          + " running at location " + plusPath[1] + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:msgPlusVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:microsoft:messenger_plus%21_live:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_mymsg_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_mymsg_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_mymsg_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800951";
+SCRIPT_DESC = "MyMsg Version Detection";
+
 mymsgPort = get_http_port(default:80);
 if(!mymsgPort){
   mymsgPort = 80;
@@ -68,10 +74,17 @@
     mymsgVer = eregmatch(pattern:"MyMsg ([0-9.]+)", string:rcvRes);
     if(mymsgVer[1] != NULL)
     {
+      tmp_version = mymsgVer[1] + " under " + dir;
       set_kb_item(name:"www/" + mymsgPort + "/MyMsg",
-                  value:mymsgVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"MyMsg version " + mymsgVer[1] + " running at location "
                          + dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:al4us:mymsg:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_n_13_news_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_n_13_news_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_n_13_news_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801737";
+SCRIPT_DESC = "N-13 News Version Detection";
+
 newsPort = get_http_port(default:80);
 if(!newsPort){
   exit(0);
@@ -65,10 +71,16 @@
     if(newsVer[1] != NULL)
     {
       ## Set the KB value
-      set_kb_item(port:pxPort, name:"www/" + newsPort + "/N-13/News", value:newsVer[1]
-                                                 + " under " + path);
+      tmp_version = newsVer[1] + " under " + path;
+      set_kb_item(port:pxPort, name:"www/" + newsPort + "/N-13/News", value:tmp_version);
       security_note(port:pxPort, data:"N-13 News version " + newsVer[1] +
                     " running at location " + path + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:network-13:n-13_news:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_navicopa_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_navicopa_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_navicopa_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801100";
+SCRIPT_DESC = "NaviCOPA Server Version Detection";
+
 httpPort = get_kb_item("Services/www");
 if(!httpPort){
   httpPort = 80;
@@ -67,5 +73,11 @@
     set_kb_item(name:"NaviCOPA/" + httpPort + "/Ver", value:ncpaVer[1]);
     security_note(data:"NaviCOPA Server version " + ncpaVer[1] +
                      " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ncpaVer[1], exp:"^([0-9.]+)", base:"cpe:/a:intervations:navicopa_web_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_netpbm_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_netpbm_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_netpbm_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800470";
+SCRIPT_DESC = "Netpbm Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -77,6 +83,12 @@
     security_note(data:"NetPBM version " + netpbmVer[1] +
                        " running at location " + binaryName + 
                        " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:netpbmVer[1], exp:"^([0-9.]+)", base:"cpe:/a:netpbm:netpbm:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_netrisk_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_netrisk_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_netrisk_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800939";
+SCRIPT_DESC = "NetRisk Version Detection";
+
 netriskPort = get_http_port(default:80);
 if(!netriskPort){
   netriskPort = 80;
@@ -70,10 +76,17 @@
 
     if(netriskVer[1] != NULL)
     {
+      tmp_version = netriskVer[1] + " under " + dir;
       set_kb_item(name:"www/" + netriskPort + "/NetRisk",
-                  value:netriskVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"NetRisk version " + netriskVer[1] +
                    " running at location " + dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:phprisk:netrisk:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_novell_zhm_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_novell_zhm_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_novell_zhm_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801644";
+SCRIPT_DESC = "Novell ZENworks Handheld Management Version Detection";
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -73,5 +79,11 @@
     set_kb_item(name:"Novell/ZHM/Ver", value:ver);
     security_note(data: "Novell ZENworks Handheld Management version " + ver +
                       " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:novell:zenworks_handheld_management:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ntp_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ntp_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ntp_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800407";
+SCRIPT_DESC = "NTP Version Detection (Linux)";
+
 ntpVersion = get_kb_item("NTP/Linux/Ver");
 if(!ntpVersion)
 {
@@ -77,8 +83,13 @@
       set_kb_item(name:"NTP/Linux/Ver", value:ntpVer);
       security_note(data:" NTP version " + ntpVer + " running at location " 
                     + binName + " was detected on the host");
+      ssh_close_connection();
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ntpVer, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:ntp:ntp:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
-      ssh_close_connection();
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_nullftp_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_nullftp_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_nullftp_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800545";
+SCRIPT_DESC = "NULL FTP Server Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -88,6 +93,12 @@
       set_kb_item(name:"NullFTP/Server/Ver", value:nullftpVer);
       security_note(data:"NULL FTP Server version " + nullftpVer + 
                     " running at location " + exePath + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: nullftpVer, exp:"^([0-9.]+)",base:"cpe:/a:vwsolutions:null_ftp:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_nulllogic_groupware_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_nulllogic_groupware_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_nulllogic_groupware_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,9 +47,14 @@
   exit(0);
 }
 
-
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800905";
+SCRIPT_DESC = "NullLogic Groupware Version Detection";
+
 ngPort = get_http_port(default:4110);
 if(!ngPort){
   ngPort = 4110;
@@ -70,4 +75,10 @@
   set_kb_item(name:"NullLogic-Groupware/Ver", value:ngVer[1]);
   security_note(data:"NullLogic Groupware version " + ngVer[1] +
                          " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:ngVer[1], exp:"^([0-9.]+)", base:"cpe:/a:nulllogic:groupware:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_openfire_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_openfire_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_openfire_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800353";
+SCRIPT_DESC = "OpenFire Version Detection";
+
 # Check for default port 9090
 firePort = get_http_port(default:9090);
 if(!firePort){
@@ -73,6 +79,12 @@
       set_kb_item(name:"www/" + firePort + "/Openfire", value:fireVer[1]);
       security_note(data:"OpenFire version " + fireVer[1] +
                    " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:fireVer[1], exp:"^([0-9.]+)", base:"cpe:/a:igniterealtime:openfire:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_openmairie_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_openmairie_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_openmairie_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,24 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800779";
+SCRIPT_DESC = "OpenMairie Products Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 ## Get HTTP port
 openPort = get_http_port(default:80);
 if(!openPort){
@@ -83,10 +100,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Open Annuaire
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Annuaire",
-                  value:openVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"Open Annuaire version " + openVer[1] +
                    " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:openannuaire:");
+
     }
   }
 
@@ -97,10 +119,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Open Courrier
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Courrier",
-                  value:openVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"Open Courrier version " + openVer[1] +
                    " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:opencourrier:");
+
      # exit(0);
     }
   }
@@ -112,10 +139,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Open Courrier
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Courrier",
-                value:openVer[1] + " under " + dir);
+                value:tmp_version);
       security_note(data:"Open Courrier version " + openVer[1] +
                  " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:opencourrier:");
+
      }
    }
 
@@ -126,10 +158,15 @@
      if(openVer[1] != NULL)
      {
        ## Set the version of Open Presse
+       tmp_version = openVer[1] + " under " + dir;
        set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Presse",
-                value:openVer[1] + " under " + dir);
+                value:tmp_version);
         security_note(data:"Open Presse version " + openVer[1] +
                  " running at location " + dir + " was detected on the host");
+
+       ## build cpe and store it as host_detail
+       register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:openpresse:");
+
       }
    }
 
@@ -140,10 +177,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Open Planning
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Planning",
-                  value:openVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"Open Planning version " + openVer[1] +
                    " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:openplanning:");
+
     }
   }
 
@@ -154,10 +196,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Open Cominterne
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_ComInterne",
-                value:openVer[1] + " under " + dir);
+                value:tmp_version);
       security_note(data:"Open ComInterne version " + openVer[1] +
                 " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:opencominterne:");
+
     }
   }
 
@@ -168,10 +215,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Open Cimetiere
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Cimetiere",
-                value:openVer[1] + " under " + dir);
+                value:tmp_version);
       security_note(data:"Open Cimetiere version " + openVer[1] +
                 " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:opencimetiere:");
+
     }
   }
 
@@ -182,10 +234,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Open Registre CIL
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Registre_CIL",
-                   value:openVer[1] + " under " + dir);
+                   value:tmp_version);
       security_note(data:"Open Registre CIL version " + openVer[1] +
                " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:openregistrecil:");
+
      }
    }
 
@@ -196,10 +253,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Open Foncier
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Foncier",
-                value:openVer[1] + " under " + dir);
+                value:tmp_version);
       security_note(data:"Open Foncier version " + openVer[1] +
                 " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:openfoncier:");
+
     }
 
     openVer = eregmatch(pattern:">version ((beta)?.?([0-9.]+))", string:rcvRes);
@@ -207,10 +269,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Open Foncier
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Foncier",
-                value:openVer[1] + " under " + dir);
+                value:tmp_version);
       security_note(data:"Open Foncier version " + openVer[1] +
                 " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:openfoncier:");
+
     }
   }
 }
@@ -233,10 +300,15 @@
     if(openVer[1] != NULL)
     {
       ## Set the version of Opencatalogue
+      tmp_version = openVer[1] + " under " + dir;
       set_kb_item(name:"www/" + openPort + "/OpenMairie/Open_Catalogue",
-                value:openVer[1] + " under " + dir);
+                value:tmp_version);
       security_note(data:"Open Catalogue version " + openVer[1] +
                 " running at location " + dir + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:openmairie:opencatalogue:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_openpro_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_openpro_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_openpro_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800928";
+SCRIPT_DESC = "OpenPro Version Detection";
+
 openPort = get_http_port(default:80);
 if(!openPort){
   openPort = 80;
@@ -74,10 +80,17 @@
 
       if(openproVer[1] != NULL)
       {
+        tmp_version = openproVer[1] + " under " + dir;
         set_kb_item(name:"www/" + openPort + "/OpenPro",
-                    value:openproVer[1] + " under " + dir);
+                    value:tmp_version);
         security_note(data:"OpenPro version " + openproVer[1] +
                      " running at location " + dir + " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:openpro:openpro:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+  
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_opensc_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_opensc_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_opensc_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800369";
+SCRIPT_DESC = "OpenSC Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -69,6 +75,12 @@
       security_note(data:"OpenSC version " + openscVer[0] + " running at location " 
                           + binName + " was detected on the host");
       ssh_close_connection();
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:openscVer[0], exp:"^([0-9.]+)", base:"cpe:/a:opensc-project:opensc:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_openssl_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_openssl_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_openssl_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800335";
+SCRIPT_DESC = "OpenSSL Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +71,12 @@
     security_note(data:"OpenSSL version " + sslVer[1] + " running at location " 
                          + sslBin + " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:sslVer[1], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:openssl:openssl:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     #exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_openssl_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_openssl_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_openssl_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800257";
+SCRIPT_DESC = "OpenSSL Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -71,6 +76,12 @@
     {
       set_kb_item(name:"OpenSSL/Win/Ver", value:ver[0]);
       security_note(data:"OpenSSL version " + ver[0] + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver[0], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:openssl:openssl:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_opera_detect_macosx.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_opera_detect_macosx.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_opera_detect_macosx.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.802142";
+SCRIPT_DESC = "Opera Browser Version Detection (Mac OS X)";
+
 ## Checking OS
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -74,3 +80,9 @@
 set_kb_item(name: "Opera/MacOSX/Version", value:operaVer);
 security_note(data:"Opera version " + operaVer +
                   " was detected on this Mac OS X host");
+  
+## build cpe and store it as host_detail
+cpe = build_cpe(value:operaVer, exp:"^([0-9.]+)", base:"cpe:/a:opera:opera_browser:");
+if(!isnull(cpe))
+   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+

Modified: trunk/openvas-plugins/scripts/gb_orbis_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_orbis_cms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_orbis_cms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801403";
+SCRIPT_DESC = "Orbis CMS Version Detection";
+
 ## Get HTTP Port
 orbisPort = get_http_port(default:80);
 if(!orbisPort){
@@ -74,11 +80,17 @@
 
     if(orbisVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + orbisPort + "/Orbis/CMS/Ver", value:orbisVer[1] +
-                  " under " + path);
+      tmp_version = orbisVer[1] + " under " + path;
+      set_kb_item(name:"www/" + orbisPort + "/Orbis/CMS/Ver", value:tmp_version);
       security_note(data:"Orbis CMS version " + orbisVer[1] +
                " running at location " + path +  " was detected on the host",
                  port:orbisPort);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:novo-ws:orbis_cms:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_orbit_downloader_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_orbit_downloader_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_orbit_downloader_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801213";
+SCRIPT_DESC = "Orbit Downloader Version Detection";
+
 ## Confirm Windows OS
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -63,4 +69,10 @@
   set_kb_item(name:"OrbitDownloader/Ver", value:ver);
   security_note(data:"Orbit Downloader version " + ver +
                      " was detected on the host");
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:orbitdownloader:orbit_downloader:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_orca_browser_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_orca_browser_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_orca_browser_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800900";
+SCRIPT_DESC = "Orca Browser Version Detection";
+
 function OrcaGetVersion(file)
 {
   share = ereg_replace(pattern:"([A-Z]):.*", replace:"\1$", string:file);
@@ -133,5 +139,11 @@
     set_kb_item(name:"OrcaBrowser/Ver", value:orcaVer);
     security_note(data:"Orca Browser version " + orcaVer + " running at location " 
                       + orcaPath + " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:orcaVer, exp:"^([0-9]\.[0-9])", base:"cpe:/a:orcabrowser:orca_browser:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ortro_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ortro_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ortro_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800980";
+SCRIPT_DESC = "Ortro Version Detection";
+
 ortroPort = get_http_port(default:80);
 if(!ortroPort){
   exit(0);
@@ -65,10 +71,16 @@
     if(ortroVer[1] != NULL)
     {
       ortroVer[1] = ereg_replace(pattern:"-| ", replace:".", string:ortroVer[1]);
-      set_kb_item(name:"www/"+ ortroPort + "/Ortro", value:ortroVer[1] +
-                  " under " + dir);
+      tmp_version = ortroVer[1] + " under " + dir;
+      set_kb_item(name:"www/"+ ortroPort + "/Ortro", value:tmp_version);
       security_note(data:"Ortro version " + ortroVer[1] + " running at location "
                         + dir + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:ortro:ortro:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_outreach_project_tool_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_outreach_project_tool_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_outreach_project_tool_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801069";
+SCRIPT_DESC = "Outreach Project Tool Version Detection (OPT)";
+
 optPort = get_http_port(default:80);
 if(!optPort){
   exit(0);
@@ -68,9 +74,16 @@
       optVer = eregmatch(pattern:"([0-9.]+)", string:optVer);
       if(optVer[1] != NULL)
       {
-       set_kb_item(name:"www/" + optPort + "/OPT", value:optVer[1] + " under " + path);
+       tmp_version = optVer[1] + " under " + path;
+       set_kb_item(name:"www/" + optPort + "/OPT", value:tmp_version);
        security_note(data:"Outreach Project Tool version " + optVer[1] +
                       " running at location " + path + " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+#        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:lanifex:outreach_project_tool:");
+#        if(!isnull(cpe))
+           register_host_detail(name:"App", value:"cpe:/a:lanifex:outreach_project_tool:"+optVer[1], nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_pacific_timesheet_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_pacific_timesheet_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_pacific_timesheet_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800180";
+SCRIPT_DESC = "Pacific Timesheet Version Detection";
+
 ## Get Pacific Timesheet port
 pacificTSPort = get_http_port(default:80);
 if(!pacificTSPort){
@@ -76,11 +82,17 @@
     if(pacificTSVer[1] != NULL && pacificTSVer[2] != NULL)
     {
       pacificTSVer = pacificTSVer[1] + "." + pacificTSVer[2];
+      tmp_version = pacificTSVer + " under " + path;
       set_kb_item(name:"www/" + pacificTSPort + "/pacificTimeSheet/Ver",
-                        value:pacificTSVer + " under " + path);
+                        value:tmp_version);
       security_note(data:"Pacific Timesheet version " + pacificTSVer +
                          " running at location " + path +
                          " was detected on the host", port:pacificTSPort);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:pacifictimesheet:pacific_timesheet:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
       exit(0);
     }

Modified: trunk/openvas-plugins/scripts/gb_panda_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_panda_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_panda_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801079";
+SCRIPT_DESC = "Panda Products Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -76,6 +93,9 @@
      set_kb_item(name:"Panda/InternetSecurity/Ver", value:pandaVer);
      security_note(data:"Panda Internet Security version " + pandaVer +
                          " was detected on the host");
+
+     ## build cpe and store it as host_detail
+     register_cpe(tmpVers:pandaVer, tmpExpr:"^(15\.0)", tmpBase:"cpe:/a:pandasecurity:panda_internet_security:2010::pro");
     }
   }
 
@@ -89,6 +109,8 @@
       security_note(data:"Panda Global Protection version " + pandaVer +
                          " was detected on the host");
 
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:pandaVer, tmpExpr:"^(3\.0)", tmpBase:"cpe:/a:pandasecurity:panda_global_protection:2010");
     }
   }
 
@@ -102,6 +124,8 @@
       security_note(data:"Panda Antivirus version " + pandaVer +
                          " was detected on the host");
 
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:pandaVer, tmpExpr:"^(9\.0)", tmpBase:"cpe:/a:pandasecurity:panda_antivirus::2010::pro");
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_peazip_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_peazip_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_peazip_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800594";
+SCRIPT_DESC = "PeaZIP Version Detection (Lin)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -87,6 +93,11 @@
       set_kb_item(name:"PeaZIP/Lin/Ver", value:peazipVer[1]);
       security_note(data:"PeaZIP version " + peazipVer[1] + 
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:peazipVer[1], exp:"^([0-9.]+)", base:"cpe:/a:giorgio_tani:peazip:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
       break;
     }

Modified: trunk/openvas-plugins/scripts/gb_peazip_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_peazip_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_peazip_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800592";
+SCRIPT_DESC = "PeaZIP Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -77,6 +83,11 @@
       set_kb_item(name:"PeaZIP/Win/Ver", value:peazipVer[1]);
       security_note(data:"PeaZIP version " + peazipVer[1] +
                                   " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:peazipVer[1], exp:"^([0-9.]+)", base:"cpe:/a:giorgio_tani:peazip:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
       exit(0);
     }

Modified: trunk/openvas-plugins/scripts/gb_pecio_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_pecio_cms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_pecio_cms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801443";
+SCRIPT_DESC = "Pecio CMS Version Detection";
+
 ## GET HTTP port
 cmsPort = get_http_port(default:80);
 if(!cmsPort){
@@ -66,10 +72,17 @@
     if(cmsVer[1] != NULL)
     {
       ## Set the KB item
+      tmp_version = cmsVer[1] + " under " + dir;
       set_kb_item(name:"www/" + cmsPort + "/Pecio_CMS",
-                  value:cmsVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"Pecio CMS version " + cmsVer[1] +
        " running at location " + dir + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:pecio-cms:pecio_cms:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_pegasus_mail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_pegasus_mail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_pegasus_mail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800969";
+SCRIPT_DESC = "Pegasus Mail Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -76,6 +82,12 @@
         security_note(data:"Pegasus Mail version " + pmailVer +
                            " running at location " + pmailPath +
                            " was detected on the host");
+  
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:pmailVer, exp:"^([0-9.]+)", base:"cpe:/a:pmail:pegasus_mail:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_perl_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_perl_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_perl_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800966";
+SCRIPT_DESC = "Perl Version Detection (Windows)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -78,6 +95,9 @@
       set_kb_item(name:"Strawberry/Perl/Ver", value:perlVer[1]);
       security_note(data:"Strawberry Perl version " + perlVer[1] +
                                      " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:perlVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:perl:perl:");
     }
   }
 
@@ -90,6 +110,9 @@
       set_kb_item(name:"ActivePerl/Ver", value:perlVer[1]);
       security_note(data:"ActivePerl version " + perlVer[1] +
                                     " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:perlVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:perl:perl:");
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_pgp_desktop_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_pgp_desktop_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_pgp_desktop_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800215";
+SCRIPT_DESC = "PGP Desktop Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,6 +79,11 @@
       set_kb_item(name:"PGPDesktop/Win/Ver", value:pgpdeskVer);
       security_note(data:"PGP Desktop version " + pgpdeskVer + 
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:pgpdeskVer, exp:"^([0-9]\.[0-9]\.[0-9])", base:"cpe:/a:pgp:desktop:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     }
     exit(0);

Modified: trunk/openvas-plugins/scripts/gb_php_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_php_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_php_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800109";
+SCRIPT_DESC = "PHP Version Detection";
+
 phpPort = get_http_port(default:80);
 if(!get_port_state(phpPort)){
   exit(0);
@@ -72,4 +78,10 @@
 {
   set_kb_item(name:"www/" + phpPort + "/PHP", value:phpVer);
   security_note(data:"PHP version " + phpVer + " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:phpVer, exp:"^([0-9.]+)", base:"cpe:/a:php:php:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_php_quick_arcade_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_php_quick_arcade_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_php_quick_arcade_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801363";
+SCRIPT_DESC = "PHP Quick Arcade (PHPQA) Version Detection";
+
 phpqaPort = get_http_port(default:80);
 if(!phpqaPort){
   exit(0);
@@ -65,10 +71,16 @@
     if(phpqaVer[1] != NULL)
     {
       ## Set the KB value
-      set_kb_item(port:phpqaPort, name:"www/" + phpqaPort + "/PHP-Quick-Arcade", value:phpqaVer[1]
-                                                 + " under " + path);
+      tmp_version = phpqaVer[1] + " under " + path;
+      set_kb_item(port:phpqaPort, name:"www/" + phpqaPort + "/PHP-Quick-Arcade", value:tmp_version);
       security_note(port:phpqaPort, data:"PHP Quick Arcade version " + phpqaVer[1] +
                    " running at location " + path + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:jcink:php-quick-arcade:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_phpbazar_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_phpbazar_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_phpbazar_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800464";
+SCRIPT_DESC = "phpBazar version detection";
+
 pbPort = get_http_port(default:80);
 if(!pbPort){
   exit(0);
@@ -85,9 +91,16 @@
       }
     }
 
+    tmp_version = pbVer + " under " + path;
     set_kb_item(name:"www/" + pbPort + "/phpBazar",
-                value:pbVer + " under " + path);
+                value:tmp_version);
     security_note(data:"phpBazar version " + pbVer + " running at location " 
                     + path + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:smartisoft:phpbazar:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_phpcoin_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_phpcoin_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_phpcoin_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800735";
+SCRIPT_DESC = "phpCOIN Version Detection";
+
 phpPort = get_http_port(default:80);
 if(!phpPort){
   exit(0);
@@ -65,6 +71,12 @@
       set_kb_item(name:"www/" + phpPort + "/phpCOIN", value:phpVer[1]);
       security_note(data:"phpCOIN version " + phpVer[1] + 
                    " running at location " + dir + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:phpVer[1], exp:"^([0-9.]+)", base:"cpe:/a:phpcoin:phpcoin:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_phpgenealogie_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_phpgenealogie_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_phpgenealogie_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801007";
+SCRIPT_DESC = "PHPGenealogie Version Detection";
+
 phpgenPort = get_http_port(default:80);
 if(!phpgenPort){
   phpgenPort = 80;
@@ -67,10 +73,17 @@
     phpgenVer = eregmatch(pattern:"> ([0-9.]+)",string:rcvRes);
     if(phpgenVer[1] != NULL)
     {
+      tmp_version = phpgenVer[1] + " under " + path;
       set_kb_item(name:"www/" + phpgenPort + "/PHPGenealogie",
-                  value:phpgenVer[1] + " under " + path);
+                  value:tmp_version);
       security_note(data:"PHPGenealogie version " + phpgenVer[1] + 
                     " running at location " + path + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:phpgenealogy:phpgenealogy:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_phpnagios_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_phpnagios_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_phpnagios_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800437";
+SCRIPT_DESC = "phpNagios Version Detection";
+
 pnPort = get_http_port(default:80);
 if(!pnPort){
   exit(0);
@@ -66,9 +72,16 @@
     Ver= eregmatch(pattern:"Nagios Version : ([0-9.]+)",string:rcvRes);
     if(!isnull(Ver[1]))
     {
-      set_kb_item(name:"www/" + pnPort + "/phpNagios", value:Ver[1] + " under " + path);
+      tmp_version = Ver[1] + " under " + path;
+      set_kb_item(name:"www/" + pnPort + "/phpNagios", value:tmp_version);
       security_note(data:"phpNagios version " + Ver[1] + " running at location " 
                            + path + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:phpnagios:phpnagios:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_pivotx_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_pivotx_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_pivotx_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801734";
+SCRIPT_DESC = "PivotX Version Detection";
+
 pxPort = get_http_port(default:80);
 if(!pxPort){
   exit(0);
@@ -65,10 +71,16 @@
     if(pxVer[1] != NULL)
     {
       ## Set the KB value
-      set_kb_item(port:pxPort, name:"www/" + pxPort + "/PivotX", value:pxVer[1]
-                                                 + " under " + path);
+      tmp_version = pxVer[1] + " under " + path;
+      set_kb_item(port:pxPort, name:"www/" + pxPort + "/PivotX", value:tmp_version);
       security_note(data:"PivotX version " + pxVer[1] +
                    " running at location " + path + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:pivotx:pivotx:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_pmwiki_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_pmwiki_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_pmwiki_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801209";
+SCRIPT_DESC = "PmWiki Version Detection";
+
 ## Get HTTP Port
 port = get_http_port(default:80);
 if(!port){
@@ -71,10 +77,16 @@
     if(wikiVer[1]!= NULL)
     {
       ## Set the version of PmWiki in KB
-      set_kb_item(name:"www/" + port + "/PmWiki", value: wikiVer[1] +
-                                                       " under " + dir);
+      tmp_version = wikiVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + port + "/PmWiki", value: tmp_version);
       security_note(data:"PmWiki version " + wikiVer[1] +
                  " running at location " + dir +  " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:pmwiki:pmwiki:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_pyftpdlib_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_pyftpdlib_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_pyftpdlib_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 
 include("ftp_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801612";
+SCRIPT_DESC = "pyftpdlib Version Detection";
+
 ## Get FTP port
 port = get_kb_item("Services/ftp");
 if(!port) {
@@ -71,5 +77,11 @@
     set_kb_item(name:"pyftpdlib/Ver", value:ver[1]);
     security_note(data:"pyftpdlib FTP server version " + ver[1] +
                        " was detected on the host", port:port);
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ver[1], exp:"^([0-9.]+)", base:"cpe:/a:g.rodola:pyftpdlib:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_python_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_python_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_python_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801795";
+SCRIPT_DESC = "Python Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,6 +79,12 @@
       set_kb_item(name:"Python/Win/Ver", value:pyVer);
       security_note(data:"Python version " + pyVer +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:pyVer, exp:"^([0-9.]+)", base:"cpe:/a:python:python:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_qip_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_qip_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_qip_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800540";
+SCRIPT_DESC = "QIP Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -82,6 +88,12 @@
       security_note(data:"QIP version " + qipVer + 
                          " running at location " + qipPath +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:qipVer, exp:"^(8\.0\..*)", base:"cpe:/a:qip:qip:2005");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_qtweb_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_qtweb_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_qtweb_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800898";
+SCRIPT_DESC = "QtWeb Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion"))
 {
   exit(0);
@@ -83,6 +88,12 @@
       set_kb_item(name:"QtWeb/Ver", value:qtwebVer);         
       security_note(data:"QtWeb version " + qtwebVer + " running at location " 
                         + qtwebPath + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:qtwebVer, exp:"^([0-9]\.[0-9])", base:"cpe:/a:qtweb:qtwe:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_quagga_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_quagga_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_quagga_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,10 +45,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800709";
+SCRIPT_DESC = "Quagga Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +72,12 @@
     security_note(data:"Quagga version " + quaggaVer[1] + " running at location " 
                         + quaggaBin + " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:quaggaVer[1], exp:"^([0-9.]+)", base:"cpe:/a:quagga:quagga_routing_software_suite:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_quixplorer_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_quixplorer_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_quixplorer_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800630";
+SCRIPT_DESC = "QuiXplorer Version Detection";
+
 quixplorerPort = get_http_port(default:80);
 
 if(!get_port_state(quixplorerPort)){
@@ -71,10 +77,16 @@
 
     if(quixplorerVer[1] != NULL)
     {
-      set_kb_item(name:"www/"+ quixplorerPort + "/QuiXplorer", value:quixplorerVer[1] +
-                           " under " + dir);
+      tmp_version = quixplorerVer[1] + " under " + dir;
+      set_kb_item(name:"www/"+ quixplorerPort + "/QuiXplorer", value:tmp_version);
       security_note(data:"QuiXplorer version " + quixplorerVer[1] + 
                     " running at location " + dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:claudio_klingler:quixplorer:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_realplayer_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_realplayer_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_realplayer_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800508";
+SCRIPT_DESC = "RealPlayer Application Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -76,4 +82,10 @@
   security_note(data:"RealPlayer Application version " + rpVer +
                      " running at location " + exeFile + 
                      " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:rpVer, exp:"^([0-9.]+)", base:"cpe:/a:realnetworks:realplayer:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_reflection_secureit_unix_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_reflection_secureit_unix_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_reflection_secureit_unix_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,9 +47,14 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800227";
+SCRIPT_DESC = "Reflection for Secure IT Version Detection (Linux)";
+
 sshPort = get_kb_item("Services/ssh");
 if(!sshPort){
   sshPort = 22;
@@ -62,4 +67,10 @@
   set_kb_item(name:"Reflection/SecureIT/Linux/Ver", value:secureItVer[1]);
   security_note(data:"Reflection for Secure IT version " + secureItVer[1] + 
                                      " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value: secureItVer[1], exp:"^([0-9.]+)",base:"cpe:/a:attachmate:reflection_for_secure_it:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_rekonq_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_rekonq_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_rekonq_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801421";
+SCRIPT_DESC = "rekonq Version Detection";
+
 ## Checking OS
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -71,6 +77,12 @@
     set_kb_item(name:"rekonq/Linux/Ver", value:rekonqVer[1]);
     security_note(data:"rekonq version " + rekonqVer[1] + " running at location "
                           + binary_rekonqName + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:rekonqVer[1], exp:"^([0-9.]+)", base:"cpe:/a:adjam:rekonq:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_rhinosoft_serv-u_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_rhinosoft_serv-u_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_rhinosoft_serv-u_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,24 @@
 
 
 include("ftp_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801117";
+SCRIPT_DESC = "Rhino Software Serv-U Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 function ServuGetVer(su_port, pat)
 {
   if(get_port_state(su_port))
@@ -77,6 +94,9 @@
 servuVer = ServuGetVer(su_port:servuPort, pat:pattern1);
 if(!isnull(servuVer[1])){
   set_kb_item(name:"Serv-U/FTP/Ver", value:servuVer[1]);
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:servuVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:rhinosoft:serv-u:");
 }
 else
 {
@@ -114,10 +134,18 @@
   if(!isnull(version[1])) {
   
     set_kb_item(name:"Serv-U/FTP/Ver", value:version[1]);
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:version[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:rhinosoft:serv-u:");
+
     set_kb_item(name:string("ftp/", servuPort, "/Serv-U"), value:version[1]);
     security_note(data:"Rhino Software Serv-U FTP version " + version[1] + 
                            " was detected on the host");
 
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:version[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:rhinosoft:serv-u:");
+
+
   } else {
 
       servuVer = ServuGetVer(su_port:servuPort, pat:pattern2);
@@ -128,6 +156,10 @@
         set_kb_item(name:"Serv-U/FTP/Ver", value:servuVer[1]);
         security_note(data:"Rhino Software Serv-U FTP version " + servuVer[1] + 
                            " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:servuVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:rhinosoft:serv-u:");
+
       }
     }
 }

Modified: trunk/openvas-plugins/scripts/gb_robo_ftp_client_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_robo_ftp_client_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_robo_ftp_client_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801053";
+SCRIPT_DESC = "Robo-FTP Client Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -76,6 +93,10 @@
       security_note(data:"Robo-FTP Client version " + ftpVer +
                          " running at location " + path +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:ftpVer, tmpExpr:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", tmpBase:"cpe:/a:robo-ftp:robo-ftp:");
+
       exit(0);
     }
   }
@@ -94,5 +115,9 @@
     security_note(data:"Robo-FTP Client version " + ftpVer +
                        " running at location " + path +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:ftpVer, tmpExpr:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", tmpBase:"cpe:/a:robo-ftp:robo-ftp:");
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ruby_rails_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ruby_rails_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ruby_rails_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,10 +45,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800911";
+SCRIPT_DESC = "Ruby On Rails Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +71,12 @@
     set_kb_item(name:"Ruby-Rails/Linux/Ver", value:rorVer[1]);
     security_note(data:"Ruby On Rails version " + rorVer[1] + 
                  " running at location " + rorBin + " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: rorVer[1], exp:"^([0-9.]+)",base:"cpe:/a:ruby_on_rails:ruby_on_rails:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_seamonkey_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_seamonkey_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_seamonkey_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800019";
+SCRIPT_DESC = "Mozilla SeaMonkey Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -71,6 +77,12 @@
     security_note(data:"Mozilla Seamonkey version " + seaVer[0] + 
                   " running at location " + binary_seaName + " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:seaVer[0], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:mozilla:seamonkey:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_seamonkey_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_seamonkey_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_seamonkey_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,13 @@
 
 
 include("smb_nt.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800016";
+SCRIPT_DESC = "Mozilla SeaMonkey Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,4 +79,10 @@
   set_kb_item(name:"Seamonkey/Win/Ver", value:seaVer[0]);
   security_note(data:"Mozilla Seamonkey version " + seaVer[0] + 
                               " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:seaVer[0], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:mozilla:seamonkey:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_sendmail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_sendmail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_sendmail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,9 +47,14 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smtp_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800608";
+SCRIPT_DESC = "Sendmail Version Detection";
+
 sendmailPort = get_kb_item("Services/smtp");
 
 if(!sendmailPort){
@@ -70,5 +75,11 @@
     set_kb_item(name:"SMTP/" + sendmailPort + "/Sendmail", value:sendmailVer[1]);
     security_note(data:"Sendmail version " + sendmailVer[1] + 
                          " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: sendmailVer[1], exp:"^([0-9.]+)",base:"cpe:/a:sendmail:sendmail:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_serenity_player_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_serenity_player_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_serenity_player_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800728";
+SCRIPT_DESC = "Serenity/Mplay Player Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -81,6 +98,9 @@
     security_note(data:"Serenity Audio Player version " + serenityVer +
                        " running at location " + appPath +
                        " was detected on the host"); 
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:serenityVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:malsmith:serenity_audio_player:");
   }
 }
 
@@ -93,5 +113,8 @@
     security_note(data:"Malx media player version " + mplayVer +
                        " running at location " + appPath2 +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:mplayVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:malsmith:serenity_audio_player:");
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_shareaza_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_shareaza_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_shareaza_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800603";
+SCRIPT_DESC = "Shareaza Version Detection";
+
 shareazaPort = get_http_port(default:6346);
 
 if(!shareazaPort){
@@ -70,5 +76,11 @@
     set_kb_item(name:"www/" + shareazaPort + "/Shareaza", value:shareazaVer[1]);
     security_note(data:"Shareaza version " + shareazaVer[1] +
                          " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:shareazaVer[1], exp:"^([0-9.]+)", base:"cpe:/a:ryo-oh-ki:shareaza:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_shibboleth_sp_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_shibboleth_sp_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_shibboleth_sp_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801115";
+SCRIPT_DESC = "Shibboleth Service Provider Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -77,6 +83,12 @@
       set_kb_item(name:"Shibboleth/SP/Win/Ver", value:shibVer);
       security_note(data:"Shibboleth Service Provider version " + shibVer +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:shibVer, exp:"^([0-9.]+)", base:"cpe:/a:internet2:shibboleth-sp:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_siestta_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_siestta_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_siestta_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800768";
+SCRIPT_DESC = "Siestta Version Detection";
+
 siPort = get_http_port(default:80);
 if(!siPort){
   siPort = 80;
@@ -64,9 +70,16 @@
     siVer = eregmatch(pattern:">S[iI][eE][sS][tT][tT][aA] ([0-9.]+)", string:rcvRes);
     if(siVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + siPort + "/Siestta", value:siVer[1] + " under " + dir);
+      tmp_version = siVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + siPort + "/Siestta", value:tmp_version);
       security_note(data:"SIESTTA version " + siVer[1] + " running at location " + dir +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:ramoncastro:siestta:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_sigplus_pro_activex_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_sigplus_pro_activex_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_sigplus_pro_activex_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801251";
+SCRIPT_DESC = "SigPlus Pro ActiveX Version Detection";
+
 ## Confirm Windows OS
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -71,6 +77,12 @@
       set_kb_item(name:"SigPlus/Ver", value:ver);
       security_note(data: "Topaz e-Signatures SigPlus version " + ver +
                           " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:topazsystems:sigplus_pro_activex_control:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_simple_machines_forum_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_simple_machines_forum_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_simple_machines_forum_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800557";
+SCRIPT_DESC = "Simple Machines Forum Version Detection";
+
 port = get_http_port(default:80);
 if(!port){
   port = 80;
@@ -84,8 +90,15 @@
       dir = "/";
     }
 
-    set_kb_item(name:"www/" + port + "/SMF", value:smfVer + " under " + dir);
+    tmp_version = smfVer + " under " + dir;
+    set_kb_item(name:"www/" + port + "/SMF", value:tmp_version);
     security_note(port:port, data:"Simple Machines Forum version " + smfVer +
     " running at location " + dir + " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)(RC[0-9])?", base:"cpe:/a:simplemachines:smf:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_simpleid_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_simpleid_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_simpleid_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801415";
+SCRIPT_DESC = "SimpleID Version Detection";
+
 ## Get HTTP Port
 simidPort = get_http_port(default:80);
 if(!get_port_state(simidPort)){
@@ -67,11 +73,17 @@
     if(simidVer[1] != NULL)
     {
       ## Set the KB item
-      set_kb_item(name:"www/" + simidPort + "/SimpleID/Ver", value:simidVer[1] +
-                  " under " + path);
+      tmp_version = simidVer[1] + " under " + path;
+      set_kb_item(name:"www/" + simidPort + "/SimpleID/Ver", value:tmp_version);
       security_note(data:"SimpleID version " + simidVer[1] +
                          " running at location " + path +
                          " was detected on the host", port:simidPort);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:kelvin_mo:simpleid:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_sinecms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_sinecms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_sinecms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800941";
+SCRIPT_DESC = "SineCMS Version Detection";
+
 sinePort = get_http_port(default:80);
 if(!sinePort){
   sinePort = 80;
@@ -68,10 +74,16 @@
     sineVer = eregmatch(pattern:"SineCms Version: ([0-9.]+)", string:rcvRes);
     if(sineVer[1]!= NULL)
     {
-      set_kb_item(name:"www/" + sinePort + "/SineCMS", value:sineVer[1] +
-                                                        " under " + dir);
+      tmp_version = sineVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + sinePort + "/SineCMS", value:tmp_version);
       security_note(data:"SineCMS version " + sineVer[1] + " running at location " 
                       + dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:sinecms:sinecms:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_siteengine_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_siteengine_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_siteengine_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801681";
+SCRIPT_DESC = "SiteEngine Version Detection";
+
 ## Get http port
 port = get_http_port(default:80);
 if(!port){
@@ -67,11 +73,17 @@
     if(ver[1])
     {
       ## Set SiteEngine Version in KB
-      set_kb_item(name:"www/" + port + "/SiteEngine", value:ver[1] +
-                  " under " + dir);
+      tmp_version = ver[1] +  " under " + dir;
+      set_kb_item(name:"www/" + port + "/SiteEngine", value:tmp_version);
       security_note(data:"SiteEngine version " + ver[1] +
                          " running at location " + dir +
                          " was detected on the host", port:port);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:boka:siteengine:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_skype_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_skype_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_skype_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 include("smb_nt.inc");
 include("version_func.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801301";
+SCRIPT_DESC = "Skype Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,6 +79,12 @@
       set_kb_item(name:"Skype/Win/Ver", value:skypeVer);
       security_note(data:"Skype version " + skypeVer + 
                                     " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:skypeVer, exp:"^([0-9.]+)", base:"");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_slysoft_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_slysoft_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_slysoft_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800391";
+SCRIPT_DESC = "SlySoft Product(s) Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -139,6 +156,10 @@
     security_note(data:"AnyDVD version " + anydvdVer +
                        " running at location " + anydvdPath +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:anydvdVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:slysoft:anydvd:");
+
   }
 }
 
@@ -154,6 +175,10 @@
     security_note(data:"CloneDVD version " + dvdVer +
                        " running at location " + clonedvdPath +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:dvdVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:slysoft:clonedvd:");
+
   }
 }
 else
@@ -167,6 +192,10 @@
     security_note(data:"CloneDVD version " + dvdVer +
                        " running at location " + clonedvdPath +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:dvdVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:slysoft:clonedvd:");
+
   }
 }
 
@@ -182,6 +211,10 @@
     security_note(data:"CloneCD version " + cdVer + 
                        " running at location " + clonecdPath +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:cdVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:slysoft:clonecd:");
+
   }
 }
 
@@ -197,5 +230,9 @@
     security_note(data:"Virtual CloneDrive version " + driveVer +
                        " running at location " + drivePath +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:driveVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:slysoft:virtualclonedrive:");
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_snipegallery_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_snipegallery_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_snipegallery_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801217";
+SCRIPT_DESC = "Snipe Gallery Version Detection";
+
 ## Get http port
 port = get_http_port(default:80);
 if(!port){
@@ -66,10 +72,16 @@
   if(ver[1])
   {
     ## Set Snipe Gallery Version in KB
-    set_kb_item(name:"www/" + port + "/snipegallery", value:ver[1] +
-                  " under " + dir);
+    tmp_version = ver[1] + " under " + dir;
+    set_kb_item(name:"www/" + port + "/snipegallery", value:tmp_version);
     security_note(data:"Snipe Gallery version " + ver[1] +
                        " running at location " + dir +
                        " was detected on the host", port:port);
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:snipegallery:snipe_gallery:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_snort_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_snort_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_snort_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801138";
+SCRIPT_DESC = "Snort Version Detection (Linux)";
+
 snortSock = ssh_login_or_reuse_connection();
 if(!snortSock){
   exit(0);
@@ -69,6 +75,12 @@
       set_kb_item(name:"Snort/Linux/Build", value:snortVer);
       security_note(data:"Snort version " + snortVer + " running at location " 
                       + binName + " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:snortVer, exp:"^([0-9.]+)", base:"cpe:/a:snort:snort:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_sonic_spot_audioactive_player_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_sonic_spot_audioactive_player_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_sonic_spot_audioactive_player_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,25 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800571";
+SCRIPT_DESC = "Sonic Spot Audioactive Player Version Detection";
+
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -65,6 +83,10 @@
     set_kb_item(name:"SonicSpot/Audoiactive/Player/Ver", value:audioactiveVer[0]);
     security_note(data:"Sonic Spot Audioactive Player version " + audioactiveVer[0] +
                     " was detected on the host");
+     
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:audioactiveVer[0], tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:sonicspot:audioactive_player:");
+    register_cpe(tmpVers:audioactiveVer[0], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:sonicspot:audioactive_player:");
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_south_river_webdrive_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_south_river_webdrive_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_south_river_webdrive_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800158";
+SCRIPT_DESC = "South River WebDrive Version Detection";
+
 ## Windows Confirmation
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -78,6 +84,12 @@
        set_kb_item(name:"SouthRiverWebDrive/Win/Ver", value:webDriveVer);
        security_note(data:"South River WebDrive version " + webDriveVer +
                          " was detected on the host");
+      
+       ## build cpe and store it as host_detail
+       cpe = build_cpe(value:webDriveVer, exp:"^([0-9.]+)", base:"cpe:/a:south_river_technologies:webdrive:");
+       if(!isnull(cpe))
+          register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_squidguard_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_squidguard_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_squidguard_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800964";
+SCRIPT_DESC = "SquidGuard Version Detection";
+
 sgSock = ssh_login_or_reuse_connection();
 if(!sgSock){
   exit(0);
@@ -71,6 +77,12 @@
     security_note(data:"squidGuard version " + sgVer + 
                        " running at location " + binFile +
                        " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:sgVer, exp:"^([0-9.]+)", base:"cpe:/a:squidguard:squidguard:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_stardict_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_stardict_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_stardict_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800643";
+SCRIPT_DESC = "StarDict Version Detection (Linux)";
+
 stardict_sock = ssh_login_or_reuse_connection();
 if(!stardict_sock){
   exit(0);
@@ -67,6 +73,12 @@
                        " running at location " + stardictbin +
                        " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:stardictVer[1], exp:"^([0-9.]+)", base:"cpe:/a:stardict:stardict:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_ston3d_prdts_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ston3d_prdts_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ston3d_prdts_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800575";
+SCRIPT_DESC = "StoneTrip Ston3D Standalone Player Version Detection (Lin)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -87,6 +93,12 @@
       set_kb_item(name:"Ston3D/Standalone/Player/Lin/Ver", value:sapVer[1]);
       security_note(data:"StoneTrip Ston3D Standalone Player version " + sapVer[1] + 
                     " running at location " + binaryName + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:sapVer[1], exp:"^([0-9.]+)", base:"cpe:/a:stonetrip:s3dplayer_standalone:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       break;
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_ston3d_prdts_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ston3d_prdts_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ston3d_prdts_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800573";
+SCRIPT_DESC = "StoneTrip Ston3d Products Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -63,6 +80,9 @@
   set_kb_item(name:"Ston3D/Standalone/Player/Win/Ver", value:sapVer);
   security_note(data:"Ston3D Standalone Engine version " + sapVer +
                          " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:sapVer,tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:stonetrip:s3dplayer_standalone:");
 }
 
 wpVer = registry_get_sz(key:key + "Ston3D Web Player", item:"DisplayVersion");
@@ -71,4 +91,7 @@
   set_kb_item(name:"Ston3D/Web/Player/Ver", value:wpVer);
   security_note(data:"Ston3D Web Player version " + wpVer +
                          " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:wpVer,tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:stonetrip:s3dplayer_web:");
 }

Modified: trunk/openvas-plugins/scripts/gb_strongswan_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_strongswan_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_strongswan_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,10 +45,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800631";
+SCRIPT_DESC = "StrongSwan Version Detection";
+
 swan_sock = ssh_login_or_reuse_connection();
 if(!swan_sock){
   exit(0);
@@ -67,6 +72,12 @@
     security_note(data:"StrongSwan version " + swanVer[1] + " running at location " 
                        + swanBin + " was detected on the host");
     ssh_close_connection();
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: swanVer[1], exp:"^([0-9.]+)",base:"cpe:/a:strongswan:strongswan:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_sun_java_sys_web_proxy_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_sun_java_sys_web_proxy_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_sun_java_sys_web_proxy_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800864";
+SCRIPT_DESC = "Sun Java System Web Proxy Server Version Detection";
+
 # Get the Default HTTP Port for Web Proxy Server
 sunPort = get_http_port(default:80);
 if(!sunPort){
@@ -75,7 +81,12 @@
     set_kb_item(name:"Sun/JavaWebProxyServ/Ver", value:wpsVer[1]);
     set_kb_item(name:"Sun/JavaWebProxyServ/Port", value:sunPort);
   
-  security_note(data:"Sun Java System Web Proxy Server version " + wpsVer[1] + 
+    security_note(data:"Sun Java System Web Proxy Server version " + wpsVer[1] + 
                                       " was detected on the host");
+     
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:wpsVer[1], exp:"^([0-9.]+)", base:"cpe:/a:sun:java_system_web_proxy_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
   } 
 }

Modified: trunk/openvas-plugins/scripts/gb_sun_java_sys_web_serv_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_sun_java_sys_web_serv_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_sun_java_sys_web_serv_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,13 @@
 
 include("http_func.inc");
 include("openvas-https.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800810";
+SCRIPT_DESC = "Sun Java System Web Server Version Detection";
+
 foreach jswsPort (make_list(80, 8800, 8989, 8888))
 {
   if(get_port_state(jswsPort))
@@ -90,6 +96,12 @@
         set_kb_item(name:"Sun/JavaSysWebServ/Port", value:jswsPort);
         security_note(data:"Sun Java System Web Server version " + jswsVer[2] +
                                       " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:jswsVer[2], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:sun:java_system_web_server:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         exit(0);
       }
     }

Modified: trunk/openvas-plugins/scripts/gb_sun_java_system_portal_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_sun_java_system_portal_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_sun_java_system_portal_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801247";
+SCRIPT_DESC = "Sun Java System Portal Server Version Detection";
+
 ## Get Http Port
 port = get_http_port(default:8080);
 if(!port){
@@ -70,5 +76,11 @@
     set_kb_item(name:"www/" + port + "/Sun/Java/Portal/Server", value:ver[1]);
     security_note(data:"Sun Java System Portal Server version " + ver[1] +
                        " was detected on the host", port:port);
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ver[1], exp:"^([0-9.]+)", base:"cpe:/a:sun:java_system_portal_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_sun_java_web_console_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_sun_java_web_console_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_sun_java_web_console_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("openvas-https.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800825";
+SCRIPT_DESC = "Sun Java Web Console Version Detection";
+
 # Default HTTPS port
 jwcPort = 6789;
 if(!get_port_state(jwcPort)){
@@ -87,6 +93,11 @@
       set_kb_item(name:"Sun/JavaWebConsole/Ver", value:jwcVer[1]);
       security_note(data:"Sun Java Web Console version " + jwcVer[1] +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:jwcVer[1], exp:"^([0-9.]+)", base:"cpe:/a:sun:java_web_console:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_swftools_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_swftools_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_swftools_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801438";
+SCRIPT_DESC = "SWFTools Version Detection";
+
 ## Checking OS
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -75,6 +81,12 @@
     set_kb_item(name:"SWFTools/Ver", value:swfVer[1]);
     security_note(data:"SWFTools version " + swfVer[1] + " running at location "
                           + binaryName + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:swfVer[1], exp:"^([0-9.]+)", base:"cpe:/a:swftools:swftools:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_symphony_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_symphony_cms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_symphony_cms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801219";
+SCRIPT_DESC = "Symphony CMS Version Detection";
+
 ## Get http Port
 port = get_http_port(default:80);
 if(!port){
@@ -75,9 +81,16 @@
       if(ver[1])
       {
         ## Set Symphony CMS version in KB
-        set_kb_item(name:"www/" + port + "/symphony", value:ver[1] + " under " + dir);
+        tmp_version = ver[1] + " under " + dir;
+        set_kb_item(name:"www/" + port + "/symphony", value:tmp_version);
         security_note(data:"Symphony CMS version " + ver[1] +" running at location "
                            + dir + " was detected on the host", port:port);
+      
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:symphony-cms:symphony_cms:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_tcexam_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_tcexam_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_tcexam_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800792";
+SCRIPT_DESC = "TCExam Version Detection";
+
 tcPort = get_http_port(default:80);
 if(!tcPort){
   exit(0);
@@ -65,11 +71,17 @@
     if(tcVer[1] != NULL)
     {
       ## Set the KB value
-      set_kb_item(port:tcPort, name:"www/" + tcPort + "/TCExam", value:tcVer[1]
-                                                 + " under " + path);
+      tmp_version = tcVer[1] + " under " + path;
+      set_kb_item(port:tcPort, name:"www/" + tcPort + "/TCExam", value:tmp_version);
       security_note(data:"TCExam version " + tcVer[1] +
                          " running at location " + path +
                          " was detected on the host", port:tcPort);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:tecnick:tcexam:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_tdiary_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_tdiary_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_tdiary_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800991";
+SCRIPT_DESC = "tDiary Version Detection";
+
 ## Get HTTP Ports
 diaryPort = get_http_port(default:80);
 if(!diaryPort){
@@ -73,10 +79,17 @@
     diaryVer = eregmatch(pattern:"tDiary.* version ([0-9.]+)<", string:rcvRes);
     if(diaryVer[1] != NULL)
     {
+      tmp_version = diaryVer[1] + " under " + path;
       set_kb_item(name:"www/" + diaryPort + "/tdiary",
-                  value:diaryVer[1] + " under " + path);
+                  value:tmp_version);
       security_note(data:"tDiary version " + diaryVer[1] + " running at location " 
                          + path + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:tdiary:tdiary:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_telepark_wiki_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_telepark_wiki_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_telepark_wiki_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801067";
+SCRIPT_DESC = "Telepark.wiki Version Detection";
+
 telwikiPort = get_http_port(default:80);
 if(!telwikiPort){
   exit(0);
@@ -63,10 +69,17 @@
     telwikiVer = eregmatch(pattern:">[vV]([0-9.]+)", string:rcvRes);
     if(telwikiVer[1] != NULL)
     {
+      tmp_version = telwikiVer[1] + " under " + path;
       set_kb_item(name:"www/" + telwikiPort + "/Telepark.wiki",
-                        value:telwikiVer[1] + " under " + path);
+                        value:tmp_version);
       security_note(data:"Telepark wiki version " + telwikiVer[1] + 
                      " running at location " + path + " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:telepark:telepark.wiki:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_tematres_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_tematres_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_tematres_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800802";
+SCRIPT_DESC = "TemaTres Version Detection";
+
 tematresPort = get_http_port(default:80);
 if(!tematresPort){
   tematresPort = 80;
@@ -75,10 +81,16 @@
     tematresVer = eregmatch(pattern:"TemaTres ([0-9.]+)", string:rcvRes);
     if(tematresVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + tematresPort + "/TemaTres", value:tematresVer[1] +
-                       " under " + dir);
+      tmp_version = tematresVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + tematresPort + "/TemaTres", value:tmp_version);
       security_note(data:"TemaTres version " + tematresVer[1] + 
                     " running at location " + dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:r020:tematres:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_thunderbird_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_thunderbird_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_thunderbird_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800018";
+SCRIPT_DESC = "Mozilla Thunderbird Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +73,12 @@
     security_note(data:"Mozilla Thunderbird version " + birdVer[0] + 
                   " running at location " + binary_birdName + " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:birdVer[0], exp:"^([0-9.]+)", base:"cpe:/a:mozilla:thunderbird:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_thunderbird_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_thunderbird_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_thunderbird_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -54,7 +54,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID = "1.3.6.1.4.1.25623.1.0.800015";
+SCRIPT_DESC = "Mozilla Thunderbird Version Detection (Windows)";
+
+
+## functions for script
+function register_cpe(tmpVers){
+   local_var cpe;
+
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:"^([0-9.]+)", base:"cpe:/a:mozilla:thunderbird:");
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
 if(!get_kb_item("SMB/WindowsVersion")){ # Confirm it is Windows
   exit(0);
 }
@@ -70,6 +87,7 @@
     set_kb_item(name:"Thunderbird/Win/Ver",value:birdVer[0]);
     security_note(data:"Mozilla Thunderbird version " + birdVer[0] +
                          " was detected on the host");
+    register_cpe(tmpVers:birdVer[0]);
   }
   exit(0);
 }
@@ -128,6 +146,7 @@
   close(soc);
   if(fileVer){
     set_kb_item(name:"Thunderbird/Win/Ver",value:fileVer);
+    register_cpe(tmpVers:fileVer);
   }
 }
 else
@@ -138,6 +157,7 @@
   {
     birdVer = eregmatch(pattern:"[0-9.]+", string:birdVer);
     set_kb_item(name:"Thunderbird/Win/Ver",value:birdVer[0]);
+    register_cpe(tmpVers:birdVer[0]);
     security_note(data:"Mozilla Thunderbird version " + birdVer[0] +
                          " was detected on the host");
   }

Modified: trunk/openvas-plugins/scripts/gb_titan_ftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_titan_ftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_titan_ftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("ftp_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800236";
+SCRIPT_DESC = "Titan FTP Server Version Detection";
+
 ftpPort = get_kb_item("Services/ftp");
 if(!ftpPort){
   ftpPort = 21;
@@ -69,4 +75,10 @@
   set_kb_item(name:"TitanFTP/Server/Ver", value:titanVer[1]);
   security_note(data:"Titan FTP Server version " + titanVer[1] +
                          " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:titanVer[1], exp:"^([0-9.]+)", base:"cpe:/a:southrivertech:titan_ftp_server:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_tor_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_tor_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_tor_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -54,10 +54,26 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800351";
+SCRIPT_DESC = "Tor Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,6 +88,10 @@
     set_kb_item(name:"Tor/Win/Ver", value:torVer[1]);
     security_note(data:"Tor version " + torVer[1] +
                          " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:torVer[1], tmpExpr:"^([0-9.]+)-?([a-z0-9]+)?", tmpBase:"cpe:/a:tor:tor:");
+
   }
   else
   {
@@ -89,6 +109,10 @@
         set_kb_item(name:"Tor/Win/Ver", value:torVer);
         security_note(data:"Tor version " + torVer +
                          " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers: torVer, tmpExpr:"^([0-9.]+)-?([a-z0-9]+)?", tmpBase:"cpe:/a:tor:tor:");
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_torrent_trader_classic_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_torrent_trader_classic_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_torrent_trader_classic_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,9 +46,29 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800525";
+SCRIPT_DESC = "TorrentTrader Classic Version Detection";
+
+TORRENT_LIST = make_list("^([0-9.]+)","cpe:/a:torrenttrader:torrenttrader_classic:",
+                         "^([0-9.]+\.[0-9])\.?([a-z0-9]+)?","cpe:/a:torrenttrader:torrenttrader_classic:");
+TORRENT_MAX = max_index(TORRENT_LIST);
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 ttcPort = get_http_port(default:80);
 if(!ttcPort){
   ttcPort = 80;
@@ -70,10 +90,18 @@
       }
       else
         ttcVer = ttcVer[2];
+
+      tmp_version = ttcVer + " under " + dir;
       set_kb_item(name:"www/"+ ttcPort + "/TorrentTraderClassic",
-                    value:ttcVer + " under " + dir);
+                    value:tmp_version);
       security_note(data:"TorrentTrader Classic version " + ttcVer + 
                      " running at location " + dir + " was detected on the host");
+     
+      ## build cpe and store it as host_detail  
+      for (i = 0; i < TORRENT_MAX-1; i = i + 2) {
+
+          register_cpe(tmpVers:tmp_version, tmpExpr:TORRENT_LIST[i], tmpBase:TORRENT_LIST[i+1]);
+      }
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_trendmicro_internet_security_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_trendmicro_internet_security_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_trendmicro_internet_security_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801263";
+SCRIPT_DESC = "Trend Micro Internet Security Version Detection";
+
 ## Check for Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -74,6 +80,12 @@
     {
       set_kb_item(name:"TrendMicro/Ver", value:ver);
       security_note(data:name + " version " + ver + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:trendmicro:internet_security:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_trillian_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_trillian_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_trillian_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800264";
+SCRIPT_DESC = "Trillian Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,4 +79,10 @@
   security_note(data:"Trillian version " + triVer +
                      " running at location " + exePath +
                      " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:triVer, exp:"^([0-9.]+)", base:"cpe:/a:ceruleanstudios:trillian:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_twiki_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_twiki_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_twiki_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800399";
+SCRIPT_DESC = "TWiki Version Detection";
+
 twikiPort = get_http_port(default:80);
 if(!twikiPort){
   twikiPort = 80;
@@ -69,10 +75,16 @@
     twikiVer = eregmatch(pattern:"TWiki-([0-9.]+),", string:rcvRes);
     if(twikiVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + twikiPort + "/TWiki", value:twikiVer[1] +
-                       " under " + dir);
+      tmp_version = twikiVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + twikiPort + "/TWiki", value:tmp_version);
       security_note(data:"TWiki version " + twikiVer[1] + " running at location " 
                         + dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:twiki:twiki:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_typsoft_ftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_typsoft_ftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_typsoft_ftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("ftp_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801057";
+SCRIPT_DESC = "TYPSoft FTP Server Version Detection";
+
 port = get_kb_item("Services/ftp");
 if(!port){
   port = 21;
@@ -67,5 +73,11 @@
     set_kb_item(name:"TYPSoft/FTP/Ver", value:tsVer[1]);
     security_note(data:"TYPSoft FTP Server version " + tsVer[1] +
                          " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tsVer[1], exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:typsoft:typsoft_ftp_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_ultraiso_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_ultraiso_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_ultraiso_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800274";
+SCRIPT_DESC = "UltraISO Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -124,6 +130,12 @@
     {
       set_kb_item(name:"UltraISO/Ver", value:v);
       security_note(data:"UltraISO version " + v + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:v, exp:"^([0-9.]+)", base:"cpe:/a:ezbsystems:ultraiso:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_uniform_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_uniform_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_uniform_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800786";
+SCRIPT_DESC = "Uniform Server Version Detection";
+
 uniPort = get_http_port(default:80);
 if(!uniPort){
   exit(0);
@@ -66,5 +72,11 @@
     set_kb_item(port:uniPort, name:"www/" + uniPort + "/Uniform-Server", value:uniVer[1]);
     security_note(data:"Uniform Server version " + uniVer[1] +
                                        " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:uniVer[1], exp:"^([0-9.]+)", base:"cpe:/a:uniformserver:uniformserver:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_v-webmail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_v-webmail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_v-webmail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800821";
+SCRIPT_DESC = "V-webmail Version Detection";
+
 vwmailPort = get_http_port(default:80);
 if(!vwmailPort){
   vwmailPort = 80;
@@ -71,10 +77,17 @@
                           string:rcvRes);
     if(vwmailVer[1] != NULL)
     {
+      tmp_version = vwmailVer[1] + " under " + dir;
       set_kb_item(name:"www/" + vwmailPort + "/V-webmail",
-                  value:vwmailVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"V-webmail version " + vwmailVer[1] + " running at location " 
                            + dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:christof_bruyland:v-webmail:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_varnish_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_varnish_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_varnish_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800446";
+SCRIPT_DESC = "Varnish Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,5 +71,11 @@
     set_kb_item(name:"Varnish/Ver", value:varVer);
     security_note(data:"Varnish version " + varVer + " running at location " 
                      + varFile + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:varVer, exp:"^([0-9.]+)", base:"cpe:/a:varnish.projects.linpro:varnish:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_visualization_library_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_visualization_library_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_visualization_library_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800999";
+SCRIPT_DESC = "Visualization Library Version Detection (Windows)";
+
 ## Check for Windows OS
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -98,6 +104,12 @@
         set_kb_item(name:"VisualizationLibrary/Win/Ver", value:vlVer);
         security_note(data:"Visualization Library version " + vlVer +
                          " was detected on the host");
+      
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:vlVer, exp:"^([0-9.]+)", base:"cpe:/a:visualizationlibrary:visualization_library:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         exit(0);
        }
      }

Modified: trunk/openvas-plugins/scripts/gb_vmware_ovm_tools_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_vmware_ovm_tools_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_vmware_ovm_tools_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800209";
+SCRIPT_DESC = "Microsoft Internet Explorer Version Detection (Win)";
+
 ## Checking OS
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -82,6 +88,12 @@
     set_kb_item(name:"VMware/OVM/Tools/Ver", value:version);
     security_note(data:"VMware Open Virtual Machine Tools  version " + version +
                   " running at location " + bin + " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:vmware:open-vm-tools:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/gb_vmware_prdts_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_vmware_prdts_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_vmware_prdts_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800001";
+SCRIPT_DESC = "VMware products version detection (Linux)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -64,6 +81,10 @@
 
   if(!isnull(gsxVer)){
      set_kb_item(name:"VMware/GSX-Server/Linux/Ver", value:gsxVer);
+
+     ## build cpe and store it as host_detail
+     register_cpe(tmpVers:gsxVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:vmware:gsx_server:");
+
   }
 
   gsxBuild = ereg_replace(string:version, replace:"\1",
@@ -86,6 +107,10 @@
                            pattern:".*VMware Workstation ([0-9].*) build.*");
   if(!isnull(wrkstnVer)){
     set_kb_item(name:"VMware/Workstation/Linux/Ver", value:wrkstnVer);
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:wrkstnVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:vmware:workstation:");
+
   }
 
   wrkstnBuild = ereg_replace(string:version, replace:"\1",
@@ -108,6 +133,10 @@
                         pattern:".*VMware Server ([0-9].*) build.*");
   if(!isnull(svrVer)){
     set_kb_item(name:"VMware/Server/Linux/Ver", value:svrVer);
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:svrVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:vmware:server:");
+
   }
 
   svrBuild = ereg_replace(string:version, replace:"\1",
@@ -154,6 +183,10 @@
       set_kb_item(name:"VMware/Linux/Installed", value:TRUE);
       security_note(data:"VMware Player version " + vmpVer[1]+
                                              " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:vmpVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:vmware:player:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_vmware_prdts_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_vmware_prdts_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_vmware_prdts_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,32 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800000";
+SCRIPT_DESC = "VMWare products version detection (Windows)";
+
+VMWARE_LIST = make_list("^([0-9.]+([a-z0-9]+)?)", "cpe:/a:vmware:ace:",
+                        "^([0-9.]+)", "cpe:/a:vmware:player:",        # Player
+                        "^([0-9.]+)", "cpe:/a:vmware:server:",        # Server
+                        "^([0-9.]+)", "cpe:/a:vmware:workstation:",   # Workstation
+                        "^([0-9.]+)", "cpe:/a:vmware:ace:",           # ACE
+                        "^([0-9.]+)", "cpe:/a:vmware:ace:");          # ACE\Dormant
+VMWARE_MAX = max_index(VMWARE_LIST);
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){ #Ensure it is Windows
   exit(0);
 }
@@ -183,6 +208,13 @@
   set_kb_item(name:"VMware/" + product + "/Win/Ver", value:vmwareVer);
   security_note(data:"VMware version " + vmwareVer +
                                             " was detected on the host");
+
+  ## build cpe and store it as host_detail  
+  for (i = 0; i < VMWARE_MAX-1; i = i + 2) {
+
+     register_cpe(tmpVers:vmwareVer, tmpExpr:VMWARE_LIST[i], tmpBase:VMWARE_LIST[i+1]);
+  }
+
   if(vmwareBuild){
     set_kb_item(name:"VMware/" + product + "/Win/Build", value:vmwareBuild);
   }

Modified: trunk/openvas-plugins/scripts/gb_wampserver_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_wampserver_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_wampserver_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800297";
+SCRIPT_DESC = "WampServer Version Detection";
+
 wampPort = get_http_port(default:80);
 if(!wampPort){
   wampPort = 80;
@@ -65,6 +71,12 @@
       set_kb_item(name:"www/" + wampPort + "/WampServer",value:wampVer[1]);
       security_note(data:"WampServer version " + wampVer[1] +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:wampVer[1], exp:"^([0-9.]+)", base:"cpe:/a:wampserver:wampserver:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_webcamxp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_webcamxp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_webcamxp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,11 +46,16 @@
   exit(0);
 }
 
-
 include("http_func.inc");
 include("version_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800221";
+SCRIPT_DESC = "webcamXP Version Detection";
+
 foreach port (make_list("80", "8080"))
 {
   if(get_port_state(port))
@@ -69,6 +74,12 @@
         set_kb_item(name:"WebcamXP/Version", value:webcamVer[1]);
         security_note(data:"WebcamXP/Version version " + webcamVer[1] +
                                                  " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:webcamVer[1], exp:"^([0-9.]+)", base:"cpe:/a:webcamxp:webcamxp:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
       exit(0);
     }

Modified: trunk/openvas-plugins/scripts/gb_weborf_webserver_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_weborf_webserver_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_weborf_webserver_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801223";
+SCRIPT_DESC = "Weborf Webserver Version Detection";
+
 ## Get Http Port
 port = get_http_port(default:8080);
 if(!port){
@@ -80,5 +86,11 @@
     set_kb_item(name:"www/" + port + "/Weborf", value:ver[1]);
     security_note(data:"Weborf  Webserver version " + ver[1] +
                        " was detected on the host", port:port);
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ver[1], exp:"^([0-9.]+)", base:"cpe:/a:galileo_students:team_weborf:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_winftp_serv_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_winftp_serv_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_winftp_serv_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,11 +48,16 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("ftp_func.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800345";
+SCRIPT_DESC = "WinFTP Server Version Detection";
+
 ftpPort = get_kb_item("Services/ftp");
 if(!ftpPort){
   ftpPort = 21;
@@ -85,4 +90,10 @@
   set_kb_item(name:"WinFTP/Server/Ver", value:winFtpVer);
   security_note(data:"WinFTP Server version " + winFtpVer +
             " running at location " + exePath +  " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: winFtpVer, exp:"^([0-9.]+)",base:"cpe:/a:wftpserver:winftp_ftp_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_wireshark_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_wireshark_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_wireshark_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800039";
+SCRIPT_DESC = "Wireshark Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +70,12 @@
     security_note(data:"Wireshark version " + sharkVer[1] + 
         " running at location " + binaryName + " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:sharkVer[1], exp:"^([0-9.]+)", base:"cpe:/a:wireshark:wireshark:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_wireshark_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_wireshark_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_wireshark_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,9 +47,14 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800038";
+SCRIPT_DESC = "Wireshark Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -60,4 +65,10 @@
   set_kb_item(name:"Wireshark/Win/Ver", value:wiresharkVer);
   security_note(data:"Wireshark version " + wiresharkVer +
                                                  " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:wiresharkVer, exp:"^([0-9.]+)", base:"cpe:/a:wireshark:wireshark:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/gb_xemacs_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_xemacs_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_xemacs_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,10 +48,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800925";
+SCRIPT_DESC = "XEmacs Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,6 +78,12 @@
     if(xemacsVer[1] != NULL){
       set_kb_item(name:"XEmacs/Win/Ver", value:xemacsVer[1]);
       security_note(data:"XEmacs version " + xemacsVer[1] + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:xemacsVer[1], exp:"^([0-9.]+)", base:"cpe:/a:xemacs:xemacs:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_xerver_http_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_xerver_http_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_xerver_http_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801017";
+SCRIPT_DESC = "Xerver Version Detection";
+
 foreach port(make_list(32123, 80))
 {
   if(get_port_state(port))
@@ -60,6 +66,12 @@
       if(xerVer[1] != NULL){
         set_kb_item(name:"www/" + port + "/Xerver", value:xerVer[1]);
         security_note(data:"Xerver version " + xerVer[1] + " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:xerVer[1], exp:"^([0-9.]+)", base:"cpe:/a:xerver:xerver:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_xm_easy_personal_ftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_xm_easy_personal_ftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_xm_easy_personal_ftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("ftp_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801119";
+SCRIPT_DESC = "XM Easy Personal FTP Server Version Detection";
+
 xmPort = get_kb_item("Services/ftp");
 if(!xmPort){
   xmPort = 21;
@@ -68,5 +74,11 @@
     set_kb_item(name:"XM-Easy-Personal-FTP/Ver", value:xmVer[1]);
     security_note(data:"XM Easy Personal FTP Server Version " + xmVer[1] +
                                                   " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:xmVer[1], exp:"^([0-9.]+)", base:"cpe:/a:dxmsoft:xm_easy_personal_ftp_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_xoops_celepar_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_xoops_celepar_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_xoops_celepar_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801152";
+SCRIPT_DESC = "Xoops Celepar Version Detection";
+
 ## Get HTTP port
 xoopsPort = get_http_port(default:80);
 if(!xoopsPort){
@@ -69,10 +75,17 @@
     ## Set the kb item
     if(celeparVer[1] != NULL)
     {
+      tmp_version = celeparVer[1] + " under " + dir;
       set_kb_item(name:"www/" + xoopsPort + "/XoopsCelepar",
-                  value:celeparVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"Xoops Celepar version " + celeparVer[1] +
                  " running at location " + dir +  " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:alexandre_amaral:xoops_celepar:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/gb_xvid_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_xvid_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_xvid_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800579";
+SCRIPT_DESC = "Xvid Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -70,6 +75,12 @@
     if(xvidVer[1] != NULL){
       set_kb_item(name:"Xvid/Win/Ver", value:xvidVer[1]);
       security_note(data:"Xvid version " + xvidVer[1] + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:xvidVer[1], exp:"^([0-9.]+)", base:"cpe:/a:xvid:xvid:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/gb_xwiki_enterprise_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_xwiki_enterprise_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_xwiki_enterprise_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801840";
+SCRIPT_DESC = "XWiki Enterprise Version Detection";
+
 ## Get http port
 port = get_http_port(default:8080);
 if(!port){
@@ -70,5 +76,11 @@
     security_note(data:"XWiki Enterprise Version " + ver[1] +
                        " running at location "  + dir +
                        " was detected on the host", port:port);
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ver[1], exp:"^([0-9.]+)", base:"cpe:/a:xwiki:xwiki:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_yabsoft_aihs_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_yabsoft_aihs_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_yabsoft_aihs_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801091";
+SCRIPT_DESC = "YABSoft Advanced Image Hosting Script (AIHS) Version Detection";
+
 aihsPort = get_http_port(default:80);
 if(!aihsPort){
   exit(0);
@@ -63,11 +69,19 @@
   {
     aihsVer = eregmatch(pattern:"AIH v([0-9.]+)" , string:rcvRes);
     if(aihsVer[1] != NULL){
+
+      tmp_version = aihsVer[1] + " under " + path;
       set_kb_item(name:"www/" + aihsPort + "/YABSoft/AIHS",
-                  value:aihsVer[1] + " under " + path);
+                  value:tmp_version);
       security_note(data:"YABSoft Advanced Image Hosting Script (AIHS) Version "
                                  + aihsVer[1] + " running at location " + path +
                                                    " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:yabsoft:advanced_image_hosting_script:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_yahoo_msg_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_yahoo_msg_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_yahoo_msg_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801149";
+SCRIPT_DESC = "Yahoo! Messenger Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,5 +81,11 @@
     set_kb_item(name:"YahooMessenger/Ver", value:ymsgVer);
     security_note(data:"Yahoo! Messenger Version " + ymsgVer +
              " running at location " + ymsgPath + " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ymsgVer, exp:"^([0-9.]+)", base:"cpe:/a:yahoo:messenger:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_zenoss_serv_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_zenoss_serv_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_zenoss_serv_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800988";
+SCRIPT_DESC = "Zenoss Server Version Detection";
+
 ## Get Http Ports
 httpPort = get_http_port(default:8080);
 if(!httpPort){
@@ -73,6 +79,12 @@
   {
     set_kb_item(name:"www/" + httpPort + "/Zenoss", value:zenVer[1]);
     security_note(data:"Zenoss Server version " + zenVer[1] + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:zenVer[1], exp:"^([0-9.]+)", base:"cpe:/a:zenoss:zenoss:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/gb_zeuscart_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gb_zeuscart_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gb_zeuscart_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.801250";
+SCRIPT_DESC = "ZeusCart Version Detection";
+
 ## Get HTTP Port
 zcPort = get_http_port(default:80);
 if(!zcPort){
@@ -65,9 +71,15 @@
   if(zcVer[1])
   {
     ## Set ZeusCart Version in KB
-    set_kb_item(name:"www/" + zcPort + "/ZeusCart",value:zcVer[1] +
-                     " under " + dir);
+    tmp_version = zcVer[1] + " under " + dir;
+    set_kb_item(name:"www/" + zcPort + "/ZeusCart",value:tmp_version);
     security_note(data:"ZeusCart version " + zcVer[1] + " running at location "
                      + dir + " was detected on the host", port:zcPort);
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:zeuscart:zeuscart:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/gravity_board_x_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/gravity_board_x_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/gravity_board_x_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,10 +55,16 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100100";
+SCRIPT_DESC = "Gravity Board X Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -90,8 +96,14 @@
        vers=chomp(version[1]);
     } 
     
-    set_kb_item(name: string("www/", port, "/GravityX"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/GravityX"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?",base:"cpe:/a:gravityboardx:gravity_board_x:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC); 
+
     info = string("None\n\nGravity Board X Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");
@@ -107,7 +119,7 @@
          security_note(port:port,data:desc);
        }
        exit(0);
-  
+
  }
 }
 exit(0);

Modified: trunk/openvas-plugins/scripts/horde_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/horde_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/horde_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,10 +57,16 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("global_settings.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.15604";
+SCRIPT_DESC = "Horde Detection";
+
 host = get_host_name();
 port = get_http_port(default:80);
 
@@ -134,13 +140,19 @@
         if (debug_level) display("debug: Horde version =>>", ver, "<<\n");
 
         # Success!
+        tmp_version = string(ver, " under ", dir);
         set_kb_item(
           name:string("www/", port, "/horde"), 
-          value:string(ver, " under ", dir)
-        );
+          value:tmp_version);
+
         installations[dir] = ver;
         ++installs;
 
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value: tmp_version, exp:"^([0-9.]+)",base:"cpe:/a:horde:horde_groupware:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         # nb: only worried about the first match.
         break;
       }

Modified: trunk/openvas-plugins/scripts/hp_data_protector_installed.nasl
===================================================================
--- trunk/openvas-plugins/scripts/hp_data_protector_installed.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/hp_data_protector_installed.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -63,7 +63,13 @@
 }
 
 include ("misc_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.19601";
+SCRIPT_DESC = "HP Data Protector Detection";
+
 # The code ...
 
 port = 5555;
@@ -110,5 +116,11 @@
     security_note(port:port, data:desc);
     set_kb_item (name:"Services/data_protector/version", value:versions[1]);
     set_kb_item (name:"Services/data_protector/build", value:builds[1]);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:versions[1], exp:"^([0-9]\.[0-9]+)", base:"cpe:/a:hp:openview_storage_data_protector:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/http_version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/http_version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/http_version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,8 +57,24 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 
+## Costant values 
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.10107";
+SCRIPT_DESC = "HTTP Server type and version";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
 #
 # The script code starts here
 #
@@ -245,9 +261,14 @@
      if(egrep(pattern:"^Server:.*StWeb.*", string:svrline))
         set_kb_item(name:"www/apache", value:TRUE);
    
-     if(egrep(pattern:"^Server:.*Oracle HTTP Server.*", string:svrline))
+     if(egrep(pattern:"^Server:.*Oracle HTTP Server.*", string:svrline)){
 	set_kb_item(name:"www/OracleApache", value:TRUE);
 
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers: TRUE, tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:oracle:http_server:");
+
+     }
+
      if(egrep(pattern:"^Server:.*Oracle HTTP Server.*", string:svrline))
         set_kb_item(name:"www/apache", value:TRUE);
 
@@ -374,9 +395,14 @@
      if(egrep(pattern:"^Server:.*WebServer 4 Everyone.*", string:svrline))
         set_kb_item(name:"www/webserver4everyone", value:TRUE);
 
-     if(egrep(pattern:"^Server:.*KeyFocus Web Server.*", string:svrline))
+     if(egrep(pattern:"^Server:.*KeyFocus Web Server.*", string:svrline)){
         set_kb_item(name:"www/KFWebServer", value:TRUE);
 
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers: TRUE, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:key_focus:kf_web_server:");
+
+     }
+
      if(egrep(pattern:"^Server:.*Jetty.*", string:svrline))
         set_kb_item(name:"www/jetty", value:TRUE);
 	

Modified: trunk/openvas-plugins/scripts/idb_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/idb_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/idb_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100109";
+SCRIPT_DESC = "iDB Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -95,7 +101,13 @@
        }	 
     }  
     
-    set_kb_item(name: string("www/", port, "/iDB"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/iDB"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:idb:idb:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\niDB Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/invision_power_board_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/invision_power_board_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/invision_power_board_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -64,7 +64,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100107";
+SCRIPT_DESC = "IP.Board Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port)){
@@ -111,8 +117,14 @@
         vers=version[1];
       }
 
+      tmp_version = string(vers," under ",install);
       set_kb_item(name:string("www/", port, "/invision_power_board"),
-                  value:string(vers," under ",install));
+                  value:tmp_version);
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:invision_power_services:invision_power_board:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
       info = string("None\n\nIP.Board Version '");
       info += string(vers);

Modified: trunk/openvas-plugins/scripts/jd_web_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/jd_web_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/jd_web_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_keepalive.inc");
 include("misc_func.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100301";
+SCRIPT_DESC = "JDownloader Web Detection";
+
 port = get_http_port(default:8765);
 if(!get_port_state(port))exit(0);
 
@@ -110,6 +116,11 @@
       }   
 
       set_kb_item(name: string("www/", port, "/jdwebinterface"), value: string(vers));
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:string(vers), exp:"^([0-9.]+)", base:"");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
       info  = string("None\n\nJDownloader Webinterface Version '");
       info += string(vers);

Modified: trunk/openvas-plugins/scripts/joomla_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/joomla_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/joomla_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100330";
+SCRIPT_DESC = "Joomla! Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -198,7 +204,14 @@
             }
         }
 
-            set_kb_item(name: string("www/", port, "/joomla"), value: string(vers," under ",install));
+            tmp_version = string(vers," under ",install);
+            set_kb_item(name: string("www/", port, "/joomla"), value: tmp_version);
+  
+            ## build cpe and store it as host_detail
+            cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:joomla:joomla");
+            if(!isnull(cpe))
+               register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
             info = string("None\n\nJoomla Version (");
             info += string(vers);
             info += string(") with lang(");

Modified: trunk/openvas-plugins/scripts/kerio_wrf_management_detection.nasl
===================================================================
--- trunk/openvas-plugins/scripts/kerio_wrf_management_detection.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/kerio_wrf_management_detection.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -73,10 +73,16 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.20225";
+SCRIPT_DESC = "Kerio WinRoute Firewall HTTP/HTTPS Management Detection";
+
 port = get_http_port(default:4080);
 if (!get_port_state(port)) get_http_port(default:4081);
 if (!get_port_state(port)) exit(0);
@@ -102,7 +108,15 @@
   }
   else report = desc;
 
-  if ( version != NULL ) set_kb_item(name:"Services/www/" + port + "/kerio_wrf", value:version);
+  if ( version != NULL ){
+    set_kb_item(name:"Services/www/" + port + "/kerio_wrf", value:version);
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: version, exp:"^([0-9.]+)",base:"cpe:/a:kerio:winroute_firewall:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+  }
   security_note(port: port, data: report);
+
   exit(0);
 }

Modified: trunk/openvas-plugins/scripts/landesk_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/landesk_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/landesk_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 include("http_keepalive.inc");
 include("global_settings.inc");
 include("misc_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100328";
+SCRIPT_DESC = "Landesk Detection";
+
 port  = 9595;
 port1 = 9593;
 
@@ -69,6 +75,12 @@
  if(egrep(pattern: "LANDesk.*Management Agent", string: buf, icase: TRUE))
  {
     set_kb_item(name: string("www/", port, "/landesk"), value: TRUE);
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:TRUE, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:landesk:landesk_management_suite:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     register_service(port:port,  ipproto:"tcp", proto:"landesk");
     register_service(port:port1, ipproto:"tcp", proto:"landesk");
 

Modified: trunk/openvas-plugins/scripts/linpha_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/linpha_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/linpha_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100119";
+SCRIPT_DESC = "LinPHA Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -90,7 +96,13 @@
        vers=chomp(version[1]);
     } 
     
-    set_kb_item(name: string("www/", port, "/linpha"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/linpha"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:linpha:linpha:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nLinPHA Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/mambo_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/mambo_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/mambo_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100036";
+SCRIPT_DESC = "mambo Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -178,7 +184,14 @@
 
 	}	
 
- 	set_kb_item(name: string("www/", port, "/mambo_mos"), value: string(vers," under ",install));
+        tmp_version = string(vers," under ",install);
+ 	set_kb_item(name: string("www/", port, "/mambo_mos"), value: tmp_version);
+
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:mambo-foundation:mambo:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         info = string("None\n\nmambo Version (");
         info += string(vers);
         info += string(") was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/mantis_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/mantis_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/mantis_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -60,7 +60,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100061";
+SCRIPT_DESC = "Mantis Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -100,7 +106,13 @@
 	}  
       }
       
+    tmp_version = string(vers," under ",install);
     set_kb_item(name: string("www/", port, "/mantis"), value: string(vers," under ",install));
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:mantis:mantis:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nMantis Version (");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/mldonkey_www.nasl
===================================================================
--- trunk/openvas-plugins/scripts/mldonkey_www.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/mldonkey_www.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -61,10 +61,27 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("misc_func.inc");
 include("http_keepalive.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.11125";
+SCRIPT_DESC = "MLDonkey web interface detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 ports = add_port_in_list(list:get_kb_list("Services/www"), port:4080);
 
 foreach port (ports)
@@ -103,11 +120,20 @@
         replace:info
     );
 
-   set_kb_item(name: string("www/", port, "/MLDonkey/version"), value: string(vers));
+   tmp_version = string(vers);
+   set_kb_item(name: string("www/", port, "/MLDonkey/version"), value: tmp_version);
+
+   ## build cpe and store it as host_detail
+   register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+-?([a-z0-9]+)?)", tmpBase:"cpe:/a:mldonkey:mldonkey:");
+   
    set_kb_item(name: string("MLDonkey/www/port/"), value: port);
 
    if(ml_www_remote) {
      set_kb_item(name: string("www/", port, "/MLDonkey/remote/"), value: 1);
+
+     ## build cpe and store it as host_detail
+     register_cpe(tmpVers:1, tmpExpr:"^([0-9.]+\.[0-9]).*([r0-9]+)?", tmpBase:"cpe:/a:mldonkey:mldonkey:");
+
    }
 
    security_note(port:port,data:desc);
@@ -115,5 +141,4 @@
   } 
  }   
 }
-
 exit(0);

Modified: trunk/openvas-plugins/scripts/modperl_version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/modperl_version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/modperl_version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 }
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100129";
+SCRIPT_DESC = "mod_perl version Detection";
+
 port = get_http_port(default:80);
 if(!get_port_state(port))exit(0);
 if(get_kb_item("Services/www/" + port + "/embedded"))exit(0);
@@ -62,8 +68,13 @@
 
 if(!isnull(matches[1])) {
     
-  set_kb_item(name: string("www/", port, "/mod_perl"), value: string(matches[1]));
+  tmp_version = string(matches[1]);
+  set_kb_item(name: string("www/", port, "/mod_perl"), value: tmp_version);
 
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:apache:mod_perl:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 }
 
 exit(0);

Modified: trunk/openvas-plugins/scripts/mozilloCMS_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/mozilloCMS_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/mozilloCMS_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100123";
+SCRIPT_DESC = "moziloCMS Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -89,9 +95,15 @@
     if ( !isnull(version[1]) ) {
        vers=chomp(version[1]);
     } 
-    
-    set_kb_item(name: string("www/", port, "/moziloCMS"), value: string(vers," under ",install));
 
+    tmp_version = string(vers," under ",install);    
+    set_kb_item(name: string("www/", port, "/moziloCMS"), value: tmp_version);
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:mozilo:mozilocms:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nmoziloCMS Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/mssql_version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/mssql_version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/mssql_version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -202,7 +202,28 @@
 #
 
 include("smb_nt.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.11217";
+SCRIPT_DESC = "Microsoft's SQL Version Query";
+
+MSSQL_LIST = make_list("^(8\..*)", "cpe:/a:microsoft:sql_server:2000",
+                       "^(9\..*)", "cpe:/a:microsoft:sql_server:2005");
+MSSQL_MAX = max_index(MSSQL_LIST);
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 function GetRealFileVersion(socket, uid, tid, fid)
 {
  local_var i, fsize, data, off, tmp, version, v, len, tab;
@@ -281,6 +302,12 @@
  {
   value = GetRealFileVersion(socket:soc, uid:uid, tid:tid, fid:fid);
   set_kb_item(name:"mssql/SQLVersion",value:value);
+
+  ## build cpe and store it as host_detail  
+  for (i = 0; i < MSSQL_MAX-1; i = i + 2) {
+
+     register_cpe(tmpVers:value, tmpExpr:MSSQL_LIST[i], tmpBase:MSSQL_LIST[i+1]);
+  }
  }
 }
 
@@ -294,6 +321,12 @@
  if(!value)value = registry_get_sz(key:key, item:"CurrentVersion");
  if(!value)exit(0);
  set_kb_item(name:"mssql/SQLVersion",value:value);
+ 
+ ## build cpe and store it as host_detail  
+ for (i = 0; i < MSSQL_MAX-1; i = i + 2) {
+
+    register_cpe(tmpVers:value, tmpExpr:MSSQL_LIST[i], tmpBase:MSSQL_LIST[i+1]);
+ }
 }
 
 for (i=0; version[i] ; i = i + 1) 

Modified: trunk/openvas-plugins/scripts/nagios_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/nagios_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/nagios_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,10 +55,16 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100186";
+SCRIPT_DESC = "Nagios Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -91,8 +97,14 @@
        vers=version[1];
     } 
 
-    set_kb_item(name: string("www/", port, "/nagios"), value: string(vers," under ", install ));
+    tmp_version = string(vers," under ", install);
+    set_kb_item(name: string("www/", port, "/nagios"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:nagios:nagios:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC); 
+
     info = string("None\n\nNagios Version '");
     info += string(vers);
     info += string("' was detected on the remote host\n");
@@ -107,7 +119,7 @@
          security_note(port:port,data:desc);
        }
        exit(0);
-  
+ 
  }
 }
 

Modified: trunk/openvas-plugins/scripts/nagios_statd_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/nagios_statd_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/nagios_statd_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -63,10 +63,14 @@
  exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("global_settings.inc");
 include("misc_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100187";
+SCRIPT_DESC = "Nagios-statd Daemon Detection";
 
 port = 1040;
 
@@ -96,6 +100,11 @@
  set_kb_item(name:"nagios_statd/"+port+"/Version", value:vers);
  register_service(port:port, ipproto:"tcp", proto:"nagios_statd");
 
+ ## build cpe and store it as host_detail
+ cpe = build_cpe(value: vers, exp:"^([0-9.]+)",base:"cpe:/a:nagios:nagios:");
+ if(!isnull(cpe))
+    register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
  tests = make_list("uptime","disk");
  
  foreach do (tests) {

Modified: trunk/openvas-plugins/scripts/net2ftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/net2ftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/net2ftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100125";
+SCRIPT_DESC = "net2ftp Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -90,8 +96,14 @@
        vers=chomp(version[1]);
     } 
     
-    set_kb_item(name: string("www/", port, "/net2ftp"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/net2ftp"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:net2ftp:net2ftp:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nnet2ftp Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/nginx_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/nginx_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/nginx_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -52,7 +52,13 @@
 
 include("http_func.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100274";
+SCRIPT_DESC = "nginx Detection";
+
 port = get_http_port(default:80);
 if(!get_port_state(port))exit(0);
 
@@ -69,7 +75,13 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("nginx/", port, "/version"), value: string(vers));
+    tmp_version = string(vers);
+    set_kb_item(name: string("nginx/", port, "/version"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:nginx:nginx:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nnginx Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/notftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/notftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/notftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100160";
+SCRIPT_DESC = "NotFTP Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -107,8 +113,14 @@
      }  
     }  
     
-    set_kb_item(name: string("www/", port, "/notftp"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/notftp"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:wonko:notftp:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nNotFTP Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/novell_edirectory_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/novell_edirectory_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/novell_edirectory_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 include("misc_func.inc");
 include("dump.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100339";
+SCRIPT_DESC = "Novell eDirectory Detection";
+
 port = get_kb_item("Services/ldap");
 if(!port)exit(0);
 if(!get_port_state(port))exit(0);
@@ -94,7 +100,12 @@
     version = eregmatch(string:str, pattern:"LDAP Agent for Novell eDirectory ([0-9.]+ ([^#]+)?)");
     if(!isnull(version[1])) {
       set_kb_item(name:string("ldap/",port,"/eDirectory"), value:version[1]);
-      
+        
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:version[1], exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:novell:edirectory:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       info = string("None\n\nNovell eDirectory Version '");
       info += string(version[1]);
       info += string("' was detected on the remote host\n");

Modified: trunk/openvas-plugins/scripts/nsd_version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/nsd_version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/nsd_version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -61,7 +61,13 @@
 }
 
 include("misc_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100208";
+SCRIPT_DESC = "Name Server Daemon Detection";
+
  soctcp53 = 0;
  
  if(get_port_state(53))
@@ -137,6 +143,12 @@
 		set_kb_item(name:"nsd/version",value:hole_data);
 		security_note(port:53, data:desc, protocol:proto);
 		close(soc);
+   
+                ## build cpe and store it as host_detail
+                cpe = build_cpe(value:hole_data, exp:"^([0-9.]+)", base:"cpe:/a:nlnetlabs:nsd:");
+                if(!isnull(cpe))
+                   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 		exit(0);
 		}
 	   }

Modified: trunk/openvas-plugins/scripts/ntop_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/ntop_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/ntop_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 
 include("http_func.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100256";
+SCRIPT_DESC = "Ntop Detection";
+
 port = get_http_port(default:3000);
 if(!get_port_state(port))exit(0);
 
@@ -79,6 +85,10 @@
     set_kb_item(name: string("www/", port, "/ntop"), value: string(vers));
     set_kb_item(name: string("/ntop/installed"), value: TRUE);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:string(vers), exp:"^([0-9.]+)", base:"cpe:/a:ntop:ntop:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nNtop Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/ntp_open.nasl
===================================================================
--- trunk/openvas-plugins/scripts/ntp_open.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/ntp_open.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,12 @@
 }
 
 include("host_details.inc");
+include("cpe.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.10884";
+SCRIPT_DESC = "NTP read variables";
+
 function ntp_read_list()
 {
     data = raw_string(0x16, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00);
@@ -143,7 +148,14 @@
               ntpVer = ntpVer[1] + "." + ntpVer[2];
          }
          else ntpVer = ntpVer[1];
-                set_kb_item(name:"NTP/Linux/Ver", value:ntpVer);
+
+         set_kb_item(name:"NTP/Linux/Ver", value:ntpVer);
+   
+         ## build cpe and store it as host_detail
+         cpe = build_cpe(value:ntpVer, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:ntp:ntp:");
+         if(!isnull(cpe))
+            register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
        }
      }
 

Modified: trunk/openvas-plugins/scripts/opencart_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/opencart_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/opencart_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -61,7 +61,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100178";
+SCRIPT_DESC = "OpenCart Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -98,8 +104,14 @@
       vers = cartVer[1];
     }
 
-    set_kb_item(name: string("www/", port, "/opencart"), value: string(vers, " under ", install));
+    tmp_version = string(vers, " under ", install);
+    set_kb_item(name: string("www/", port, "/opencart"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:opencart:opencart:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nOpenCart Version ");
     info += string(vers);
     info += string(" was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/openoffice_CB-A08-0068.nasl
===================================================================
--- trunk/openvas-plugins/scripts/openoffice_CB-A08-0068.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/openoffice_CB-A08-0068.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -83,9 +83,15 @@
 # The code starts here
 #
 
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.90029";
+SCRIPT_DESC = "OpenOffice.org <= 2.4.1 vulnerability (Lin)";
+
 local_var ver, sec_hole, sec_proto, garg, file_name, arg, r, i, t, l, p;
 
 sock = ssh_login_or_reuse_connection();
@@ -131,6 +137,12 @@
         build = eregmatch(pattern:"^[0-9]+", string: build);
         ver = version[0]+"."+build[0];
         set_kb_item(name: "OpenOffice.org/Build", value: ver);
+
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value: ver, exp:"^([0-9.]+([a-z0-9]+)?)",base:"cpe:/a:openoffice:openoffice.org:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         if( "/lib64" >< t ) {
           test_version = "2.4.9311";
         } else {

Modified: trunk/openvas-plugins/scripts/oracle_tnslsnr_version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/oracle_tnslsnr_version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/oracle_tnslsnr_version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -76,9 +76,15 @@
 	exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("misc_func.inc");
 include("global_settings.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.10658";
+SCRIPT_DESC = "Oracle tnslsnr version query";
+
 function tnscmd(sock, command)
 {
 	# construct packet
@@ -179,6 +185,11 @@
 		set_kb_item(name:string("oracle_tnslsnr/", port, "/version"),
 			    value:version);
 		
+                ## build cpe and store it as host_detail
+                cpe = build_cpe(value: version, exp:"^([0-9.]+)",base:"cpe:/a:oracle:database_server:");
+                if(!isnull(cpe))
+                   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 		if (ereg(pattern:".*.Version\ (8\.1\.6)|(8\.0\.6)|(7\.3\.4).*.", string:version))
 		{
 			

Modified: trunk/openvas-plugins/scripts/osticket_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/osticket_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/osticket_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,12 +58,16 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("global_settings.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 include("misc_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.13858";
+SCRIPT_DESC = "osTicket Detection";
 
 port = get_http_port(default:80);
 if (!get_port_state(port)) exit(1);
@@ -141,13 +145,19 @@
       debug_print("osTicket version '", ver, "'.");
 
       # Success!
+      tmp_version = string(ver, " under ", dir);
       set_kb_item(
         name:string("www/", port, "/osticket"), 
-        value:string(ver, " under ", dir)
-      );
+        value:tmp_version);
+
       installations[dir] = ver;
       ++installs;
 
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)",base:"cpe:/a:osticket:osticket:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       # nb: only worried about the first match.
       break;
     }

Modified: trunk/openvas-plugins/scripts/patchlink_detection.nasl
===================================================================
--- trunk/openvas-plugins/scripts/patchlink_detection.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/patchlink_detection.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -65,7 +65,13 @@
 include("smb_nt.inc");
 include("secpod_reg.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.80039";
+SCRIPT_DESC = "Patchlink Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -91,6 +97,12 @@
   security_note(port:port, data:report);
 
   set_kb_item(name:"SMB/Patchlink/version", value:version);
+  
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:version, exp:"^([0-9]+\.[0-9]+)", base:"cpe:/a:lumension_security:patchlink_update:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }
 
 exit(0);

Modified: trunk/openvas-plugins/scripts/perforce_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/perforce_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/perforce_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,10 +51,16 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("global_settings.inc");
 include("misc_func.inc");
 include("dump.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100268";
+SCRIPT_DESC = "Perforce Detection";
+
 port = 1666;
 if (!get_tcp_port_state(port)) exit(0);
 
@@ -123,6 +129,11 @@
     if(!isnull(version[1])) {
       set_kb_item(name:"perforce/"+port+"/version", value:version[1]);
      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: version[1], exp:"^([0-9]{4}[.]{1}[0-9]+/[0-9]{6})",base:"cpe:/a:perforce:perforce_server:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       info = string("None\n\nPerforce Version '");
       info += version[1];
       info += string("' was detected on the remote host.\n");

Modified: trunk/openvas-plugins/scripts/phorum_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phorum_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phorum_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100108";
+SCRIPT_DESC = "phorum Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -90,8 +96,14 @@
        vers=version[1];
     }
 
-    set_kb_item(name: string("www/", port, "/phorum"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phorum"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:phorum:phorum:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nphorum Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/photopost_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/photopost_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/photopost_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,7 +55,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100285";
+SCRIPT_DESC = "Photopost Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -83,7 +89,14 @@
     if(!ver) ver="unknown";
 
     # PhotoPost installation found
-    set_kb_item(name:string("www/", port, "/photopost"),value:string(ver, " under ", dir));
+    tmp_version = string(ver, " under ", dir);
+    set_kb_item(name:string("www/", port, "/photopost"),value:tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:photopost:photopost_php_pro:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     if(report_verbosity) {
       if(dir=="") dir="/";
       info+=ver + " under " + dir + '\n';

Modified: trunk/openvas-plugins/scripts/phpBugTracker_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phpBugTracker_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phpBugTracker_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -62,7 +62,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100217";
+SCRIPT_DESC = "phpBugTracker Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -99,7 +105,13 @@
        vers=version[1];
     }
 
-    set_kb_item(name: string("www/", port, "/phpBugTracker"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phpBugTracker"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+?)", base:"cpe:/a:benjamin_curtis:phpbugtracker:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nphpBugTracker Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/phpScheduleIt_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phpScheduleIt_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phpScheduleIt_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -59,7 +59,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100233";
+SCRIPT_DESC = "phpScheduleIt Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -90,7 +96,13 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/phpScheduleIt"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phpScheduleIt"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:php.brickhost:phpscheduleit:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nphpScheduleIt Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/phpWebThings_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phpWebThings_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phpWebThings_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,10 +55,16 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100219";
+SCRIPT_DESC = "phpWebThings Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -91,8 +97,14 @@
        vers=chomp(version[1]);
     } 
     
-    set_kb_item(name: string("www/", port, "/phpWebThings"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phpWebThings"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: tmp_version, exp:"^([0-9.]+)",base:"cpe:/a:phpwebthings:phpwebthings:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nphpWebThings Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/phpbb_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phpbb_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phpbb_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -60,7 +60,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100033";
+SCRIPT_DESC = "phpBB Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -103,8 +109,14 @@
     
     }	
     
-    set_kb_item(name: string("www/", port, "/phpBB"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phpBB"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:phorum:phorum:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nphpBB Version (");
     info += string(vers);
     info += string(") was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/phpgroupware_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phpgroupware_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phpgroupware_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100092";
+SCRIPT_DESC = "phpGroupWare Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -98,7 +104,13 @@
 	}  
       }	
     
-    set_kb_item(name: string("www/", port, "/phpGroupWare"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phpGroupWare"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:phpgroupware:phpgroupware:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nphpGroupWare Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/phpldapadmin_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phpldapadmin_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phpldapadmin_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -56,7 +56,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100395";
+SCRIPT_DESC = "phpLDAPadmin Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -89,8 +95,14 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/phpldapadmin"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phpldapadmin"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:phpldapadmin:phpldapadmin:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nphpLDAPadmin Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/phplive_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phplive_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phplive_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -55,7 +55,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100302";
+SCRIPT_DESC = "PHP Live! Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -86,7 +92,13 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/phplive"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phplive"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:phplivesupport.:phplive");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nPHP Live! Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/phpmyfaq_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phpmyfaq_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phpmyfaq_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -61,7 +61,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100106";
+SCRIPT_DESC = "phpMyFAQ Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -98,8 +104,13 @@
          vers=version[1];
     }
 
-    set_kb_item(name: string("www/", port, "/phpmyfaq"),
-                value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phpmyfaq"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:phpmyfaq:phpmyfaq:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nphpMyFAQ Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/phpshop_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/phpshop_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/phpshop_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -56,7 +56,13 @@
 include("http_keepalive.inc");
 include("global_settings.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100382";
+SCRIPT_DESC = "PhpShop Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -98,9 +104,14 @@
        }  
      }	 
     
+    tmp_version =  string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/phpshop"), value: tmp_version);
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:edikon:phpshop:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
-    set_kb_item(name: string("www/", port, "/phpshop"), value: string(vers," under ",install));
-
     info = string("None\n\nPhpShop Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/podcast_generator_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/podcast_generator_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/podcast_generator_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100134";
+SCRIPT_DESC = "Podcast Generator Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -88,7 +94,13 @@
        vers=chomp(version[1]);
     } 
     
-    set_kb_item(name: string("www/", port, "/podcast_generator"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/podcast_generator"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)([a-z 0-9]+)?", base:"cpe:/a:podcast_generator:podcast_generator:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nPodcast Generator Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/postgresql_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/postgresql_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/postgresql_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -56,10 +56,16 @@
  exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("global_settings.inc");
 include("misc_func.inc");
 include("dump.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100151";
+SCRIPT_DESC = "PostgreSQL Detection";
+
 function bin2string (ddata) {
  local_var tmp, i, j, line, linenumber, len, data, c;
 
@@ -141,6 +147,12 @@
   if(!isnull(vers))
   {
     set_kb_item(name:"PostgreSQL/Remote/" + port + "/Ver", value: vers);
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: vers, exp:"^([0-9.]+)",base:"cpe:/a:postgresql:postgresql:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nPostgreSQL Version '");
     info += vers;
     info += string("' was detected on the remote host.\n\n");

Modified: trunk/openvas-plugins/scripts/prtg_traffic_grapher_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/prtg_traffic_grapher_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/prtg_traffic_grapher_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100215";
+SCRIPT_DESC = "PRTG Traffic Grapher Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -81,7 +87,13 @@
        vers=version[1];
     } 
 
-    set_kb_item(name: string("www/", port, "/PRTGTrafficGrapher"), value: string(vers," under /"));
+    tmp_version = string(vers," under /");
+    set_kb_item(name: string("www/", port, "/PRTGTrafficGrapher"), value: tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:paessler:prtg_traffic_grapher:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nPRTG Traffic Grapher Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/punBB_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/punBB_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/punBB_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -67,7 +67,13 @@
 include("global_settings.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.15936";
+SCRIPT_DESC = "PunBB detection";
+
 port = get_http_port(default:80);
 if (!get_port_state(port)) exit(0);
 if (!can_host_php(port:port)) exit(0);
@@ -98,7 +104,13 @@
     desc += '\n\nPlugin output :\n\n' + report;
     security_note(port:port, data:desc);
 
-    set_kb_item(name:"www/" + port + "/punBB", value:version + " under " + dir);
+    tmp_version = version + " under " + dir;
+    set_kb_item(name:"www/" + port + "/punBB", value:tmp_version);
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:punbb:punbb:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/realty_web_base_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/realty_web_base_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/realty_web_base_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -56,7 +56,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100194";
+SCRIPT_DESC = "Realty Web-Base Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -90,7 +96,13 @@
            vers = version[1];
 	 }  
 
-	 set_kb_item(name: string("www/", port, "/RealtyWebBase"), value: string(vers," under ",install));
+         tmp_version = string(vers," under ",install);
+	 set_kb_item(name: string("www/", port, "/RealtyWebBase"), value: tmp_version);
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:realtywebware:realty_web-base:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
          info = string("None\n\nRealty Web-Base Version '");
          info += string(vers);

Modified: trunk/openvas-plugins/scripts/remote-detect-Leap_CMS.nasl
===================================================================
--- trunk/openvas-plugins/scripts/remote-detect-Leap_CMS.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/remote-detect-Leap_CMS.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -66,7 +66,12 @@
 include("misc_func.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.101025";
+SCRIPT_DESC = "Leap CMS service detection";
 
 port = get_http_port(default:80);
 report = '';
@@ -86,6 +91,11 @@
 		set_kb_item(name:"LeapCMS/installed", value:TRUE);
 		set_kb_item(name:"LeapCMS/port", value:port);
 		set_kb_item(name:"LeapCMS/version", value:vendor[1]);
+     
+                ## build cpe and store it as host_detail
+                cpe = build_cpe(value:vendor[1], exp:"^([0-9.]+)", base:"cpe:/a:gowondesigns:leap:");
+                if(!isnull(cpe))
+                   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
 		server = eregmatch(pattern:"Server: ([a-zA-Z]+)/([0-9.]+)",string:response);
 

Modified: trunk/openvas-plugins/scripts/remote-detect-MSdotNET-version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/remote-detect-MSdotNET-version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/remote-detect-MSdotNET-version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -72,8 +72,14 @@
 include("misc_func.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.101007";
+SCRIPT_DESC = "Microsoft dotNET version grabber";
 
+
 # request a non existant random page
 page = string(rand() + ".aspx");
 
@@ -107,7 +113,11 @@
 		set_kb_item(name:"dotNET/install", value:TRUE);
 		set_kb_item(name:"dotNET/port", value:port);
 		set_kb_item(name:"dotNet/version", value:dotNet_header[1]);
-	
+	   
+                ## build cpe and store it as host_detail
+                cpe = build_cpe(value:dotNet_header[1], exp:"^([0-9.]+)", base:"cpe:/a:microsoft:.net_framework:");
+                if(!isnull(cpe))
+                   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 		
 		if(aspNET_header >< response){
 			report +=  " and " + aspNet_header[0];

Modified: trunk/openvas-plugins/scripts/remote-detect-WindowsSharepointServices.nasl
===================================================================
--- trunk/openvas-plugins/scripts/remote-detect-WindowsSharepointServices.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/remote-detect-WindowsSharepointServices.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -25,8 +25,6 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
-
-
 if(description)
 {
 script_id(101018);
@@ -67,13 +65,27 @@
 #
 # The script code starts here
 #
-
+include("cpe.inc");
 include("misc_func.inc");
 include("http_func.inc");
 include("host_details.inc");
 include("http_keepalive.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.101018";
+SCRIPT_DESC = "Windows SharePoint Services detection";
 
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 port = get_http_port(default:80);
 
 # request a non existant random page
@@ -113,14 +125,25 @@
 
 			set_kb_item(name:"WindowsSharePointServices/installed", value:TRUE);
 			set_kb_item(name:"MicrosoftSharePointTeamServices/version", value:mstsVersion[1]);
+
+                        ## build cpe and store it as host_detail
+                        register_host_detail(name:"App", value:"cpe:/a:microsoft:sharepoint_team_services:2007", nvt: SCRIPT_OID, desc:SCRIPT_DESC);
 			
 			if( eregmatch(pattern:"(6.0.2.[0-9]+)", string:mstsVersion[1], icase:TRUE) ){
 				wssVersion = "2.0";
 				set_kb_item(name:"WindowsSharePointServices/version", value:wssVerion);
+
+                                ## build cpe and store it as host_detail
+                                register_cpe(tmpVers:wssVersion, tmpExpr:"^([0-9]\.[0-9])", tmpBase:"cpe:/a:microsoft:sharepoint_services:");
+
 			}
 			if( eregmatch(pattern:"(12.[0-9.]+)", string:mstsVersion[1], icase:TRUE) ){
 				wssVersion = "3.0";
 				set_kb_item(name:"WindowsSharePointServices/version", value:wssVersion);
+
+                                ## build cpe and store it as host_detail
+                                register_cpe(tmpVers:wssVersion, tmpExpr:"^([0-9]\.[0-9])", tmpBase:"cpe:/a:microsoft:sharepoint_services:");
+
 			}
 
 			report = "Detected: " + mstsVersion[0];	
@@ -152,12 +175,16 @@
 
 			set_kb_item(name:"Microsoft-IIS/installed", value:TRUE);	
 			set_kb_item(name:"Microsoft-IIS/version", value:dotNetServer[1]); 	
+
+                        ## build cpe and store it as host_detail
+                        register_cpe(tmpVers: dotNetServer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:microsoft:iis:");
+
 			report += "\n" + dotNetServer[0];
 			if( osVersion ){
 				report += "\n" + "Operating System Type: " + osVersion;
 
                         	register_host_detail(name:"OS", value:osVersion,
-                                	nvt:"1.3.6.1.4.1.25623.1.0.101018",
+                                	nvt:NID,
                                 	desc:"Windows SharePoint Services Information Gathering");
                         }
 		}
@@ -175,4 +202,3 @@
 if ( report ) {		
 	security_note(port:port, data:report);
 }
-

Modified: trunk/openvas-plugins/scripts/rt_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/rt_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/rt_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -58,7 +58,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100385";
+SCRIPT_DESC = "RT: Request Tracker Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -91,8 +97,14 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/rt_tracker"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/rt_tracker"), value: tmp_version);
 
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:best_practical_solutions:request_tracker:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     info = string("None\n\nRT: Request Tracker Version '");
     info += string(vers);
     info += string("' was detected on the remote host in the following directory(s):\n\n");

Modified: trunk/openvas-plugins/scripts/sahana_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/sahana_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/sahana_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -56,7 +56,13 @@
 include("http_func.inc");
 include("http_keepalive.inc");
 include("global_settings.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.100335";
+SCRIPT_DESC = "Sahana Detection";
+
 port = get_http_port(default:80);
 
 if(!get_port_state(port))exit(0);
@@ -89,7 +95,13 @@
        vers=chomp(version[1]);
     }
 
-    set_kb_item(name: string("www/", port, "/sahana"), value: string(vers," under ",install));
+    tmp_version = string(vers," under ",install);
+    set_kb_item(name: string("www/", port, "/sahana"), value: tmp_version);
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:sahana:sahana:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     info = string("None\n\nSahana Version '");
     info += string(vers);

Modified: trunk/openvas-plugins/scripts/savce_installed.nasl
===================================================================
--- trunk/openvas-plugins/scripts/savce_installed.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/savce_installed.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -59,6 +59,13 @@
 include("secpod_reg.inc");
 include("secpod_smb_func.inc");
 
+include("cpe.inc");
+include("host_details.inc");
+
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.80040";
+SCRIPT_DESC = "Symantec Anti Virus Corporate Edition Check";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -162,6 +169,12 @@
     version = string (v1, ".", v2, ".", v3, ".", vlow);
 
     set_kb_item(name: "Antivirus/SAVCE/version", value:version);
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:symantec:norton_antivirus:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     return version;
    }
 

Modified: trunk/openvas-plugins/scripts/secpod_admin_news_tools_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_admin_news_tools_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_admin_news_tools_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,9 +47,14 @@
   exit(0);
 }
 
-
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900904";
+SCRIPT_DESC = "Admin News Tools Version Detection";
+
 antPort = get_http_port(default:80);
 if(!antPort){
   exit(0);
@@ -67,10 +72,18 @@
     {
       antVer = eregmatch(pattern:"Admin News Tools v([0-9.]+)", string:rcvRes);
       if(antVer[1] != NULL){
+
+        tmp_version = antVer[1] + " under " + dir;
         set_kb_item(name:"www/" + antPort + "/Admin-New-Tools",
-                            value:antVer[1] + " under " + dir);
+                            value:tmp_version);
         security_note(data:"Admin News Tools version " + antVer[1] +
                 " running at location " + dir +  " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:adminnewstools:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_adobe_dreamweaver_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_adobe_dreamweaver_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_adobe_dreamweaver_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901148";
+SCRIPT_DESC = "Adobe Dreamweaver Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,9 +79,16 @@
     ver = registry_get_sz(key:key + item, item:"DisplayVersion");
     if(ver != NULL)
     {
-      set_kb_item(name:"Adobe/Dreamweaver/Ver", value:ver + " " +name);
+      tmp_version = ver + " " +name;
+      set_kb_item(name:"Adobe/Dreamweaver/Ver", value:tmp_version);
       security_note(data:name + " version " + ver +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:adobe:dreamweaver:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_adobe_indesign_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_adobe_indesign_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_adobe_indesign_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902084";
+SCRIPT_DESC = "Adobe InDesign Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,9 +81,16 @@
     adVer = registry_get_sz(key:key + item, item:"DisplayVersion");
     if(adVer != NULL)
     {
-      set_kb_item(name:"Adobe/InDesign/Ver", value:adName + " " + adVer);
+      tmp_version = adName + " " + adVer;
+      set_kb_item(name:"Adobe/InDesign/Ver", value:tmp_version);
       security_note(data:adName + " version " + adVer + " installed at location " +
                        adPath + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:adobe:indesign_cs3:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_adobe_jrun_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_adobe_jrun_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_adobe_jrun_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,9 +47,14 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900822";
+SCRIPT_DESC = "Sun Adobe JRun Version Detection";
+
 jrunPort = get_http_port(default:8000);
 if(!jrunPort){
   jrunPort = 8000;
@@ -72,5 +77,11 @@
     set_kb_item(name:"/Adobe/JRun/Ver", value:jrunVer[1]);
     security_note(data:"Adobe JRun version " + jrunVer[1] +
                                       " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: jrunVer[1], exp:"^([0-9.]+)",base:"cpe:/a:adobe:jrun:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_adobe_prdts_detect_macosx.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_adobe_prdts_detect_macosx.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_adobe_prdts_detect_macosx.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,24 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902711";
+SCRIPT_DESC = "Adobe Products Version Detection (Mac OS X)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 ## Checking OS
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -70,6 +87,9 @@
    set_kb_item(name: "Adobe/Flash/Player/MacOSX/Version", value:version[1]);
    security_note(data:"Adobe Flash Player version " + version[1] +
         " was detected on this host");
+
+   ## build cpe and store it as host_detail
+   register_cpe(tmpVers:version[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:adobe:flash_player:");
   }
 }
 
@@ -90,3 +110,6 @@
 set_kb_item(name: "Adobe/Air/MacOSX/Version", value:airVer);
 security_note(data:"Adobe Air version " + airVer +
                   " was detected on this host");
+
+## build cpe and store it as host_detail
+register_cpe(tmpVers:airVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:adobe:adobe_air:");

Modified: trunk/openvas-plugins/scripts/secpod_adobe_prdts_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_adobe_prdts_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_adobe_prdts_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,10 +49,26 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID = "1.3.6.1.4.1.25623.1.0.900319";
+SCRIPT_DESC= "Adobe Products Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -78,6 +94,10 @@
       set_kb_item(name:"Adobe/Acrobat/Win/Ver", value:acrobatVer);
       security_note(data:"Adobe Acrobat version " + acrobatVer +
                                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers: acrobatVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:adobe:acrobat:");
+
     }
   }
 
@@ -88,6 +108,10 @@
       set_kb_item(name:"Adobe/Reader/Win/Ver", value:readerVer);
       security_note(data:"Adobe Reader version " + readerVer +
                                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers: readerVer, tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:adobe:acrobat_reader:");
+
     }
   }
 }
@@ -117,6 +141,10 @@
         set_kb_item(name:"Adobe/Audition/Win/Ver", value:audVer);
         security_note(data:"Adobe Audition version " + audVer +
                          " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers: audVer, tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:adobe:audition:");
+
       }
    }
   }

Modified: trunk/openvas-plugins/scripts/secpod_adobe_shockwave_detect_macosx.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_adobe_shockwave_detect_macosx.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_adobe_shockwave_detect_macosx.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902619";
+SCRIPT_DESC = "Adobe Shockwave Version Detection (MacOSX)";
+
 ## Checking OS
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -106,3 +112,9 @@
 set_kb_item(name: "Adobe/Shockwave/MacOSX/Version", value:shockVer);
 security_note(data:"Adobe Shockwave version " + shockVer +
                   " was detected on this host");
+  
+## build cpe and store it as host_detail
+cpe = build_cpe(value:shockVer, exp:"^([0-9.]+)", base:"cpe:/a:adobe:shockwave_player:");
+if(!isnull(cpe))
+   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+

Modified: trunk/openvas-plugins/scripts/secpod_adobe_shockwave_player_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_adobe_shockwave_player_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_adobe_shockwave_player_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,9 +51,15 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900581";
+SCRIPT_DESC = "Adobe Shockwave Player Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -127,5 +133,11 @@
     set_kb_item(name:"Adobe/ShockwavePlayer/Ver", value:swVer);
     security_note(data:"Adobe Shockwave Player version " + swVer +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: swVer, exp:"^([0-9.]+)",base:"cpe:/a:adobe:shockwave_player:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_alefmentor_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_alefmentor_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_alefmentor_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901084";
+SCRIPT_DESC = "AlefMentor Version Detection";
+
 amPort = get_http_port(default:80);
 if(!amPort){
   exit(0);
@@ -63,10 +69,17 @@
   {
     amVer = eregmatch(pattern:"AlefMentor ([0-9.]+)" , string:rcvRes);
     if(amVer[1] != NULL){
-      set_kb_item(name:"www/" + amPort + "/AlefMentor", value:amVer[1] +
-                                                      " under " + path);
+
+      tmp_version = amVer[1] + " under " + path;
+      set_kb_item(name:"www/" + amPort + "/AlefMentor", value:tmp_version);
       security_note(data:"AlefMentor Version " + amVer[1] +
                " running at location " + path +  " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:findmysoft:alefmentor:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_amarok_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_amarok_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_amarok_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900430";
+SCRIPT_DESC = "Amarok Player Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +73,12 @@
     security_note(data:"Amarok Player version " + amarokVer[1] +
            " running at location " + amarokBin + " was detected on the host");
     ssh_close_connection();
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:amarokVer[1], exp:"^([0-9.]+)", base:"cpe:/a:amarok:amarok:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_amsn_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_amsn_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_amsn_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 
 include("smb_nt.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902044";
+SCRIPT_DESC = "aMSN Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -61,4 +67,10 @@
 if(msnVer != NULL){
   set_kb_item(name:"aMSN/Win/Ver", value:msnVer);
   security_note(data:"aMSN version " + msnVer + " was detected on the host");
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:msnVer, exp:"^([0-9.]+)", base:"cpe:/a:amsn:amsn:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_apache_apr-utils_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_apache_apr-utils_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_apache_apr-utils_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900571";
+SCRIPT_DESC = "Apache APR-Utils Version Detection";
+
 util_sock = ssh_login_or_reuse_connection();
 if(!util_sock){
   exit(0);
@@ -70,6 +76,12 @@
       set_kb_item(name:"Apache/APR-Utils/Ver", value:utilsVer[0]);
       security_note(data:"Apache APR-Utils version " + utilsVer[0] +
           " running at location " + binaryFile + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:utilsVer[0], exp:"^([0-9.]+)", base:"cpe:/a:apache:apr-util:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_apache_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_apache_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_apache_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900498";
+SCRIPT_DESC = "Apache Web ServerVersion Detection";
+
 port = get_http_port(default:80);
 if(!get_port_state(port)){
   exit(0);
@@ -65,4 +71,10 @@
   set_kb_item(name:"www/" + port + "/Apache", value:apacheVer[1]);
   security_note(data:"Apache Web Server version " + apacheVer[1] +
                                                  " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:apacheVer[1], exp:"^([0-9.]+)", base:"cpe:/a:apache:http_server:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_apache_tiles_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_apache_tiles_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_apache_tiles_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900493";
+SCRIPT_DESC = "Apache Tiles Version Detection";
+
 port = get_http_port(default:8080);
 if(!port){
   port = 8080;
@@ -85,9 +91,17 @@
     {
       version = eregmatch(pattern:">([0-9]\.[0-9]\.[0-9.]+)", string:response);
       if(version[1] != NULL){
-        set_kb_item(name:"www/" + port + "/Apache/Tiles", value:version[1] + " under " + dir);
+
+        tmp_version = version[1] + " under " + dir;
+        set_kb_item(name:"www/" + port + "/Apache/Tiles", value:tmp_version);
         security_note(data:"Apache Tiles version " + version[1] +
                  " running at location " + dir +  " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:apache:tiles:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_aphpkb_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_aphpkb_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_aphpkb_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902520";
+SCRIPT_DESC = "Andy's PHP Knowledgebase Version Detection";
+
 ## Get http port
 port = get_http_port(default:80);
 if(!port){
@@ -69,11 +75,17 @@
     if(version =~ '[0-9.]+')
     {
       ## Set the KB value
-      set_kb_item(name:"www/" + port + "/aphpkb", value:version +
-                       " under " + dir);
+      tmp_version = version + " under " + dir;
+      set_kb_item(name:"www/" + port + "/aphpkb", value:tmp_version);
       security_note(data:"Andy's PHP Knowledgebase version " + version +
                          " running at location "  + dir +
                          " was detected on the host", port:port);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:aphpkb:aphpkb:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_apple_itunes_detection_win_900123.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_apple_itunes_detection_win_900123.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_apple_itunes_detection_win_900123.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,10 +46,15 @@
  exit(0);
 }
 
-
  include("smb_nt.inc");
  include("secpod_smb_func.inc");
+ include("cpe.inc");
+ include("host_details.inc");
 
+ ## Constant values
+ SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900123";
+ SCRIPT_DESC = "Apple iTunes Version Detection for Windows";
+
  if(!get_kb_item("SMB/WindowsVersion")){
  	exit(0);
  }
@@ -140,6 +145,12 @@
                         set_kb_item(name:"iTunes/Win/Ver", value:iTunesVer);
                         security_note(data:"Apple iTunes version " + iTunesVer
                                                 + " was detected on the host");
+   
+                        ## build cpe and store it as host_detail
+                        cpe = build_cpe(value:iTunesVer, exp:"^([0-9]\.[0-9]\.[0-9])", base:"cpe:/a:apple:itunes:");
+                        if(!isnull(cpe))
+                           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
                 }
                 exit(0);
         }

Modified: trunk/openvas-plugins/scripts/secpod_apple_quicktime_detection_win_900124.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_apple_quicktime_detection_win_900124.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_apple_quicktime_detection_win_900124.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
  exit(0);
 }
 
-
  include("smb_nt.inc");
  include("secpod_smb_func.inc");
+ include("cpe.inc");
+ include("host_details.inc");
 
+ ## Constant values
+ SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900124";
+ SCRIPT_DESC = "Apple QuickTime Version Detection for Windows";
+
  if(!get_kb_item("SMB/WindowsVersion")){
  	exit(0);
  }
@@ -118,4 +123,10 @@
 	set_kb_item(name:"QuickTime/Win/Ver", value:quickTimeVer);
         security_note(data:"Apple QuickTime version " + quickTimeVer +
             " running at location " + quickTimePath + " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:quickTimeVer, exp:"^([0-9.]+)", base:"cpe:/a:apple:quicktime:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
  }

Modified: trunk/openvas-plugins/scripts/secpod_apple_safari_detect_win_900003.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_apple_safari_detect_win_900003.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_apple_safari_detect_win_900003.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
  include("smb_nt.inc");
+ include("cpe.inc");
+ include("host_details.inc");
 
+ ## Constant values
+ SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800209";
+ SCRIPT_DESC = "Microsoft Internet Explorer Version Detection (Win)";
+
  if(!get_kb_item("SMB/WindowsVersion")){
  	exit(0);
  }
@@ -149,6 +155,12 @@
                                  	    value:safariVer);
                                 security_note(data:"Apple Safari Version " +
                                       safariVer + " was detected on the host");
+
+                                ## build cpe and store it as host_detail
+                                cpe = build_cpe(value:safariVer, exp:"^([0-9.]+)", base:"cpe:/a:apple:safari:");
+                                if(!isnull(cpe))
+                                   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
                 	}
 			exit(0);
 		}

Modified: trunk/openvas-plugins/scripts/secpod_asterisk_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_asterisk_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_asterisk_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -52,7 +52,13 @@
 
 
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900811";
+SCRIPT_DESC = "Asterisk Version Detection";
+
 function get_sip_banner(asterisk_port)
 {
   local_var soc, r, opt, asterisk_banner;
@@ -115,6 +121,12 @@
       set_kb_item(name:"Asterisk-PBX/Ver", value:asteriskVer[1]);
       security_note(data:"Asterisk-PBX version " + asteriskVer[1] +
                                                   " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:asterisVer, exp:"^([0-9.]+\.[0-9])\.?(rc[0-9]+)?", base:"cpe:/a:digium:asterisk:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     else
       set_kb_item(name:"Asterisk-PBX/Installed", value:TRUE);

Modified: trunk/openvas-plugins/scripts/secpod_audacity_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_audacity_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_audacity_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900306";
+SCRIPT_DESC = "Audacity Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -70,6 +76,12 @@
     security_note(data:"Audacity version " + audacityVer[1] +
              " running at location " + binName + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:audacityVer[1], exp:"^([0-9.]+)", base:"cpe:/a:audacity:audacity:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_audacity_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_audacity_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_audacity_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900304";
+SCRIPT_DESC = "Audacity Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -70,6 +76,12 @@
     if(audacityVer[1] != NULL){
       set_kb_item(name:"Audacity/Win/Ver", value:audacityVer[1]);
       security_note(data:"Audacity version " + audacityVer[1] + " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:audacityVer[1], exp:"^([0-9.]+)", base:"cpe:/a:audacity:audacity:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_audistat_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_audistat_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_audistat_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902028";
+SCRIPT_DESC = "AudiStat Version Detection";
+
 ## Get HTTP Port
 statPort = get_http_port(default:80);
 if(!statPort){
@@ -65,10 +71,17 @@
     ## Get Version and Set the version
     statVer = eregmatch(pattern:"> v([0-9.]+)<", string:rcvRes);
     if(statVer[1] != NULL){
-      set_kb_item(name:"www/" + statPort + "/Audistat", value:statVer[1] +
-                  " under " + path);
+
+      tmp_version = statVer[1] + " under " + path;
+      set_kb_item(name:"www/" + statPort + "/Audistat", value:tmp_version);
       security_note(data:"AudiStat version " + statVer[1] +
                " running at location " + path +  " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:alexandre_dubus:audistat:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_avahi_detection_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_avahi_detection_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_avahi_detection_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900416";
+SCRIPT_DESC = "Avahi Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +71,12 @@
     security_note(data:"Avahi Version " + avahiVer[0] + 
         " running at location " + binaryName + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:avahiVer[0], exp:"^([0-9.]+)", base:"cpe:/a:avahi:avahi:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_avg_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_avg_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_avg_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,10 +48,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900718";
+SCRIPT_DESC = "AVG AntiVirus Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -67,5 +72,11 @@
   if(avgVer != NULL){
     set_kb_item(name:"AVG/AV/Win/Ver", value:avgVer);
     security_note(data:"AVG AntiVirus version " + avgVer + " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: avgVer, exp:"^([0-9.]+)",base:"cpe:/a:avg:avg_anti-virus:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_axon_virtual_pbx_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_axon_virtual_pbx_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_axon_virtual_pbx_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 include("sip.inc");
 include("http_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900983";
+SCRIPT_DESC = "Axon Virtual PBX Version Detection";
+
 # Check for Axon Virtual PBX on SIP port 5060
 axonPort = get_kb_item("Services/udp/sip");
 if(!axonPort){
@@ -82,5 +88,11 @@
     set_kb_item(name:"Axon-Virtual-PBX/Ver", value:axonVer[1]);
     security_note(data:"Axon Virtual PBX version " + axonVer[1] +
                                            " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:axonVer[1], exp:"^([0-9.]+)", base:"cpe:/a:nch:axon_virtual_pbx:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_b2evolution_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_b2evolution_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_b2evolution_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900712";
+SCRIPT_DESC = "b2evolution Version Detection";
+
 b2Port = get_http_port(default:80);
 if(!b2Port){
   b2Port = 80;
@@ -68,10 +74,17 @@
     b2Ver = eregmatch(pattern:"b2evolution ([0-9.]+)", string:response);
     if(b2Ver[1] != NULL)
     {
+      tmp_version = b2Ver[1] + " under " + path;
       set_kb_item(name:"www/" + b2Port + "/b2evolution",
-                  value:b2Ver[1] + " under " + path);
+                  value:tmp_version);
       security_note(data:"b2evolution Version " + b2Ver[1] +
                 " running at location " + path +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:b2evolution:b2evolution:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_beanstalkd_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_beanstalkd_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_beanstalkd_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,7 +44,13 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901121";
+SCRIPT_DESC = "Beanstalkd Version Detection";
+
 port = "11300" ;
 ## Check port status
 if (! get_port_state(port)) {
@@ -72,5 +78,11 @@
   set_kb_item(name:"Beanstalkd/Ver", value:version[1]);
   security_note(data:"Beanstalkd version " + version[1] +
                      " was detected on the host", port:port);
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:version[1], exp:"^([0-9.]+)", base:"cpe:/a:wildbit:beanstalkd:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }
 

Modified: trunk/openvas-plugins/scripts/secpod_bitdefender_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_bitdefender_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_bitdefender_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900326";
+SCRIPT_DESC = "BitDefender Product(s) Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,6 +90,10 @@
       set_kb_item(name:"BitDefender/InetSec/Ver", value:bitVer);
       security_note(data:"BitDefender Internet Security version " + bitVer +
                                                  " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:bitVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:bitdefender:internet_security:");
+
     }
   }
 
@@ -89,6 +110,10 @@
       set_kb_item(name:"BitDefender/AV/Ver", value:bitVer);
       security_note(data:"BitDefender Antivirus version " + bitVer + 
                                                  " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:bitVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:bitdefender:bitdefender_antivirus:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_bitweaver_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_bitweaver_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_bitweaver_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900355";
+SCRIPT_DESC = "Bitweaver Version Detection";
+
 bitweaverPort = get_http_port(default:80);
 if(!bitweaverPort){
   bitweaverPort = 80;
@@ -77,10 +83,17 @@
                              string:rcvRes);
     if(bitweaverVer[2] != NULL)
     {
+      tmp_version = bitweaverVer[2] + " under " + dir;
       set_kb_item(name:"www/"+ bitweaverPort + "/Bitweaver",
-                  value:bitweaverVer[2] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"Bitweaver version " + bitweaverVer[2] +
                 " running at location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:bitweaver:bitweaver:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_blackberry_desktop_software_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_blackberry_desktop_software_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_blackberry_desktop_software_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902311";
+SCRIPT_DESC = "BlackBerry Desktop Software Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,6 +79,12 @@
       set_kb_item(name:"BlackBerry/Desktop/Win/Ver", value:bbdVer);
       security_note(data:"BlackBerry Desktop Software version " + bbdVer +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:bbdVer, exp:"^([0-9.]+)", base:"cpe:/a:rim:blackberry_desktop_software:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_blender_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_blender_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_blender_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900251";
+SCRIPT_DESC = "Blender Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -73,6 +79,12 @@
     set_kb_item(name:"Blender/Lin/Ver", value:blendVer);
     security_note(data:"Blender version " + blendVer + " running at location "
                                       + binPath + " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:blendVer, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:blender:blender:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_bopup_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_bopup_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_bopup_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900686";
+SCRIPT_DESC = "Bopup Communication Server Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -69,5 +75,11 @@
     set_kb_item(name:"Bopup/Server/Ver", value:bopupVer);
     security_note(data:"Bopup Communication Server version " + bopupVer +
             " running at location " + bopupPath + " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:bopupVer, exp:"^([0-9.]+)", base:"cpe:/a:blabsoft:bopup_communication_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ca_mult_prdts_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ca_mult_prdts_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ca_mult_prdts_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900966";
+SCRIPT_DESC = "CA Multiple Products Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -69,6 +86,9 @@
     set_kb_item(name:"CA/eTrust-EZ-AV/Win/Ver", value:ezavVer);
     security_note(data:"CA eTrust EZ Antivirus version " + ezavVer +
                                               " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:ezavVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:ca:etrust_ez_antivirus:");
   }
 }
 
@@ -82,6 +102,9 @@
     set_kb_item(name:"CA/AV/Win/Ver", value:caavVer);
     security_note(data:"CA Antivirus version " + caavVer + 
                                               " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:caavVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:ca:anti-virus:");
   }
 }
 
@@ -94,5 +117,8 @@
     set_kb_item(name:"CA/ISS/Win/Ver", value:caissVer);
     security_note(data:"CA Internet Security version " + caissVer +          
                                               " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:caissVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:ca:internet_security_suite");
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_campsite_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_campsite_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_campsite_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900384";
+SCRIPT_DESC = "Campsite Version Detection";
+
 campsitePort = get_http_port(default:80);
 if(!campsitePort){
   campsitePort = 80;
@@ -80,9 +86,16 @@
   }
   if(campsiteVer != NULL)
   {
+    tmp_version = campsiteVer + " under " + dir;
     set_kb_item(name:"www/"+ campsitePort + "/Campsite",
-                value:campsiteVer + " under " + dir);
+                value:tmp_version);
     security_note(data:"Campsite version " + campsiteVer + 
                  " running at location " + dir +  " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9]\.[0-9]\.[0-9]+)\.?([a-z0-9]+)?", base:"cpe:/a:campware.org:campsite:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_changetrack_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_changetrack_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_changetrack_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900867";
+SCRIPT_DESC = "Changetrack Version Detection";
+
 change_sock = ssh_login_or_reuse_connection();
 if(!change_sock){
   exit(0);
@@ -64,6 +69,12 @@
     set_kb_item(name:"Changetrack/Ver", value:ctrack_ver[1]);
     security_note(data:"Changetrack version " + ctrack_ver[1] +
              " running at location " + binName + " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ctrack_ver[1], exp:"^([0-9.]+)", base:"cpe:/a:cameron_morland:changetrack:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_cmailserver_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_cmailserver_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_cmailserver_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("smtp_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900917";
+SCRIPT_DESC = "CMailServer Version Detection";
+
 smtpPort = get_kb_item("Services/smtp");
 if(!smtpPort){
   smtpPort = 25;
@@ -76,6 +82,12 @@
       set_kb_item(name:"CMailServer/Ver", value:cmailVer[1]);
       security_note(data:"CMailServer version " + cmailVer[1] +
                                                " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:cmailVer[1], exp:"^([0-9.]+)", base:"cpe:/a:youngzsoft:cmailserver:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_cowon_jetaudio_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_cowon_jetaudio_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_cowon_jetaudio_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900976";
+SCRIPT_DESC = "COWON Media Center JetAudio Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -79,4 +85,9 @@
   set_kb_item(name:"JetAudio/Ver", value:jaVer);
   security_note(data:"COWON Media Center JetAudio version " + jaVer +
              " running at location " + jaPath + " was detected on the host");
+  
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:jaVer, exp:"^([0-9.]+)", base:"cpe:/a:cowonamerica:cowon_media_center-jetaudio:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 }

Modified: trunk/openvas-plugins/scripts/secpod_crawltrack_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_crawltrack_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_crawltrack_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901178";
+SCRIPT_DESC = "CrawlTrack Version Detection";
+
 ## Get http port
 port = get_http_port(default:80);
 if(!port){
@@ -68,10 +74,17 @@
     if(ver[1])
     {
       ## Set the KB value
-      set_kb_item(name:"www/" + port + "/CrawlTrack", value:ver[1] +" under "+ dir);
+      tmp_version = ver[1] +" under "+ dir;
+      set_kb_item(name:"www/" + port + "/CrawlTrack", value:tmp_version);
       security_note(data:"CrawlTrack Version " + ver[1] +
                          " running at location "  + dir +
                          " was detected on the host", port:port);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:crawltrack:crawltrack:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ctorrent_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ctorrent_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ctorrent_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,24 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800209";
+SCRIPT_DESC = "CTorrent/Enhanced CTorrent Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -64,12 +81,19 @@
       set_kb_item(name:"Enhanced/CTorrent/Ver", value:ctorrentVer[4]);
       security_note(data:"Enhanced CTorrent version " + ctorrentVer[4] +
            " running at location " + binaryFile + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:ctorrentVer[4], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:rahul:dtorrent:");
+
     }
     else
       set_kb_item(name:"CTorrent/Ver", value:ctorrentVer[4]);
       security_note(data:"CTorrent version " + ctorrentVer[4] +
            " running at location " + binaryFile + " was detected on the host");
 
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:ctorrentVer[4], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:rahul:dtorrent:");
+
   }
   ssh_close_connection();
   exit(0);

Modified: trunk/openvas-plugins/scripts/secpod_cubecart_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_cubecart_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_cubecart_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900614";
+SCRIPT_DESC = "Detecting the cubecart version";
+
 port = get_http_port(default:80);
 if(!port){
   exit(0);
@@ -70,6 +76,12 @@
        set_kb_item(name:"www/"+ port + "/cubecart",value:version[1]);
        security_note(data:"Cubecart version " + version[1] + 
                  " running at location " + dir +  " was detected on the host");
+   
+       ## build cpe and store it as host_detail
+       cpe = build_cpe(value:version[1], exp:"^([0-9.]+)", base:"cpe:/a:cubecart:cubecart:");
+       if(!isnull(cpe))
+          register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_cups_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_cups_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_cups_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900348";
+SCRIPT_DESC = "CUPS Version Detection";
+
 cupsPort = get_http_port(default:631);
 if(!cupsPort){
   cupsPort = 631;
@@ -78,6 +84,12 @@
       set_kb_item(name:"www/"+ cupsPort + "/CUPS", value:cupsVer);
       security_note(data:"CUPS version " + cupsVer + " running at location " +
                                             dir + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:cupsVer, exp:"^([0-9.]+\.[0-9])\.([a-z0-9]+)?", base:"cpe:/a:apple:cups:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_cutenews_detect_win_900128.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_cutenews_detect_win_900128.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_cutenews_detect_win_900128.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
  include("http_func.inc");
  include("http_keepalive.inc");
+ include("cpe.inc");
+ include("host_details.inc");
 
+ ## Constant values
+ SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900128";
+ SCRIPT_DESC = "CuteNews Version Detection for Windows";
+
  port = get_http_port(default:80);
  if(!port){
         exit(0);
@@ -67,11 +73,19 @@
                 cutenewsVer = egrep(pattern:"CuteNews v[0-9.]+", string:rcvRes);
                 cutenewsVer = eregmatch(pattern:"[0-9.]+", string:cutenewsVer);
                 if(cutenewsVer != NULL){
+
+                        tmp_version = cutenewsVer[0] + " under " + dir;
                         set_kb_item(name:"www/"+ port + "/CuteNews",
-                                      value:cutenewsVer[0] + " under " + dir);
+                                      value:tmp_version);
                         security_note(data:"CuteNews version " + cutenewsVer[0]
                                            + " running at location " + dir +
                                                  " was detected on the host");
+   
+                        ## build cpe and store it as host_detail
+                        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:cutephp:cutenews:");
+                        if(!isnull(cpe))
+                           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
                 }
         }
  }

Modified: trunk/openvas-plugins/scripts/secpod_cyrus_sasllib_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_cyrus_sasllib_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_cyrus_sasllib_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900659";
+SCRIPT_DESC = "Cyrus SASL Library Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +71,12 @@
     security_note(data:"Cyrus SASL Library version " + saslVer[1] +
             " running at location " + saslbin + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:saslVer[1], exp:"^([0-9.]+)", base:"cpe:/a:cmu:cyrus-sasl:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_datatrack_system_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_datatrack_system_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_datatrack_system_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902061";
+SCRIPT_DESC = "DataTrack System Version Detection";
+
 dtsPort = get_http_port(default:81);
 if(!dtsPort){
   exit(0);
@@ -64,5 +70,11 @@
     set_kb_item(name:"www/" + dtsPort + "/DataTrack_System", value:dtsVer[1]);
     security_note(data:"DataTrack System version " + dtsVer[1] +
                                        " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:dtsVer[1], exp:"^([0-9.]+)", base:"cpe:/a:magnoware:datatrack_system:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_discloser_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_discloser_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_discloser_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902137";
+SCRIPT_DESC = "Discloser Version Detection";
+
 discPort = get_http_port(default:80);
 if(!discPort){
   exit(0);
@@ -76,11 +82,18 @@
 
     if(discVer[1])
     {
+        tmp_version = discVer + " under " + path;
         discVer = ereg_replace(pattern:"-", string:discVer[1], replace:".");
         set_kb_item(name:"www/" + discPort + "/Discloser",
-                value:discVer + " under " + path);
+                value:tmp_version);
         security_note(data:"Discloser version " + discVer +
                " running at location " + path +  " was detected on the host");
+      
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:bob_jewell:discloser:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_divx_web_player_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_divx_web_player_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_divx_web_player_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900534";
+SCRIPT_DESC = "DivX Web Player Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -87,4 +93,10 @@
   set_kb_item(name:"DivX/Web/Player/Ver", value:divVer);
   security_note(data:"DivX Web Player version " + divVer +
            " running at location " + path + " was detected on the host");
+    
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:Ver, exp:"", base:"");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_dovecot_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_dovecot_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_dovecot_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901025";
+SCRIPT_DESC = "Dovecot Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -62,6 +67,12 @@
     set_kb_item(name:"Dovecot/Ver", value:dovecotVer[1]);
     security_note(data:"Dovecot version " + dovecotVer[1] +
          " running at location " + dovecotbin + " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:dovecotVer[1], exp:"^([0-9.]+)", base:"cpe:/a:dovecot:dovecot:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_easy_rmtomp3_conv_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_easy_rmtomp3_conv_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_easy_rmtomp3_conv_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900632";
+SCRIPT_DESC = "Easy RmtoMp3 Converter Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,6 +78,12 @@
       set_kb_item(name:"EasyRmtoMp3/Conv/Ver", value:rmtomp3Ver[1]);
       security_note(data:"Easy RmtoMp3 Converter version " + rmtomp3Ver[1] +
                                                 " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:rmtomp3Ver[1], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:mini-stream:easy_rm-mp3_converter:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_efront_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_efront_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_efront_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901044";
+SCRIPT_DESC = "eFront Version Detection";
+
 efrontPort = get_http_port(default:80);
 if(!efrontPort){
   exit(0);
@@ -64,10 +70,18 @@
   {
     efrontVer = eregmatch(pattern:"version ([0-9.]+)", string:rcvRes);
     if(efrontVer[1] != NULL){
+
+      tmp_version = efrontVer[1] + " under " + dir;
       set_kb_item(name:"www/"+ efrontPort + "/eFront",
-                  value:efrontVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"eFront version " + efrontVer[1] +
                  " running at location " + dir +  " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:efrontlearning:efront:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_elecard_avchd_player_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_elecard_avchd_player_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_elecard_avchd_player_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,8 +51,14 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
-if(!get_kb_item("SMB/WindowsVersion")){
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900628";
+SCRIPT_DESC = "Elecard AVC HD Player Version Detection";
+
+if (!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
 
@@ -62,4 +68,10 @@
    set_kb_item(name:"Elecard/AVC/HD/Ver", value:avcVer);
    security_note(data:"Elecard AVC HD Player version " + avcVer +
                                                   " was detected on the host");
+    
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:avcVer, exp:"^([0-9.]+)", base:"cpe:/a:elecard:elecard_avc_hd_player:");
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_elog_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_elog_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_elog_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901008";
+SCRIPT_DESC = "ELOG Version Detection";
+
 elogPort = get_http_port(default:8080);
 if(!elogPort){
   elogPort = 8080;
@@ -71,4 +77,10 @@
   elogVer = ereg_replace(pattern:"-", string:elogVer[1], replace: ".");
   set_kb_item(name:"www/" + elogPort + "/ELOG", value:elogVer);
   security_note(data:"ELOG version " + elogVer + " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:elogVer, exp:"^([0-9]+\.[0-9]+\.[0-9]+)", base:"cpe:/a:stefan_ritt:elog_web_logbook:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_eset_remote_administrator_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_eset_remote_administrator_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_eset_remote_administrator_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,24 @@
 
 
 include("smb_nt.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900508";
+SCRIPT_DESC = "ESET Remote Administrator Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -64,6 +81,10 @@
     set_kb_item(name:"ESET/RemoteAdmin/Console/Ver", value:consoleVer);
     security_note(data:"ESET Remote Administrator Console version " + 
                                    consoleVer + " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:consoleVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:eset:remote_administrator:");
+
   }
 }
 
@@ -76,6 +97,10 @@
     set_kb_item(name:"ESET/RemoteAdmin/Server/Ver", value:servVer);
     security_note(data:"ESET Remote Administrator Server version " + 
                                    servVer + " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:servVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:eset:remote_administrator:");
+
   }
 
 }

Modified: trunk/openvas-plugins/scripts/secpod_ezip_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ezip_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ezip_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900524";
+SCRIPT_DESC = "eZip Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -59,4 +64,10 @@
 if(ezipVer != NULL){
   set_kb_item(name:"eZip/Version", value:ezipVer);
   security_note(data:"eZip Version " + ezipVer + " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:ezipVer, exp:"^([0-9.]+)", base:"cpe:/a:edisys:ezip_wizard:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_f-prot_av_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_f-prot_av_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_f-prot_av_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900553";
+SCRIPT_DESC = "F-PROT Antivirus Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
        set_kb_item(name:"F-Prot/AV/Win/Ver", value:fprotVer);
        security_note(data:"F-PROT Antivirus version " + fprotVer +
                                              " was detected on the host");
+    
+       ## build cpe and store it as host_detail
+       cpe = build_cpe(value:fprotVer, exp:"^([0-9.]+)", base:"cpe:/a:f-prot:f-prot_antivirus:");
+       if(!isnull(cpe))
+          register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_faslo_player_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_faslo_player_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_faslo_player_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900253";
+SCRIPT_DESC = "Faslo Player Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -66,4 +72,9 @@
   set_kb_item(name:"FasloPlayer/Ver", value:fpVer);
   security_note(data:"Faslo Player version " + fpVer +
                                               " was detected on the host");
+  
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:fpVer, exp:"^([0-9.]+)", base:"cpe:/a:faslo:faslo_player:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 }

Modified: trunk/openvas-plugins/scripts/secpod_fcms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_fcms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_fcms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902309";
+SCRIPT_DESC = "Haudenschilt Family Connections CMS (FCMS) Version Detection";
+
 ## GET HTTP port
 cmsPort = get_http_port(default:80);
 if(!cmsPort){
@@ -66,10 +72,17 @@
     if(cmsVer[1] != NULL)
     {
       ## Set the KB item
+      tmp_version = cmsVer[1] + " under " + dir;
       set_kb_item(name:"www/" + cmsPort + "/FCMS",
-                    value:cmsVer[1] + " under " + dir);
+                    value:tmp_version);
       security_note(data:"Family Connections version " + cmsVer[1] +
                    " running at location " + dir + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:haudenschilt:family_connections_cms:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_filezilla_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_filezilla_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_filezilla_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("ftp_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900518";
+SCRIPT_DESC = "FileZilla Server Version Detection";
+
 fzillaPort = get_kb_item("Services/ftp");
 if(!fzillaPort){
   fzillaPort = 21;
@@ -68,5 +74,11 @@
     set_kb_item(name:"FileZilla/Serv/Ver", value:fzillaVer[1]);
     security_note(data:"FileZilla Server version " + fzillaVer[1] +
                                              " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:fzillaVer[1], exp:"^([0-9.]+([a-z])?)", base:"cpe:/a:filezilla:filezilla_server:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_formmax_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_formmax_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_formmax_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900971";
+SCRIPT_DESC = "FormMax Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"FormMax/Evaluation/Ver", value:fmVer[1]);
       security_note(data:"FormMax version " + fmVer[1] +
                                               " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:fmVer[1], exp:"^([0-9.]+)", base:"cpe:/a:cutepdf:formmax:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_foxit_wac_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_foxit_wac_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_foxit_wac_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("ssh_func.inc");
 include("telnet_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900923";
+SCRIPT_DESC = "Foxit WAC Server Version Detection";
+
 sshdPort = get_kb_item("Services/ssh");
 if(!sshdPort){
   sshdPort = 22;
@@ -77,6 +83,12 @@
       set_kb_item(name:"Foxit-WAC-Server/Ver", value:wacVer);
       security_note(data:"Foxit WAC Server version " + wacVer +
                                                " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:wacVer, exp:"^([0-9.]+)", base:"cpe:/a:foxitsoftware:wac_server:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_freeradius_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_freeradius_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_freeradius_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900855";
+SCRIPT_DESC = "FreeRADIUS Version Detection";
+
 radius_sock = ssh_login_or_reuse_connection();
 if(!radius_sock){
   exit(0);
@@ -65,6 +70,12 @@
       set_kb_item(name:"FreeRADIUS/Ver", value:radius_ver[1]);
       security_note(data:"FreeRADIUS version " + radius_ver[1] +
             " running at location " + binName + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:radius_ver[1], exp:"^([0-9.]+)", base:"cpe:/a:freeradius:freeradius:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_freesshd_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_freesshd_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_freesshd_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900959";
+SCRIPT_DESC = "freeSSHd Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,6 +78,12 @@
       set_kb_item(name:"freeSSHd/Ver", value:sshdVer[1]);
       security_note(data:"freeSSHd version " + sshdVer[1] +
                                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:sshdVer[1], exp:"^([0-9.]+)", base:"cpe:/a:freesshd:freesshd:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_freetype_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_freetype_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_freetype_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900626";
+SCRIPT_DESC = "FreeType Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +71,12 @@
     security_note(data:"FreeType version " + ftVer[0] +
              " running at location " + binName + " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ftVer[0], exp:"^([0-9.]+)", base:"cpe:/a:freetype:freetype:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_freetype_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_freetype_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_freetype_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901144";
+SCRIPT_DESC = "FreeType Version Detection (Windows)";
+
 ## Check for Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -74,6 +80,12 @@
     {
       set_kb_item(name:"FreeType/Win/Ver", value:ver);
       security_note(data:"FreeType version "+ver+" was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:freetype:freetype:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_frontaccounting_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_frontaccounting_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_frontaccounting_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900256";
+SCRIPT_DESC = "FrontAccounting Detection";
+
 port = get_http_port(default:80);
 if(!get_port_state(port)){
   exit(0);
@@ -84,10 +90,17 @@
       }
       if(version)
       {
+        tmp_version = string(version," under ",dir);
         set_kb_item(name:string("www/", port, "/FrontAccounting"),
-                    value:string(version," under ",dir));
+                    value:tmp_version);
         security_note(data:"FrontAccounting version " + version +
                   " running at location " + dir +  " was detected on the host");
+  
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:frontaccounting:frontaccounting:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         exit(0);
       }
     }

Modified: trunk/openvas-plugins/scripts/secpod_ftpshell_client_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ftpshell_client_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ftpshell_client_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900961";
+SCRIPT_DESC = "FTPShell Client Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -97,6 +102,12 @@
           set_kb_item(name:"FTPShell/Client/Ver", value:shellVer);
           security_note(data:"FTPShell Client version " + shellVer +
                              " was detected on the host");
+   
+          ## build cpe and store it as host_detail
+          cpe = build_cpe(value:shellVer, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:ftpshell:ftpshell:");
+          if(!isnull(cpe))
+             register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         }
       }
     }

Modified: trunk/openvas-plugins/scripts/secpod_fuzzylime_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_fuzzylime_cms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_fuzzylime_cms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900583";
+SCRIPT_DESC = "Fuzzylime(cms) Version Detection";
+
 cmsPort = get_http_port(default:80);
 if(!cmsPort){
   cmsPort = 80;
@@ -80,10 +86,18 @@
       }
     }
     if(cmsVer[1] != NULL){
+
+        tmp_version = cmsVer[1] + " under " + dir;
         set_kb_item(name:"www/"+ cmsPort + "/Fuzzylime(cms)",
-                    value:cmsVer[1] + " under " + dir);
+                    value:tmp_version);
         security_note(data:"Fuzzylime(cms) Version " + cmsVer[1] +
                  " running at location " + dir +  " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:fuzzylime:fuzzylime_cms:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
  }
 }

Modified: trunk/openvas-plugins/scripts/secpod_g15daemon_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_g15daemon_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_g15daemon_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900853";
+SCRIPT_DESC = "G15Daemon Version Detection";
+
 g15d_sock = ssh_login_or_reuse_connection();
 if(!g15d_sock) {
   exit(0);
@@ -63,6 +69,12 @@
     set_kb_item(name:"G15Daemon/Ver", value:g15dVer[1]);
     security_note(data:"G15Daemon version " + g15dVer[1] +
              " running at location " + binName + " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:g15dVer[1], exp:"^([0-9.]+)", base:"cpe:/a:g15tools:g15daemon:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_geoserver_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_geoserver_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_geoserver_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,24 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900945";
+SCRIPT_DESC = "GeoServer Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 geoPort = get_http_port(default:8080);
 if(!geoPort){
   geoPort = 8080;
@@ -81,10 +98,15 @@
       ## Replacing "-" with "." ex 1.7.0-RC1 and 1.7.0-beta1
       geoVer = ereg_replace(pattern:string("-"), replace:string("."),
                             string:geoVer);
+      tmp_version = geoVer + " under " + dir;
       set_kb_item(name:"www/" + geoPort + "/GeoServer",
-                  value:geoVer + " under " + dir);
+                  value:tmp_version);
       security_note(data:"GeoServer version " + geoVer + " running at location "
                                           + dir +  " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:geoserver:geoserver:");
+
     }
   }
 
@@ -108,11 +130,15 @@
         ## Replacing "-" with "." ex 1.7.0-RC1 and 1.7.0-beta1
         geoVer = ereg_replace(pattern:string("-"), replace:string("."),
                               string:geoVer);
+        tmp_version = geoVer + " under " + dir;
         set_kb_item(name:"www/" + geoPort + "/GeoServer",
-                    value:geoVer + " under " + dir);
+                    value:tmp_version);
         security_note(data:"GeoServer version " + geoVer + 
                  " running at location " + dir +  " was detected on the host");
 
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:geoserver:geoserver:");
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_ghostscript_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ghostscript_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ghostscript_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900541";
+SCRIPT_DESC = "Ghostscript Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +73,12 @@
     security_note(data:"Ghostscript version " + gsVer[0] +
          " running at location " + binary_name + " was detected on the host");
     ssh_close_connection();
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:gsVer[0], exp:"^([0-9.]+)", base:"cpe:/a:ghostscript:ghostscript:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ghostscript_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ghostscript_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ghostscript_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900539";
+SCRIPT_DESC = "Ghostscript Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"Ghostscript/Win/Ver", value:ghostVer[1]);
       security_note(data:"Ghostscript version " + ghostVer[1] +
                                              " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ghostVer[1], exp:"^([0-9.]+)", base:"cpe:/a:ghostscript:ghostscript:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_gupnp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_gupnp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_gupnp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900681";
+SCRIPT_DESC = "GUPnP Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +71,12 @@
     set_kb_item(name:"GUPnP/Ver", value:gupnpVer[1]);
     security_note(data:"GUPnP version " + gupnpVer[1] +
             " running at location " + gupnpBin + " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:gupnpVer[1], exp:"^([0-9.]+)", base:"cpe:/a:gupnp:gupnp:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_hamster_audio_player_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_hamster_audio_player_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_hamster_audio_player_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800692";
+SCRIPT_DESC = "Hamster Audio Player Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"Hamster/Audio-Player/Ver", value:hamsterVer[1]);
       security_note(data:"Hamster Audio player Version " + hamsterVer[1] +
                                                  " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:hamsterVer[1], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:ondanera.net:hamster_audio_player:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_home_ftp_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_home_ftp_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_home_ftp_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900259";
+SCRIPT_DESC = "Home FTP Server Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -69,5 +75,11 @@
     set_kb_item(name:"HomeFTPServer/Ver", value:hftpVer[2]);
     security_note(data:"Home FTP Server version " + hftpVer[2] +
                                             " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:hftpVer[2], exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:downstairs.dnsalias:home_ftp_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_hp_openview_nnm_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_hp_openview_nnm_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_hp_openview_nnm_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900242";
+SCRIPT_DESC = "HP OpenView Network Node Manager Version Detection";
+
 ## Check NNM Port status
 nnmPort = 7510;
 if(!get_port_state(nnmPort)){
@@ -69,5 +75,11 @@
     set_kb_item(name:"www/"+ nnmPort + "/HP/OVNNM/Ver", value:nnmVer[1]);
     security_note(port:nnmPort, data:"HP OpenView Network Node Manager " +
                        "version " + nnmVer[1] + " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:nnmVer[1], exp:"^([0-9.]+)", base:"cpe:/a:hp:openview_network_node_manager:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_hp_smh_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_hp_smh_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_hp_smh_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("http_func.inc");
 include("misc_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900657";
+SCRIPT_DESC = "HP System Management Homepage (SMH) Version Detection";
+
 ports = add_port_in_list(list:get_kb_list("Services/www"), port:2301);
 foreach port (ports)
 {
@@ -61,6 +67,12 @@
       set_kb_item(name:"www/" + port + "/HP/SMH", value:smhVer[1]);
       security_note(data:"HP System Management Homepage (SMH) version " +
                                      smhVer[1] + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:smhVer[1], exp:"^([0-9.]+)", base:"cpe:/a:hp:system_management_homepage:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_hplip_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_hplip_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_hplip_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900428";
+SCRIPT_DESC = "HP Linux Imaging and Printing System Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -68,6 +74,12 @@
                        hplipVer[1] + " running at location " + hplipBin + 
                       " was detected on the host");
     ssh_close_connection();
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:hplipVer[1], exp:"^([0-9.]+)", base:"cpe:/a:hp:hplip:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_hyleos_chemview_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_hyleos_chemview_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_hyleos_chemview_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900748";
+SCRIPT_DESC = "Hyleos ChemView Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -71,6 +77,12 @@
        set_kb_item(name:"Hyleos/ChemViewX/Ver", value:chemVer);
        security_note(data:"Hyleos ChemView version " + chemVer +
                                               " was detected on the host");
+      
+       ## build cpe and store it as host_detail
+       cpe = build_cpe(value:chemVer, exp:"^([0-9.]+)", base:"cpe:/a:hyleos:chemview:");
+       if(!isnull(cpe))
+          register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ibm_db2_detect_linux_900217.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ibm_db2_detect_linux_900217.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ibm_db2_detect_linux_900217.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 
  include("ssh_func.inc");
+ include("cpe.inc");
+ include("host_details.inc");
 
+ ## Constant values
+ SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900217";
+ SCRIPT_DESC = "IBM DB2 Server Detection (Linux)";
+
  if("Linux" >!< get_kb_item("ssh/login/uname")){
         exit(0);
  }
@@ -64,9 +70,15 @@
 	ibmdbVer = eregmatch(pattern:" [.0-9]+", string:strstr(db2Ver, '/'));
 	if(ibmdbVer != NULL)
 	{
-		set_kb_item(name:"Linux/IBM_db2/Ver", value:ibmdbVer[0]- " ");
+                tmp_version = ibmdbVer[0]- " ";
+		set_kb_item(name:"Linux/IBM_db2/Ver", value:tmp_version);
                 security_note(data:"IBM DB2 Server version " + ibmdbVer[0] + 
                                                   " was detected on the host");
+     
+                ## build cpe and store it as host_detail
+                cpe = build_cpe(value:tmp_version, exp:"^([0-9]\.[0-9])", base:"cpe:/a:ibm:db2:");
+                if(!isnull(cpe))
+                   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
 		patchVer = eregmatch(pattern:" [.0-9a-z ]+",
 				     string:strstr(db2Ver, '/'));

Modified: trunk/openvas-plugins/scripts/secpod_ibm_db2_detect_win_900218.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ibm_db2_detect_win_900218.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ibm_db2_detect_win_900218.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,10 +46,15 @@
  exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900218";
+SCRIPT_DESC = "IBM DB2 Server Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
     exit(0);
 }
@@ -73,6 +78,12 @@
         set_kb_item(name:"Win/IBM-db2/Ver", value:appVer);
         security_note(data:"IBM DB2 Server version " + appVer +
                                              " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:appVer, exp:"^([0-9]\.[0-9])", base:"cpe:/a:ibm:db2:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         exit(0);
       }
     }exit(0);

Modified: trunk/openvas-plugins/scripts/secpod_ibm_informix_dynamic_server_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ibm_informix_dynamic_server_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ibm_informix_dynamic_server_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902547";
+SCRIPT_DESC = "IBM Informix Dynamic Server Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -71,5 +77,11 @@
     set_kb_item(name:"IBM/Informix/Dynamic/Server/Lin/Ver", value:version[1]);
     security_note(data:"IBM Informix Dynamic Server " + version[1] +
                          " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:version[1], exp:"^([0-9.]+)", base:"cpe:/a:ibm:informix_dynamic_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ibm_informix_dynamic_server_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ibm_informix_dynamic_server_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ibm_informix_dynamic_server_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,10 +45,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902545";
+SCRIPT_DESC = "IBM Informix Dynamic Server Version Detection (Windows)";
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -78,6 +83,11 @@
       set_kb_item(name:"IBM/Informix/Dynamic/Server/Win/Ver", value:version);
       security_note(data:"IBM Informix Dynamic Server " + version +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: version, exp:"^([0-9.]+)",base:"cpe:/a:ibm:informix_dynamic_server:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ibm_lotus_notes_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ibm_lotus_notes_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ibm_lotus_notes_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901016";
+SCRIPT_DESC = "IBM Lotus Notes Version Detection (Linux)";
+
 # Get the Socket Connection
 sock = ssh_login_or_reuse_connection();
 if(!sock)
@@ -69,6 +75,12 @@
     set_kb_item(name:"IBM/LotusNotes/Linux/Ver", value:lotusVer[1]);
     security_note(data:"IBM Lotus Notes version " + lotusVer[1] +
              " running at location " + binName + " was detected on the host");
+    
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:lotusVer[1], exp:"^([0-9]\.[0-9]+\.[0-9]+)", base:"cpe:/a:ibm:lotus_notes:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_ibm_lotus_notes_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ibm_lotus_notes_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ibm_lotus_notes_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901013";
+SCRIPT_DESC = "IBM Lotus Notes Version Detection (Win)";
+
 # Check for Windows
 if(!get_kb_item("SMB/WindowsVersion"))
 {
@@ -80,5 +86,11 @@
     set_kb_item(name:"IBM/LotusNotes/Win/Ver", value:lotusVer);
     security_note(data:"IBM Lotus Notes version " + lotusVer +
                " running at location " + path + " was detected on the host");
+    
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:lotusVer, exp:"^([0-9]\.[0-9]+\.[0-9]+)", base:"cpe:/a:ibm:lotus_notes:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ida_pro_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ida_pro_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ida_pro_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901188";
+SCRIPT_DESC = "Hex-Rays IDA Pro Version Detection";
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -86,4 +92,10 @@
   security_note(data:"IDA Pro Version " + idaVer +
                      " installed at location " + path +
                      " was detected on the host");
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:idaVer, exp:"^([0-9.]+)", base:"cpe:/a:hex-rays:ida:5.7::");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_imagemagick_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_imagemagick_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_imagemagick_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900563";
+SCRIPT_DESC = "ImageMagick version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +73,13 @@
     set_kb_item(name:"ImageMagick/Lin/Ver", value:imageVer[1]);
     security_note(data:"ImageMagick version " + imageVer[1] +
           " running at location " + binaryFile + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:imageVer[1], exp:"^([0-9.]+)", base:"cpe:/a:imagemagick:imagemagick:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_imagemagick_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_imagemagick_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_imagemagick_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900562";
+SCRIPT_DESC = "ImageMagick Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"ImageMagick/Win/Ver", value:imVer[1]);
       security_note(data:"ImageMagick version " + imVer[1] +
                                            " was detected on the host");
+    
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:imVer[1], exp:"^([0-9.]+)", base:"cpe:/a:imagemagick:imagemagick:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_irfanview_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_irfanview_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_irfanview_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900376";
+SCRIPT_DESC = "IrfanView Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -125,4 +131,11 @@
   set_kb_item(name:"IrfanView/Ver", value:irViewVer);
   security_note(data:"IrfanView version " + irViewVer + " running at location "
                                   + irViewPath +  " was detected on the host");
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:irViewVer, exp:"^([0-9.]+)", base:"cpe:/a:irfanview:irfanview:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_isc_dhcp_client_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_isc_dhcp_client_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_isc_dhcp_client_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900696";
+SCRIPT_DESC = "ISC DHCP Client Version Detection";
+
 dhcp_sock = ssh_login_or_reuse_connection();
 if(!dhcp_sock){
   exit(0);
@@ -72,6 +78,12 @@
      set_kb_item(name:"ISC/DHCP-Client/Ver", value:dhcpVer);
      security_note(data:"ISC DHCP Client version " + dhcpVer +
              " running at location " + dhcpBin + " was detected on the host");
+    
+     ## build cpe and store it as host_detail
+     cpe = build_cpe(value:dhcpVer, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:isc:dhcp:");
+     if(!isnull(cpe))
+        register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_jag_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_jag_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_jag_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900744";
+SCRIPT_DESC = "JAG (Just Another Guestbook) Version Detection";
+
 jagPort = get_http_port(default:80);
 if(!jagPort){
   exit(0);
@@ -63,10 +69,18 @@
   {
     jagVer = eregmatch(pattern:"> v([0-9.]+)", string:rcvRes);
     if(jagVer[1] != NULL){
+
+      tmp_version = jagVer[1] + " under " + path;
       set_kb_item(name:"www/" + jagPort + "/JAG",
-                               value:jagVer[1] + " under " + path);
+                               value:tmp_version);
       security_note(data:"JAG (Just Another Guestbook) version " + jagVer[1] +
                 " running at location " + path +  " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:xs4all:jag:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_kde_konqueror_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_kde_konqueror_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_kde_konqueror_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900902";
+SCRIPT_DESC = "KDE Konqueror Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -72,6 +78,12 @@
     set_kb_item(name:"KDE/Konqueror/Ver", value:konqerVer);
     security_note(data:"KDE Konqueror version " + konqerVer +
           " running at location " + binaryName + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:konqerVer, exp:"^([0-9.]+)", base:"cpe:/a:kde:konqueror:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_kvirc_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_kvirc_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_kvirc_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901010";
+SCRIPT_DESC = "KVIrc Version Detection (Win)";
+
 # Check for Windows OS
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -113,6 +119,12 @@
       set_kb_item(name:"Kvirc/Win/Ver", value:kvircVer);
       security_note(data:"KVIrc Version " + kvircVer + " running at location "
                                      + exePath +  " was detected on the host");
+     
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:kvircVer, exp:"^([0-9.]+)", base:"cpe:/a:kvirc:kvirc:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_labtam_proftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_labtam_proftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_labtam_proftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900979";
+SCRIPT_DESC = "Labtam ProFTP Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"Labtam/ProFTP/Ver", value:item);
       security_note(data:"Labtam ProFTP version " + item +
                                       " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:item, exp:"^([0-9.]+)", base:"cpe:/a:proftpd:proftpd:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_libpng_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_libpng_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_libpng_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900070";
+SCRIPT_DESC = "libpng Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +73,12 @@
     security_note(data:"libpng Version " + pngVer[0] +
           " running at location " + binaryName + " was detected on the host");
     ssh_close_connection();
+     
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:pngVer[0], exp:"^([0-9.]+)", base:"cpe:/a:libpng:libpng:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_libre_office_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_libre_office_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_libre_office_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,24 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902701";
+SCRIPT_DESC = "LibreOffice Version Detection (Linux)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -71,11 +88,15 @@
       buildVer = eregmatch(pattern:"Build.?([0-9.]+)", string:officeVer[2]);
       if(buildVer[1] != NULL)
       {
-        set_kb_item(name:"LibreOffice/Linux/Ver", value:officeVer[1] + "." +
-                                                               buildVer[1]);
+        tmp_version = officeVer[1] + "." + buildVer[1];
+        set_kb_item(name:"LibreOffice/Linux/Ver", value:tmp_version);
         security_note(data:"LibreOffice version " + officeVer[1] + "." +
                     buildVer[1] + " running at location " + binary_officeName
                      + " was detected on the host");
+
+         ## build cpe and store it as host_detail
+        register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:libreoffice:libreoffice:");
+
       }
     }
     else
@@ -84,6 +105,10 @@
       security_note(data:"LibreOffice version " + officeVer[1] +
                     " running at location " + binary_officeName +
                     " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:officeVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:libreoffice:libreoffice:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_libre_office_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_libre_office_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_libre_office_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902398";
+SCRIPT_DESC = "LibreOffice Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -78,6 +84,12 @@
       set_kb_item(name:"LibreOffice/Win/Ver", value:officeVer);
       security_note(data:"LibreOffice version " + officeVer +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:officeVer, exp:"^([0-9.]+)", base:"cpe:/a:libreoffice:libreoffice:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_lightneasy_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_lightneasy_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_lightneasy_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,24 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900371";
+SCRIPT_DESC = "LightNEasy Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 lightNEasyPort = get_http_port(default:80);
 if(!lightNEasyPort){
   lightNEasyPort = 80;
@@ -79,18 +96,27 @@
     {
       if(lightNEasyVer[1]!= NULL)
       {
+        tmp_version = 
         set_kb_item(name:"www/"+ lightNEasyPort + "/LightNEasy/Sqlite",
-                    value:lightNEasyVer[1] + " under " + lightDir);
+                    value:tmp_version);
         security_note(data:"LightNEasy version " + lightNEasyVer[1] +
             " running at location " + lightDir +  " was detected on the host");
+
+        ## build cpe and store it as host detail
+        register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:sqlite:sqlite:");
+
       }
     }
     else if(lightNEasyVer[1] != NULL)
     {
+      tmp_version = lightNEasyVer[1] + " under " + lightDir;
       set_kb_item(name:"www/"+ lightNEasyPort + "/LightNEasy/NoDB",
-                  value:lightNEasyVer[1] + " under " + lightDir);
+                  value:tmp_version);
       security_note(data:"LightNEasy version " + lightNEasyVer[1] + 
             " running at location " + lightDir +  " was detected on the host");
+
+      ## build cpe and store it as host detail
+      register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:lightneasy:lightneasy:");
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_limesurvey_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_limesurvey_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_limesurvey_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,24 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900352";
+SCRIPT_DESC = "LimeSurvey Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 surveyPort = get_http_port(default:80);
 if(!surveyPort){
   surveyPort = 80;
@@ -78,10 +95,15 @@
                             string:res);
       if(surveyVer[1] != NULL)
       {
+        tmp_version = surveyVer[1] + " under " + dir;
         set_kb_item(name:"www/" + surveyPort + "/LimeSurvey",
-                    value:surveyVer[1] + " under " + dir);
+                    value:tmp_version);
         security_note(data:"LimeSurvey version " + surveyVer[1] +
                 " running at location " + dir +  " was detected on the host");
+
+        ## build cpe and store it as host detail
+        register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?",tmpBase:"cpe:/a:limesurvey:limesurvey:");
+
       }
     }
   }
@@ -95,10 +117,15 @@
                              string:rcvRes);
     if(surveyorVer[2] != NULL)
     {
+      tmp_version = surveyorVer[2] + " under " + dir;
       set_kb_item(name:"www/" + surveyPort + "/LimeSurvey",
-                  value:surveyorVer[2] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"LimeSurvey version " + surveyorVer[2] + 
                 " running at location " + dir +  " was detected on the host");
+
+      ## build cpe and store it as host detail
+      register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?",tmpBase:"cpe:/a:limesurvey:limesurvey:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_mahara_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_mahara_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_mahara_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -52,7 +52,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900381";
+SCRIPT_DESC = "Mahara Version Detection";
+
 maharaPort = get_http_port(default:80);
 if(!maharaPort){
   maharaPort = 80;
@@ -97,10 +103,17 @@
 
       if(maharaVer != NULL)
       {
+        tmp_version = maharaVer + " under " + dir;
         set_kb_item(name:"www/"+ maharaPort + "/Mahara",
-                    value:maharaVer + " under " + dir);
+                    value:tmp_version);
         security_note(data:"Mahara version " + maharaVer + " running at location " +
 		                    dir +  " was detected on the host", port:maharaPort);
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:mahara:mahara:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         break;
       }
     }

Modified: trunk/openvas-plugins/scripts/secpod_mathematica_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_mathematica_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_mathematica_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901118";
+SCRIPT_DESC = "Mathematica Version Detection (Linux)";
+
 ## Create Socket
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -80,6 +86,12 @@
         security_note(data:"Mathematica version " + mVer[1] +
                            " running at location " + path +
                            " was detected on the host");
+      
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:mVer[1], exp:"^([0-9.]+)", base:"cpe:/a:wolfram_research:mathematica:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_mcafee_saas_endpoint_protection_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_mcafee_saas_endpoint_protection_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_mcafee_saas_endpoint_protection_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902561";
+SCRIPT_DESC = "McAfee SaaS Endpoint Protection Version Detection (Windows)";
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -71,5 +77,11 @@
     set_kb_item(name:"McAfee/SaaS/Win/Ver", value:version);
     security_note(data:"McAfee SaaS Endpoint Protection " + version +
                        " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:mcafee:saas_endpoint_protection:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_media_player_classic_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_media_player_classic_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_media_player_classic_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900947";
+SCRIPT_DESC = "Gabset Media Player Classic Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")) {
   exit(0);
 }
@@ -67,5 +73,11 @@
     set_kb_item(name:"MediaPlayerClassic/Ver", value:mpcVer);
     security_note(data:"Media Player Classic version " + mpcVer +
              " running at location " + mpcPath +  " was detected on the host");
+     
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:mpcVer, exp:"^([0-9.]+)", base:"cpe:/a:rob_schultz:media_player_classic:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_mediawiki_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_mediawiki_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_mediawiki_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -57,7 +57,24 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900420";
+SCRIPT_DESC = "MediaWiki script Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 port = get_http_port(default:80);
 if(!port){
   port = 80;
@@ -78,15 +95,26 @@
     if(wikiVer[1] != NULL)
     {
       if(wikiVer[3] != NULL){
-        set_kb_item(name:"MediaWiki/Version", value:wikiVer[1]+ "." +wikiVer[2]
-                            + " under " + dir);
+
+        tmp_version = wikiVer[1]+ "." +wikiVer[2] + " under " + dir;
+        set_kb_item(name:"MediaWiki/Version", value:tmp_version);
         security_note(data:"MediaWiki Version " + wikiVer[1]+ "." +wikiVer[2] +
                  " running at location " + dir +  " was detected on the host");
+     
+        ## build cpe and store it as host_detail
+        register__cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:mediawiki:mediawiki:");
+
       }
       else {
-        set_kb_item(name:"MediaWiki/Version", value:wikiVer[1] + " under " + dir);
+
+        tmp_version = wikiVer[1] + " under " + dir;
+        set_kb_item(name:"MediaWiki/Version", value:tmp_version);
         security_note(data:"MediaWiki Version " + wikiVer[1] + 
                  " running at location " + dir +  " was detected on the host");
+     
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:tmp_version, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:mediawiki:mediawiki:");
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_metasploit_framework_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_metasploit_framework_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_metasploit_framework_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902293";
+SCRIPT_DESC = "Metasploit Framework Version Detection (Windows)";
+
 ## Check for Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -73,6 +79,12 @@
       ## Set the version in KB
       set_kb_item(name:"Metasploit/Framework/Win/Ver", value:ver);
       security_note(data:"Metasploit Framework " + ver + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:metasploit:metasploit_framework:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_mikmod_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_mikmod_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_mikmod_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900442";
+SCRIPT_DESC = "MikMod Module Player Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +73,12 @@
     security_note(data:"MikMod Module Player version " + mikmodCmd[1] +
          " running at location " + binary_name + " was detected on the host");
     ssh_close_connection();
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:mikmodCmd[1], exp:"^([0-9.]+)", base:"cpe:/a:igno_saitz:libmikmod:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_mini_stream_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_mini_stream_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_mini_stream_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,10 +50,26 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900642";
+SCRIPT_DESC = "Mini-Stream Products Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -70,6 +86,8 @@
   set_kb_item(name:"MiniStream/SSRecorder/Ver", value:ssRVer[1]);
   security_note(data:"Mini-stream Shadow Stream Recorder version " + ssRVer[1]
                                                 + " was detected on the host");
+  ##build cpe and store it as host_detail
+  register_cpe(tmpVers:ssRVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:mini-stream:shadow_stream_recorder:");
 }
 
 item2 = "Mini-stream RM-MP3 Converter_is1\";
@@ -82,6 +100,9 @@
   set_kb_item(name:"MiniStream/RmToMp3/Conv/Ver", value:rmTmpVer[1]);
   security_note(data:"Mini-stream RM-MP3 Converter version " + rmTmpVer[1] 
                                                + " was detected on the host");
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:rmTmpVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:mini-stream:easy_rm-mp3_converter:");
+
 }
 
 item3 = "WM Downloader_is1\";
@@ -94,6 +115,9 @@
   set_kb_item(name:"MiniStream/WMDown/Ver", value:wmDownVer[1]);
   security_note(data:"Mini-stream WM Downloader version " + wmDownVer[1]
                                                + " was detected on the host");
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:wmDownVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:mini-stream:wm_downloader:");
+
 }
 
 item4 = "RM Downloader_is1\";
@@ -106,6 +130,9 @@
   set_kb_item(name:"MiniStream/RMDown/Ver", value:rmDownVer);
   security_note(data:"Mini-stream RM Downloader version " + rmDownVer
                                                + " was detected on the host");
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:rmDownVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:mini-stream:mini-stream_rm_downloader:");
+
 }
 
 item5 = "ASX to MP3 Converter_is1\";
@@ -118,6 +145,9 @@
   set_kb_item(name:"MiniStream/AsxToMp3/Conv/Ver", value:asx2mpVer[1]);
   security_note(data:"Mini-stream ASX to MP3 Converter version " + asx2mpVer[1]
                                                 + " was detected on the host");
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:asx2mpVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:mini-stream:mini-stream_to_mp3_converter:");
+
 }
 
 item6 = "Mini-stream Ripper_is1\";
@@ -130,6 +160,9 @@
   set_kb_item(name:"MiniStream/Ripper/Ver", value:msRipperVer[1]);
   security_note(data:"Mini-stream Ripper version " + msRipperVer[1]
                                                + " was detected on the host");
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:msRipperVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:mini-stream:ripper:");
+
 }
 
 
@@ -144,5 +177,8 @@
     set_kb_item(name:"MiniStream/CastRipper/Ver", value:castripperVer[1]);
     security_note(data:"Mini-stream CastRipper version " + castripperVer[1]
                                                + " was detected on the host");
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:castripperVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:mini-stream:castripper:");
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_mpg123_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_mpg123_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_mpg123_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900543";
+SCRIPT_DESC = "mpg123 Player Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 
 if(!sock){
@@ -67,6 +72,12 @@
     security_note(data:"mpg123 Player version " + mpgVer[0] +
               " running at location " + binName + " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:mpgVer[0], exp:"^([0-9.]+)", base:"cpe:/a:mpg123:mpg123:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ms_iis_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ms_iis_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ms_iis_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,9 +47,14 @@
   exit(0);
 }
 
-
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900710";
+SCRIPT_DESC = "Microsoft IIS Webserver Version Detection";
+
 iisPort = get_http_port(default:80);
 if(!iisPort){
   iisPort = 80;
@@ -72,4 +77,10 @@
   set_kb_item(name:"IIS/" + iisPort + "/Ver", value:iisVer[1]);
   security_note(data:"Microsoft IIS Webserver Version " + iisVer[1] +
                                                  " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value: iisVer[1], exp:"^([0-9])\..*", base:"cpe:/a:microsoft:iis:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_ms_office_detection_900025.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ms_office_detection_900025.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ms_office_detection_900025.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,31 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900025";
+SCRIPT_DESC = "Microsoft Office Version Detection";
+
+TMP_OFFICE_LIST = make_list( "^(9\..*)",  "cpe:/a:microsoft:office:2000",
+                             "^(10\..*)", "cpe:/a:microsoft:office:2002",
+                             "^(11\..*)", "cpe:/a:microsoft:office:2003",
+                             "^(12\..*)", "cpe:/a:microsoft:office:2007" );
+MAX = max_index(TMP_OFFICE_LIST);
+
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -81,6 +105,10 @@
      if(MSOffVer){
        set_kb_item(name:"MS/Office/Viewer/Ver", value:MSOffVer);
        security_note(data:MSOffName + " was detected on the host");
+
+       ## build cpe and store it as host_detail
+       register_cpe(tmpVers:MSOffVer, tmpExpr:"^([0-9.]+)", tmpBase:"");
+
      }
      continue;
   }
@@ -92,6 +120,12 @@
     if(MSOffVer){
       set_kb_item(name:"MS/Office/Ver", value:MSOffVer);
       security_note(data:MSOffName + " was detected on the host");
+
+      ## build cpe and store it as host_detail  
+      for (i = 0; i < MAX-1; i = i + 2) {
+         
+         register_cpe(tmpVers:MSOffVer, tmpExpr:TMP_OFFICE_LIST[i], tmpBase:TMP_OFFICE_LIST[i+1]);
+      }
     }
     continue;
   }

Modified: trunk/openvas-plugins/scripts/secpod_ms_visual_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ms_visual_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ms_visual_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,34 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900808";
+SCRIPT_DESC = "Microsoft Visual Products Version Detection";
+
+NET_LIST = make_list("^(7\..*)", "cpe:/a:microsoft:visual_studio_.net:2003",
+                     "^(8\..*)", "cpe:/a:microsoft:visual_studio_.net:2005",
+                     "^(9\..*)", "cpe:/a:microsoft:visual_studio_.net:2008");
+NET_MAX = max_index(NET_LIST);
+
+STUDIO_LIST = make_list("^(7\..*)", "cpe:/a:microsoft:visual_studio:2003",
+                        "^(8\..*)", "cpe:/a:microsoft:visual_studio:2005",
+                        "^(9\..*)", "cpe:/a:microsoft:visual_studio:2008");
+STUDIO_MAX = max_index(STUDIO_LIST);
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,6 +99,12 @@
     if(studioVer != NULL){
       set_kb_item(name:"Microsoft/VisualStudio/Ver", value:studioVer);
       security_note(data:visualName + " was detected on the host");
+
+      ## build cpe and store it as host_detail  
+      for (i = 0; i < STUDIO_MAX-1; i = i + 2) {
+
+        register_cpe(tmpVers:studioVer, tmpExpr:STUDIO_LIST[i], tmpBase:STUDIO_LIST[i+1]);
+      }
     }
   }
 
@@ -82,6 +115,12 @@
     if(netVer != NULL){
       set_kb_item(name:"Microsoft/VisualStudio.Net/Ver", value:netVer);
       security_note(data:"Microsoft " + visualName + " was detected on the host");
+
+      ## build cpe and store it as host_detail  
+      for (i = 0; i < NET_MAX-1; i = i + 2) {
+
+        register_cpe(tmpVers:netVer, tmpExpr:NET_LIST[i], tmpBase:NET_LIST[i+1]);
+      }
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ms_win_media_player_detect_900173.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ms_win_media_player_detect_900173.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ms_win_media_player_detect_900173.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,10 +46,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900173";
+SCRIPT_DESC = "Microsoft Windows Media Player Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,3 +80,9 @@
 set_kb_item(name:"Win/MediaPlayer/Ver", value:wmpVer);
 security_note(data:"Microsoft Windows Media Player version " + wmpVer + 
                    " was detected on the host");
+   
+## build cpe and store it as host_detail
+cpe = build_cpe(value:wmpVer, exp:"^([0-9.]+)", base:"cpe:/a:microsoft:windows_media_player:");
+if(!isnull(cpe))
+   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+

Modified: trunk/openvas-plugins/scripts/secpod_ms_wpp_enterprise_library_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ms_wpp_enterprise_library_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ms_wpp_enterprise_library_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900956";
+SCRIPT_DESC = "Microsoft Windows Patterns & Practices EntLib Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -71,6 +76,12 @@
       set_kb_item(name:"MS/WPP/EntLib/Ver", value:entlibVer);
       security_note(data:"Microsoft Windows Patterns & Practices Enterprise "+
                          "Library version " + entlibVer + " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:entlibVer, exp:"^([0-9]\.[0-9])", base:"cpe:/a:microsoft:enterprise_library:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_mutt_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_mutt_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_mutt_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900675";
+SCRIPT_DESC = "Mutt Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +71,12 @@
     security_note(data:"Mutt version " + muttVer[1] + " running at location " +
                         muttbin +  " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:muttVer[1], exp:"^([0-9.]+)", base:"cpe:/a:mutt:mutt:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_nakid_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_nakid_cms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_nakid_cms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902083";
+SCRIPT_DESC = "Nakid CMS Version Detection";
+
 ## Get HTTP Port
 ncPort = get_http_port(default:80);
 if(!ncPort){
@@ -68,11 +74,18 @@
   {
     ncVer = eregmatch(pattern:"> v.([0-9.]+)", string:rcvRes);
     if(ncVer[1] != NULL){
-      set_kb_item(name:"www/" + ncPort + "/Nakid/CMS/Ver", value:ncVer[1] +
-                  " under " + path);
+     
+      tmp_version = ncVer[1] + " under " + path;
+      set_kb_item(name:"www/" + ncPort + "/Nakid/CMS/Ver", value:tmp_version);
       security_note(data:"Nakid CMS version " + ncVer[1] +
                          " running at location " + path +
                          " was detected on the host", port:ncPort);
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:jeffkilroy:nakid_cms:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_nasl_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_nasl_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_nasl_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900189";
+SCRIPT_DESC = "NASL Version Detection (Linux)";
+
 naslPort = 1241;
 if(!get_tcp_port_state(naslPort)){
   exit(0);
@@ -71,6 +77,12 @@
     security_note(data:"NASL version " + naslVer[1] + " running at location "+
                        naslBin +  " was detected on the host");
     ssh_close_connection();
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:naslVer[1], exp:"^([0-9.]+)", base:"cpe:/a:nessus:nessus:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_natterchat_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_natterchat_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_natterchat_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901003";
+SCRIPT_DESC = "NatterChat Version Detection";
+
 nchatPort = get_http_port(default:80);
 if(!nchatPort){
   nchatPort = 80;
@@ -69,10 +75,17 @@
 
     if(nchatVer[1] != NULL)
     {
+      tmp_version = nchatVer[1] + " under " + dir;
       set_kb_item(name:"www/"+ nchatPort + "/NatterChat",
-                  value:nchatVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"NatterChat version " + nchatVer[1] + " running at "+
                          "location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:natterchat:natterchat:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_neon_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_neon_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_neon_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900827";
+SCRIPT_DESC = "WebDAV Neon Version Detection";
+
 neon_sock = ssh_login_or_reuse_connection();
 if(!neon_sock){
   exit(0);
@@ -68,6 +73,12 @@
     security_note(data:"WebDAV Neon version " + neonVer[1] + 
                        " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:neonVer[1], exp:"^([0-9.]+)", base:"cpe:/a:webdav:neon:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_netdecision_tftp_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_netdecision_tftp_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_netdecision_tftp_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,10 +48,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900357";
+SCRIPT_DESC = "NetDecision TFTP Server Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -131,6 +136,12 @@
       set_kb_item(name:"NetDecision/TFTP/Ver", value:netdeciVer);
       security_note(data:"NetDecision TFTP Server version " + netdeciVer + 
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: netdeciVer, exp:"^([0-9.]+)",base:"cpe:/a:netmechanica:netdecision_tftp_server:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_netpet_cms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_netpet_cms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_netpet_cms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902023";
+SCRIPT_DESC = "Netpet CMS Version Detection";
+
 netPort = get_http_port(default:80);
 if(!netPort){
   exit(0);
@@ -60,10 +66,18 @@
   {
     netVer = eregmatch(pattern:" V ([0-9.]+)", string:rcvRes);
     if(netVer[1] != NULL){
+
+      tmp_version = netVer[1] + " under " + path;
       set_kb_item(name:"www/" + netPort + "/NetpetCMS",
-                value:netVer[1] + " under " + path);
+                value:tmp_version);
       security_note(data:"Netpet CMS version " + netVer[1] + " running at " +
                          "location " + path +  " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:netpet:netpet_cms:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_netscape_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_netscape_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_netscape_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900394";
+SCRIPT_DESC = "Netscape Version Detection (Linux)";
+
 scape_sock = ssh_login_or_reuse_connection();
 if(!scape_sock){
   exit(0);
@@ -96,5 +102,11 @@
   if(ver != NULL){
     set_kb_item(name:"Netscape/Linux/Ver", value:ver);
     security_note(data:"Netscape version " + ver + " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ver, exp:"^([0-9]+)", base:"cpe:/a:netscape:navigator:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_netscape_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_netscape_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_netscape_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900392";
+SCRIPT_DESC = "Netscape Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -69,6 +75,12 @@
         set_kb_item(name:"Netscape/Win/Ver", value:scapeVer[1]);
         security_note(data:"Netscape version " + scapeVer[1] + 
                            " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:scapeVer[1], exp:"^([0-9]+)", base:"cpe:/a:netscape:navigator:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_noticeware_mail_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_noticeware_mail_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_noticeware_mail_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,11 +47,16 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("smtp_func.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900462";
+SCRIPT_DESC = "NoticeWare Email Server Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -76,6 +81,12 @@
       set_kb_item(name:"NoticeWare/Mail/Server/Ver", value:ver);
       security_note(data:"NoticeWare Email Server version " + ver + 
                          " was detected on the host");
+
+       ## build cpe and store it as host_detail
+       cpe = build_cpe(value: ver, exp:"^([0-9.]+)",base:"cpe:/a:noticeware:noticeware_email_server_ng:");
+       if(!isnull(cpe))
+          register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_novell_prdts_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_novell_prdts_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_novell_prdts_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -52,7 +52,24 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900598";
+SCRIPT_DESC = "Novell Products Version Detection (Linux)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -78,6 +95,10 @@
     security_note(data:"Novell eDirectory version " + eDirVer + 
                        " was detected on the host");
 
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:eDirVer, tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:novell:edirectory:");
+
+
   }  
 }
 
@@ -93,6 +114,10 @@
     security_note(data:"Novell iPrint Client version " + iPrintVer[1] + 
                        " running at location " + iPrintBin +  
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:iPrintVer[1], tmpExpr:"^([0-9]\.[0-9]+)", tmpBase:"cpe:/a:novell:iprint_client:");
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_novell_prdts_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_novell_prdts_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_novell_prdts_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -64,7 +64,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900340";
+SCRIPT_DESC = "Novell Multiple Products Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -87,6 +104,10 @@
       set_kb_item(name:"Novell/eDir/Win/Ver", value:eDirVer);
       security_note(data:"Novell eDirectory version " + eDirVer +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:eDirVer, tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:novell:edirectory:");
+
     }
   }
 }
@@ -119,6 +140,10 @@
     set_kb_item(name:"Novell/iPrint/Ver", value:iprintVer);
     security_note(data:"Novell iPrint version " + iprintVer +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:iprintVer, tmpExpr:"^([0-9]\.[0-9]+)", tmpBase:"cpe:/a:novell:iprint:");
+
 }
 
 # Set KB for Novell Client
@@ -144,6 +169,10 @@
     set_kb_item(name:"Novell/Client/Ver", value:clientVer);
     security_note(data:"Novell Client version " + clientVer +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:clientVer, tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:novell:client:");
+
   }
 }
 
@@ -167,6 +196,10 @@
         security_note(data:"Novell NetIdentity version " + netidVer[1] +
                            " was detected on the host");
 
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:netidVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:novell:netidentity_client:");
+
+
         buildVer = registry_get_sz(key:key + item, item:"DisplayVersion");
         if(!buildVer)
         {
@@ -198,6 +231,10 @@
       security_note(data:"Novell Groupwise Client version " + gcVer +
                          " running at location " + gcPath +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:gcVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:novell:groupwise:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ocs_inventory_ng_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ocs_inventory_ng_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ocs_inventory_ng_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902058";
+SCRIPT_DESC = "OCS Inventory NG Version Detection";
+
 ocsPort = get_http_port(default:80);
 if(!ocsPort){
   exit(0);
@@ -70,9 +76,16 @@
     }
 
     ## Set the KB value
+    tmp_version = ocsVer + " under " + dir;
     set_kb_item(name:"www/" + ocsPort + "/OCS_Inventory_NG",
-               value:ocsVer + " under " + dir);
+               value:tmp_version);
     security_note(port:ocsPort, data:"OCS Inventory NG version " + ocsVer +
                     " running at location " + dir + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:ocsinventory-ng:ocs_inventory_ng:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
  }
 }

Modified: trunk/openvas-plugins/scripts/secpod_office_products_version_900032.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_office_products_version_900032.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_office_products_version_900032.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -72,7 +72,84 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900032";
+SCRIPT_DESC = "MS Office Products Version Detection";
+
+WORDVIEW_LIST = make_list(" ^(9\..*)", "cpe:/a:microsoft:office_word_viewer:2000",
+                          "^(10\..*)", "cpe:/a:microsoft:office_word_viewer:2002",
+                          "^(11\..*)", "cpe:/a:microsoft:office_word_viewer:2003",
+                          "^(12\..*)", "cpe:/a:microsoft:office_word_viewer:2007");
+WORDVIEW_MAX = max_index(WORDVIEW_LIST);
+
+XLVIEW_LIST = make_list( "^(9\..*)", "cpe:/a:microsoft:office_excel_viewer:2000",
+                        "^(10\..*)", "cpe:/a:microsoft:office_excel_viewer:2002",
+                        "^(11\..*)", "cpe:/a:microsoft:office_excel_viewer:2003",
+                        "^(12\..*)", "cpe:/a:microsoft:office_excel_viewer:2007");
+XLVIEW_MAX = max_index(XLVIEW_LIST);
+
+PPVIEW_LIST = make_list( "^(9\..*)", "cpe:/a:microsoft:office_powerpoint_viewer:2000",
+                        "^(10\..*)", "cpe:/a:microsoft:office_powerpoint_viewer:2002",
+                        "^(11\..*)", "cpe:/a:microsoft:office_powerpoint_viewer:2003",
+                        "^(12\..*)", "cpe:/a:microsoft:office_powerpoint_viewer:2007");
+PPVIEW_MAX = max_index(PPVIEW_LIST);
+
+VISIO_LIST = make_list( "^(9\..*)", "cpe:/a:microsoft:visio_viewer:2000",
+                       "^(10\..*)", "cpe:/a:microsoft:visio_viewer:2002",
+                       "^(11\..*)", "cpe:/a:microsoft:visio_viewer:2003",
+                       "^(12\..*)", "cpe:/a:microsoft:visio_viewer:2007");
+VISIO_MAX = max_index(VISIO_LIST);
+
+WORD_LIST = make_list( "^(9\..*)", "cpe:/a:microsoft:office_word:2000",
+                      "^(10\..*)", "cpe:/a:microsoft:office_word:2002",
+                      "^(11\..*)", "cpe:/a:microsoft:office_word:2003",
+                      "^(12\..*)", "cpe:/a:microsoft:office_word:2007");
+WORD_MAX = max_index(WORD_LIST);
+
+EXCEL_LIST = make_list( "^(9\..*)", "cpe:/a:microsoft:office_excel:2000",
+                       "^(10\..*)", "cpe:/a:microsoft:office_excel:2002",
+                       "^(11\..*)", "cpe:/a:microsoft:office_excel:2003",
+                       "^(12\..*)", "cpe:/a:microsoft:office_excel:2007");
+EXCEL_MAX = max_index(EXCEL_LIST);
+
+ACCESS_LIST = make_list( "^(9\..*)", "cpe:/a:microsoft:access:2000",
+                        "^(10\..*)", "cpe:/a:microsoft:access:2002",
+                        "^(11\..*)", "cpe:/a:microsoft:access:2003",
+                        "^(12\..*)", "cpe:/a:microsoft:access:2007");
+ACCESS_MAX = max_index(ACCESS_LIST);
+
+POWERPNT_LIST = make_list( "^(9\..*)", "cpe:/a:microsoft:office_powerpoint:2000",
+                          "^(10\..*)", "cpe:/a:microsoft:office_powerpoint:2002",
+                          "^(11\..*)", "cpe:/a:microsoft:office_powerpoint:2003",
+                          "^(12\..*)", "cpe:/a:microsoft:office_powerpoint:2007");
+POWERPNT_MAX = max_index(POWERPNT_LIST);
+
+OUTLOOK_LIST = make_list( "^(9\..*)", "cpe:/a:microsoft:outlook:2000",
+                         "^(10\..*)", "cpe:/a:microsoft:outlook:2002",
+                         "^(11\..*)", "cpe:/a:microsoft:outlook:2003",
+                         "^(12\..*)", "cpe:/a:microsoft:outlook:2007");
+OUTLOOK_MAX = max_index(OUTLOOK_LIST);
+
+PUBLISHER_LIST = make_list( "^(9\..*)", "cpe:/a:microsoft:office_publisher:2000",
+                           "^(10\..*)", "cpe:/a:microsoft:office_publisher:2002",
+                           "^(11\..*)", "cpe:/a:microsoft:office_publisher:2003",
+                           "^(12\..*)", "cpe:/a:microsoft:office_publisher:2007");
+PUBLISHER_MAX = max_index(PUBLISHER_LIST);
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -92,6 +169,12 @@
   wordviewVer = GetVer(file:wview, share:share);
   if(wordviewVer){
     set_kb_item(name:"SMB/Office/WordView/Version", value:wordviewVer);
+
+    ## build cpe and store it as host_detail  
+    for (i = 0; i < WORDVIEW_MAX-1; i = i + 2) {
+
+       register_cpe(tmpVers:wordviewVer, tmpExpr:WORDVIEW_LIST[i], tmpBase:WORDVIEW_LIST[i+1]);
+    }
   }
 }
 
@@ -121,6 +204,12 @@
         xlviewVer = GetVer(file:xlview, share:share);
         if(xlviewVer != NULL){
           set_kb_item(name:"SMB/Office/XLView/Version", value:xlviewVer);
+
+          ## build cpe and store it as host_detail  
+          for (i = 0; i < XLVIEW_MAX-1; i = i + 2) {
+
+            register_cpe(tmpVers:xlviewVer, tmpExpr:XLVIEW_LIST[i], tmpBase:XLVIEW_LIST[i+1]);
+          }
         }
       }
     }
@@ -144,6 +233,12 @@
         pptviewVer = GetVer(file:pptview, share:share);
         if(pptviewVer != NULL){
           set_kb_item(name:"SMB/Office/PPView/Version", value:pptviewVer);
+
+          ## build cpe and store it as host_detail  
+          for (i = 0; i < PPVIEW_MAX-1; i = i + 2) {
+
+             register_cpe(tmpVers:pptviewVer, tmpExpr:PPVIEW_LIST[i], tmpBase:PPVIEW_LIST[i+1]);
+          }
         }
       }
     }
@@ -154,6 +249,9 @@
     cPackVer = registry_get_sz(key:key + item, item:"DisplayVersion");
     if(cPackVer != NULL){
       set_kb_item(name:"SMB/Office/ComptPack/Version", value:cPackVer);
+
+      ## build cpe and store it as host detail
+      register_cpe(tmpVers:cPackVer,tmpExpr:"^(12\..)*",tmpBase:"cpe:/a:microsoft:compatibility_pack_word_excel_powerpoint:2007:");
     }
   }
 }
@@ -170,6 +268,9 @@
   grooveVer = GetVer(file:groove, share:share);
   if(grooveVer != NULL){
     set_kb_item(name:"SMB/Office/Groove/Version", value:grooveVer);
+
+    ## build cpe and store it as host detail
+    register_cpe(tmpVers:grooveVer,tmpExpr:"^(12\..*)",tmpBase:"cpe:/a:microsoft:office_groove:2007:");
   }
 }
 
@@ -186,6 +287,9 @@
     ppcnvVer = GetVer(file:ppfile, share:share);
     if(ppcnvVer){
       set_kb_item(name:"SMB/Office/PowerPntCnv/Version", value:ppcnvVer);
+
+      ## build cpe and store it as host detail
+      register_cpe(tmpVers:ppcnvVer,tmpExpr:"^(12\..)",tmpBase:"");
     }
   }
 }
@@ -203,6 +307,12 @@
     visiovVer = GetVer(file:vvfile, share:share);
     if(visiovVer){
       set_kb_item(name:"SMB/Office/VisioViewer/Ver", value:visiovVer);
+
+      ## build cpe and store it as host_detail  
+      for (i = 0; i < VISIO_MAX-1; i = i + 2) {
+
+         register_cpe(tmpVers:visiovVer, tmpExpr:VISIO_LIST[i], tmpBase:VISIO_LIST[i+1]);
+      }
     }
   }
 }
@@ -223,6 +333,12 @@
   wordVer = GetVer(file:word, share:share);
   if(wordVer){
     set_kb_item(name:"SMB/Office/Word/Version", value:wordVer);
+
+    ## build cpe and store it as host_detail  
+    for (i = 0; i < WORD_MAX-1; i = i + 2) {
+
+       register_cpe(tmpVers:wordVer, tmpExpr:WORD_LIST[i], tmpBase:WORD_LIST[i+1]);
+    }
   }
 }
 
@@ -237,6 +353,12 @@
   excelVer = GetVer(file:excel, share:share);
   if(excelVer){
     set_kb_item(name:"SMB/Office/Excel/Version", value:excelVer);
+
+    ## build cpe and store it as host_detail  
+    for (i = 0; i < EXCEL_MAX-1; i = i + 2) {
+
+       register_cpe(tmpVers:excelVer, tmpExpr:EXCEL_LIST[i], tmpBase:EXCEL_LIST[i+1]);
+    }
   }
 }
 
@@ -251,6 +373,12 @@
   accessVer = GetVer(file:access, share:share);
   if(accessVer){
     set_kb_item(name:"SMB/Office/Access/Version", value:accessVer);
+
+    ## build cpe and store it as host_detail  
+    for (i = 0; i < ACCESS_MAX-1; i = i + 2) {
+
+       register_cpe(tmpVers:accessVer, tmpExpr:ACCESS_LIST[i], tmpBase:ACCESS_LIST[i+1]);
+    }
   }
 }
 
@@ -265,6 +393,12 @@
   powerPptVer = GetVer(file:power, share:share);
   if(powerPptVer){
     set_kb_item(name:"SMB/Office/PowerPnt/Version", value:powerPptVer);
+
+    ## build cpe and store it as host_detail  
+    for (i = 0; i < POWERPNT_MAX-1; i = i + 2) {
+
+       register_cpe(tmpVers:powerPptVer, tmpExpr:POWERPNT_LIST[i], tmpBase:POWERPNT_LIST[i+1]);
+    }
   }
 }
 
@@ -279,6 +413,9 @@
   wordcnvVer = GetVer(file:word, share:share);
    if(wordcnvVer){
     set_kb_item(name:"SMB/Office/WordCnv/Version", value:wordcnvVer);
+
+    ## build cpe and store it as host detail
+    register_cpe(tmpVers:wordcnvVer,tmpExpr:"^(12\..*)",tmpBase:"");
   }
 }
 
@@ -293,6 +430,9 @@
   xlcnvVer = GetVer(file:xlfile, share:share);
   if(xlcnvVer){
     set_kb_item(name:"SMB/Office/XLCnv/Version", value:xlcnvVer);
+
+    ## build cpe and store it as host detail
+    register_cpe(tmpVers:xlcnvVer,tmpExpr:"^(12\..*)",tmpBase:"");
   }
 }
 
@@ -307,6 +447,12 @@
   pubVer = GetVer(file:pub, share:share);
   if(pubVer){
     set_kb_item(name:"SMB/Office/Publisher/Version", value:pubVer);
+
+    ## build cpe and store it as host_detail  
+    for (i = 0; i < PUBLISHER_MAX-1; i = i + 2) {
+
+       register_cpe(tmpVers:pubVer, tmpExpr:PUBLISHER_LIST[i], tmpBase:PUBLISHER_LIST[i+1]);
+    }
   }
 }
 
@@ -321,5 +467,11 @@
   outlookVer = GetVer(file:outlookFile, share:share);
   if(outlookVer){
     set_kb_item(name:"SMB/Office/Outloook/Version", value:outlookVer);
+
+    ## build cpe and store it as host_detail  
+    for (i = 0; i < OUTLOOK_MAX-1; i = i + 2) {
+
+       register_cpe(tmpVers:outlookVer, tmpExpr:OUTLOOK_LIST[i], tmpBase:OUTLOOK_LIST[i+1]);
+    }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_opendocman_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_opendocman_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_opendocman_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900884";
+SCRIPT_DESC = "OpenDocMan Version Detection";
+
 docmanPort = get_http_port(default:80);
 if(!docmanPort){
   exit(0);
@@ -79,10 +85,18 @@
         docmanVer = docmanVer[1] + "." + docmanVer[2];
       else
         docmanVer = docmanVer[1];
+
+      tmp_version = docmanVer + " under " + dir;
       set_kb_item(name:"www/"+ docmanPort + "/OpenDocMan",
-                  value:docmanVer + " under " + dir);
+                  value:tmp_version);
       security_note(data:"OpenDocMan version " + docmanVer + " running at " +
                          "location " + dir +  " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:opendocman:opendocman:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_openforum_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_openforum_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_openforum_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900926";
+SCRIPT_DESC = "OpenForum Version Detection";
+
 opnfrmPort = get_http_port(default:80);
 if(!opnfrmPort){
   opnfrmPort = 80;
@@ -70,10 +76,17 @@
     {
       ofVer = ereg_replace(pattern:" ", string:opnfrmVer[1], replace:".");
       if(ofVer != NULL){
-       set_kb_item(name:"www/" + opnfrmPort + "/OpenForum", value:ofVer +
-                                                          " under " + dir);
+
+       tmp_version = ofVer + " under " + dir;
+       set_kb_item(name:"www/" + opnfrmPort + "/OpenForum", value:tmp_version);
        security_note(data:"OpenForum version " + ofVer + " running at " +
                           "location " + dir +  " was detected on the host");
+   
+       ## build cpe and store it as host_detail
+       cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:2enetworx:openforum:");
+       if(!isnull(cpe))
+          register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_openjdk_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_openjdk_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_openjdk_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900334";
+SCRIPT_DESC = "OpenJDK Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -74,6 +80,12 @@
       security_note(data:"OpenJDK version " + ver + " running at location " +
                          binName +  " was detected on the host");
       ssh_close_connection();
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:sun:openjdk:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_openoffice_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_openoffice_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_openoffice_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900073";
+SCRIPT_DESC = "OpenOffice Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -72,6 +78,12 @@
     security_note(data:"OpenOffice version " + openVer[0] + " running at " +
                        "location " + binaryName +  " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:openVer[0], exp:"^([0-9.]+)", base:"cpe:/a:openoffice:openoffice.org:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_openoffice_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_openoffice_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_openoffice_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,13 @@
 include("smb_nt.inc");
 include("version_func.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900072";
+SCRIPT_DESC = "OpenOffice Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -74,6 +80,12 @@
       set_kb_item(name:"OpenOffice/Win/Ver", value:openVer);
       security_note(data:"OpenOffice version " + openVer +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:openVer, exp:"^([0-9.]+)", base:"cpe:/a:openoffice:openoffice.org:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_opensc_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_opensc_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_opensc_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901174";
+SCRIPT_DESC = "OpenSC Version Detection (Windows)";
+
 ## Check for Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -75,6 +81,12 @@
       set_kb_item(name:"OpenSC/Win/Ver", value:ver);
       security_note(data:name + " version " + ver +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ver, exp:"^([0-9.]+)", base:"cpe:/a:opensc-project:opensc:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_openswan_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_openswan_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_openswan_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900387";
+SCRIPT_DESC = "Openswan Version Detection";
+
 oswan_sock = ssh_login_or_reuse_connection();
 if(!oswan_sock){
   exit(0);
@@ -65,6 +70,12 @@
     security_note(data:"Openswan version " + oswanVer[1] + 
                        " was detected on the host");
     ssh_close_connection();
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: oswanVer[1], exp:"^([0-9.]+)(rc[0-9])?",base:"cpe:/a:openswan:openswan:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_opera_detection_linux_900037.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_opera_detection_linux_900037.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_opera_detection_linux_900037.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900037";
+SCRIPT_DESC = "Opera Version Detection for Linux";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -96,6 +102,11 @@
     set_kb_item(name:"Opera/Linux/Version", value:operaVer[1]);
     security_note(data:"Opera browser version " + operaVer[1] + " running at "+
                        "location " + binaryName +  " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:operaVer[1], exp:"^([0-9.]+)", base:"cpe:/a:opera:opera:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 
     operaBuildVer = get_bin_version(full_prog_name:grep, version_argv:arg2,
                     ver_pattern:"Internal [B|b]uild ([0-9]+)", sock:sock);

Modified: trunk/openvas-plugins/scripts/secpod_opera_detection_win_900036.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_opera_detection_win_900036.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_opera_detection_win_900036.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900036";
+SCRIPT_DESC = "Opera Version Detection for Windows";
+
 function OperaGetVer(ofile)
 {
   oshare = ereg_replace(pattern:"([A-Z]):.*", replace:"\1$", string:ofile);
@@ -70,6 +76,12 @@
     set_kb_item(name:"Opera/Win/Version", value:ver[1]);
     security_note(data:"Opera browser version " + ver[1] +
                        " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:ver[1], exp:"^([0-9.]+)", base:"cpe:/a:opera:opera:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 

Modified: trunk/openvas-plugins/scripts/secpod_otrs_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_otrs_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_otrs_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902018";
+SCRIPT_DESC = "Open Ticket Request System (OTRS) Version Detection";
+
 otrsPort = get_http_port(default:80);
 if(!otrsPort){
   otrsPort = 80;
@@ -65,11 +71,19 @@
   {
     otrsVer = eregmatch(pattern:"OTRS ([0-9.]+)" , string:rcvRes);
     if(otrsVer[1] != NULL){
+
+      tmp_version = otrsVer[1] + " under " + dir;
       set_kb_item(name:"www/" + otrsPort + "/OTRS",
-                                value:otrsVer[1] + " under " + dir);
+                                value:tmp_version);
       security_note(data:"Open Ticket Request System (OTRS) version " +
                          otrsVer[1] + " running at location " + dir +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:otrs:otrs:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_overlook_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_overlook_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_overlook_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902513";
+SCRIPT_DESC = "OPEN IT OverLook Version Detection";
+
 ## Get http port
 port = get_http_port(default:80);
 if(!port){
@@ -74,11 +80,17 @@
       if(ver[1])
       {
         ## Set the KB value
-        set_kb_item(name:"www/" + port + "/OverLook", value:ver[1] +
-                         " under " + dir);
+        tmp_version = ver[1] + " under " + dir;
+        set_kb_item(name:"www/" + port + "/OverLook", value:tmp_version);
         security_note(data:"OverLook version " + ver[1] +
                            " running at location "  + dir +
                            " was detected on the host", port:port);
+      
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:openit:overlook:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_oxid_eshop_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_oxid_eshop_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_oxid_eshop_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900932";
+SCRIPT_DESC = "OXID eShop Community Edition Version Detection";
+
 eshopPort = get_http_port(default:80);
 if(!eshopPort){
   eshopPort = 80;
@@ -69,11 +75,18 @@
   {
     eshopVer = eregmatch(pattern:"Version ([0-9.]+)", string:rcvRes);
     if(eshopVer[1]!= NULL){
-      set_kb_item(name:"www/" + eshopPort + "/OXID-eShop", value:eshopVer[1] +
-                                                             " under " + dir);
+      
+      tmp_version = eshopVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + eshopPort + "/OXID-eShop", value:tmp_version);
       security_note(data:"OXID eShop Community Edition version " + eshopVer[1]
                        + " running at location " + dir + " was detected on " +
                          "the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:oxid:eshop:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_pango_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_pango_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_pango_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900643";
+SCRIPT_DESC = "Pango Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -63,6 +69,12 @@
     set_kb_item(name:"Pango/Ver", value:pangoVer[1]);
     security_note(data:"Pango version " + pangoVer[1] + " running at location "+
                        pangobin +  " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:pangoVer[1], exp:"^([0-9.]+)", base:"cpe:/a:pango:pango:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_php_address_book_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_php_address_book_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_php_address_book_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900697";
+SCRIPT_DESC = "PHP Address Book Version Detection";
+
 port = get_http_port(default:80);
 if(!port){
   exit(0);
@@ -68,11 +74,18 @@
 
     if(phpaddrbook[1] != NULL)
     {
+      tmp_version = phpaddrbook[1] + " under " + dir;
       set_kb_item(name:"www/"+ port + "/PHP-Address-Book",
-                  value:phpaddrbook[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"PHP Address Book version " + phpaddrbook[1] +
                          " running at location " + dir +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:chatelao:php_address_book:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_php_calendar_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_php_calendar_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_php_calendar_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901089";
+SCRIPT_DESC = "PHP Calendar Version Detection";
+
 calPort = get_http_port(default:80);
 if(!calPort){
   exit(0);
@@ -71,10 +77,17 @@
         if(!isnull(calVer[1]))
         {
            Ver = ereg_replace(pattern:"-", replace:".", string:calVer[1]);
-           set_kb_item(name:"www/" + calPort + "/PHP-Calendar", value:Ver + " under " + dir);
+           tmp_version = Ver + " under " + dir;
+           set_kb_item(name:"www/" + calPort + "/PHP-Calendar", value:tmp_version);
            security_note(data:"PHP Calendar version " + Ver  + " running " +
                               "at location " + dir +  " was detected on the "+
                               "host");
+
+           ## build cpe and store it as host_detail
+           cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:php-calendar:php-calendar:");
+           if(!isnull(cpe))
+              register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         }
       }
     }

Modified: trunk/openvas-plugins/scripts/secpod_php_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_php_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_php_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,14 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902435";
+SCRIPT_DESC = "PHP Version Detection (Windows)";
+
+
 ## Confirm Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -90,4 +97,9 @@
   ## Set PHP version in KB
   set_kb_item(name:"PHP/Ver/win", value:phpVer);
   security_note(data:"PHP version " + phpVer + " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:phpVer, exp:"^([0-9.]+)", base:"cpe:/a:php:php:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 }

Modified: trunk/openvas-plugins/scripts/secpod_php_fusion_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_php_fusion_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_php_fusion_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,24 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900612";
+SCRIPT_DESC = "Detectintg the Version of php-fusion";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 port = get_http_port(default:80);
 if(!port){
    exit(0);
@@ -77,6 +94,10 @@
     if(matchVersion[1]!= NULL)
     {
       set_kb_item(name:"www/"+ port + "/php-fusion",value:matchVersion[1]);
+
+      ## build cpe and store it as host detail
+      register_cpe(tmpVers:matchVersion[1],tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:php-fusion:php-fusion:");
+
       exit(0);
      }
    }
@@ -93,9 +114,15 @@
     matchline = egrep(pattern:"Version:</[a-z]+> [0-9.]+", string:rcvRes);
     matchVersion = eregmatch(pattern:"> ([0-9.]+)", string:matchline);
     if(matchVersion[1]!= NULL){
-      set_kb_item(name:"www/"+ port + "/php-fusion",value:matchVersion[1] + " under " + dir);
+
+      tmp_version = matchVersion[1] + " under " + dir;
+      set_kb_item(name:"www/"+ port + "/php-fusion",value:tmp_version);
       security_note(data:"PHP-Fusion version " + matchVersion[1] + " running" +
                          " at location " + dir +  " was detected on the host");
+
+       ## build cpe and store it as host detail
+       register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:php-fusion:php-fusion:");
+
      }
      exit(0);
    }

Modified: trunk/openvas-plugins/scripts/secpod_php_icalendar_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_php_icalendar_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_php_icalendar_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900198";
+SCRIPT_DESC = "PHP iCalendar Version Detection";
+
 port = get_http_port(default:80);
 if(!port){
   exit(0);
@@ -72,6 +78,12 @@
        security_note(data:"PHP iCalendar version " + icalendarVer[1] + 
                           " running at location " + dir +
                           " was detected on the host");
+   
+       ## build cpe and store it as host_detail
+       cpe = build_cpe(value:icalendarVer[1], exp:"^([0-9.]+)", base:"cpe:/a:phpicalendar:phpicalendar:");
+       if(!isnull(cpe))
+          register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_php_nuke_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_php_nuke_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_php_nuke_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900338";
+SCRIPT_DESC = "PHP-Nuke Version Detection";
+
 nukePort = get_http_port(default:80);
 if(!nukePort){
   exit(0);
@@ -81,10 +87,17 @@
       {
         nukeVer = eregmatch(pattern:"Version ([0-9.]+)", string:rcvRes);
         if(nukeVer[1]!= NULL){
-          set_kb_item(name:"www/"+ nukePort + "/php-nuke", value:nukeVer[1] +
-                           " under " + dir);
+    
+          tmp_version = nukeVer[1] + " under " + dir; 
+          set_kb_item(name:"www/"+ nukePort + "/php-nuke", value:tmp_version);
           security_note(data:"PHP-Nuke version " + nukeVer[1] + " running at" +
                              " location " + dir +  " was detected on the host");
+   
+          ## build cpe and store it as host_detail
+          cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:phpnuke:php-nuke:");
+          if(!isnull(cpe))
+             register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         }
       }
     }

Modified: trunk/openvas-plugins/scripts/secpod_phpmyadmin_detect_900129.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_phpmyadmin_detect_900129.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_phpmyadmin_detect_900129.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -52,7 +52,13 @@
 
  include("http_func.inc");
  include("http_keepalive.inc");
+ include("cpe.inc");
+ include("host_details.inc");
 
+ ## Constant values
+ SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900129";
+ SCRIPT_DESC = "phpMyAdmin Detection";
+
  port = get_http_port(default:80);
  if(!port){
         exit(0);
@@ -98,11 +104,18 @@
 	     pw_protected=1; # username password required
 	  } 
 	  
-        	  set_kb_item(name:"www/"+ port + "/phpMyAdmin", value:version + " under " + dir);               
-		  installations[x] = string(version + " under " + dir + ":" + pw_protected + "");
-		  x++;
+          tmp_version = version + " under " + dir;
+          set_kb_item(name:"www/"+ port + "/phpMyAdmin", value:tmp_version);
+               
+	  installations[x] = string(tmp_version + ":" + pw_protected + "");
+	  x++;
+   
+         ## build cpe and store it as host_detail
+         cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+).*([rc0-9]*)?", base:"cpe:/a:phpmyadmin:phpmyadmin:");
+         if(!isnull(cpe))
+            register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
                  
-	      }
+      }
  }
  
 

Modified: trunk/openvas-plugins/scripts/secpod_pidgin_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_pidgin_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_pidgin_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900661";
+SCRIPT_DESC = "Pidgin Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock)
   exit(0);
@@ -67,6 +73,12 @@
     set_kb_item(name:"Pidgin/Lin/Ver", value:pidginVer[1]);
     security_note(data:"Pidgin version " + pidginVer[1] + " running at " +
                        "location " + pidginbin +  " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:pidginVer[1], exp:"^([0-9.]+)", base:"cpe:/a:pidgin:pidgin:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_pidgin_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_pidgin_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_pidgin_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900662";
+SCRIPT_DESC = "Pidgin Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -66,5 +72,11 @@
    set_kb_item(name:"Pidgin/Win/Ver", value:pidginVer);
    security_note(data:"Pidgin version " + pidginVer +
                       " was detected on the host");
+   
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:pidginVer, exp:"^([0-9.]+)", base:"cpe:/a:pidgin:pidgin:");
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_pivot_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_pivot_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_pivot_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900578";
+SCRIPT_DESC = "Pivot Version Detection";
+
 pivotPort = get_http_port(default:80);
 if(!pivotPort){
   pivotPort = 80;
@@ -70,10 +76,17 @@
     pivotVer = ereg_replace(pattern:" ", replace:".", string:ver[1]);
     if(pivotVer != NULL)
     {
+      tmp_version = pivotVer + " under " + dir;
       set_kb_item(name:"www/" + pivotPort + "/Pivot",
-                value:pivotVer + " under " + dir);
+                value:tmp_version);
       security_note(data:"Pivot version " + pivotVer + " running at " +
                          "location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:pivot:pivot:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_postgresql_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_postgresql_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_postgresql_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,10 +45,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900478";
+SCRIPT_DESC = "PostgreSQL Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +72,12 @@
     security_note(data:"PostgreSQL version " + postgresqlVer[1] + " running at"+
                        " location " + binaryName +  " was detected on the host");
     ssh_close_connection();
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: postgresqlVer[1], exp:"^([0-9.]+)",base:"cpe:/a:postgresql:postgresql:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_postgresql_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_postgresql_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_postgresql_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,9 +48,15 @@
   exit(0);
 }
 
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900479";
+SCRIPT_DESC = "PostgreSQL Version Detection (Windows)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,4 +78,10 @@
   set_kb_item(name:"PostgreSQL/Win/Ver", value:gresqlVer);
   security_note(data:"PostgreSQL version " + gresqlVer + " running at " +
                      "location " + path +  " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: gresqlVer, exp:"^([0-9.]+)",base:"cpe:/a:postgresql:postgresql:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_powerzip_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_powerzip_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_powerzip_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,26 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900490";
+SCRIPT_DESC = "PowerZip Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -70,6 +86,10 @@
     set_kb_item(name:"PowerZip/Ver", value:zipVer);
     security_note(data:"PowerZip version " + zipVer +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:zipVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:powerzip:powerzip:");
+
     exit(0);
   }
 }
@@ -86,6 +106,10 @@
       set_kb_item(name:"PowerZip/Ver", value:zipVer);
       security_note(data:"PowerZip version " + zipVer +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:zipVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:powerzip:powerzip:");
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_pplive_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_pplive_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_pplive_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900535";
+SCRIPT_DESC = "PPLive Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -71,6 +77,12 @@
       set_kb_item(name:"PPLive/Ver", value:ppliveVer);
       security_note(data:"PPLive version " + ppliveVer +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:ppliveVer, exp:"^([0-9.]+)", base:"cpe:/a:pplive:pplive:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_prochatrooms_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_prochatrooms_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_prochatrooms_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900330";
+SCRIPT_DESC = "Pro Chat Rooms Version Detection";
+
 pcrPort = get_kb_item("Services/www");
 if(!pcrPort){
   exit(0);
@@ -74,6 +80,12 @@
                   value:pcrVer[1]);
       security_note(data:"Pro Chat Room version " + pcrVer[1] + " running at "+
                          "location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:pcrVer[1], exp:"^([0-9.]+)", base:"cpe:/a:pro_chat_rooms:pro_chat_rooms:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_proftpd_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_proftpd_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_proftpd_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,10 +50,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900506";
+SCRIPT_DESC = "ProFTPD Server Version Detection";
+
 # Check for Version is Getting from Banner
 if(get_kb_item("ProFTPD/Ver")  != NULL){
   exit(0);
@@ -90,6 +95,12 @@
       security_note(data:"ProFTPD version " + ftpVer + " running at location "
                          + binPath + " was detected on the host");
       ssh_close_connection();
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: ftpVer, exp:"^([0-9.]+)(rc[0-9]+)?",base:"cpe:/a:proftpd:proftpd:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_proftpd_server_remote_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_proftpd_server_remote_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_proftpd_server_remote_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,9 +51,14 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ftp_func.inc");
 
+## Constant Values
+SCRIPT_OID ="1.3.6.1.4.1.25623.1.0.900815";
+SCRIPT_DESC="ProFTPD Server Remote Version Detection";
+
 ftpPort = get_kb_item("Services/ftp");
 if(!ftpPort){
   ftpPort = 21;
@@ -85,6 +90,12 @@
         set_kb_item(name:"ProFTPD/Ver", value:ftpVer);
         security_note(data:"ProFTPD version " + ftpVer +
                            " was detected on the host");
+
+         ## build cpe and store it as host_detail
+         cpe = build_cpe(value: ftpVer, exp:"^([0-9.]+)(rc[0-9]+)?",base:"cpe:/a:proftpd:proftpd:");
+         if(!isnull(cpe))
+            register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_pumpkin_tftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_pumpkin_tftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_pumpkin_tftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,10 +48,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900647";
+SCRIPT_DESC = "PumpKIN TFTP Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -65,5 +70,11 @@
     set_kb_item(name:"PumpKIN/TFTP/Ver", value:pumpKINVer[1]);
     security_note(data:"PumpKIN TFTP version " + pumpKINVer[1] +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: pumpKINVer[1], exp:"^([0-9.]+)",base:"cpe:/a:klever:pumpkin:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_putty_version.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_putty_version.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_putty_version.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 include("smb_nt.inc");
 include("version_func.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900618";
+SCRIPT_DESC = "putty Version Detection";
+
 path = registry_get_sz(key:"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PuTTY_is1",item:"DisplayName");
 
 if(!path){
@@ -62,4 +68,10 @@
   set_kb_item(name:"PuTTY/Version", value:version[0]);
   security_note(data:"PuTTY version " + version[0] +
                      " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:version[0], exp:"^([0-9.]+)", base:"cpe:/a:putty:putty:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_qemu_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_qemu_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_qemu_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900969";
+SCRIPT_DESC = "QEMU Version Detection (Linux)";
+
 qemuSock = ssh_login_or_reuse_connection();
 if(!qemuSock){
   exit(0);
@@ -67,6 +73,12 @@
     security_note(data:"QEMU PC emulator version " + qemuVer[1] + " running " +
                        "at location " + binaryName +
                        " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:qemuVer[1], exp:"^([0-9.]+)", base:"cpe:/a:qemu:qemu:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_raidenftpd_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_raidenftpd_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_raidenftpd_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,11 +49,16 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("ftp_func.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900510";
+SCRIPT_DESC = "RaidenFTPD Server Version Detection";
+
 ftpPort = get_kb_item("Services/ftp");
 if(!ftpPort){
   ftpPort = 21;
@@ -86,4 +91,10 @@
   set_kb_item(name:"RaidenFTPD/Ver", value:rftpdVer);
   security_note(data:"RaidenFTPD Server version " + rftpdVer + " running at" +
                      " location " + exePath +  " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value: rftpdVer, exp:"^([0-9.]+)",base:"cpe:/a:raidenftpd:raidenftpd:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_realplayer_detect_macosx.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_realplayer_detect_macosx.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_realplayer_detect_macosx.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902622";
+SCRIPT_DESC = "RealNetworks RealPlayer Version Detection (Mac OS X)";
+
 ## Checking OS
 sock = ssh_login_or_reuse_connection();
 if(!sock){
@@ -74,3 +80,9 @@
 set_kb_item(name: "RealPlayer/MacOSX/Version", value:realVer);
 security_note(data:"RealNetworks RealPlayer version " + realVer +
                   " was detected on this host");
+  
+## build cpe and store it as host_detail
+cpe = build_cpe(value:realVer, exp:"^([0-9.]+)", base:"cpe:/a:realnetworks:realplayer:");
+if(!isnull(cpe))
+   register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+

Modified: trunk/openvas-plugins/scripts/secpod_rosoft_audio_converter_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_rosoft_audio_converter_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_rosoft_audio_converter_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902078";
+SCRIPT_DESC = "Rosoft Audio Converter Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -77,6 +83,12 @@
       set_kb_item(name:"Rosoft/Audio/Converter/Ver", value:racVer[1]);
       security_note(data:"Rosoft Audio Converter version " + racVer[1] +
                      " running at location " + racPath + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:racVer[1], exp:"^([0-9.]+)", base:"cpe:/a:rosoftengineering:rosoft_audio_converter:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ruby_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ruby_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ruby_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900569";
+SCRIPT_DESC = "Ruby Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -88,6 +94,12 @@
     security_note(data:"Ruby version " + rubyVer + " running at location " + 
                        binaryName +  " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:rubyVer, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:ruby-lang:ruby:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
    exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ruby_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ruby_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ruby_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900799";
+SCRIPT_DESC = "Ruby Interpreter Version Detection (Windows)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -71,6 +88,9 @@
         set_kb_item(name:"Ruby/Win/Ver", value:version);
         security_note(data:"Ruby version " + version + " was detected on the host");
 
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:version , tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:ruby-lang:ruby:");
+
         exit(0);
       }
     }
@@ -94,6 +114,10 @@
       set_kb_item(name:"Ruby/Win/Ver", value:replace);
       security_note(data:"Ruby version " + replace + " was detected on the host");
 
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers: replace, tmpExpr:"^([0-9.]+([a-z0-9]+)?)", tmpBase:"cpe:/a:ruby-lang:ruby:");
+
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_sdp_downloader_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_sdp_downloader_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_sdp_downloader_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,10 +48,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900641";
+SCRIPT_DESC = "SDP Downloader Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -73,6 +78,12 @@
       set_kb_item(name:"SDP/Downloader/Ver", value:sdpVer);
       security_note(data:"SDP Downloader version " + sdpVer +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:sdpVer, exp:"^([0-9.]+)", base:"cpe:/a:sdp_multimedia:streaming_download_project:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_servu_ftp_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_servu_ftp_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_servu_ftp_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900482";
+SCRIPT_DESC = "Rhinosoft Serv-U FTP Server Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -72,5 +78,11 @@
     security_note(data:"Rhinosoft Serv-U FTP Server version " + version +
                        " running at location " + path +
                        " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:version, exp:"^([0-9.]+)", base:"cpe:/a:rhinosoft:serv-u:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }  
 }

Modified: trunk/openvas-plugins/scripts/secpod_silc_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_silc_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_silc_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900950";
+SCRIPT_DESC = "SILC Products Version Detection";
+
 silc_sock = ssh_login_or_reuse_connection();
 if(!silc_sock){
   exit(0);
@@ -65,6 +70,12 @@
     set_kb_item(name:"SILC/Client/Ver", value:clntVer[1]);
     security_note(data:"SILC version " + clntVer[1] + " running at location " +
                        clntBin +  " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:clntVer[1], exp:"^([0-9.]+)", base:"cpe:/a:silcnet:silc_client:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_sjs_access_manager_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_sjs_access_manager_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_sjs_access_manager_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900194";
+SCRIPT_DESC = "Sun Java System Access Manager Version Detection";
+
 am_port = get_http_port(default:8080);
 if(!am_port){
   am_port = 8080;
@@ -74,11 +80,18 @@
     if(amVer[1] != NULL)
     {
        amVer = ereg_replace(pattern:" ", string:amVer[1], replace:".");
+       tmp_version = amVer + " under " + dir;
        set_kb_item(name:"www/"+ am_port + "/Sun/JavaSysAccessMang",
-                  value:amVer + " under " + dir);
+                  value:tmp_version);
        security_note(data:"Sun Java System Access Manager version " + amVer +
                           " running at location " + dir +
                           " was detected on the host");
+   
+       ## build cpe and store it as host_detail
+       cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:sun:java_system_access_manager:");
+       if(!isnull(cpe))
+          register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_slurm_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_slurm_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_slurm_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -44,10 +44,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900374";
+SCRIPT_DESC = "SLURM Version Detection";
+
 slurm_sock = ssh_login_or_reuse_connection();
 if(!slurm_sock){
   exit(0);
@@ -68,6 +73,12 @@
       security_note(data:"SLURM version " + slurmVer +
                          " was detected on the host");
       ssh_close_connection();
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:slurmVer, exp:"^([0-9.]+)", base:"cpe:/a:llnl:slurm:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_smartermail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_smartermail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_smartermail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902258";
+SCRIPT_DESC = "SmarterMail Version Detection";
+
 smPort = "9998";
 if(!get_port_state(smPort)){
   exit(0);
@@ -66,5 +72,11 @@
   {
     set_kb_item(name:"SmartMail/Ver", value:version[1]);
     security_note(data:"SmartMail version " + version[1] + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:version[1], exp:"^([0-9.]+)", base:"cpe:/a:smartertools:smartermail:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_solarwinds_tftp_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_solarwinds_tftp_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_solarwinds_tftp_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900930";
+SCRIPT_DESC = "SolarWinds TFTP Server Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -78,6 +83,12 @@
         set_kb_item(name:"SolarWinds/TFTP/Ver", value:stftpVer);
         security_note(data:"SolarWinds TFTP Server version " + stftpVer +
                            " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value: stftpVer, exp:"^([0-9.]+)",base:"cpe:/a:solarwinds:tftp_server:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_sql_ledger_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_sql_ledger_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_sql_ledger_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902009";
+SCRIPT_DESC = "SQL-Ledger Version Detection";
+
 ledgerPort = get_http_port(default:80);
 if(!ledgerPort){
   exit(0);
@@ -73,10 +79,18 @@
     }
 
     if(!isnull(ledgerVer[1])){
+
+      tmp_version = ledgerVer[1] + " under " + dir;
       set_kb_item(name:"www/"+ ledgerPort + "/SQL-Ledger",
-                  value:ledgerVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"SQL-Ledger version " + ledgerVer[1] + " running at" +
                          " location " + dir +  " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:sql-ledger:sql-ledger:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_squid_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_squid_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_squid_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900611";
+SCRIPT_DESC = "Squid Version Detection";
+
 port = get_kb_item("Services/http_proxy");
 if(!port){
   port = 3128;
@@ -78,4 +84,10 @@
 if(version){
   set_kb_item(name:"www/" + port + "/Squid", value:version);
   security_note(data:"Squid version " + version + " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:squid-cache:squid:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_subversion_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_subversion_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_subversion_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.101103";
+SCRIPT_DESC = "Subversion Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +72,12 @@
       security_note(data:"Subversion version " + svnVer[0] + " running at " +
                          "location " + binaryFile +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:svnVer[0], exp:"^([0-9.]+)", base:"cpe:/a:subversion:subversion:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_sun_java_app_serv_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_sun_java_app_serv_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_sun_java_app_serv_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,10 +51,26 @@
   exit(0);
 }
 
-
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900200";
+SCRIPT_DESC = "Sun Java System Application Server Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 port = get_http_port(default:8080);
 if(!port){
   exit(0);
@@ -87,6 +103,10 @@
   set_kb_item(name:"Sun/Java/AppServer/Ver", value:appservVer);
   security_note(data:"Sun Java Application Server version " + appservVer +
                      " was detected on the host");
+
+  ## build cpe and store it as host_detail
+  register_cpe(tmpVers:appservVer, tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:sun:java_system_application_server:");
+
   exit(0);
 }
 
@@ -98,5 +118,8 @@
     set_kb_item(name:"Sun/Java/AppServer/Ver", value:appservVer[1]);
     security_note(data:"Sun Java Application Server version " + appservVer[1] +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    register_cpe(tmpVers:appservVer[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:sun:java_system_application_server:");
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_sun_java_dir_server_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_sun_java_dir_server_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_sun_java_dir_server_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900705";
+SCRIPT_DESC = "Sun Java Directory Server Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -68,6 +74,12 @@
                        " running at location " + dirBin +
                        " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:dirVer[1], exp:"^([0-9.]+)", base:"cpe:/a:sun:java_system_directory_server:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_sun_java_dir_server_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_sun_java_dir_server_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_sun_java_dir_server_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900492";
+SCRIPT_DESC = "Sun Java Directory Server Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -70,6 +87,9 @@
       set_kb_item(name:"Sun/JavaDirServer/Win/Ver", value:ver[1]);
       security_note(data:"Java Directory Server version " + ver[1] +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:ver[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:sun:java_system_directory_server:");
     }
   }
 }
@@ -95,6 +115,9 @@
         set_kb_item(name:"Sun/JavaDirServer/Win/Ver", value:appVer[1]);
         security_note(data:"Java Directory Server version " + appVer[1] +
                            " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        register_cpe(tmpVers:ver[1], tmpExpr:"^([0-9.]+)", tmpBase:"cpe:/a:sun:java_system_directory_server:");
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_sun_opensso_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_sun_opensso_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_sun_opensso_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900817";
+SCRIPT_DESC = "Sun OpenSSO Version Detection";
+
 am_port = get_http_port(default:8080);
 
 if(!am_port){
@@ -72,10 +78,17 @@
     if(ssoVer[2] != NULL)
     {
       ssoVer = ereg_replace(pattern:" ", string:ssoVer[2], replace:".");
+      tmp_version = ssoVer + " under " + dir;
       set_kb_item(name:"www/"+ am_port + "/Sun/OpenSSO",
-                  value:ssoVer + " under " + dir);
+                  value:tmp_version);
       security_note(data:"OpenSSO version " + ssoVer + " running at location "
                          + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:sun:opensso_enterprise:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_sun_virtualbox_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_sun_virtualbox_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_sun_virtualbox_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,25 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901051";
+SCRIPT_DESC = "Sun VirtualBox Version Detection (Linux)";
+
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+  local_var cpe;
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+  if(!isnull(cpe))
+    register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -69,6 +87,10 @@
       set_kb_item(name:"Sun/VirtualBox/Lin/Ver", value:vbVer);
       security_note(data:"sun (Oracle) VirtualBox version " + vbVer + " running at " +
                          "location " + binaryFile + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:vbVer, tmpExpr:"^(3\..*)", tmpBase:"cpe:/a:sun:virtualbox:");
+      register_cpe(tmpVers:vbVer, tmpExpr:"^([0-2]\..*)", tmpBase:"cpe:/a:sun:xvm_virtualbox:");
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_sun_virtualbox_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_sun_virtualbox_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_sun_virtualbox_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -53,7 +53,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901053";
+SCRIPT_DESC = "Sun VirtualBox Version Detection (Win)";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -84,6 +101,10 @@
       set_kb_item(name:"Sun/VirtualBox/Win/Ver", value:vmVer);
       security_note(data:"Sun VirtualBox version " + vmVer +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:vmVer, tmpExpr:"^3\.0\..*", tmpBase:"cpe:/a:sun:virtualbox:");
+
     }
   }
   else if("Sun xVM VirtualBox" >< vbname)
@@ -93,6 +114,10 @@
       set_kb_item(name:"Sun/xVM-VirtualBox/Win/Ver", value:xvmVer);
       security_note(data:"Sun xVirtualBox version " + xvmVer +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:xvmVer, tmpExpr:"^[0-2]\..*", tmpBase:"cpe:/a:sun:xvm_virtualbox:");
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_surgemail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_surgemail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_surgemail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,9 +45,14 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900839";
+SCRIPT_DESC = "SurgeMail Version Detection";
+
 function SurgeMailSetVer(banner)
 {
   version = eregmatch(pattern:"Version ([0-9.]+)([a-z][0-9]?(-[0-9])?)?",
@@ -65,6 +70,12 @@
       set_kb_item(name:"SurgeMail/Ver", value:version);
       security_note(data:"SurgeMail version " + version +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: version, exp:"^([0-9.]+([a-z0-9])?)",base:"cpe:/a:netwin:surgemail:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_symantec_prdts_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_symantec_prdts_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_symantec_prdts_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -56,7 +56,24 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900332";
+SCRIPT_DESC = "Symantec Product(s) Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -77,6 +94,10 @@
       set_kb_item(name:"Symantec/pcAnywhere/Ver", value:pcawVer);
       security_note(data:"Symantec pcAnywhere version " + pcawVer +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:pcawVer, tmpExpr:"^([0-9]+\.[0-9])", tmpBase:"cpe:/a:symantec:pcanywhere:");
+
     }
   }
 
@@ -87,6 +108,10 @@
       set_kb_item(name:"Norton/InetSec/Ver", value:nisVer);
       security_note(data:"Symantec Norton Internet Security version " +
                          nisVer + " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      register_cpe(tmpVers:nisVer, tmpExpr:"^(15\..*)", tmpBase:"cpe:/a:symantec:norton_internet_security:2008");
+
     }
   }
 

Modified: trunk/openvas-plugins/scripts/secpod_systemtap_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_systemtap_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_systemtap_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901036";
+SCRIPT_DESC = "SystemTap Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -63,6 +69,12 @@
     set_kb_item(name:"SystemTap/Ver", value:sytemtapVer[1]);
     security_note(data:"SystemTap version " + sytemtapVer[1] + " running at " +
                        "location " + sytemtapbin + " was detected on the host");
+  
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:sytemtapVer[1], exp:"^([0-9.]+)", base:"cpe:/a:systemtap:systemtap:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_task_freak_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_task_freak_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_task_freak_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902053";
+SCRIPT_DESC = "Task Freak Version Detection";
+
 tfPort = get_http_port(default:80);
 if(!tfPort){
   tfPort = 80;
@@ -65,10 +71,16 @@
     tfVer = eregmatch(pattern:"> v([0-9.]+)", string:rcvRes);
     if(tfVer[1] != NULL)
     {
-      set_kb_item(name:"www/" + tfPort + "/TaskFreak", value:tfVer[1]
-                   + " under " + dir);
+      tmp_version = tfVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + tfPort + "/TaskFreak", value:tmp_version);
       security_note(data:"Task Freak version " + tfVer[1] + " running at location "
                          + dir + " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:taskfreak:taskfreak%21:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_tcpdb_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tcpdb_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tcpdb_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900550";
+SCRIPT_DESC = "TCPDB Version Detection";
+
 wwwPort = get_http_port(default:80);
 if(!wwwPort){
   exit(0);
@@ -68,9 +74,16 @@
     tcpdbVer = eregmatch(pattern:"TCPDB version ([0-9]\.[0-9])", string:rcvRes);
     if(tcpdbVer[1]!= NULL)
     {
-      set_kb_item(name:"www/" + wwwPort + "/TCPDB", value:tcpdbVer[1] + " under " + dir);
+      tmp_version = tcpdbVer[1] + " under " + dir;
+      set_kb_item(name:"www/" + wwwPort + "/TCPDB", value:tmp_version);
       security_note(data:"TCPDB version " + tcpdbVer[1] + " running at " +
                          "location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:tcpdb:tcpdb:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_tembria_server_monitor_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tembria_server_monitor_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tembria_server_monitor_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901107";
+SCRIPT_DESC = "Tembria Server Monitor Version Detection";
+
 ## Get Tembria Server Monitor Port
 port = get_http_port(default:80);
 if(!port){
@@ -68,11 +74,17 @@
     if(ver[1])
     {
       ## Set Tembria Server Monitor Version in KB
-      set_kb_item(name:"www/" + port + "/tembria", value:ver[1] +
-                  " under " + dir);
+      tmp_version = ver[1] + " under " + dir;
+      set_kb_item(name:"www/" + port + "/tembria", value:tmp_version);
       security_note(data:"Tembria Server Monitor version " + ver[1] +
                          " running at location " + dir +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:tembria:server_monitor:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_tfm_mmplayer_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tfm_mmplayer_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tfm_mmplayer_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900596";
+SCRIPT_DESC = "TFM MMPlayer Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -75,6 +81,12 @@
       set_kb_item(name:"TFM/MMPlayer/Ver", value:mmplayerVer);
       security_note(data:"TFM MMPlayer version " + mmplayerVer +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:mmplayerVer, exp:"^([0-9]\.[0-9])", base:"cpe:/a:tfm:mmplayer:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_thegreenbow_ipsec_vpn_client_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_thegreenbow_ipsec_vpn_client_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_thegreenbow_ipsec_vpn_client_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -51,7 +51,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900921";
+SCRIPT_DESC = "TheGreenBow IPSec VPN Client Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -76,6 +82,12 @@
       set_kb_item(name:"TheGreenBow-IPSec-VPN-Client/Ver", value:vpnVer);
       security_note(data:"TheGreenBow IPSec VPN Client version " + vpnVer +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:vpnVer, exp:"^([0-9.]+)", base:"cpe:/a:thegreenbow:thegreenbow_vpn_client:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_tightvnc_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tightvnc_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tightvnc_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900474";
+SCRIPT_DESC = "TightVNC Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -66,6 +72,12 @@
     security_note(data:"TightVNC version " + vncVer[1] + " running at " +
                        "location " + vncBin + " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:vncVer[1], exp:"^([0-9.]+)", base:"cpe:/a:tightvnc:tightvnc:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_tightvnc_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tightvnc_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tightvnc_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900472";
+SCRIPT_DESC = "TightVNC Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -71,6 +77,12 @@
       set_kb_item(name:"TightVNC/Win/Ver", value:tvncVer);
       security_note(data:"TightVNC version " + tvncVer +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tvncVer, exp:"^([0-9.]+)", base:"cpe:/a:tightvnc:tightvnc:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_tikiwiki_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tikiwiki_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tikiwiki_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901001";
+SCRIPT_DESC = "TikiWiki Version Detection";
+
 tikiPort = get_http_port(default:80);
 if(!tikiPort){
   tikiPort = 80;
@@ -75,10 +81,18 @@
     }
 
     if(tikiVer[1] != NULL){
+
+      tmp_version = tikiVer[1] + " under " + dir;
       set_kb_item(name:"www/"+ tikiPort + "/TikiWiki",
-                  value:tikiVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"TikiWiki version " + tikiVer[1] + " running at " +
                          "location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:tikiwiki:tikiwiki:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_tnftpd_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tnftpd_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tnftpd_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,9 +46,14 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ftp_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901005";
+SCRIPT_DESC = "tnftpd Version Detection";
+
 port = get_kb_item("Services/ftp");
 if(!port){
   port = 21;
@@ -68,5 +73,11 @@
     set_kb_item(name:"/tnftpd/Ver", value:ntftpVer[1]);
     security_note(data:"tnftpd version " + ntftpVer[1] +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: ntftpVer[1], exp:"^([0-9.]+)",base:"cpe:/a:luke_mewburn:tnftpd:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_tor_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tor_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tor_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,10 +48,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ssh_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900418";
+SCRIPT_DESC = "Tor Version Detection (Linux)";
+
 tor_sock = ssh_login_or_reuse_connection();
 if(!tor_sock){
   exit(0);
@@ -72,6 +77,12 @@
     security_note(data:"Tor version " + torVer[1] + " running at location "
                        + binaryName + " was detected on the host");
     ssh_close_connection();
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: torVer[1], exp:"^([0-9.]+-?([a-z0-9]+)?)",base:"cpe:/a:tor:tor:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }
 ssh_close_connection();

Modified: trunk/openvas-plugins/scripts/secpod_torrentvolve_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_torrentvolve_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_torrentvolve_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900576";
+SCRIPT_DESC = "TorrentVolve Version Detection";
+
 tvPort = get_http_port(default:80);
 if(!tvPort){
   tvPort = 80;
@@ -71,10 +77,17 @@
       tvVer = eregmatch(pattern:"([0-9.]+\.[0-9])", string:ver);
       if(tvVer[1] != NULL)
       {
+        tmp_version = tvVer[1] + " under " + dir;
         set_kb_item(name:"www/"+ tvPort + "/TorrentVolve",
-                    value:tvVer[1] + " under " + dir);
+                    value:tmp_version);
         security_note(data:"TorrentVolve version " + tvVer[1] + " running at "+
                            "location " + dir +  " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:castro_xl:torrentvolve:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_transmission_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_transmission_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_transmission_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900714";
+SCRIPT_DESC = "Transmission Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +73,12 @@
     security_note(data:"Transmission version " + transVer[1] + " running at " +
                        "location " + transBin + " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:transVer[1], exp:"^([0-9.]+)", base:"cpe:/a:transmissionbt:transmission:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_trellian_ftp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_trellian_ftp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_trellian_ftp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901108";
+SCRIPT_DESC = "Trellian FTP Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -74,4 +80,10 @@
   set_kb_item(name:"TrellianFTP/Version", value:trellianVer);
   security_note(data:"Trellian FTP version " + trellianVer + " running at " +
                      "location " + trellianPath + " was detected on the host");
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:trellianVer, exp:"^([0-9.]+)", base:"cpe:/a:trellian:ftp:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_tt_website_manager_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tt_website_manager_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tt_website_manager_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902134";
+SCRIPT_DESC = "TT Web Site Manager Version Detection";
+
 ttwmPort = get_http_port(default:80);
 if(!ttwmPort){
   exit(0);
@@ -60,11 +66,19 @@
   {
     ttwmVer = eregmatch(pattern:">version ([0-9.]+)", string:rcvRes);
     if(ttwmVer[1] != NULL){
+
+      tmp_version = ttwmVer + " under " + path;
       set_kb_item(name:"www/" + ttwmPort + "/TTWebsiteManager",
-                value:ttwmVer + " under " + path);
+                value:tmp_version);
       security_note(data:"TT Web Site Manager version " + ttwmVer +
                          " running at location " + path +
                          " was detected on the host");
+      
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:technotoad:tt_web_site_manager:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_tvp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_tvp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_tvp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900453";
+SCRIPT_DESC = "Total Video Player Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -79,6 +85,12 @@
       set_kb_item(name:"TotalVideo/Player/Ver", value:tvpVer[1]);
       security_note(data:"Total Video Player version " + tvpVer[1] +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tvpVer[1], exp:"^([0-9.]+?)", base:"cpe:/a:effectmatrix:total_video_player:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_uebimiau_webmail_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_uebimiau_webmail_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_uebimiau_webmail_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901023";
+SCRIPT_DESC = "Uebimiau Webmail Version Detection";
+
 uwebPort = get_http_port(default:80);
 if(!uwebPort){
   exit(0);
@@ -65,11 +71,17 @@
     if(uwebVer[1] != NULL)
     {
       uwebVer = ereg_replace(pattern:"-", string:uwebVer[1], replace: ".");
-      set_kb_item(name:"www/" + uwebPort + "/Uebimiau/Webmail", value:uwebVer
-                                                          + " under " + path);
+      tmp_version = uwebVer + " under " + path;
+      set_kb_item(name:"www/" + uwebPort + "/Uebimiau/Webmail", value:tmp_version);
       security_note(data:"Uebimiau Webmail version " + uwebVer +
                          " running at location " + path +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:uebimiau:uebimiau:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_ultravnc_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ultravnc_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ultravnc_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900470";
+SCRIPT_DESC = "UltraVNC Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -71,6 +77,12 @@
       set_kb_item(name:"UltraVNC/Win/Ver", value:vncString[1]);
       security_note(data:"UltraVNC version " + vncString[1] +
                          " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:vncString[1], exp:"^([0-9]\.[0-9]\.[0-9])", base:"cpe:/a:ultravnc:ultravnc:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_usebb_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_usebb_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_usebb_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901056";
+SCRIPT_DESC = "UseBB Version Detection";
+
 usebbPort = get_http_port(default:80);
 if(!usebbPort){
   exit(0);
@@ -69,9 +75,16 @@
     if(usebbVer[1]!= NULL)
     {
       usebbVer = ereg_replace(pattern:" ", string:usebbVer[1], replace: ".");
-      set_kb_item(name:"www/"+ usebbPort + "/UseBB", value:usebbVer + " under " + dir);
+      tmp_version = usebbVer + " under " + dir;
+      set_kb_item(name:"www/"+ usebbPort + "/UseBB", value:tmp_version);
       security_note(data:"UseBB version " + usebbVer + " running at " +
                          "location " + dir +  " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:usebb:usebb:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_valarsoft_webmatic_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_valarsoft_webmatic_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_valarsoft_webmatic_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901087";
+SCRIPT_DESC = "Valarsoft Webmatic Version Detection";
+
 webmaticPort = get_http_port(default:80);
 if(!webmaticPort){
   exit(0);
@@ -63,11 +69,18 @@
     webmaticVer = eregmatch(pattern:"Webmatic ([0-9.]+)", string:rcvRes);
     if(webmaticVer[1] != NULL)
     {
+      tmp_version = webmaticVer[1] + " under " + path;
       set_kb_item(name:"www/" + webmaticPort + "/Valarsoft/Webmatic",
-                  value:webmaticVer[1] + " under " + path);
+                  value:tmp_version);
       security_note(data:"Valarsoft Webmatic version " + webmaticVer[1] +
                          " running at location " + path +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:valarsoft:webmatic:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_viplay_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_viplay_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_viplay_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900360";
+SCRIPT_DESC = "URUWorks ViPlay Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -82,6 +87,12 @@
         set_kb_item(name:"ViPlay/MediaPlayer/Ver", value:viplayVer);
         security_note(data:"ViPlay Media Player version " + viplayVer +
                            " was detected on the host");
+   
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:viplayVer, exp:"^([0-9.]+)", base:"cpe:/a:urusoft:viplay3:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_vlc_media_player_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_vlc_media_player_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_vlc_media_player_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900529";
+SCRIPT_DESC = "VLC Media Player Version Detection (Lin)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -65,6 +71,12 @@
                        " running at location " + binPath +
                        " was detected on the host");
     ssh_close_connection();
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:vlcVer[1], exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:videolan:vlc_media_player:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_vlc_media_player_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_vlc_media_player_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_vlc_media_player_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900528";
+SCRIPT_DESC = "VLC Media Player Version Detection (Win)";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -60,4 +66,10 @@
   set_kb_item(name:"VLCPlayer/Win/Ver", value:vlcVer);
   security_note(data:"VLC Media Player version " + vlcVer +
                      " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:vlcVer, exp:"^([0-9.]+([a-z0-9]+)?)", base:"cpe:/a:videolan:vlc_media_player:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_vmware_springsource_tc_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_vmware_springsource_tc_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_vmware_springsource_tc_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,7 +46,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902187";
+SCRIPT_DESC = "Vmware SpringSource tc Server Version Detection";
+
 sstcPort = get_http_port(default:8080);
 if(!sstcPort){
   sstcPort = 8080;
@@ -74,10 +80,17 @@
       sstcVer = ereg_replace(pattern:"-", replace:".", string:sstcVer[1]);
       if(sstcVer != NULL)
       {
+        tmp_version = sstcVer + " under " + dir;
         set_kb_item(name:"www/"+ sstcPort + "/Vmware/SSTC/Runtime",
-                  value:sstcVer + " under " + dir);
+                  value:tmp_version);
         security_note(data:"SpringSource tc Server Version " + sstcVer +
                " running at location " + dir +  " was detected on the host");
+
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+)", base:"cpe:/a:vmware:tc_server:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_vuplayer_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_vuplayer_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_vuplayer_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -50,7 +50,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900191";
+SCRIPT_DESC = "VUPlayer Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -80,5 +86,11 @@
     set_kb_item(name:"VUPlayer/Version", value:vuplayerVer);
     security_note(data:"VUPlayer version " + vuplayerVer + " running at " +
                        "location " + exePath +  " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:vuplayerVer, exp:"^([0-9.]+)", base:"cpe:/a:vuplayer:vuplayer:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_websvn_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_websvn_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_websvn_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900440";
+SCRIPT_DESC = "WebSVN version detection";
+
 websvnPort = get_kb_item("Services/www");
 if(!websvnPort){
   exit(0);
@@ -67,6 +73,12 @@
       set_kb_item(name:"www/" + websvnPort + "/WebSVN", value:svnVer[1]);
       security_note(data:"WebSVN version " + svnVer[1] + " running at " +
                          "location " + dir +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:svnVer[1], exp:"^([0-9.]+)", base:"cpe:/a:tigris:websvn:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_winamp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_winamp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_winamp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900196";
+SCRIPT_DESC = "Winamp Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -70,4 +75,10 @@
   set_kb_item(name:"Winamp/Version", value:winampVer);
   security_note(data:"Winamp version " + winampVer + " running at location " +
                       winampPath +  " was detected on the host");
+   
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:winampVer, exp:"^([0-9.]+)", base:"cpe:/a:nullsoft:winamp:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_wingate_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_wingate_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_wingate_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900324";
+SCRIPT_DESC = "Qbik WinGate Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -68,5 +73,11 @@
     set_kb_item(name:"WinGate/Ver", value:winGateVer);
     security_note(data:"Qbik WinGate version " + winGateVer + " running at " +
                        "location " + path +  " was detected on the host");
+   
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:winGateVer, exp:"^([0-9.]+)", base:"cpe:/a:qbik:wingate:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_winrar_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_winrar_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_winrar_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.901021";
+SCRIPT_DESC = "WinRAR Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -88,4 +93,10 @@
 
  set_kb_item(name:"WinRAR/Ver", value:rarVer);
  security_note(data:"WinRAR version " + rarVer + " was detected on the host");
+   
+ ## build cpe and store it as host_detail
+ cpe = build_cpe(value:rarVer, exp:"^([0-9.]+)", base:"cpe:/a:rarlab:winrar:");
+ if(!isnull(cpe))
+    register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_woltlab_burning_board_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_woltlab_burning_board_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_woltlab_burning_board_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.800936";
+SCRIPT_DESC = "WoltLab Burning Board Version Detection";
+
 wbbPort = get_http_port(default:80);
 if(!wbbPort){
   wbbPort = 80;
@@ -73,11 +79,18 @@
 
     if(wbbVer[1] != NULL)
     {
+      tmp_version = wbbVer[1] + " under " + dir;
       set_kb_item(name:"www/" + wbbPort + "/BurningBoard",
-                  value:wbbVer[1] + " under " + dir);
+                  value:tmp_version);
       security_note(data:"WoltLab Burning Board version " + wbbVer[1] +
                          " running at location " + dir +
                          " was detected on the host");
+  
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9]+)?", base:"cpe:/a:woltlab:burning_board:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_wordpress_detect_900182.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_wordpress_detect_900182.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_wordpress_detect_900182.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -52,7 +52,24 @@
 
 
 include("http_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900182";
+SCRIPT_DESC = "WordPress Version Detection";
+
+## functions for script
+function register_cpe(tmpVers, tmpExpr, tmpBase){
+
+   local_var cpe;
+   ## build cpe and store it as host_detail
+   cpe = build_cpe(value:tmpVers, exp:tmpExpr, base:tmpBase);
+   if(!isnull(cpe))
+      register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+}
+
+## start script
 wpPort = get_kb_item("Services/www");
 if(!wpPort){
   wpPort = 80;
@@ -82,10 +99,15 @@
 
         if(wpVer[1] != NULL)
         {
+          tmp_version = wpVer[1] + " under " + dir;
           set_kb_item(name:"www/" + wpPort + "/WordPress",
-                      value:wpVer[1] + " under " + dir);
+                      value:tmp_version);
           security_note(data:"WordPress version " + wpVer[1] + " running at " +
                              "location " + dir + " was detected on the host");
+
+          ## build cpe and store it as host detail
+          register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:wordpress:wordpress:");
+
         }
       }
 
@@ -95,11 +117,16 @@
 
         if(wpmuVer[1] != NULL)
         {
+          tmp_version = wpmuVer[1] + " under " + dir;
           set_kb_item(name:"www/" + wpPort + "/WordPress-Mu",
-                      value:wpmuVer[1] + " under " + dir);
+                      value:tmp_version);
           security_note(data:"WordPress-Mu version " + wpmuVer[1] +
                              " running at location " + dir +
                              " was detected on the host");
+
+          ## build cpe and store it as host detail
+          register_cpe(tmpVers:tmp_version,tmpExpr:"^([0-9.]+)",tmpBase:"cpe:/a:wordpress:wordpress_mu:");
+
         }
       }
     }

Modified: trunk/openvas-plugins/scripts/secpod_wow_raid_manager_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_wow_raid_manager_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_wow_raid_manager_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -46,10 +46,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("http_func.inc");
 include("http_keepalive.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900514";
+SCRIPT_DESC = "WOW Raid Manager Version Detection";
+
 port = get_http_port(default:80);
 if(!port){
   exit(0);
@@ -72,6 +77,12 @@
       security_note(data:"WOW Raid Manager version " + version[1] +
                          " running at location " + dir +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value: version[1], exp:"^([0-9.]+)",base:"cpe:/a:wowraidmanager:wowraidmanager:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_ws_ftp_client_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_ws_ftp_client_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_ws_ftp_client_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,7 +48,13 @@
 
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.902170";
+SCRIPT_DESC = "Iswitch WS-FTP Client Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -82,6 +88,12 @@
         set_kb_item(name:"Ipswitch/WS_FTP_Pro/Client/Ver", value:wsftpVer);
         security_note(data:"WS_FTP version " + wsftpVer +
                            " was detected on the host");
+      
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:wsftpVer, exp:"^([0-9.]+)", base:"cpe:/a:ipswitch:ws_ftp:12.0:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
         exit(0);
       }
     }

Modified: trunk/openvas-plugins/scripts/secpod_wsftp_win_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_wsftp_win_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_wsftp_win_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,10 +45,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ftp_func.inc");
 include("version_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900608";
+SCRIPT_DESC = "WS_FTP Version Detection";
+
 port = get_kb_item("Services/ftp");
 if(!port){
   port = 21;
@@ -66,5 +71,11 @@
     set_kb_item(name:"WSFTP/Win/Ver", value:wsVer[1]);
     security_note(data:"WS_FTP version " + wsVer[1] +
                        " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: wsVer[1], exp:"^([0-9.]+)",base:"cpe:/a:ipswitch:ws_ftp:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_xampp_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_xampp_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_xampp_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900526";
+SCRIPT_DESC = "XAMPP Version Detection";
+
 xamppPort = get_kb_item("Services/www");
 if(!xamppPort){
   exit(0);
@@ -74,6 +80,12 @@
       set_kb_item(name:"www/" + xamppPort + "/XAMPP", value:xamppVer[1]);
       security_note(data:"XAMPP version " + xamppVer[1] + " running at " +
                          "location " + path +  " was detected on the host");
+   
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:xamppVer[1], exp:"^([0-9.]+)", base:"cpe:/a:apachefriends:xampp:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       exit(0);
     }
     exit(0);

Modified: trunk/openvas-plugins/scripts/secpod_xilisoft_video_conv_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_xilisoft_video_conv_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_xilisoft_video_conv_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -48,10 +48,15 @@
   exit(0);
 }
 
-
 include("smb_nt.inc");
 include("secpod_smb_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900629";
+SCRIPT_DESC = "Xilisoft Video Converter Version Detection";
+
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
 }
@@ -74,6 +79,12 @@
       set_kb_item(name:"Xilisoft/Video/Conv/Ver", value:xilisoftVer);
       security_note(data:"Xilisoft Video Converter version " + xilisoftVer +
                          " was detected on the host");
+
+      ## build cpe and store it as host_detail
+      cpe = build_cpe(value:xilisoftVer, exp:"^([0-9]\.[0-9]\.[0-9]+)", base:"cpe:/a:xilisoft:xilisoft_video_converter:");
+      if(!isnull(cpe))
+         register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     }
     exit(0);
   }

Modified: trunk/openvas-plugins/scripts/secpod_xitami_server_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_xitami_server_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_xitami_server_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,10 +47,15 @@
   exit(0);
 }
 
-
+include("cpe.inc");
+include("host_details.inc");
 include("ftp_func.inc");
 include("http_func.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900547";
+SCRIPT_DESC = "Xitami Server Version Detection";
+
 wwwPort = get_http_port(default:80);
 if(!wwwPort){
   wwwPort = 80;
@@ -105,4 +110,10 @@
   set_kb_item(name:"Xitami/Ver", value:xVer);
   security_note(data:"Xitami Server version " + xVer +
                      " was detected on the host");
+
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value: xVer, exp:"^([0-9.]+([a-z][0-9]?)?)",base:"cpe:/a:imatix:xitami:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
 }

Modified: trunk/openvas-plugins/scripts/secpod_xnview_detect_lin.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_xnview_detect_lin.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_xnview_detect_lin.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,7 +45,13 @@
 
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900753";
+SCRIPT_DESC = "XnView Version Detection (Linux)";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -62,6 +68,12 @@
     set_kb_item(name:"XnView/Linux/Ver", value:xnviewVer[1]);
     security_note(data:"XnView version " + xnviewVer[1] + " running at " +
                        "location " + xnviewbin + " was detected on the host");
+      
+    ## build cpe and store it as host_detail
+    cpe = build_cpe(value:xnviewVer[1], exp:"^([0-9.]+)", base:"cpe:/a:xnview:xnview:");
+    if(!isnull(cpe))
+       register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
     exit(0);
   }
 }

Modified: trunk/openvas-plugins/scripts/secpod_xnview_detect_win.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_xnview_detect_win.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_xnview_detect_win.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -47,7 +47,13 @@
 
 
 include("smb_nt.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900751";
+SCRIPT_DESC = "XnView Version Detection";
+
 ## Check for Windows
 if(!get_kb_item("SMB/WindowsVersion")){
   exit(0);
@@ -65,4 +71,9 @@
   set_kb_item(name:"XnView/Win/Ver", value:xnviewVer);
   security_note(data:"XnView version " + xnviewVer +
                      " was detected on the host");
+      
+  ## build cpe and store it as host_detail
+  cpe = build_cpe(value:xnviewVer, exp:"^([0-9.]+)", base:"cpe:/a:xnview:xnview:");
+  if(!isnull(cpe))
+     register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
 }

Modified: trunk/openvas-plugins/scripts/secpod_xoops_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_xoops_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_xoops_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -49,7 +49,13 @@
 
 include("http_func.inc");
 include("http_keepalive.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900892";
+SCRIPT_DESC = "XOOPS Version Detection";
+
 xoopsPort = get_http_port(default:80);
 if(!xoopsPort){
   exit(0);
@@ -85,10 +91,17 @@
         else
           xoopsVer = xoopsVer[1];
 
+        tmp_version = xoopsVer + " under " + dir;
         set_kb_item(name:"www/"+ xoopsPort + "/XOOPS",
-                    value:xoopsVer + " under " + dir);
+                    value:tmp_version);
         security_note(data:"XOOPS version " + xoopsVer + " running at " +
                            "location " + dir +  " was detected on the host");
+  
+        ## build cpe and store it as host_detail
+        cpe = build_cpe(value:tmp_version, exp:"^([0-9.]+\.[0-9])\.?([a-z0-9])?", base:"cpe:/a:xoops:xoops:");
+        if(!isnull(cpe))
+           register_host_detail(name:"App", value:cpe, nvt:SCRIPT_OID, desc:SCRIPT_DESC);
+
       }
     }
   }

Modified: trunk/openvas-plugins/scripts/secpod_xpdf_detect.nasl
===================================================================
--- trunk/openvas-plugins/scripts/secpod_xpdf_detect.nasl	2011-09-19 07:53:14 UTC (rev 11630)
+++ trunk/openvas-plugins/scripts/secpod_xpdf_detect.nasl	2011-09-19 09:56:25 UTC (rev 11631)
@@ -45,10 +45,15 @@
   exit(0);
 }
 
-
 include("ssh_func.inc");
 include("version_func.inc");
+include("cpe.inc");
+include("host_details.inc");
 
+## Constant values
+SCRIPT_OID  = "1.3.6.1.4.1.25623.1.0.900466";
+SCRIPT_DESC = "Xpdf Version Detection";
+
 sock = ssh_login_or_reuse_connection();
 if(!sock){
   exit(0);
@@ -67,6 +72,12 @@
     security_note(data:"Xpdf version " + xpdfVer[1] + " running at " +
                        "location " + xpdfBin + " was detected on the host");
     ssh_cl