Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Sep 8 09:54:48 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m88Gsm5k023805 for ; Mon, 8 Sep 2008 09:54:48 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m88GrnCd003948 for ; Mon, 8 Sep 2008 09:53:49 -0700 Message-Id: <200809081653.m88GrnCd003948@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551 warmup1 - malicious client Date: Mon, 08 Sep 2008 09:53:49 -0700 From: Bill Cheng Someone wrote: > I got some problem with malicious clients. > > 1) malicious client #1&2 show "No data read." > What does that mean? Don't know! The client is malicious! :-) > 2) malicious client #5 shows > Received 14 bytes from 127.0.0.1. > MessageType: 0xfe21 > Offset: 0x00000000 > DataLength: 0x00000004 > FILESIZE = '\n' > > I've checked output string and pretty sure that malicious client > only output a newline character. Is it caused by byte order? > To clarify, I tested : > #1. use memcpy copying an int variable to a char[4] and watch its > value. => and it's big endian. > ie. int i=14; => 0x00 00 00 0e > I also check this link, which mention sun sparc server is big endian. > http://merlot.usc.edu/cs551-f08/projects/byteorder.html > > So what else I can do to find out this bug? According to the grading guidelines, malicious client #5 is not so malicous! It only pause for 2 seconds between sending the header and the data. My guess is that your server is not sending the right stuff back! Please remember that you need to return the filesize in a non-null-terminated ASCII string! You must implement according to the spec. Just for your own client to talk to your own server is not enough. -- Bill Cheng // bill.cheng@usc.edu