Child pages
  • WHM API 1 Functions - get_cphulk_excessive_brutes

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function retrieves excessive brute force attack entries from the cPHulk database.

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/get_cphulk_excessive_brutes?api.version=1
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/get_cphulk_excessive_brutes?api.version=1
Expand
titleCommand Line
Code Block
languagebash
whmapi1 get_cphulk_excessive_brutes

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{
  "data": {
    "excessive_brutes": [
      {
        "exptime": "2014-11-07 00:00:00",
        "timeleft": "14",
        "notes": "this was a triumph",
        "logintime": "2014-10-20 00:00:00",
        "ip": "192.168.0.1"
      },
      {
        "exptime": "2014-11-20 00:00:00",
        "timeleft": "14",
        "notes": "I'm making a note here:",
        "logintime": "2014-10-20 00:00:00",
        "ip": "192.168.0.2"
      },
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "get_cphulk_excessive_brutes"
  }
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<result>
    <data>
        <excessive_brutes>
            <exptime>2014-11-07 00:00:00</exptime>
            <timeleft>14</timeleft>
            <notes>this was a triumph</notes>
            <logintime>2014-10-20 00:00:00</logintime>
            <ip>192.168.0.2</ip>
        </excessive_brutes>
        <excessive_brutes>
            <exptime>2014-11-20 00:00:00</exptime>
            <timeleft>14</timeleft>
            <notes>I'm making a note here:</notes>
            <logintime>2014-10-20 00:00:00</logintime>
            <ip>192.168.0.2</ip>
        </excessive_brutes>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_cphulk_excessive_brutes</command>
    </metadata>
</result>

Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
excessive_brutesarray of hashesAn array of information about each brute force attack.This array includes the exptime, notes, logintime, and ip returns. 

exptime

string

When the login request will time out.

The function returns this value in the excessive_brutes array.

A valid time in YYYY-MM-DD HH:mm:SS format, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the day.
  • HH represents the hour.
  • mm represents the minute.
  • SS represents the second.
2014-12-07 00:00:00

timeleft

integer

The number of minutes that remain before cPHulk removes the block.

The function returns this value in the excessive_brutes array.

A positive integer that represents a number of minutes.14

 notes

string

The login entry's notes.

The function returns this value in the excessive_brutes array.

A valid string.this was a triumph

logintime

string

When the login attempt occurred.

The function returns this value in the excessive_brutes array.

A valid time in YYYY-MM-DD HH:mm:SS format, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the day.
  • HH represents the hour.
  • mm represents the minute.
  • SS represents the second.
2014-11-20 00:00:00

ip

string

The IP address of the login attempt.

The function returns this value in the excessive_brutes array.

A valid IP address.192.168.0.1