Skip to main content

microftp

Python module to handle FTP protocol (client side only). It is modified original ftplib to handle broken FTP servers in embedded world.

Requirements

It should work with both python2 and python3 with simple pip commands:

pip install microftp

microftpcmd examples

Few microftpcmd examples:

microftpcmd --host 192.168.4.1 ls
microftpcmd --host 192.168.4.1 -d -v ls
microftpcmd --host 192.168.4.1 put local.txt remote.txt
microftpcmd --host 192.168.4.1 put local.txt remote.txt
microftpcmd --host 192.168.4.1 get remote-file.txt local-file.txt
microftpcmd --host 192.168.4.1 rm file-to-delete.txt

Note that you can also specify basic parameters using environment variables:

export MICROFTP_HOST=127.0.0.1
export MICROFTP_USER=user
export MICROFTP_PASSWORD=password
export MICROFTP_DIR=/something

and then you can just specify command:

microftpcmd ls

All options are listed using --help:

microftpcmd --help

Requirements

It should work with both python2 and python3 with simple pip commands:

sudo apt-get update
sudo apt-get install -y python3 python3-pip
sudo pip3 install microftp

Examples

Simple example to get devices and its current status:

import microftp

ftp = microftp.microFTP("127.0.0.1")
ftp.set_pasv(True)
ftp.login()
ftp.set_debuglevel(9999)
ftp.cwd(args.dir)
print(ftp.raw_retrlines('LIST'))
ftp.quit()

Manual

usage: microftpcmd [-h] [--host HOST] [--port PORT] [--delay DELAY]
                   [--block BLOCK] [--verbose] [--debug] [--user USER]
                   [--password PASSWORD] [--site SITE] [--siteafter SITEAFTER]
                   [--dir DIR]
                   CMD [CMD ...]

microftp - connect to broken or embedded FTP servers

positional arguments:
  CMD                   commands for ftp

optional arguments:
  -h, --help            show this help message and exit
  --host HOST, -i HOST
  --port PORT, -P PORT
  --delay DELAY
  --block BLOCK
  --verbose, -v
  --debug, -d
  --user USER, -u USER
  --password PASSWORD, -p PASSWORD
  --site SITE, -S SITE
  --siteafter SITEAFTER, -A SITEAFTER
  --dir DIR, -D DIR

microftpcmd --host 192.168.4.1 ls
microftpcmd --host 192.168.4.1 get remote-file.txt local-file.txt
microftpcmd --host 192.168.4.1 put local-file.txt remote-file.txt
microftpcmd --host 192.168.4.1 -S mount -D sd -A umount ls
microftpcmd --host 192.168.4.1 -S mount -D sd -A site /sd/blink.bit -A umount put blink.bit blink.bit

ulx3s

Some specific ulx3s examples:

microftpcmd --host 192.168.5.7 --delay 0.3 --block 32 -v -d --user root put ~/wget /root/wget
microftpcmd --host 192.168.4.1 -S mount -D sd -A umount ls
microftpcmd --host 192.168.4.1 -S mount -D sd -A site /sd/blink.bit -A umount put blink.bit blink.bit

Metadata

Release files for microftp 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for microftp 0.9.0
File Size Uploaded Provenance Actions
microftp-0.9.0.tar.gz 4.7 kB Without provenance Details for microftp-0.9.0.tar.gz

Release files / microftp-0.9.0.tar.gz

Download URL microftp-0.9.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f8759a347ffe48d428f0927966b63075ab64f264600a96e8d9dc01ace972c54f
BLAKE2b-256 checksum
How to use checksums
0fbbd58817e51aaaf30eba011bb15052073cc1314fca10e815e3fdcc4affaae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.5

Security for microftp 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page