From 41830a46aaa16bbb97b5cd901bfeb48d0689cc0a Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 9 Nov 2017 08:59:18 -0800 Subject: [PATCH] String, Hashes: remove links describing hashing methods These are either dead or don't accurately describe the state of these methods today. For example, the SHA1 site still describes SHA-1 and MD5 as "trusted" despite widely reported collision attacks already being possible[1][2][3]. [1]: https://www.computerworld.com/article/3173616/security/the-sha1-hash-function-is-now-completely-unsafe.html [2]: https://arstechnica.com/information-technology/2017/02/at-deaths-door-for-years-widely-used-sha1-function-is-now-dead/ [3]: https://techcrunch.com/2017/02/23/security-researchers-announce-first-practical-sha-1-collision-attack/ --- plugins/Hashes/plugin.py | 8 ++------ plugins/String/plugin.py | 12 +++--------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/plugins/Hashes/plugin.py b/plugins/Hashes/plugin.py index 67194775e..40a93eecb 100644 --- a/plugins/Hashes/plugin.py +++ b/plugins/Hashes/plugin.py @@ -47,9 +47,7 @@ class Hashes(callbacks.Plugin): def md5(self, irc, msg, args, text): """ - Returns the md5 hash of a given string. Read - http://www.rsasecurity.com/rsalabs/faq/3-6-6.html for more information - about md5. + Returns the md5 hash of a given string. """ irc.reply(hashlib.md5(text.encode('utf8')).hexdigest()) md5 = wrap(md5, ['text']) @@ -58,9 +56,7 @@ class Hashes(callbacks.Plugin): def sha(self, irc, msg, args, text): """ - Returns the SHA hash of a given string. Read - http://www.secure-hash-algorithm-md5-sha-1.co.uk/ for more information - about SHA. + Returns the SHA1 hash of a given string. """ irc.reply(hashlib.sha1(text.encode('utf8')).hexdigest()) sha = wrap(sha, ['text']) diff --git a/plugins/String/plugin.py b/plugins/String/plugin.py index 90d4492bf..91584bee8 100644 --- a/plugins/String/plugin.py +++ b/plugins/String/plugin.py @@ -219,9 +219,7 @@ class String(callbacks.Plugin): def xor(self, irc, msg, args, password, text): """ - Returns XOR-encrypted with . See - http://www.yoe.org/developer/xor.html for information about XOR - encryption. + Returns XOR-encrypted with . """ chars = utils.iter.cycle(password) ret = [chr(ord(c) ^ ord(next(chars))) for c in text] @@ -232,9 +230,7 @@ class String(callbacks.Plugin): def md5(self, irc, msg, args, text): """ - Returns the md5 hash of a given string. Read - http://www.rsasecurity.com/rsalabs/faq/3-6-6.html for more information - about md5. + Returns the md5 hash of a given string. """ irc.reply(utils.crypt.md5(text.encode('utf8')).hexdigest()) md5 = wrap(md5, ['text']) @@ -243,9 +239,7 @@ class String(callbacks.Plugin): def sha(self, irc, msg, args, text): """ - Returns the SHA hash of a given string. Read - http://www.secure-hash-algorithm-md5-sha-1.co.uk/ for more information - about SHA. + Returns the SHA1 hash of a given string. """ irc.reply(utils.crypt.sha(text.encode('utf8')).hexdigest()) sha = wrap(sha, ['text'])