A simple Python HTTP file server for upload and download, with optional GUI.
Project description
Install
- This is learning project tested in Kali and Win11.
- In Kali or any Linux, use this command to install:
pipx install getpost-fileserver
- While in Windows, use:
py -m pip install getpost-fileserver
getpost-fileserver-cli.pyis the no GUI version.- While
getpost-fileserver.pyis with GUI. - Tested in Kali and Windows10/11
Start GUI version getpost-fileserver.py
- In Kali's terminal, use
getpost-fileserver.py. - In Windows CMD, use
py -m runpy getpost_fileserver.app.
Start CLI version getpost-fileserver-cli.py
- In Kali's terminal, use
getpost-fileserver-cli.py. - In Windows CMD, use
py -m runpy getpost_fileserver.server.
Intro
This Tool will run python based http GET and Post webserver.
Usage:
-
The server will list (GET) the content of the current directory where the app located: Browse the IP of the machine with the selected port
http://192.168.8.10:80Or you can use one of the following in linux:
wget http://192.168.8.10:80/
Or:curl http://192.168.8.10:80/ -
The server will accept transferred files (POST) and save them to current directory where the app located. You can use one of the following: \
-
Using curl
curl.exe -X POST -H "X-Filename: nmap.exe" --data-binary "@C:\Users\kaled\Downloads\nmap-7.98-setup.exe" http://192.168.8.10:80/
you will getnmap.exeafter the upload.
Where:-XUse the HTTP POST method (send data in the request body).-H"X-Filename: nmap.exe". Add a custom HTTP header named X-Filename with value nmap.exe (your server reads this to pick the filename to save).--data-binary "@C:\Users\kaled\Downloads\nmap-7.98-setup.exe"Send the exact bytes of that local file as the HTTP request body. The @ tells curl to read the file contents.http://192.168.8.10:80/The destination URL (IP and port 80).
-
Using wget
wget --method=POST --header="X-Filename: test.txt" --header="Content-Type: application/octet-stream" --body-file="C:\Users\kaled\Downloads\somefile.txt" "http://192.168.8.10:80/"
Where: \--method=POSTsets the method to POST.--header=...sends the custom X-Filename header.test.txtthe file name after transferring, it can be anything likekey.pem.--body-file=somefile.txtsends the file as raw binary.somefile.txtthe file name before transferring, it should be exact.
-
Created by Kaled Aljebur for learning purposes in teaching classes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file getpost_fileserver-0.1.0.tar.gz.
File metadata
- Download URL: getpost_fileserver-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7303d1b87ba47d6a59f1c8a7329ea9950339400e5668baba4c1c02c91000bc9
|
|
| MD5 |
35a5e229d52dcc49db1d76a50a38a8c0
|
|
| BLAKE2b-256 |
0ec7ca7ef053f2ce2b9acadf4e22e8e64ee580c537ddcd01a3683993a9eb65ec
|
File details
Details for the file getpost_fileserver-0.1.0-py3-none-any.whl.
File metadata
- Download URL: getpost_fileserver-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3de4db521af2b821a48a9bea3ee415de55877fc93772c0a73fb2b485b9e8d60
|
|
| MD5 |
19db671b35fb5e1d9f67ab1c75817759
|
|
| BLAKE2b-256 |
a49fa05f1ba37570dea7a64c25b76b87627cb1e672fa8a51a4c0fd09cb73a273
|