You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Copyright (C) 2015-2019 Wazuh, Inc. All rights reserved.
4
+
* Wazuh.com
5
+
*
6
+
* This program is a free software; you can redistribute it
7
+
* and/or modify it under the terms of the GNU General Public
8
+
* License (version 2) as published by the FSF - Free Software
9
+
* Foundation.
10
+
*/
11
+
12
+
13
+
varrouter=require('express').Router();
14
+
15
+
/**
16
+
* @api {get} /mitre Get information from Mitre database
17
+
* @apiName GetMitre
18
+
* @apiGroup Info
19
+
*
20
+
* @apiParam {Number} [offset] First element to return in the collection.
21
+
* @apiParam {Number} [limit=10] Maximum number of elements to return.
22
+
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
23
+
* @apiParam {String} [select] List of selected fields separated by commas.
24
+
* @apiParam {String} [q] Query to filter results by. For example q="id=T1010"
25
+
* @apiParam {String} [id] Filter by attack ID.
26
+
* @apiParam {String} [phase_name] Filter by phase name.
27
+
* @apiParam {String} [platform_name] Filter by platform name.
28
+
* @apiParam {String} [search] Looks for elements with the specified string.
29
+
*
30
+
* @apiDescription Returns information from Mitre database
31
+
*
32
+
* @apiExample {curl} Example usage*:
33
+
* curl -u foo:bar -k -X GET "https://127.0.0.1:55000/mitre?limit=2&offset=4&pretty"
34
+
*
35
+
*/
36
+
router.get('/',cache(),function(req,res){
37
+
logger.debug(req.connection.remoteAddress+" GET /mitre");
* @api {get} /rules/mitre Get rule mitre requirements
334
+
* @apiName GetRulesMitre
335
+
* @apiGroup Info
336
+
*
337
+
* @apiParam {Number} [offset] First element to return in the collection.
338
+
* @apiParam {Number} [limit=500] Maximum number of elements to return.
339
+
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
340
+
* @apiParam {String} [search] Looks for elements with the specified string.
341
+
*
342
+
* @apiDescription Returns the Mitre requirements of all rules.
343
+
*
344
+
* @apiExample {curl} Example usage:
345
+
* curl -u foo:bar -k -X GET "https://127.0.0.1:55000/rules/Mitre?offset=0&limit=2&pretty"
346
+
*
347
+
*/
348
+
router.get('/mitre',cache(),function(req,res){
349
+
logger.debug(req.connection.remoteAddress+" GET /rules/mitre");
0 commit comments