aboutsummaryrefslogtreecommitdiff
path: root/modules/haveibeenpwned.py
diff options
context:
space:
mode:
authorGravatar dngfx2018-08-31 10:50:37 +0100
committerGravatar dngfx2018-08-31 10:50:37 +0100
commitabed9cf4ea71dcbad2dd2c049683b8d14b942e09 (patch)
tree3e40caf63fa7e1500469f4ad9a0c45c51808aad4 /modules/haveibeenpwned.py
parentFix a copy paste fail in IRCLineHandler that caused PARTs to be handled as QUITs (diff)
Reformat
Diffstat (limited to 'modules/haveibeenpwned.py')
-rw-r--r--modules/haveibeenpwned.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/haveibeenpwned.py b/modules/haveibeenpwned.py
index fa10129c..d3e8aef3 100644
--- a/modules/haveibeenpwned.py
+++ b/modules/haveibeenpwned.py
@@ -3,21 +3,23 @@ import Utils
URL_HAVEIBEENPWNEDAPI = "https://haveibeenpwned.com/api/v2/breachedaccount/%s"
URL_HAVEIBEENPWNED = "https://haveibeenpwned.com/"
+
class Module(object):
def __init__(self, bot):
bot.events.on("received").on("command").on("beenpwned").hook(
self.beenpwned, min_args=1,
help="Find out if a username, email or similar has appeared "
- "in any hacked databases", usage="<username/email>")
+ "in any hacked databases", usage="<username/email>")
def beenpwned(self, event):
page = Utils.get_url(URL_HAVEIBEENPWNEDAPI % event["args"], json=True,
- code=True)
+ code=True)
if page:
code, page = page
if code == 200:
event["stdout"].write(
- "It seems '%s' has been pwned. check on %s." % (event["args"],
+ "It seems '%s' has been pwned. check on %s." % (
+ event["args"],
URL_HAVEIBEENPWNED))
else:
event["stdout"].write("It seems '%s' has not been pwned" % (