telnet implementation over TCP socket with python

Related tags

NetworkingCN-telnet
Overview

TELNET Protocol Implementation

This a P2P implementation of telnet. This program transfers data on TCP sockets as plain text. However there is also an option to send and recieve messages in encryption mode. It uses the rsa module to generate public and private keys and a handshake is done between client and server to transfer their public key to the otherside.

This is not a complete implementation in telnet protocol based on rfc854. There is no option negotiation to establish an NVT

This script could be used for:

  1. Sending plain and encrypted text messages to server
  2. Upload and download files to and from a peer
  3. Execute commands on another peer and get the results
  4. Scan open ports of a host
  5. Send other requests such as SMTP or HTTP requests to servers.

This program uses PostgreSQL to save commands entered on client side on telnet_history database. When you run program in client mode it asks for username and password to connect to Postgre database.

You need to run this script as 2 proccesses for client and server mode.

To exit the program press Ctrl+c.

Server Mode

To run in server mode you need to run the following command in terminal:

>python3 main.py server [portnumber] [-e]

portnumber is the port server is going to listen on.

-e should be provided if you would like to enter encrypted mode.

Client Mode

To run in client mode you need to run the following command in terminal:

>python3 main.py client
  • To establish a connection:

    telnet> open [host] [port] [-e]
    

    When connection is established you can:

    1. Send message to another peer:

      127.0.0.1:2250> send message
      hi
      done
      
    2. Send message to a remote SMTP or HTTP server:

      301 Moved

      301 Moved

      The document has moved here. Server response recieved! ">
      google.com:80>send remote
      GET / HTTP/1.1
      HOST: google.com
      
      done
      
      Waiting for server...
      HTTP/1.1 301 Moved Permanently
      Location: http://www.google.com/
      Content-Type: text/html; charset=UTF-8
      Date: Sun, 30 May 2021 11:24:52 GMT
      Expires: Tue, 29 Jun 2021 11:24:52 GMT
      Cache-Control: public, max-age=2592000
      Server: gws
      Content-Length: 219
      X-XSS-Protection: 0
      X-Frame-Options: SAMEORIGIN
      
      
      301 Moved
      

      301 Moved

      The document has moved here. Server response recieved!
    3. Upload a file to a peer:

      127.0.0.1:2250> upload [path]
      
    4. Download file from a peer:

      127.0.0.1:2250> download [path]
      
    5. Execute a command on peer:

      127.0.0.1:2250> exec [command]
      
    6. Disconnect:

      127.0.0.1:2250> quit
      
  • To scan 1 to 1024 ports from start_ip to end_port:

    telnet> scan [start_ip] [end_ip]
    
  • You could also see the previouse commands:

    telnet> history
    
Securely and anonymously share files, host websites, and chat with friends using the Tor network

OnionShare OnionShare is an open source tool that lets you securely and anonymously share files, host websites, and chat with friends using the Tor ne

OnionShare 5.4k Jan 01, 2023
A Python library to ease the integration with the Beem Africa (SMS, AIRTIME, OTP, 2WAY-SMS, BPAY, USSD)

python-client A Python library to easy the integration with the Beem Africa SMS Gateway Features to be Implemented Airtime OTP SMS Two way SMS USSD Bp

Beem Africa 24 Oct 29, 2022
Ov3 - Easy common OpenVPN3 operations

ov3 Easy common OpenVPN3 operations Install ov3 requires Python3 and OpenVPN3 to

Yunus Bora Erciyas 6 Apr 25, 2022
jarbou3 is rat tool coded in python with C&C which can accept multiple connections from clients

jarbou3 Jarbou3 is rat tool with coded in python with C&C which can accept multi

youhacker55 108 Dec 29, 2022
The best way to send tokens into a specific server, which can be used for discord bots, and some tools..

XTRA420 The simplified version of sending tokens into a server, the basic and fastest way.. When using this, you have the option to use proxies (http)

07v 1 Nov 30, 2021
Vent domain information retrieval tool, which is capable of retrieving customer information

Vent domain information retrieval tool, which is capable of retrieving customer information. This tool has been created for the purpose of complete education, Iam not responsible for any illegal acti

Md. Ridwanul Islam Muntakim 25 Dec 09, 2022
pfSense integration with Home Assistant

hass-pfsense Join pfSense with home-assistant! hass-pfsense uses the built-in xmlrpc service of pfSense for all interactions. No special plugins or so

Travis Glenn Hansen 105 Dec 24, 2022
This script will make it easier to connect to any wireguard vpn config

wireguard-linux-python-script-vpn This script will make it easier to connect to any wireguard vpn config also u will need your wireguard vpn from your

Jimo 1 Sep 21, 2022
The World Most Fastest Proxy Checker In Python, Maybe?!

The World's Most Fastest Proxy Checker In Python, Maybe?! Features Based on Python 3.7+ Save Valid Porixes into the custom file Multi-Thread Fully Asy

Cyber 4 Feb 10, 2022
WARP+ uses Cloudflare’s virtual private backbone, known as Argo, to achieve higher speeds and ensure your connection is encrypted across the long haul of the Internet

WARP+ uses Cloudflare’s virtual private backbone, known as Argo, to achieve higher speeds and ensure your connection is encrypted across the long haul of the Internet

Rivane Rasetiansyah 3 Apr 01, 2022
ProxyBroker is an open source tool that asynchronously finds public proxies from multiple sources and concurrently checks them

ProxyBroker is an open source tool that asynchronously finds public proxies from multiple sources and concurrently checks them. Features F

Denis 3.2k Jan 04, 2023
Secure connection between tenhou Window client and server.

tenhou-secure The tenhou Windows client looks awesome. However, the traffic between the client and tenhou server is NOT encrypted, including your uniq

1 Nov 11, 2021
Dark Utilities - Cloudflare Uam Bypass

Dark Utilities - Cloudflare Uam Bypass

Inplex-sys 26 Dec 14, 2022
This application aims to read all wifi passwords and visualizes the complexity in graph formation by taking into account several criteria and help you generate new random passwords.

This application aims to read all wifi passwords and visualizes the complexity in graph formation by taking into account several criteria and help you generate new random passwords.

Njomza Rexhepi 0 May 29, 2022
tradingview socket api for fetching real time prices.

tradingView-API tradingview socket api for fetching real time prices. How to run git clone https://github.com/mohamadkhalaj/tradingView-API.git cd tra

MohammadKhalaj 35 Dec 31, 2022
boofuzz: Network Protocol Fuzzing for Humans

boofuzz: Network Protocol Fuzzing for Humans Boofuzz is a fork of and the successor to the venerable Sulley fuzzing framework. Besides numerous bug fi

Joshua Pereyda 1.7k Dec 31, 2022
This Python script can be used to bypass IP source restrictions using HTTP headers.

ipsourcebypass This Python script can be used to bypass IP source restrictions using HTTP headers. Features 17 HTTP headers. Multithreading. JSON expo

Podalirius 322 Dec 28, 2022
Way find out if DNS is down or your instance

DNS-PING Way to find out if DNS is down or your instance Problem: At times it happens that DNS provider services of a website URL is down and so to re

Giten Mitra 4 Nov 18, 2022
openPortScanner is a port scanner made with Python!

Port Scanner made with python • Installation • Usage • Commands Installation Run this to install: $ git clone https://github.com/Miguel-Galdin0/openPo

Miguel Galdino 7 Jan 09, 2022
sshuttle: where transparent proxy meets VPN meets ssh

Transparent proxy server that works as a poor man's VPN. Forwards over ssh. Doesn't require admin. Works with Linux and MacOS. Supports DNS tunneling.

9.4k Jan 09, 2023