added base util

This commit is contained in:
Benjamyn Love 2018-09-09 04:46:06 +10:00
parent 6179e2fe82
commit a71db93722
2 changed files with 19 additions and 0 deletions

Binary file not shown.

19
pybusedb.py Normal file
View File

@ -0,0 +1,19 @@
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)