no.ntnu.vegare.visualizer.client.prototype
Class DataGenerator

java.lang.Object
  extended by no.ntnu.vegare.visualizer.client.prototype.DataGenerator

public class DataGenerator
extends java.lang.Object

Provides methods to generate random security incidents, according to the specification. The generation is based on very simple principles, and should not be considered an approximation of a real world system.

For the purpose of empirical tests or feasibility studies, this class should be expanded to support realistic probability distributions

IP addresses were loaded from Malware Patrol's block list, available at http://www.malwarepatrol.net. The IP addresses are not necessarily malicious when this software is executed.

Author:
vegare

Constructor Summary
DataGenerator()
           
 
Method Summary
static void createBacklog(AbstractLogDatabase db)
          Create a backlog of log entries.
static java.lang.String getRandomFacility()
          Generates a random facility.
static java.lang.String getRandomIpAddress()
          Generate a random IP from Malware Patrol's block list, available at http://www.malwarepatrol.net.
static int getRandomSeverity()
          Generates a random severity level, as specified by syslog:
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataGenerator

public DataGenerator()
Method Detail

createBacklog

public static void createBacklog(AbstractLogDatabase db)
Create a backlog of log entries.

Parameters:
db - Database to load entries into

getRandomSeverity

public static int getRandomSeverity()

Generates a random severity level, as specified by syslog:

Returns:
Severity level, as specified by syslog

getRandomFacility

public static java.lang.String getRandomFacility()
Generates a random facility. This method uses syslog facilities, but the system allows other facilities to be used.

Returns:
Facility, as specified by syslog

getRandomIpAddress

public static java.lang.String getRandomIpAddress()
Generate a random IP from Malware Patrol's block list, available at http://www.malwarepatrol.net.

Returns:
IP address as a dot-decimal string