diff --git a/analyzers/Onyphe/onyphe_api.py b/analyzers/Onyphe/onyphe_api.py index bda783f..bd48787 100644 --- a/analyzers/Onyphe/onyphe_api.py +++ b/analyzers/Onyphe/onyphe_api.py @@ -77,6 +77,12 @@ class Onyphe: url_path = "/api/geoloc/{ip}".format(ip=ip) return self._request_without_api(path=url_path) + def user(self): + """Return a summary of user information. + """ + url_path = "/api/user" + return self._request(path=url_path) + def ip(self, ip: str): """Return a summary of all information we have for the given IPv{4,6} address. History of changes will not be shown, only latest results. """ @@ -125,6 +131,29 @@ class Onyphe: url_path = "/api/forward/{search}".format(search=search) return self._request(path=url_path) + def onionscan(self, search: str): + """Return information we have for the given onion domain with history of changes. Multiple onion entries may match. We return all of them. + """ + url_path = "/api/onionscan/{search}".format(search=search) + return self._request(path=url_path) + + def sniffer(self, ip: str): + """Return sniffer information we have for the given IPv{4,6} address with history of changes. Multiple sniffer entries may match. We return all of them. + """ + url_path = "/api/sniffer/{ip}".format(ip=ip) + return self._request(path=url_path) + + def ctl(self, search: str): + """Return information we have for the given domain name with history of changes. Multiple ctl entries may match. We return all of them. + """ + url_path = "/api/ctl/{search}".format(search=search) + return self._request(path=url_path) + + def md5(self, search: str): + """Return information we have for the given md5 hash with history of changes. Multiple datascan entries may match. We return all of them. + """ + url_path = "/api/md5/{search}".format(search=search) + return self._request(path=url_path) class APIError(Exception): """This exception gets raised when the returned error code is non-zero positive"""