added base util
This commit is contained in:
1 parent
6179e2fe82
commit
a71db93722
2 files changed
+19
No files matched your search
Binary file not shown.
+19
@@ -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)
|
||||||
Reference in new issue
Block a user