# ----------------------------------------------------------------------------
#
# HttpTools Project
#
# This file is a part of the HttpTools project. The project was created at
# Reykjavik University, the Laboratory for Dependable Secure Systems (LDSS).
# Its purpose is to create a set of OMNeT++ components to simulate browsing
# behaviour in a high-fidelity manner along with a highly configurable
# Web server component.
#
# Maintainer: Kristjan V. Jonsson (LDSS) kristjanvj@gmail.com
# Project home page: code.google.com/p/omnet-httptools
#
# ----------------------------------------------------------------------------
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# ----------------------------------------------------------------------------

#
# Initialization script for the simple DDoS example scenario. Scripted browsing is
# used to create easily predictable and interpretable results. Sockets version.
#

[General]
network = HttpNnodes
tkenv-plugin-path = ../../../../etc/plugins

# Controller
**.controller.config = xmldoc("../../controller_cfg.xml","//controller-profile[@id='uniform']")
**.controller.events = ""
**.controller.eventsSection = ""

# Common client/server parameters
**.numTcpApps = 1
**.tcpApp[0].httpProtocol = 11

# Servers
**.thegood.tcpApp[0].typename = "HttpServer"
**.thegood.tcpApp[0].hostName = "www.good.com"
**.thegood.tcpApp[0].port = 80
**.thegood.tcpApp[0].logFile = ""
**.thegood.tcpApp[0].siteDefinition = ""
**.thegood.tcpApp[0].config = xmldoc("../../server_cfg.xml","//server-profile[@id='normal']")
**.thegood.tcpApp[0].activationTime = 0.0

# This server generates documents containing a number of references to images
# stored on www.good.com. The unwitting browser will thus contribute to a DDoS attack
# against the wictim site.
**.thebad.tcpApp[0].typename = "HttpServerEvilA"
**.thebad.tcpApp[0].hostName = "www.bad.org"
**.thebad.tcpApp[0].port = 80
**.thebad.tcpApp[0].logFile = ""
**.thebad.tcpApp[0].siteDefinition = ""
**.thebad.tcpApp[0].config = xmldoc("../../server_cfg.xml","//server-profile[@id='normal']")
**.thebad.tcpApp[0].activationTime = 0.0
**.thebad.tcpApp[0].minBadRequests = 3  # Very moderate attack
**.thebad.tcpApp[0].maxBadRequests = 8

# This server generates documents containing a number of references to non-existing resources
# on www.good.com (random URLs). The unwitting browser will thus contribute to a DDoS attack
# against the wictim site.
**.theugly.tcpApp[0].typename = "HttpServerEvilB"
**.theugly.tcpApp[0].hostName = "www.ugly.org"
**.theugly.tcpApp[0].port = 80
**.theugly.tcpApp[0].logFile = ""
**.theugly.tcpApp[0].siteDefinition = ""
**.theugly.tcpApp[0].config = xmldoc("../../server_cfg.xml","//server-profile[@id='normal']")
**.theugly.tcpApp[0].activationTime = 0.0
**.theugly.tcpApp[0].minBadRequests = 3  # Very moderate attack
**.theugly.tcpApp[0].maxBadRequests = 8

# Clients
**.client[*].tcpApp[0].typename = "HttpBrowser"
**.client[*].tcpApp[0].logFile = ""
**.client[*].tcpApp[0].scriptFile = "browse.script" # Lets use a script to simplify the test
**.client[*].tcpApp[0].config = xmldoc("../../browser_cfg.xml","//user-profile[@id='normal']")
**.client[*].tcpApp[0].activationTime = 0.0

# TCP settings
**.tcp.mss = 1024
**.tcp.advertisedWindow = 14336  # 14*mss
**.tcp.tcpAlgorithmClass = "TCPReno"
**.tcp.recordStats = true

# ARP configuration
**.networkLayer.proxyARP = true  # Host's is hardwired "false"
