Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    mock ftp server and backtrack

    What im trying to do is setup a fake ftp server in backtrack 5 on a virtual machine in vmware. Ive downloaded said fake ftp server from this website:
    Now,my main goal in doing this is to monitor traffic to see the traffic to the fake server.

    As an example to ask my question i typed the following command "stubFtpServer.start()" and got ">_" as an response. Does that mean that it worked or do i need to do more? I tryed to type "StubFtpServer stubFtpServer = new StubFtpServer()" but it gave me grief. Any help is appreciated.

    Note: Im new to this site and didnt know where to post this question with the various linux areas. If someone can direct me to the proper area that involves backtrack I would appreciate it.

  2. #2
    Unfortunately, I don't think the MockFtpServer framework/application is going to easily do what you want to do.

    See the project web site at

    That framework is designed more as an aid to testing FTP client code. It comes with 2 separate implementations. The StubFtpServer implementation enables the FTP server to return any status code and response data that you configure -- very low-level.

    FakeFtpServer implementation is designed to behave mostly like a real FTP server, out of the box, so that you can test different scenarios for your FTP client code. But it does not track usage. To do that, you'd have to write a decent amount of code and plug that into the framework.

    Chris Mair

  3. #3
    you wouldnt happen to know where i can find code to program it?

  4. $spacer_open
  5. #4
    Not really. That would require custom code for each FTP Server command that you wanted to track. And remember that these are relatively low-level commands -- e.g. RETR and STOR. You'd have to dig into the MockFtpServer code and probably subclass each of the existing CommandHandler classes that you were interested in. The web site has some documentation that would help you get started -- see "FakeFtpServer - Getting Started", including how to configure your custom CommandHandler classes. But it would not be a quick and easy thing.

    I think you'd probably be better off exploring the open source FTP Server packages and seeing if any of them tracked the traffic the way you needed. I've used Filezilla, but I don't know if they expose that kind of data. I'm pretty sure there are other open source FTP servers, too.

  6. #5
    ok,i figured that much. But the problem is that when i put in a command like "FakeFtpServer fakeFtpServer = new FakeFtpServer();",I get FakeFtpServer is not a command or something like that. Do i just type fakeFtpServer = new FakeFtpServer() or something like that?

  7. #6
    MockFtpServer is a Java "framework", so that will require a Java development environment to extend, and at least a Java runtime environment (JRE) to run, once you create and compile the Java class(es) to start/configure the server. I can't be sure from your comments above if that is what you have setup. You will typically need at least a Java main() to execute the code to start the FakeFtpServer (or StubFtpServer).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts