added base util
This commit is contained in:
parent
6179e2fe82
commit
a71db93722
BIN
__pycache__/pybusedb.cpython-37.pyc
Normal file
BIN
__pycache__/pybusedb.cpython-37.pyc
Normal file
Binary file not shown.
19
pybusedb.py
Normal file
19
pybusedb.py
Normal 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)
|
||||||
Loading…
x
Reference in New Issue
Block a user