Skip to content

pmihsan/Java-FTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JFTP

Advanced multithreaded FTP console application with user-password based login configuration, automatic log management and directory traversal functionalities and support for basic commands.

Commands (case insensitive)

Commands Uses
list list the contents of the current directory
cd Used to change to the specified directory. Can also be used to change into previous directory.
get Used to get files from the server. Can receive multiple arguments but not directories.
put Similar to get, used put files on to the directory.
pwd Tells us the present working directory.
whoami provides us with the username with which we have logged in.

Usage

Server

    java SERVER PORT

PORT - To run the server on specified PORT

On first server startup it creates three folders in the current users home directory under jftp folder. That includes

  • config
  • log
  • share

Config

This directory contains the user:password(SHA256 Hash) mapping file.

Log

This directory contains two files access and startup logs which monitors the server startups.

And also monitors which user have logged in and what commands are they executing.

Share

This folder acts as the share to the ftp, whichever files you want to share add it to this directory.

Client

    java CLIENT USER@DOMAIN PORT

USER - The user through which we log in to the server.

DOMAIN - Domain name or IP address on which the server is running.

PORT - To connect to the server running on specified PORT.

Features

  • Automatic log management on server startup, user authentication and command execution.
  • After first startup of the server you can add other users to the server.
  • Passwords are stored and transferred are encrypted using SHA-256 Hash.

Easy Use

Download the latest release jftp-2.0. Instead of having all the source files, this FTP.jar is a precompiled version of all the class files. You could download this file and use the same as

    java -cp FTP.jar {SERVER || CLIENT}

with the above-mentioned arguments for either the server or the client.

In case if there is a mismatch between the precompiled version and your java jdk, you have download all the source files and compile it again.