org.jasen.plugins
Class TagFalseAnchorScanner

java.lang.Object
  extended byorg.jasen.plugins.TagFalseAnchorScanner
All Implemented Interfaces:
JasenPlugin

public class TagFalseAnchorScanner
extends Object
implements JasenPlugin

Checks for false anchors.

When the HTML parser encounters an anchor (A) tag, it checks the contained text.
If this contained text contains a url reference, but that url reference does not match EXACTLY the
url reference in the href for the anchor, the anchor is considered false

For example:

<a href="www.fakebank.com/stealyourpassword">http://www.citibank.com/internetbanking</a>

Author:
Jason Polites

Constructor Summary
TagFalseAnchorScanner()
           
 
Method Summary
 void destroy()
          Destroys the plugin.
 void init(Properties properties)
          Initialises the plugin with the given properties
 JasenTestResult test(Jasen engine, javax.mail.internet.MimeMessage rawMessage, JasenMessage parsedMessage, ParserData data, ReceivedHeaderParser parser)
          Computess the "spamminess" of a message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagFalseAnchorScanner

public TagFalseAnchorScanner()
Method Detail

init

public void init(Properties properties)
          throws JasenException
Description copied from interface: JasenPlugin
Initialises the plugin with the given properties

Specified by:
init in interface JasenPlugin
Parameters:
properties -
Throws:
JasenException

destroy

public void destroy()
             throws JasenException
Description copied from interface: JasenPlugin
Destroys the plugin. This is called when the core jASEN engine is destroyed

Specified by:
destroy in interface JasenPlugin
Throws:
JasenException

test

public JasenTestResult test(Jasen engine,
                            javax.mail.internet.MimeMessage rawMessage,
                            JasenMessage parsedMessage,
                            ParserData data,
                            ReceivedHeaderParser parser)
                     throws JasenException
Description copied from interface: JasenPlugin
Computess the "spamminess" of a message.

Specified by:
test in interface JasenPlugin
Parameters:
engine - A reference to the current engine instance.
rawMessage - The original MimeMessage passed to the engine.
parsedMessage - The parsed JasenMessage returned from the MimeParser.
data - The data returned from the HTML Parser / Tokenizer combination.
parser - The parser used to parse mail headers
Returns:
A JasenTestResult
Throws:
JasenException - If an error occurs while performing the test