Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

filebridging

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filebridging

Share files via a bridge server using TCP over SSL and end-to-end encryption.

  • 0.0.9
  • PyPI
  • Socket score

Maintainers
1

filebridging

Share files via a bridge server using TCP over SSL and end-to-end encryption.

Requirements

Python3.8+ is needed for this package. You may find it here.

OpenSSL 1.1.1+ is required as well to handle SSL connection and end-to-end cryptography. On Windows, installing git for Windows will install OpenSSL as well.

Usage

If you need a virtual environment, create it.

python3.8 -m venv env;
alias pip="env/bin/pip";
alias python="env/bin/python";

Install filebridging and read the help.

pip install filebridging
python -m filebridging.server --help
python -m filebridging.client --help

Examples

  • Client-server example

    # 3 distinct tabs
    python -m filebridging.server --host localhost --port 5000 --certificate ~/.ssh/server.crt --key ~/.ssh/server.key
    python -m filebridging.client s --host localhost --port 5000 --certificate ~/.ssh/server.crt --token 12345678 --password supersecretpasswordhere --path ~/file_to_send 
    python -m filebridging.client r --host localhost --port 5000 --certificate ~/.ssh/server.crt --token 12345678 --password supersecretpasswordhere --path ~/Downloads 
    
  • Client-client example

    # 2 distinct tabs
    python -m filebridging.client s --host localhost --port 5000 --certificate ~/.ssh/server.crt --key ~/.ssh/private.key --token 12345678 --password supersecretpasswordhere --path ~/file_to_send --standalone
    python -m filebridging.client r --host localhost --port 5000 --certificate ~/.ssh/server.crt --token 12345678 --password supersecretpasswordhere --path ~/Downloads 
    

    The receiver client may be standalone as well: just add the --key parameter (for SSL-secured sessions) and the --standalone flag.

  • Configuration file example

    #!/bin/python
    
    host = "www.example.com"
    port = 5000
    certificate = "/path/to/public.crt"
    key = "/path/to/private.key"
    
    action = 'r'
    password = 'verysecretpassword'
    token = 'sessiontok'
    file_path = '.'
    

Generating SSL certificates

You may use filebridging.create_certificate.py script or use openssl from the command line.

Via script

python -m filebridging.create_certificate --name example --domain example.com --force

Via command line

Store configuration in file mycert.csr.cnf and run the following command to generate a self-signed SSL certificate.

openssl req -newkey rsa:4096 -nodes -keyout ./mycert.key \
 -x509 -days 365 -out ./mycert.crt \
 -config mycert.csr.cnf

mycert.csr.cnf

[ req ]
default_bits = 4096
prompt = no
default_md = sha256
distinguished_name = dn

[ dn ]
CN = yourdomain.com

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc