access_log
):
200.53.59.194 - - [06/Jan/2014:10:39:26 -0500] "\x96\x89\xc3^\xba(=\xb4\xad\x11= \xe1\xeb\x8d\x9c" 400 226 70.199.0.151 - - [06/Jan/2014:13:10:59 -0500] "-" 408 - 213.74.103.2 - - [07/Jan/2014:09:05:02 -0500] "\x02f\xcb\x956\xfa$\xb1\x0e}\xc22j\xe0\x82;$\xc0\xe0{\xce?\xb0\xecw1\x8e\xee\xe2/i" 501 246 148.204.15.1 - - [07/Jan/2014:09:23:00 -0500] "-" 408 - 38.116.192.247 - - [15/Jan/2014:08:34:17 -0500] "\xe5\xcd\x0c\v\xb9\xa8\xcc\x90VQ|\xb4\x1d\xd7\xd2\xeb\xe2\xd7\x1a\x1df\xf7\x05}" 400 226 111.73.45.233 - - [15/Jan/2014:09:24:08 -0500] "GET http://www.daydaydata.com/proxy.txt HTTP/1.1" 404 207 59.61.216.53 - - [29/Jan/2014:16:24:47 -0500] "GET http://www.mit.edu/ HTTP/1.1" 200 44
If you are not familiar with the Common Log Format (CLF), check the Wikipedia article on the subject. Answer the following questions:
a2.html
, the HTML description of the previous assignment (download it from
http://www.cs.unh.edu/~rbartos/class/cs725/ay/a2.html).
curl
or wget
and outline an approach that can be used to fill
web forms from a script. Come up with a simple demo.
CS Students: Write a node.js
server that provides the functionality observed in the trace from the previous question. More specifically, the server should serve page formnjs.html
, it should respond to the AJAX GET /prefcalc
request from the page by returning JSON-encoded results of the prefix calculation, and it must return HTTP 404 Page Not Found status code for any other request. As with any servers, it is very likely that your implementation contains significant security holes that can be easily exploited. For that reason, do not leave your code running longer than it is necessary for testing. This is also the reason why the example page uses no active components on the server side. Include your code in the report together with a brief description of your approach. Create an archive with all the files required to run the server. Name the archive using the standard naming scheme (e.g., xyz123-a3.tgz
) and submit it with your assignment.
IT Students: Modify the HTML file so that the functionality is provided by a client-side script embedded in the page. For that you need to remove the AJAX call to the server and replace it with a JavaScript version of the code that you wrote for Assignment 1. Include the JavaScript from the page in the report together with a brief description of your approach. Name the file using the standard naming scheme (e.g., xyz123-a3.html
) and submit it with your assignment.
Other majors: you can pick either the CS or the IT option.
Follow the standard assignment submission instructions.