Last active
May 8, 2019 15:17
-
-
Save fenrir-naru/63f71c5f9b1b7cb1fce4 to your computer and use it in GitHub Desktop.
Address verifier for emailrelay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# coding: utf-8 | |
require 'win32ole' | |
wsh = WIN32OLE.new('WScript.Shell') | |
address = ARGV[0] | |
res = 0 | |
if address !~ /\@example\.com$/ then | |
case wsh.popup("アドレスを確認、送信する?\r\n" + address , 0, '', 1); | |
when 2 | |
puts "invalid address." | |
exit(2) | |
end | |
end | |
puts "" | |
puts address | |
exit 1 | |
__END__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment