commit 42466fa: [Project] Remove old code
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Jul 28 16:21:14 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-07-28 17:14:18 +0100
URL: https://github.com/rspamd/rspamd/commit/42466fa83a7f57d2e484bee163c90405ce6ff332 (HEAD -> master)
[Project] Remove old code
---
rules/bitcoin.lua | 43 -------------------------------------------
1 file changed, 43 deletions(-)
diff --git a/rules/bitcoin.lua b/rules/bitcoin.lua
index 5ffd1a548..0c9c79bac 100644
--- a/rules/bitcoin.lua
+++ b/rules/bitcoin.lua
@@ -230,49 +230,6 @@ config.regexp['BITCOIN_ADDR'] = {
end
end,
},
- callbackk = function(task)
- local rspamd_re = require "rspamd_regexp"
-
- local btc_wallet_re = rspamd_re.create_cached('^[13LM][1-9A-Za-z]{25,34}$')
- local segwit_wallet_re = rspamd_re.create_cached('^(?:bc1|[13]|(?:[^:]+:))[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{14,}$', 'i')
- local words_matched = {}
- local segwit_words_matched = {}
- local valid_wallets = {}
-
- for _,part in ipairs(task:get_text_parts() or {}) do
- local pw = part:filter_words(btc_wallet_re, 'raw', 3)
-
- if pw and #pw > 0 then
- for _,w in ipairs(pw) do
- words_matched[#words_matched + 1] = w
- end
- end
-
- pw = part:filter_words(segwit_wallet_re, 'raw', 3)
- if pw and #pw > 0 then
- for _,w in ipairs(pw) do
- segwit_words_matched[#segwit_words_matched + 1] = w
- end
- end
- end
-
- for _,word in ipairs(words_matched) do
- local valid = is_traditional_btc_address(word)
- if valid then
- valid_wallets[#valid_wallets + 1] = word
- end
- end
- for _,word in ipairs(segwit_words_matched) do
- local valid = is_segwit_bech32_address(word)
- if valid then
- valid_wallets[#valid_wallets + 1] = word
- end
- end
-
- if #valid_wallets > 0 then
- return true,1.0,valid_wallets
- end
- end,
score = 0.0,
one_shot = true,
group = 'scams',
More information about the Commits
mailing list