Abuse Contact Finder
- class prsw.stat.abuse_contact_finder.AbuseContactFinder(RIPEstat, resource)
The main purpose of this data call is to return abuse contact informations for a Internet number resource.
Note
Note that this information is in many cases incorrect or not available.
- Additional information:
the resources RIR name (if available)
whether the queries resource is related to a special purpose Internet number resource (if available)
blocklist informations (if available)
additional information about the matchin autnum or inet(6)num object in the RIPE DB (e.g. holder name)
less and more specific IP prefixes/ranges for IP based queries
Reference: https://stat.ripe.net/docs/data_api#abuse-contact-finder
Property
Description
authortiesList all RIRs that are responsible for the queried resource
blocklist_infoLists the total amount of entries in one blocklist source Every blocklist is given with the name as “list” and the number of entries in the field “entries”.
global_network_infoThis contains information that are related to special purpose Internet number resources, e.g. private address space.
anti_abuse_contactsContains the anti-abuse contact informations (if available)
holder_infoContains information found in the matching autnum or inet(6)num object in the RIPE DB.
less_specificLists less specific IP prefixes/ranges found for the given input resource.
more_specificLists more specific IP prefixes/ranges found for the given input resource.
resourceThe resource the query was based on.
query_timeHolds the time the query was based on.
import prsw ripe = RIPEstat() # Lookup by ASN contacts = ripe.abuse_contact_finder(3333) # Lookup by IPv4 or IPv6 Address contacts = ripe.abuse_contact_finder(IPv4Address('193.0.0.0')) # Lookup by IPv4 or IPv6 Network (prefix) contacts = ripe.abuse_contact_finder(IPv4Network('193.0.0.0/23)) # See each property below for additional details on each of the returned # properties listed in the table above. contacts.resource # resource used in query: # 3333 -or- IPv4Address('193.0.0.0') -or- IPv4Network('193.0.0.0/23') contacts.query_time # datetime.datetime(2021, 4, 14, 12, 54, 37)
- __init__(RIPEstat, resource)
Initialize and request Absute Contacts.
- Parameters
resource – A prefix, single IP address or ASN
contacts = ripe.abuse_contact_finder('193.0.0.0')
- property anti_abuse_contacts
This object contains anti-abuse contact information (if available)
Property
Description
abuse_cDedicated abuse contact that is according to ripe-563, for further details refer to This RIPE Labs article. If the abuse-c contact is available other contact fields (e.g. “extracted_mails”) will be left empty.
emailsAny found email address is stated with a “description” and a “email” field
extracted_emailsThose contacts have been extracted/parsed from a RIPE DB object, the exact reference is given by “object-type” and “object-key”.
objects_with_remarksAny object that was found to contain anti-abuse related information is listed with a “type” field and a link to the RIPE DB web interface.
finder = ripe.abuse_contact_finder(3333) contacts = finder.anti_abuse_contacts # AntiAbuseContacts( # abuse_c=[], # email=[], # extracted_emails=[], # objects_with_remarks=[] # ) for contact in contacts.abuse_c: print(contact["description"]) print(contact["email"]) print(contact["key"])
- property authorities
List of all RIRs that are responsible for the queried resource.
contacts = ripe.abuse_contact_finder('193.0.0.0') contacts.authorities # ['ripe']
- property blocklist_info
List of total amount of entries in one blocklist source. Every blocklist is given with the name as “list” and the number of entries in the field “entries”.
- property global_network_info
This contains information that are related to special purpose Internet number resources, e.g. private address space.
contacts = ripe.abuse_contact_finder('192.0.0.0') contacts.global_network_info # GlobalNetworkInfo(description="", name="RIPE NCC PI Allocation") contacts.global_network_info.name # "RIPE NCC PI Allocation"
- property holder_info
This contains information found in the matching autnum or inet(6)num object in the RIPE DB.
Property
Description
name“netname” for IP based queries, “as-name” for ASN based queries
resourceThe resource that is mapped to the object (that doesn’t have to be the same as the given input)
contacts = ripe.abuse_contact_finder(3333) contacts.holder_info # HolderInfo(name=str, resource=str) print(contacts.holder_info.name) # "RIPE-NCC" print(contacts.holder_info.resource) # "3333"
- property less_specifics
Less specific IP prefixes/ranges found for the given input resource.
Returns the list response of strings from the RIPE API due to the various possible formats of each line:
"193.0.18.0-193.0.21.255", "193.0.0.0-193.0.23.255", "193.0.0.0/16"
- property more_specifics
More specific IP prefixes/ranges found for the given input resource.
Returns the list response of strings from the RIPE API due to the various possible formats of each line:
"193.0.18.0-193.0.21.255", "193.0.0.0-193.0.23.255", "193.0.0.0/16"
- property query_time
Holds the time the query was based on.
- property resource
Holds the resource the query was based on.
- property special_resources
List returned from API. No description available.