Skip to content

A Python3 HTTPServer wrapper for the Windows BITS protocol

License

Notifications You must be signed in to change notification settings

fkadibs/BITSServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BITSServer

BITSServer is a basic Python3 server for using the Windows Binary Intelligent Transfer Service protocol (BITS), supporting file upload and download from Windows clients using the built-in bitsadmin.exe command-line tool, BitsTransfer PowerShell module, or COM interface.

WARNING: BITSServer uses Python3's built-in http.server library and is NOT recommended for production.

Installation

git clone https://github.com/fkadibs/BITSServer && cd BITSServer/
pip3 install .

Server Operation

BITSServer supports uploading/downloading any files from the working directory. The server logs will write to bitsserver.log

You can run the server from the command line:

python3 -m bitsserver 80

Alternatively, build and run the docker container:

docker build --tag bitsserver .
docker run bitsserver -d -p 80:80 -v /tmp/bits:/app

In this example, we are mapping the local /tmp/bits directory to the container's working directory (/app), acting as our download/upload directory, and log destination.

Client Operation

On the client-side, create a transfer job using the BITS client of your choice. For instance, uploading a file to the server using bitsadmin.exe:

bitsadmin /transfer <name> /upload http://<server>/<filename> <filepath>

Using PowerShell's BitsTransfer module is another option

Import-Module BitsTransfer
Start-BitsTransfer -TransferType Upload -Source <filepath> -Destination http://<server>/<filename> -DisplayName <name>

These are simple examples. For custom client development, BITS jobs can be created and managed locally with the COM interface, or remotely with WinRM.

About

A Python3 HTTPServer wrapper for the Windows BITS protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published