threatobjectsclient (rstapi.threatobjects) for the RST Threat Library:GET /threat-objects/{object_type}overintrusion-sets,malware,tools, andcampaigns.GetThreatObjects(object_type, ...)supportslimit/offsetpagination, single lookups viaid/name,filtersearch expressions, and sorting (orderBy=created_at/modified/updated_at,orderMode=asc/desc). Convenience helpersGetThreatObjectById/GetThreatObjectByName.- Threat Library pagination helper:
IterThreatObjects(object_type, page_size=100, ...)is a generator that walks every page (stopping ontotalor a short page) and raises on an API error so callers never silently truncate. Tolerant of{"data": [...], "total": N}, bare-list, and{"objects": [...]}response shapes. Constructor and environment variables (APIKEY,APIURL,RST_API_KEY, timeouts,RST_SSL_VERIFY) match the other clients; query params and the object-type path segment are URL-encoded.
scanclient (rstapi.scan) for the RST Cloud Scan API: Cobalt Strike beacon (/scan/cs-beacon), SSL certificate (/scan/ssl/certificate), favicon (/scan/favicon), HTML body (/scan/html/body), HTML body JavaScript (/scan/html/body/js), and HTML screenshots — first, full-page, and last frame (/scan/html/screenshot/*). Constructor and environment variables match other clients (APIKEY,APIURL,RST_API_KEY, timeouts, etc.).- Scan — optional file output: pass
pathto save binary or text — PNG fromimage_base64/base64_image(screenshots and favicon withinclude_base64=Truefor the favicon API’sbase64query flag), or raw response bytes for HTML body and JS endpoints. Successful file writes addsaved_image_pathto JSON responses where applicable, or return{"status": "ok", "message": path}for raw body saves (same pattern as threat feed / report PDF). connectivityclient (rstapi.connectivity) withCheckApiKey()callingGET /auth/check. The JSON response includesquota(used,limit,remaining,period) andcheck(status, etc.) so applications can read how many requests are left in the current quota window.- URL encoding: query parameters and path segments use
urllib.parse(quote/urlencode). IoC lookup, Noise Control lookup, Whois domain paths, Report Hub report URLs, and Threat Feed query strings encode reserved characters (&,=,%, spaces, Unicode, etc.) correctly. Simple ASCII-only values behave as before. - Environment variables:
RST_CONNECT_TIMEOUT,RST_READ_TIMEOUT, andRST_MAX_RETRIESare parsed as integers; invalid values fall back to the constructor default.RST_SSL_VERIFYis resolved forrequestsTLSverify: common boolean strings (true/false,1/0,yes/no,on/off) become real booleans; any other non-empty value is used as a CA bundle path string. noisecontrol: instance attributeAPIURLrenamed toAPI_URLfor consistency with other clients (constructor parameter nameAPIURLis unchanged). Any code that readnoisecontrol.APIURLmust useAPI_URLinstead.noisecontrol.BatchResult: parameterstimeoutandretryare honored —timeoutis the delay between retries when the server responds with HTTP 301 (pending);retry=Falsereturns the first response immediately without waiting on 301 (including a single JSON body from a 301 response).- Internals: success vs error detection uses
isinstance(..., dict)instead of probingrequests.Responsewithin.RequestExceptionerrors are surfaced withmessageas a string. POST JSON bodies useisinstance(data, dict).
- timeout bugfix
- Added retry logic for all API endpoints
- Added connect/read timeouts and an ability to ignose SSL certs
- Noise Control Batch result API has its own retry parameter
- All errors are standardised as {"status": "error", "message": "Reason"}
- Package updates
- Package updates
- Move beta to version 1.0.0