RiskIQ API
Bases: object
RiskIQ API Client
Example:
from riskiq.api import Client
# Put credentials here.
token, key = None, None
client = Client(token, key)
# Submit URLs to your project
urls = ['http://evilexample.com/evil.php?shell=true', ...]
client.submit_landing_page_bulk(urls, project_name='Example')
# Get blacklist list from varying date ranges
client.get_blacklist_list(days=5)
data = client.get_blacklist_list(
start="2014/08/01 00:00:00", end="today 00:00:00"
)
results = data['resources']
all_malware = [x for x in results if x['malware']]
Return the affiliate campaign summary report for the given date range.
Parameters: |
|
---|---|
Returns: | data containing the number of results and the objects |
Return the affiliate campaign summary report for the given date range.
Parameters: |
|
---|---|
Returns: | data containing the number of results and the objects |
Retrieve an android application by package name. If the app is not found, 404 NOT FOUND is returned.
Parameters: | package_name – name of android package |
---|---|
Returns: | the requested app |
Retrieve an android app by store URL. The store URL should be of the form https://play.google.com/store/apps/details?id=[package name]
Parameters: | url – The store URL |
---|---|
Returns: | app details |
Query for the binary encoded base64 with the given md5 hash
Parameters: | md5_hash – md5 hash of the binary data |
---|---|
Returns: | object containing a dict with ‘data’ key encoded in base64 |
Return a list of all binaries in date range
Parameters: |
|
---|---|
Returns: | data containing the number of results and the objects |
Query blacklist incidents by url.
Parameters: | url – URL to query blacklist on. |
---|---|
Returns: | Blacklist incident |
Query blacklist incidents
Parameters: | url – list of blacklist incidents within timeframe |
---|
Parameters: |
|
---|---|
Returns: | Blacklist list |
Query blacklisted resources
Parameters: |
|
---|---|
Returns: | all blacklisted resources |
Query blacklist on url.
Parameters: | url – URL to query blacklist on. |
---|---|
Returns: | Blacklist Dict |
Query for all discovered malware resources generated within a particular period.
Parameters: |
|
---|---|
Returns: | all blacklisted resources |
Query for the crawl volume daily summary report for the date range
Parameters: |
|
---|---|
Returns: | crawl volume daily summary |
Get the passive dns results by ip address, query data
Parameters: |
|
---|---|
Returns: | return a JSON object of the data |
Get the passive dns results by ip address, query data
Parameters: |
|
---|---|
Returns: | return a JSON object of the data |
Get the passive dns results by hostname.
Parameters: |
|
---|---|
Returns: | return a JSON object of the data |
Get the reverse dns of a particular IP.
Parameters: |
|
---|---|
Returns: | return a JSON object of the data |
Retrieve a single landing page by MD5.
Parameters: |
|
---|---|
Returns: | landing page data |
List landing pages by crawl date - maximum of 100
Parameters: |
|
---|---|
Returns: | landing page data |
List landing pages by known profile creation date - maximum of 100
Parameters: |
|
---|---|
Returns: | landing page data |
List landing pages with malicious binary incidents.
Parameters: |
|
---|---|
Returns: | landing page data |
List all projects that landing pages may be submitted to.
Returns: | all projects |
---|
Retrieve an mobile app incident by ID. If the incident is not found, 404 NOT FOUND is returned.
Parameters: | incident_id – Long int ID |
---|---|
Returns: | mobile incident |
List app incidents by their incident creation date.
Parameters: |
|
---|---|
Returns: | mobile incidents |
retrieve a page and return it
Parameters: |
|
---|---|
Returns: | requested page |
retrieve a page and return its DOM
Parameters: |
|
---|---|
Returns: | requested page |
retrieve a page and return its DOM text
Parameters: |
|
---|---|
Returns: | requested page |
retrieve a page and return its response
Parameters: |
|
---|---|
Returns: | requested page |
retrieve a page and return its DOM
Parameters: |
|
---|---|
Returns: | requested page |
retrieve a page and return it
Parameters: |
|
---|---|
Returns: | requested page |
List all keywords associated to specified project.
Parameters: | project_id – Integer ID of the project |
---|---|
Returns: | Keywords of project |
List all projects.
Lookup a proxy by IP
Parameters: | ip – ip address of proxy |
---|---|
Returns: | proxy |
Get the current zlist urls.
Parameters: |
|
---|---|
Returns: | all URLs |
Submit a single landing page.
Parameters: |
|
---|---|
Returns: | returns json of landing page. |
Submit landing pages in bulk At least url must be specified.
Parameters: | entries – list of dictionaries specifying the below |
---|---|
Entry_key url: | Url to submit. |
Entry_key keyword: | |
Optional Keyword for this landing page. | |
Entry_key md5_hash: | |
Optional MD5 representing the canonical ID for this landing page | |
Entry_key project_name: | |
Optional Project name to submit landing page to | |
Entry_key pingback_url: | |
Optional URL to be GET requested upon completion of analysis of the landing page | |
Entry_key fields: | |
Optional dictionary of custom fields | |
Returns: | returns json of landing page bulk request. |
Generate a start date and an end date based off of how many days.
Parameters: |
|
---|---|
Returns: | (start, end) tuple of strings in acceptable date format |
Generates a date string in the required format from a datetime object.
Parameters: |
|
---|---|
Returns: | string in acceptable date format |
Generates a date string for today.
Returns: | Date string of today in “yyyy-mm-dd” format, accepted by API |
---|
Render the template with supplied context. Example template_file: “blacklist/lookup”
RiskIQ API