maplocal
Table of Contents
Installation
pip install maplocal
Configuration
to configure maplocal the following env vars must be set:
MAPLOCAL_OS_FROM: str = "linux" # TODO make enum
MAPLOCAL_OS_TO: str = "windows" # TODO make enum
MAPLOCAL_FROM: ty.Optional[pathlib.PurePath] = None # the rootdir to be removed from path
MAPLOCAL_TO: ty.Optional[pathlib.PurePath] = None # the rootdir to be added to path
MAPLOCAL_SCRIPT_PATH: ty.Optional[pathlib.Path] = None # script with `openpath` and `runcmd` functions
in the MAPLOCAL_SCRIPT_PATH dir is a python file that must contain functions named openpath and runcmd.
Use Case
You manage a cloud-hosted service that is attached to file-server storing user data.
Users have access to your service, but also separately have access to file-directory through their computers.
The way that the file-server is mounted is different for the user and for the cloud hosted service.
This provides a way to map the root directory of the users machine and the file server.
It also provides a hacky, potentially unsafe[1][1] hook that allows a locally saved script file to
inject the functions openfile and runcmd that are intended to provide ways for the server
to open a file from the users machine and run a shell command on the users machine.
[1]: a script file placed in a known directory allows users to inject code into the program. Not inherently unsafe but could be used as a way to inject malicious code by bad-actors.
Examples
- running WSL, Ubuntu. Opening files saved in the Ubuntu file system with Windows Programs.
- running WSL, Ubuntu. Opening files on the windows files system (mounted C:\drive).
License
maplocal is distributed under the terms of the 0BSD license.
Metadata
Release files for maplocal 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| maplocal-0.2.1.tar.gz | 14.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maplocal-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.3 kB
Release files / maplocal-0.2.1.tar.gz
| Download URL | maplocal-0.2.1.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4a38db49241ae8d66c5d5f2a5c33810d02b22d30d13d4aef50dcbfa23d6d3fe
|
|
BLAKE2b-256 checksum How to use checksums |
2f5ff52ec95581cad2b4deea5fc1e3ada0b4cdbe28ee1d83d95b34c4d6bf6364
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.25.1
|
Release files / maplocal-0.2.1-py3-none-any.whl
| Download URL | maplocal-0.2.1-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea9c1c01965cd05172b137a78ca3b953eabf787198fb824db3468bc6c67b649a
|
|
BLAKE2b-256 checksum How to use checksums |
7dd2392229b44bd029731a187a259d3903f72a034f96a4f8147efe7a203363ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.25.1
|