spam-lookup.sh

来自「Shall高级编程」· Shell 代码 · 共 46 行

SH
46
字号
#!/bin/bash# spam-lookup.sh: Look up abuse contact to report a spammer.# Thanks, Michael Zick.# Check for command-line arg.ARGCOUNT=1E_WRONGARGS=65if [ $# -ne "$ARGCOUNT" ]then  echo "Usage: `basename $0` domain-name"  exit $E_WRONGARGSfidig +short $1.contacts.abuse.net -c in -t txt# Also try:#     dig +nssearch $1#     Tries to find "authoritative name servers" and display SOA records.# The following also works:#     whois -h whois.abuse.net $1#           ^^ ^^^^^^^^^^^^^^^  Specify host.  #     Can even lookup multiple spammers with this, i.e."#     whois -h whois.abuse.net $spamdomain1 $spamdomain2 . . .#  Exercise:#  --------#  Expand the functionality of this script#+ so that it automatically e-mails a notification#+ to the responsible ISP's contact address(es).#  Hint: use the "mail" command.exit $?# spam-lookup.sh chinatietong.com#                A known spam domain.# "crnet_mgr@chinatietong.com"# "crnet_tec@chinatietong.com"# "postmaster@chinatietong.com"#  For a more elaborate version of this script,#+ see the SpamViz home page, http://www.spamviz.net/index.html.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?