- Created by Documentation, last modified on Apr 09, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function lists brute force attack entries from the cPHulk database.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/json-api/get_cphulk_brutes?api.version=1
https://hostname.example.com:2087/cpsess##########/xml-api/json-api/get_cphulk_brutes?api.version=1
whmapi1 get_cphulk_brutes
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 1 documentation or run the
whmapi1 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi1
command:/usr/local/cpanel/bin/whmapi1
{ "data": { "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": "8", "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_brutes" } }
<result> <data> <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> </brutes> <brutes> <exptime>2014-11-20 00:00:00</exptime> <timeleft>8</timeleft> <notes>I'm making a note here:</notes> <logintime>2014-10-20 00:00:00</logintime> <ip>192.168.0.2</ip> </brutes> </data> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>get_cphulk_brutes</command> </metadata> </result>
Note:
Parameters
This function does not accept parameters.
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
brutes | array of hashes | An array of information about each brute force attack. | This array includes the exptime , timeleft , notes , logintime , and ip returns. | |
| string | When the login request will time out. The function returns this value in the | A valid time in
|
|
| integer | The number of minutes that remain before cPHulk removes the block. The function returns this value in the | A positive integer that represents a number of minutes. | 14 |
| string | The login entry's notes. The function returns this value in the | A valid string. | this was a triumph |
| string | When the login attempt occurred. The function returns this value in the | A valid time in
| 2014-11-20 00:00:00 |
| string | The IP address of the login attempt. The function returns this value in the | A valid IP address. | 192.168.0.1 |
Function information
API Version:
Available in:
WHM 11.48+
Methods:
GET, POST
Required Parameters:
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Functions - flush_cphulk_login_history — This function removes the login history entries from the cPHulk database.
-
Page:WHM API 1 Functions - get_cphulk_failed_logins — This function lists failed login attempt entries from the cPHulk database.
-
Page:WHM API 1 Functions - get_cphulk_excessive_brutes — This function retrieves excessive brute force attack entries from the cPHulk database.
-
Page:WHM API 1 Functions - get_cphulk_brutes — This function lists brute force attack entries from the cPHulk database.
-
Page:WHM API 1 Functions - save_cphulk_config — This function modifies cPHulk's configuration settings.