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
    
Python 3.3+'s ipaddress for older Python versions

ipaddress Python 3.3+'s ipaddress for Python 2.6, 2.7, 3.2. This repository tracks the latest version from cpython, e.g. ipaddress from cpython 3.8 as

Philipp Hagemeister 103 Nov 11, 2022
Socialhome is best described as a federated personal profile with social networking functionality

Description Socialhome is best described as a federated personal profile with social networking functionality. Users can create rich content using Mar

Jason Robinson 332 Dec 30, 2022
Python code that get the name and ip address of a computer/laptop

IP Address This is a python code that provides the name and the internet protocol address of the computer. You need to install socket pip install sock

CODE 2 Feb 21, 2022
A simple Encrypted IM chat software Server & client based on Python3.

SecretBox A simple Encrypted IM chat software Server & client based on Python3. Version 1.0 命令行版 安装步骤 Server 运行pip3 install -r requirements 安装依赖。 运行py

h3h3da 5 Oct 31, 2022
This program ingests a Cisco "sh ip arp" as a text file and produces the list of vendors seen in the file

IP-ARP-Vendor_lookup This program ingests a Cisco "sh ip arp" as a text file and produces the list of vendors seen in the file Why? Answers the questi

Stew Alexander 1 Dec 24, 2022
ProtOSINT is a Python script that helps you investigate Protonmail accounts and ProtonVPN IP addresses

ProtOSINT ProtOSINT is a Python script that helps you investigate ProtonMail accounts and ProtonVPN IP addresses. Description This tool can help you i

pixelbubble 249 Dec 23, 2022
Burp Extension that copies a request and builds a FFUF skeleton

ffuf is gaining a lot of traction within the infosec community as a fast portable web fuzzer. It has been compared and aligned (kinda) to Burp's Intruder functionality. Thus, Copy As FFUF is trying t

Desmond Miles 81 Dec 22, 2022
Blockchain-Enabled IoT Sensor Framework that uses Augmented Reality and Artificial Intelligence.

Arduino + Raspberry Pi + Unity3D + Cloud + Hyperledger Our Mission: Keep it simple, leave no one behind. Blockchain-Enabled Smart Sensor Framework usi

DappAR 23 Dec 05, 2021
Tool that creates a complete copy of your server

Discord-Server-Cloner Tool that creates a complete copy of your server Setup: Open run.bat If the file closes, open cmd And write: pip install -r requ

DEEM 3 Dec 13, 2021
msgspec is a fast and friendly implementation of the MessagePack protocol for Python 3.8+

msgspec msgspec is a fast and friendly implementation of the MessagePack protocol for Python 3.8+. In addition to serialization/deserializat

Jim Crist-Harif 414 Jan 06, 2023
A pure python implementation of multicast DNS service discovery

python-zeroconf Documentation. This is fork of pyzeroconf, Multicast DNS Service Discovery for Python, originally by Paul Scott-Murphy (https://github

Jakub Stasiak 483 Dec 29, 2022
Python port of proxy-www (https://github.com/justjavac/proxy-www)

proxy-www.py Python port of proxy-www (https://github.com/justjavac/proxy-www). Implemented additional functionalities! How to install pip install pro

Minjun Kim (Lapis0875) 20 Dec 08, 2021
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
TicTacToe using Socket Server

TicTacToe using Socket Server This is a project for the class : 18CSC302J - Computer Networks by Dr. S.Babu Contributors Suvodeep Sinha RA191100301010

Suvodeep Sinha 12 Nov 30, 2022
Modern Denial-of-service ToolKit for python

💣 Impulse Modern Denial-of-service ToolKit 💻 Main window 📡 Methods: Method Target Description SMS PHONE Sends a massive amount of SMS messages and

1 Nov 29, 2021
Simple client for the Sirah Matisse Commander TCP server.

Simple client for the Sirah Matisse Commander TCP server.

Nelson Darkwah Oppong 1 Nov 02, 2021
Very simple and tiny file sharing service written in python

Simple File sharing tool Sharing client usage (You will need to use python3 for linux) main.py --send -f file/path Optionnal flags : pwd : set a passw

2 Jul 26, 2022
RabbitMQ asynchronous connector library for Python with built in RPC support

About RabbitMQ connector library for Python that is fully integrated with the aio-pika framework. Introduction BunnyStorm is here to simplify working

22 Sep 11, 2022
Herramienta para transferir eventos de Shadowserver REST API hacia Azure Blob Storage.

Herramienta para transferir eventos de Shadowserver REST API hacia Azure Blob Storage.

CSIRT-RD 1 Feb 04, 2022
Multipurpose Growtopia Server tools, can be used for newbie to learn things.

Multipurpose Growtopia Server tools, can be used for newbie to learn things.

FelixF 3 Dec 01, 2021