Asegúr@IT 8 is a one-morning event to be held in Valencia. Speakers are knowledgeable people on the security field. Attendance to the event is free but the seats are limited.
BTW, this event is sponsored by Microsoft and a Passport/LiveID account is needed to register.
CodeJam2010
I usually join the contest and I am kick out very soon. Java is among the programming languages accepted. There are many sample problems you can attempt to test your skills before the contest begins. Those of you making it to Round 2 can claim an extra 10% mark.
4th and last assignment is out
This time you have to write a simple "wrapper" code to allow the use of an interactive command-line program through a socket connection. While this can be achieved by piping your command to nc or sock commands, you are required to do this by yourself in Java language.
A brief explanation on how you can launch an external program and access its input and output is provided. You have till May 26th, 2010.
A sample implementation is provided too, but please note it won't work in a Windows computer (unless /usr/bin/bc command is found on your system).
A brief explanation on how you can launch an external program and access its input and output is provided. You have till May 26th, 2010.
A sample implementation is provided too, but please note it won't work in a Windows computer (unless /usr/bin/bc command is found on your system).
New assignment is out

One of the problems we face when our computer is behind a NAT (or a firewall) is that incoming connections cannot reach our computer. While it is possible to fix this with some additional configuration, this assignment is about creating a piece of software that will help two users to be connected even when they are behind a NAT.
For testing purposes let's assume both users will use telnet application to have an interactive chat session (only two users per chat). Your meeting server will enable conversations between pairs of clients, but at any given moment several independent chat sessions may take place.
You can click on the title to get a copy of the assignment document.Update: Please feel free to ask any question you might have about the assignment as a comment to this entry. This way other students may benefit from it being answered here to.
Update2: As with other assignments, I'm providing you a sample binary for MServer for you to test.
1st term marks
Exams have been marked. Most of you will find your estimate was pretty accurate, but a few cases differ more than 10%, some underestimated and others overestimated their mark. It is ok. Those having no mark is because they did not show up for the exam.
We've won three new students that just showed up for the exam (so they have 0% attendance), for these people, welcome to the class, I hope to see you more often. It is likely some new Erasmus students will join us for the 2nd term too.
Exam average mark is 45% and term average mask is 50%. Both Juan and Anush are our top scorers this term, congratulations!
However, our top scorer in the exam was not any of them but Michał, who scored 80%, congratulations too!
The most difficult question seemed to be (17) how to print the IP address of a received datagram packet. Nobody realized getAddress method returns a InetAddress object and not an IP address dotted decimal string. For that, getHostAddress method was needed.
Those of you below of 40% this term really need to get up to speed to pass this subject. Whether you plan on just focus on the second term or repeat the first term exam too is up to you. But I strongly recommend you to work quite a bit harder not to fail the subject.
To see the list you can click this entry title or just go to the attendance record link where all the details are found.
Update: You can now check marked exams. Please email me if you find any marking error you want me to have a look at.
Solved exam
Click on the title to have access to the solved exam.
I sent it to all of you by email too.
Please have a look at it and mark your own answers (I guess you remember what you answered this morning) using a digital logic: answers are either right or wrong.
Please note each right answer scores 2%.
Once you have marked your exam I want you to send me an email with your name and mark.
Please do so as fast as possible (as your memory about what you answered today will fade away).
I sent it to all of you by email too.
Please have a look at it and mark your own answers (I guess you remember what you answered this morning) using a digital logic: answers are either right or wrong.
Please note each right answer scores 2%.
Once you have marked your exam I want you to send me an email with your name and mark.
Please do so as fast as possible (as your memory about what you answered today will fade away).
Exam Remainder
Please remember REDES' exam will be held in building 1G next Monday, January 25th, at 9:00. Max exam duration is two hours.
X-ray your network communication
While we've presented netstat as a tool to help you watch your connections, if you're running Windows you may want to hear about TCPview. From their website:
TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections. On Windows Server 2008, Vista, and XP, TCPView also reports the name of the process that owns the endpoint. TCPView provides a more informative and conveniently presented subset of the Netstat program that ships with Windows. The TCPView download includes Tcpvcon, a command-line version with the same functionality.
Please note that the tool can also be useful to track down suspicious communications happening on your computer. You can easily know where your computer is connecting to and which process is doing it.
TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections. On Windows Server 2008, Vista, and XP, TCPView also reports the name of the process that owns the endpoint. TCPView provides a more informative and conveniently presented subset of the Netstat program that ships with Windows. The TCPView download includes Tcpvcon, a command-line version with the same functionality.
Please note that the tool can also be useful to track down suspicious communications happening on your computer. You can easily know where your computer is connecting to and which process is doing it.
Assignment#2 is marked
Apparently second assignment has been quite challenging as only five submissions were received. It's been marked and all of them have passed the assignment. Source code of any of the submissions can be obtained on the anti-plagiarism system report.
Torrents are good
Downloading large files using P2P technology can be quite convenient. As an example I've uploaded the ISO image of Graduation Ceremony DVD to Mininova. These guys are now prevented by a court order to distribute copyrighted contents. However there is no problem if the contents is public domain or posted by the rights holder. So here you have the torrent file.
If you did not graduate this year and therefore missed the ceremony, now you can have a look at it.
Class source code
Today we talked about Multi-thread servers and how we can create them easily in Java.
There are the three examples I wrote.
And let me correct myself: The first implementation of synchronized methods (using inc and dec methods for the simultaneous client counter) is as good as the last one (using just inc) as it is explained in here.
There are the three examples I wrote.
And let me correct myself: The first implementation of synchronized methods (using inc and dec methods for the simultaneous client counter) is as good as the last one (using just inc) as it is explained in here.

Excellence in Teaching Awards 2009

Now it is time to look around and to thank all the people that made this possible: from my colleagues who share an interest on teaching to my students who keep on asking questions. From all of them I learn a lot every day.
I'm also grateful for my University and government that through various programs have supported different visits and stays at foreign universities.
And last, but not least, to my dear family and friends who have always been there for me.
For all of these I'm grateful.
Assignment#1 report
Not that the results are very bad but I want you to know that measures are taken to keep you all honest.
The following report checks the similarities between all of your submitted assignments.
Class problem
A 4-MByte file is transferred between two computers linked by a router. Each link is 100 Mbps and 100 meters long. Signal propagates at 85% the speed of light. TCP is used for the transfer with MSS=1460 bytes and Receive window is 2048 bytes. How long does it take for the transfer to complete?
Assume only data and TCP headers are transmitted. Assume TCP acknowledgments transmission and queuing delay are negligible. Assume TCP uses delayed acknowledgments. Assume no transmission errors happen and no congestion control is used. Assume TCP connection already established.
For solution OpenOffice's spreadsheet click on this entry title.
Or...
No thanks, I prefer to shot myself on the foot than to use OpenOffice.
Assume only data and TCP headers are transmitted. Assume TCP acknowledgments transmission and queuing delay are negligible. Assume TCP uses delayed acknowledgments. Assume no transmission errors happen and no congestion control is used. Assume TCP connection already established.
For solution OpenOffice's spreadsheet click on this entry title.
Or...
No thanks, I prefer to shot myself on the foot than to use OpenOffice.
Solution to assignment#1
As you have asked me for a solution I'm providing you mine.
You can see that as soon as a client does not provide expected command it is kicked out.
This server won't accept multiple messages sent over the same connection (nor it was required).
An alternative implementation using a finite state machine for the implementation is shown in this other solution.
You can see that as soon as a client does not provide expected command it is kicked out.
This server won't accept multiple messages sent over the same connection (nor it was required).
An alternative implementation using a finite state machine for the implementation is shown in this other solution.
Second assignment is out
Only GET method is permitted, so you can safely reject any other method coming from the browser (to keep things as simple as possible).
You can click on this entry title to get the assignment text. Second assignment due date is December 23rd, 2009.
Haven't read RFC 821 yet?

Click on the image on the left to get a better view of it.
Issues with Assignment#1
Apparently there are some difficult statements on the assignment text (given the submissions I'm getting). Let me repeat some of them here (pasted from original document, boldface added here):
- Please include a MANDATORY comment on the source code with your name.
- Please send me the java source code file by email to the email account shown here with
EXACTLY the subject: Assignment#1 - Each time your server receives a message it will write it down to a text file named "received.txt".
- Main class name MUST BE SmtpServer.
In case you have not noticed it, I was using UPPER CASE to remark that these were IMPORTANT information.
How to write to a text file in Java?
I would suggest you to use PrintWriter class to write to a text file the same way you'll print to a socket. In the below example object out is created so later on out.println("whatever") can be invoked.
PrintWriter out = new PrintWriter(new FileOutputStream("received.txt"));
Subscribe to:
Posts (Atom)