Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Phishbert for Rocket.Chat (set this up as an Outgoing Webhook script)
- class Script {
- prepare_outgoing_request({ request }) {
- // Detect phishing attempts and alert channel
- let pattern = new RegExp('(0x)?[0-9a-f]{40}|(etherscan.io)', 'gi');
- if (pattern.test(request.data.text)) {
- return {
- message: {
- text: [
- '⚠️ *ALERT* ⚠️',
- 'The previous message from @' + request.data.user_name + ' may be a phishing attempt. Do not send funds to addresses posted in this channel or follow suspicious links.'
- ].join('\n')
- }
- };
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement