Giter Site home page Giter Site logo

simple_tcp's Introduction

SIMPLE TCP TESTING TOOL

Simple tools to manually test socket programming project. Requires python3.

Features:

  • Arguments can be inputted via command line arguments vs via interactive console
  • Verbose mode vs silent mode
  • SSL/TLS wrapped socket (optional)
  • Does not require additional python module (only using socket, argparse, ssl, and sys)

Common Usage:

  • python3 simple_tcp.py -s -p 3000: start server socket on port 3000 and accept connection from all interface
  • python3 simple_tcp.py -c -h 192.168.1.20 -p 3000: connect to 192.168.1.20:3000
  • python3 simple_tcp.py -i: interactive mode, the script will ask for host, port and mode interactively (easier for noobs)

Arguments:

  • "-h"/"--help": display all command line arguments
  • "-a"/"--host": (optional) set target host, ex: -a 192.168.137.20, will default to localhost if not set
  • "-p"/"--port": (optional) set target port, ex: -p 8888, will default to 80 if not set
  • "-b"/"--buffer": (optional) set buffer size, ex: -b 1024, will default to 4092 if not set
  • flag mode: "-s"/"--server" or "-c"/"--client", can only choose one, will default to client mode if not set
  • flag interactive: "-i"/"--interactive", ask for host, port, buffer, and mode interactively (automatically assumed if no arguments provided)
  • flag verbose: "--verbose", display verbose output (useful for debugging)

SSL Arguments:

  • flag ssl: "--ssl": add this flag to use ssl mode
  • "--ssl_server_certificate": set path to ssl server certificate (for ssl server mode only)
  • "--ssl_server_privatekey": set path to ssl server private key (for ssl server mode only)
  • "--ssl_client_ca": set path to certificate authority (CA)'s certificate (for ssl client mode only)

simple_tcp's People

Contributors

kristian-tan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.