Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/safebreach-labs/simplebitsserver
A simple python implementation of a BITS server.
https://github.com/safebreach-labs/simplebitsserver
Last synced: 8 days ago
JSON representation
A simple python implementation of a BITS server.
- Host: GitHub
- URL: https://github.com/safebreach-labs/simplebitsserver
- Owner: SafeBreach-Labs
- License: bsd-3-clause
- Created: 2017-04-09T14:47:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-06T03:23:50.000Z (over 2 years ago)
- Last Synced: 2024-05-04T00:10:29.486Z (7 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 97
- Watchers: 10
- Forks: 25
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SimpleBITSServer (Background Intelligent Transfer Service)
A simple python implementation of a BITS server. BITS protocol is used to transfer files asynchronously between a client and a server.
The BITS protocol metadata communication resides mainly in BITS-defined HTTP headers, all start with prefix "BITS-". For that reason, this implemantation is based on python's built-in SimpleHTTPRequestHandler.The implementation corresponds to the [MSDN specification](https://msdn.microsoft.com/en-us/library/windows/desktop/aa362828(v=vs.85).aspx) for client and server packets.
* It was originally developed as an ad-hoc utility for modelling a BITS upload job scenario.
* The corresponding client is Windows' built-in PowerShell cmdlet.
* Therefore, It is not intended to fully implement or abide to the official specification.
Further work may be done in the future to expand the specification coverage.## Background
[Official protocol specification](https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MC-BUP/[MC-BUP].pdf) - Background Intelligent Transfer Service (BITS)
[Example use at SafeBreach Labs](https://safebreach.com/Post/Building-a-Python-BITS-Server)
## Usage
### Server
* Tested with Python 2.7:```
python SimpleBITSServer.py [port]
```### Client
Prerequisites:
* Must run on a Windows OS to use the Microsoft Windows BITS Service.
* Ports or protocol mimics might exist, please inform us if you do find
* a BITS client, preferably PowerShell's Start-BitsTransfer. Alternatively:
* Windows' built in utility - bitsadmin.exe (deprecated)
* Any program implementing the required interfaces as described on [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop/aa362820(v=vs.85).aspx)The simple PowerShell usage this server was built to service:
```
> Import-Module BitsTransfer
> Start-BitsTransfer -TransferType Upload -Source C:\temp\to_upload.txt -Destination http://127.0.0.1/to_upload.txt -DisplayName TEST
```## Authors
**Dor Azouri** - *Initial work*
See also the list of [contributors](https://github.com/SafeBreach-Labs/SimpleBITSServer/contributors) who participated in this project.
## License
[WTFPL](http://www.wtfpl.net/) - do What the Fuck You Want To Public License