Skip to content

OpenSISE/The-Awesome-FtpMapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The-Awesome-FtpMapping-script

A ftpmapping for helping files or foler index with ftp server

Inspired by a code snippet on oschina

Usage

It below is generated by python ftpmapping.py -h command

Usage: ftpmapping.py [options]

Options:
  -h, --help            show this help message and exit
  --path=PATH           the path used to generate the tree [default: /]
  -o FILE, --out=FILE   specify a filename or file to store the generated tree
                        [default: pathname.trees]
  -u USERNAME, --username=USERNAME
                        the username used to connect to the ftp server
                        [default: anonymous]
  -p PASSWORD, --password=PASSWORD
                        the password used to connect to the ftp server
                        [default: anonymous]
  -s SERVER, --server=SERVER
                        the ftp server address
  -t TREETYPE, --type=TREETYPE
                        tree type, leave it default for folder-only.It map and
                        generate the tree contained files when passing 'file'.
                        [default: folder]

Example:

list folders only python ftpmapping.py -u chris -p damnpass -s 172.16.144.202 -t folder --path /

example1

list folders and files python ftpmapping.py -u chris -p damnpass -s 172.16.144.202 -t file --path /

example2

output

example3

Algorithm thought

I plan to use stack to push and pop every node while it interactive with tree

License

Apache v2 License

About

The-awesome-ftpmapping-script for the algorithm pratise

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages