The method allows to retrieve scripts according to the given parameters该方法允许根据给定的参数检索脚本.

    Parameters参数

    (object) Parameters defining the desired output定义所需输出的参数.

    The method supports the following parameters该方法支持以下参数.

    • an array of objects一组对象;

    • the count of retrieved objects, if the countOutput parameter has been used如果已经使用了countOutput参数,则检索对象的计数.

    Examples范例

    Retrieve all scripts检索所有脚本

    Retrieve all configured scripts检索所有已配置的脚本.

    Response响应:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "scriptid": "1",
    6. "name": "Ping",
    7. "command": "/bin/ping -c 3 {HOST.CONN} 2>&1",
    8. "host_access": "2",
    9. "groupid": "0",
    10. "description": "",
    11. "confirmation": "",
    12. "type": "0",
    13. "execute_on": "1"
    14. },
    15. {
    16. "scriptid": "2",
    17. "name": "Traceroute",
    18. "command": "/usr/bin/traceroute {HOST.CONN} 2>&1",
    19. "host_access": "2",
    20. "usrgrpid": "0",
    21. "groupid": "0",
    22. "description": "",
    23. "confirmation": "",
    24. "type": "0",
    25. "execute_on": "1"
    26. {
    27. "scriptid": "3",
    28. "name": "Detect operating system",
    29. "command": "sudo /usr/bin/nmap -O {HOST.CONN} 2>&1",
    30. "host_access": "2",
    31. "usrgrpid": "7",
    32. "groupid": "0",
    33. "description": "",
    34. "confirmation": "",
    35. "type": "0",
    36. "execute_on": "1"
    37. }
    38. ],
    39. "id": 1
    40. }

    Source源码