public class RFICollector extends Thread implements AuditEventListener
This class scans audit-events for remote-file references in parameters and downloads all references into a local repository. The aim is to create collections of scripts which are used to check for RFI-vulnerabilities.
The class basically implements the worker-thread part to handle the scanning and
download given an audit-event or access-log source (usually a file). Though the class
provides a main-method for running in a standalone-manner, it is primarily
used within an rfi-collector-server, which handles a bunch of rfi-collectors and is
controllable via a simple RMI-interface.
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_DATA_DIR |
static String |
PROPERTY_DOWNLOAD |
static String |
PROPERTY_FILES_ONLY |
static String |
PROPERTY_FOLLOW_FILES |
static String |
PROPERTY_LOG_FILE |
static String |
PROPERTY_PRESERVE_URL |
static String |
PROPERTY_SITE_DIRS |
static String |
PROPERTY_TAIL |
static String |
VERSION |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
RFICollector(AuditEventReader source,
Properties p) |
RFICollector(Properties p) |
| Modifier and Type | Method and Description |
|---|---|
static AuditEventReader |
createReader(String f,
boolean tail) |
String |
download(URL url) |
void |
eventArrived(AuditEvent e)
This method is called when a new event arrives at the listener.
|
void |
eventsArrived(Collection<AuditEvent> events)
This method is called for notifying the listener of arrival of
several events in a block.
|
List<String> |
extractRemoteReferences(AuditEvent evt)
This method extracts all remote-file references from the request associated
with this audit event.
|
void |
finish() |
int |
getCount() |
void |
handleEvent(AuditEvent evt)
This is called for all events.
|
static void |
loadProperties(File file) |
static void |
main(String[] args) |
String |
md5(String data) |
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic static final String VERSION
public static final String PROPERTY_TAIL
public static final String PROPERTY_FOLLOW_FILES
public static final String PROPERTY_FILES_ONLY
public static final String PROPERTY_DOWNLOAD
public static final String PROPERTY_SITE_DIRS
public static final String PROPERTY_DATA_DIR
public static final String PROPERTY_LOG_FILE
public static final String PROPERTY_PRESERVE_URL
public RFICollector(Properties p) throws Exception
p - Exceptionpublic RFICollector(AuditEventReader source, Properties p) throws Exception
source - data - Exceptionpublic int getCount()
public List<String> extractRemoteReferences(AuditEvent evt)
evt - The audit event which was recorded during the request.public void eventArrived(AuditEvent e)
AuditEventListener
After the dispatcher calls this method each listener gets a call to
#notify(), thus a listener might wait for packets to arrive.
eventArrived in interface EventListener<AuditEvent>eventArrived in interface AuditEventListenere - The event which arrived.public void eventsArrived(Collection<AuditEvent> events)
AuditEventListenerAuditEventListener.eventArrived(AuditEvent) for each of the given
events, but may be handled in a more efficient way by implementations
capable of processing blocks of events.eventsArrived in interface AuditEventListenerevents - The block of events arrived.public void handleEvent(AuditEvent evt)
evt - public String download(URL url) throws Exception
url - Exceptionpublic void finish()
public static AuditEventReader createReader(String f, boolean tail) throws Exception
Exceptionpublic static void loadProperties(File file) throws IOException
IOExceptionpublic static void main(String[] args)
args - Copyright © 2015 jwall.org. All Rights Reserved.