#TRUSTED 9032f5cbbc8bfec8f421d6fe6e2f0b5528e1ec497f9817607d58260ed233d02a070ee4c08f6f400d8513417c320e53110bffa27a7467532d1673f367bb4590ec3afe5776a4e8cb27b1067a4ceadf037987702408c83f858e6b32f977573073a0d636431fc747d8793114a9fa4988c1829adb44510e6f4c43de572464077f97ba9e66ddae6b97ff74ca1f8894a4d114366aac5310b679d4bb463d33e8ef25d2ed9f16da9940a654dc209b453dba1a42f54e172f07f527127e913369e1cdca40a7bef2dd36a8ae208d9576ddbc49357d8eb8c6e3e6f21abdffe032d0ad45996363e3b3d998a624a57c5212c4489cafc67210eaaab19ad65fe125c3a7b4a33ebd51bc8bfb744326d9cc0b20080e15948ef66f617ae03dbf005f6df85146ac8d321e273bd8d902a71757b3cc70d46546f49794a345f2b77d35fd969d5f48258a761c96faa96c25a1ddf74cf59f91df09230df8aaf51a7ae046e7da387f229305d073a17e761d1f753bfb8d2b6f58fb8ae35c5b990966e392ec254e5d0d2c03cb184bbfe0d7ec5c4c1df4da3b96fc2305dd075fb94adae9618b0021cca2ea38b9284863221890e64be83074a991f7fa6e2045fd7551193d3131be682565feb17f4177102f38bfea2534a9c38e7b3ccefe20b884511d382883e73ae756e4cf3bea81a05fec5cf343619c5fd74e88e10d627e04aedb10ab18ede22facd104934240ed3e
#TRUST-RSA-SHA256 0390474b5e30db0486955aca07edc1760aae185c7e2eead1b994cce362f137c93289ec1cfbb5d4d72d5c2fecf5457c592eff0f8becbfb8014fd7e6c0efe7d60ebf3027612b2a10e590690d1b37247ad43c4161ecb13d53e107b4f7bd1a81ec7a165dd64c4c0f208ae863398dffb4d9097f3eed7235c6b1f28a5e47b36d3fced4f36706b3c5541008f59e2ac3f905c41a7ca719670e7dcec8ad493d19a0ae1159b64b78ae5dbbb543cc0732895ef3f514577d65b5a4823f54f5afa67b326d735d5acaa3ee1c938a033785f57b34d686574e048d6195eeca22660d2895643add3a2712d4a34de3bda7baf8795fc5b6a62b8784ba545df11c19f417bbf019fb7e6b2d0d7e73acac18c34376665cd1ca1bb190b5af8cf102d90e59f004d7510c13e01073f2f6b87827f1383267ff7eef80aa79d0f2cc135ad2c3206b7fcf0cdac8dbc5ea28109571699bfca2bb25561143ec8aa39de0b5f9d0914f14e1cfb2dc471d2280e3dc27036c1a20019f08ac8d37b578cdf598421f521d11a50ff6672e371e81ac47bb5b4a39564f6affdd83e67e0891f960dd3c85f35168c4a08588e47d9dd8e245056ef34f98467c301f09081441236a550b889c06133ce40c4197dec0255568ab99edf3d3b0fa5db220484fd9d49fe181e71588e99c28ec9e5398d236049325cfeaa1b198c37d07aa6bb5c1243417bfade8768319f487240654b735bc07
#
# (C) Tenable Network Security, Inc.
#
include("compat.inc");
if (description)
{
script_id(84239);
script_version("1.22");
script_set_attribute(attribute:"plugin_modification_date", value:"2025/07/14");
script_name(english:"Debugging Log Report");
script_summary(english:"Aggregates plugin debugging messages.");
script_set_attribute(attribute:"synopsis", value:
"This plugin gathers the logs written by other plugins and reports
them.");
script_set_attribute(attribute:"description", value:
"Logs generated by other plugins are reported by this plugin. Plugin
debugging must be enabled in the policy in order for this plugin
to run.");
script_set_attribute(attribute:"solution", value:"n/a");
script_set_attribute(attribute:"risk_factor", value:"None");
script_set_attribute(attribute:"plugin_publication_date", value:"2015/06/17");
script_set_attribute(attribute:"plugin_type", value:"combined");
script_set_attribute(attribute:"agent", value:"all");
script_set_attribute(attribute:"asset_inventory", value:"True");
script_set_attribute(attribute:"always_run", value:TRUE);
script_end_attributes();
script_category(ACT_END2);
script_family(english:"Settings");
script_copyright(english:"This script is Copyright (C) 2015-2025 and is owned by Tenable, Inc. or an Affiliate thereof.");
# Allow this to run for ninety minutes, unless the timeout is already
# set above ninety minutes. Mostly for MDM debugging and Windows logging.
if (int(get_preference("plugins_timeout")) <= 5400)
script_timeout(5400);
script_require_keys("global_settings/enable_plugin_debugging");
exit(0);
}
get_kb_item_or_exit("global_settings/enable_plugin_debugging");
var mem_size = 1024*1024*1024;
#increasing the memory limits for MDM debug scans which can be rather large
if (defined_func("set_mem_limits"))
set_mem_limits(max_alloc_size:mem_size, max_program_size:mem_size);
var tables = get_kb_list(spad_log::KB_LOGNAMES + '*');
if(!tables)
exit(0, "No log information to report.");
var kb_prefix_len = strlen(spad_log::KB_LOGNAMES);
var logfile, logname, name;
# It's impossible to call security_report_with_attachments() multiple times on versions < 10.4
if (nasl_level() < 190400)
{
var logs = [];
for (name in tables)
{
logname = substr(name, kb_prefix_len);
logfile = new spad_log::logfile(logname, tables[name]);
if (logfile.error)
{
delete logfile;
continue;
}
logfile.create_attachment();
append_element(value:logfile.attachment[0], var:logs);
delete logfile;
}
security_report_with_attachments(
port : 0,
level : 0,
extra : "Plugin debug log(s) have been attached.",
attachments : logs
);
exit(0);
}
# On all of our other products we should be able to call security_report_with_attachments() multiple times
for (name in tables)
{
logname = substr(name, kb_prefix_len);
logfile = new spad_log::logfile(logname, tables[name]);
if (logfile.error)
{
delete logfile;
continue;
}
logfile.create_attachment();
security_report_with_attachments(
port : 0,
level : 0,
extra : "Plugin debug log(s) have been attached.",
attachments : logfile.attachment
);
delete logfile;
}
exit(0);
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation