pybusedb/pybusedb.py
2018-09-09 04:46:06 +10:00

20 lines
503 B
Python

import json
import requests
import re
class APIConnect(object):
def __init__(self, APIKEY):
self.APIKEY = APIKEY
self.baseAPIURL = "https://www.abuseipdb.com/"
self.checkIPURL = "check/"
self.checkCIDRURL = "check-block/"
self.reportIPURL = "report/"
print(self.APIKEY)
def checkIP(self, ip):
self.ip = ip
self.URL = self.baseAPIURL + self.checkIPURL + self.ip + '/json' '?key=%s' % self.APIKEY
print(self.URL)