zeldor.biz

Linux, programming and more

Copyright © 2023
Log in

Quickshare methods

November 26, 2018 by Igor Drobot Leave a Comment

Sharing is caring. For this situations there are following command line methods to provide some data to be downloaded from everywhere.
On the most common linux systems is python preinstalled or is a part of the core system,
so the next two python-examples should work like a charm.

Python2

1
python -m SimpleHTTPServer 8080

python -m SimpleHTTPServer 8080

Python3

1
python3 -m http.server 8080

python3 -m http.server 8080

PHP

1
php -S 0.0.0.0:8080

php -S 0.0.0.0:8080

In each case, a small HTTP server will be started to listen on TCP port 8080. The current working directory, in which the command was executed, will be started to share. You are free to use other port.

Be careful to start from the /root directory, where your ssh-keys or some more private information lives.
The shared directory can be browsed now directly or just navigated with wget/curl to single files.

Filed Under: Linux Tagged With: Linux, PHP, Python, python3

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *