Skip to main content

No project description provided

Project description

maplocal

PyPI - Version PyPI - Python Version


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

  1. running WSL, Ubuntu. Opening files saved in the Ubuntu file system with Windows Programs.
  2. running WSL, Ubuntu. Opening files on the windows files system (mounted C:\drive).

License

maplocal is distributed under the terms of the 0BSD license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maplocal-0.2.1.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

maplocal-0.2.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file maplocal-0.2.1.tar.gz.

File metadata

  • Download URL: maplocal-0.2.1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.1

File hashes

Hashes for maplocal-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b4a38db49241ae8d66c5d5f2a5c33810d02b22d30d13d4aef50dcbfa23d6d3fe
MD5 1bb507e49ee7fb5e939bda0b133762a6
BLAKE2b-256 2f5ff52ec95581cad2b4deea5fc1e3ada0b4cdbe28ee1d83d95b34c4d6bf6364

See more details on using hashes here.

File details

Details for the file maplocal-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: maplocal-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.1

File hashes

Hashes for maplocal-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea9c1c01965cd05172b137a78ca3b953eabf787198fb824db3468bc6c67b649a
MD5 0a5edd6b23a8a9cc3702bfa8f68be8c2
BLAKE2b-256 7dd2392229b44bd029731a187a259d3903f72a034f96a4f8147efe7a203363ba

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page