Skip to content

Instantly share code, notes, and snippets.

@mrks111
mrks111 / gist:2827090f715e9e4db1b5cc32f51de420
Created July 21, 2024 05:59 — forked from dvlop/gist:fca36213ad6237891609e1e038a3bbc1
My long list of bad bots to block in htaccess, ready to copy and paste!
# Start Bad Bot Prevention
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ bad_bot
SetEnvIfNoCase User-Agent "^12soso.*" bad_bot
SetEnvIfNoCase User-Agent "^192.comAgent.*" bad_bot
SetEnvIfNoCase User-Agent "^1Noonbot.*" bad_bot
SetEnvIfNoCase User-Agent "^1on1searchBot.*" bad_bot
SetEnvIfNoCase User-Agent "^3D_SEARCH.*" bad_bot
SetEnvIfNoCase User-Agent "^3DE_SEARCH2.*" bad_bot
SetEnvIfNoCase User-Agent "^3GSE.*" bad_bot
@mrks111
mrks111 / free_email_provider_domains.txt
Created June 12, 2024 12:28 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@mrks111
mrks111 / email_list_mx_checker.rb
Created December 3, 2023 06:30 — forked from peterc/email_list_mx_checker.rb
Email list MX record checker
# Read stdin, extract email addresses
# Look up MX records for those addresses
# Return each email address and their first MX record
# (or IP address, as a fallback)
hosts = {}
STDIN.each_line do |l|
# Extract the email and the email domain from each line
email = l[/^([^\s]+\@[^\s+\,]+)\b/, 1]
@mrks111
mrks111 / email-ping.rb
Created December 2, 2023 13:10 — forked from mikedamage/email-ping.rb
Ping an email address to see if it exists. This script resolves MX records to find the SMTP server responsible for delivering mail to the address, connects to it, and starts to send a message to the address. It disconnects before the message is sent.
#!/usr/bin/env ruby
#
# = Email Ping
#
# Check to see if an email address exists by looking up MX records and connecting
# to the address's home SMTP server. It then starts to send a message to the address
# but quits before the message is actually sent.
require 'resolv'
require 'net/smtp'