Skip to main content

Async Python library for network communication using socat

Project description

README.md

SocatLib v2.0.0

Advanced asynchronous Python library for network communication using socat.

Installation

pip install SocatLib

Quick Start

import asyncio
from SocatLib import sending, listening

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

asyncio.run(main())

Features

  • Async/await support
  • Error handling with detailed messages
  • 5 second timeout on all operations
  • File transfer support
  • Reverse shell capability
  • OpenSSL encryption support
  • Easy integration into existing projects

API Reference

sending(msg, ip, port)

Send a message to a server and get response.

listening(port)

Start a listening server on specified port.

send_file(file, ip, port)

Transfer a file to remote server.

reverse_shell(attacker_ip, attacker_port)

Create reverse shell connection.

encrypted_send(msg, ip, port)

Send encrypted message using OpenSSL.

encrypted_listen(port)

Listen with encryption enabled.

receive_file(port, save_path)

Receive file on specified port.

Requirements

  • Python 3.6+
  • socat installed and in PATH

Author

ash404.dev

License

MIT 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

socatlib-2.0.1.tar.gz (2.8 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.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: socatlib-2.0.1.tar.gz
  • Upload date:
  • Size: 2.8 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.1.tar.gz
Algorithm Hash digest
SHA256 99d8429f0433ecc7730b4eb93c72f858b92a02c05019df0e6591511e447ab403
MD5 794dafaa66b20f1bb106dc5e0bb38308
BLAKE2b-256 676057305fb8bbbf5d17b3c26c771ed3046133f4f700d16c6a5a2c8d70f93057

See more details on using hashes here.

File details

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

File metadata

  • Download URL: socatlib-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37f94dc5e02e14affb51b28a55624ae727ae0fb056e565671552cecd80b886d5
MD5 620d80c30c76510f77b575412dd0d765
BLAKE2b-256 f95228750aa33269dd08afc9c893876359bcacb2aacc7732a6abbb801bf03f23

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