Skip to main content

Netcat as a library: convienent socket interfaces

Project description

nclib is a python socket library that wants to be your friend.

nclib provides:

  • Easy-to-use interfaces for connecting to and listening on TCP and UDP sockets
  • A better socket class, the Netcat object
    • Convenient receive methods for common socket usage patterns
    • Highly customizable logging
    • Interactive mode, connecting the socket to your stdin/stdout
    • Intelligent detection of socket closes and connection drops
    • Long-running functions cleanly abortable with ctrl-c
    • Lots of aliases in case you forget the right method name
  • Mechanisms to launch processes with their in/out streams connected to sockets
    • Launch a process with gdb attached
  • TCP and UDP server classes for writing simple python daemons
  • A script to easily daemonize command-line programs

Documentation is available at and source code is available at

If you are familiar with pwntools, nclib provides much of the functionaly that pwntools’ socket wrappers do, but with the bonus feature of not being pwntools.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
nclib-0.8.3.tar.gz (13.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page