/sucuri_api

Custom library for interacting with Sucuri sites.

Primary LanguagePython

Sucuri API Wrapper

This API wrapper is used to interact with Sucuri's public API. It can be used to add/delete sites on their scanner, query scan results, create malware removal requests, etc.

The configuration file requires an API key, and Sucuri login credentials. The article below details how to retrieve your API key. You will need to use your "Dashboard API" api key, rather than the "Scanning API".

https://kb.sucuri.net/monitoring/scanning-api

Methods

login()

     Login to Sucuri. This is done automatically when necessary.

add_site(String domain)

     Add site to Sucuri's site scanner.

del_site(String domain)

     Delete site from Sucuri's site scanner.

grep_domain(String domain)

     Check if provided domain exists in Sucuri's site scanner.

run_scan(String domain)

     Force Sucuri to run a new site scan on the provided domain.

query(String domain)

     Query Sucuri site scanner for scan results on the most recent scan. Returns 'result', 'status', and 'query'.

ticket_exists(String domain)

     Checks for an existing "Waiting on your reply" or "In review" malware removal request ticket.

create_ticket(String domain, String host, String username, String password)

     Create a malware removal request with the provided FTP Hostname, username, and password.