Coder Social home page Coder Social logo

aorzh / spam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jrasanen/spam

0.0 2.0 0.0 41 KB

Python library to check urls for spam

Home Page: http://fmarani.github.com/spam/

License: GNU Lesser General Public License v3.0

Shell 0.90% Python 99.10%

spam's Introduction

SPAM - URL spam testing library

image

A library to verify whether an url has been classified as spam

Supports:

  • SpamHaus zen
    • SBL (e-mail spam)
    • XBL (infected PCs)
    • PBL (unsolicited smtp traffic)
  • Surbl multi
    • Spamcop
    • sa-blacklist
    • Outblaze
    • Abusebutler
    • Phishtank
    • Zeus tracker
    • jwSpamSpy
    • Prolocation

For any further information, you can watch the tutorial here: http://www.youtube.com/watch?v=anwy2MPT5RE

Install

From PyPI (stable):

pip install spam-blocklists

From Github (this fork):

pip install git+git://github.com/aorzh/spam.git#egg=spam-blocklists

Use

Spamhaus:

>>> from spam.spamhaus import SpamHausChecker
>>> checker = SpamHausChecker()

# google.com is a good domain
>>> checker.is_spam("http://www.google.com/search?q=food")
False

# this domain does not exist
>>> checker.is_spam("http://buyv1agra.com/")
Traceback (most recent call last):
    ...
DomainInexistentException

# this is a scam
>>> checker.is_spam("http://mihouyuan.com/login.htm")
True

Surbl:

>>> from spam.surbl import SurblChecker
>>> checker = SurblChecker()

# google.com test
>>> checker.is_spam("http://www.google.com/search?q=food")
False

# spamhaus says it is spam, surbl does not
>>> checker.is_spam("http://mihouyuan.com/login.htm")
False

# test endpoint for surbl
>>> checker.is_spam("http://surbl-org-permanent-test-point.com/")
True

Contribute

Clone and install testing dependencies:

pip install -r requirements.txt

Ensure tests pass:

./runtests.sh

spam's People

Contributors

fmarani avatar aorzh avatar jrasanen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.