Find the answer to your Linux question:
Results 1 to 6 of 6
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: mockftpserver.sourceforge.net ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2011
    Posts
    3

    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: mockftpserver.sourceforge.net
    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
    Just Joined!
    Join Date
    Oct 2011
    Posts
    3
    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 mockftpserver.org.

    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
    Just Joined!
    Join Date
    Sep 2011
    Posts
    3
    you wouldnt happen to know where i can find code to program it?

  4. #4
    Just Joined!
    Join Date
    Oct 2011
    Posts
    3
    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.

  5. #5
    Just Joined!
    Join Date
    Sep 2011
    Posts
    3
    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?

  6. #6
    Just Joined!
    Join Date
    Oct 2011
    Posts
    3
    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
  •