Skip to content

Instantly share code, notes, and snippets.

@amscotti
Created August 20, 2017 00:11

Revisions

  1. amscotti created this gist Aug 20, 2017.
    7 changes: 7 additions & 0 deletions spam.groovy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    listofemails = new File("email_list.txt").text
    listofemails.eachLine { it ->
    def respons = new XmlSlurper().parseText(new URL("http://www.stopforumspam.com/api?email=${it}").text)
    if (respons.appears.text() == "yes") {
    println "${it} has been reported ${respons.frequency.text()} times on stopforumspam.com"
    }
    }