|
virtual int | numInitStages () const override |
|
virtual void | initialize (int stage) override |
|
virtual std::string | generateBody () override |
|
virtual void | finish () override |
|
virtual void | handleMessage (cMessage *msg) override |
|
virtual void | socketEstablished (int connId, void *yourPtr) override |
|
virtual void | socketDataArrived (int connId, void *yourPtr, cPacket *msg, bool urgent) override |
|
virtual void | socketPeerClosed (int connId, void *yourPtr) override |
|
virtual void | socketClosed (int connId, void *yourPtr) override |
|
virtual void | socketFailure (int connId, void *yourPtr, int code) override |
|
virtual void | refreshDisplay () const override |
|
HttpReplyMessage * | generateDocument (HttpRequestMessage *request, const char *resource, int size=0) |
|
HttpReplyMessage * | generateResourceMessage (HttpRequestMessage *request, std::string resource, HttpContentType category) |
|
HttpReplyMessage * | handleGetRequest (HttpRequestMessage *request, std::string resource) |
|
HttpReplyMessage * | generateErrorReply (HttpRequestMessage *request, int code) |
|
cPacket * | handleReceivedMessage (cMessage *msg) |
|
void | registerWithController () |
|
void | readSiteDefinition (std::string file) |
|
std::string | readHtmlBodyFile (std::string file, std::string path) |
|
void | sendDirectToModule (HttpNodeBase *receiver, cPacket *packet, simtime_t constdelay=0.0, rdObject *rd=nullptr) |
|
double | transmissionDelay (cPacket *packet) |
|
void | logRequest (const HttpRequestMessage *httpRequest) |
|
void | logResponse (const HttpReplyMessage *httpResponse) |
|
void | logEntry (std::string line) |
|
std::string | formatHttpRequestShort (const HttpRequestMessage *httpRequest) |
|
std::string | formatHttpResponseShort (const HttpReplyMessage *httpResponse) |
|
std::string | formatHttpRequestLong (const HttpRequestMessage *httpRequest) |
|
std::string | formatHttpResponseLong (const HttpReplyMessage *httpResponse) |
|
virtual bool | handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override |
| Perform one stage of a lifecycle operation. More...
|
|
An evil attacker server demonstration - type B.
Demonstrates subclassing the server to create a custom site. This site is an attacker – a puppetmaster – which serves HTML pages containing attack code. In this case, we are simulating JavaScript attack code which prompts the unsuspecting browser to issue a number of requests for non-existing resources (random URLs) to the victim site. Delays are specified to simulate hiding the attack from the browser user by use of JavaScript timeouts or similar mechanisms. The generateBody virtual function is redefined to create a page containing the attack code.
- See also
- HttpServer
- Author
- Kristjan V. Jonsson