Skip to main content

Async Python library for network communication using socat

Project description

SocatLib v2.0.0

Advanced async Python library for network communication using socat.

Features

  • Asynchronous operations (async/await)
  • Strong error handling
  • Timeout protection (5 seconds default)
  • File transfer
  • Reverse shell
  • Encrypted communication (OpenSSL)
  • Easy to integrate into any project

Installation

pip install SocatLib

Usage

import asyncio
from SocatLib import sending, listening

async def main():
    server = await listening(4444)
    await asyncio.sleep(1)
    
    result = await sending("Hello", "127.0.0.1", 4444)
    print(result)
    
    server.terminate()

asyncio.run(main())

Functions

  1. sending(msg, ip, port) - Send message and get response
  2. listening(port) - Start server on port
  3. send_file(file, ip, port) - Transfer file
  4. reverse_shell(attacker_ip, attacker_port) - Reverse shell
  5. encrypted_send(msg, ip, port) - Send encrypted message
  6. encrypted_listen(port) - Listen with encryption
  7. receive_file(port, save_path) - Receive file

Requirements

  • Python 3.6+
  • socat

License

MIT

Author

ash404.dev

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

socatlib-2.0.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

socatlib-2.0.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file socatlib-2.0.0.tar.gz.

File metadata

  • Download URL: socatlib-2.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for socatlib-2.0.0.tar.gz
Algorithm Hash digest
SHA256 f756acfd4be56cdf67304dbfb85ad50f09dd6c7894a2a0cc88eb24bcdf5c5a3b
MD5 656b59a887f6be47160787123636d203
BLAKE2b-256 01ec5e3fc7899ca09041e6586351bf655195ca8b47c23f0873f126d6b3c920d1

See more details on using hashes here.

File details

Details for the file socatlib-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: socatlib-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for socatlib-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cae182e3c4145ba67337f3ac38da46c7a51aa0f1f118589241b687632da27436
MD5 ed48de107af095cca7183b0bf097d860
BLAKE2b-256 64a423f49f5ea825c4bcdace66a28e325a824f6f3eda16d60593a27fae73fe5d

See more details on using hashes here.

Supported by

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