Centauro - a command line tool with some network management functionality

Overview

Centauro

Ferramenta de rede

image

O Centauro é uma ferramenta de linha de comando com algumas funcionalidades de gerenciamento de rede, tais como:

Apesar de ser desenvolvido especialmente para o Windows, que tem problemas em encontrar ferramentas do tipo para download, tenho tentado deixar compatível com o Linux. Por favor comunique qualquer bug encontrado ou mande um pull request com a correção. Toda ajuda é bem-vinda!

  • Scanner de portas TCP;
  • Descoberta de hosts; No prompt de comando, use passe o argumento --help para saber como usá-lo.
python centauro.py --help

Modos de operação

Para selecionar o modo de operação, passe o modo escolhido para o parâmetro -m. Por exemplo, para usar o modo discover:

python centauro.py -m discover 
   

   
  • Scanner: modo padrão de operação do centauro. Caso o parâmetro -m seja omitido, o centauro operará como scanner. Esse modo exige os parâmetros -a ALVO e -i INTERVALO. O alvo deve ser um endereço de IP ou nome do dispositivo alvo. O intervalo deve ser um intervalo de portas a serem scaneadas. Exemplo de uso:

    python centauro.py -a 192.168.0.1 -i 1-80
    

    Nesse exemplo, o scanner irá scanear as portas de 1 a 80 do host 192.168.0.1.

  • Discover: modo de operação para descobertas de hosts. Para usá-lo é necessário passar o endereço da rede junto à máscara de rede separados por uma barra ao prâmetro -r, como no exemplo a seguir:

    python centauro.py -m discover -r 192.168.0.0/255.255.255.0
    

    Nesse exemplo, o discover vai verificar os hosts de 192.168.0.1 até 192.168.0.254.

O código

Bom, o código não está limpo, realmente, mas nada que bastante paciência não resolva. Vamos tentar descomplicar tudo isso!

A classe Centauro:

A classe centauro não tem nenhum atributo no método construtor (sim, é verdade, por enquanto). Essa "peculiaridade" é devido ao fato de que a maioria das variáveis são restritas a um método da classe. Por exemplo, a variável self.interval da classe só é acessada pelo método scanner, portanto, achei conveniente declará-la no método scanner.

Em consequência da ausência de declarações no método construtor, são é necessário passar argumentos ao instânciar um objeto a partir dessa classe:

centauro = Centauro()

O método scanner(host, intervalo, timeout=1):

Esse é o método responsável pelo escaneamento de portas. Ele usa o recurso de multiplas threads e, portanto, o processo é mais ágil.

O método discover(rede):

Esse método recebe como argumento em formato de string para a descoberta de hosts.

Atributos:

  • self.host: alvo escaneado pelo método scanner
  • self.interval: intervalo de portas a ser escaneado pelo método scanner
  • self.timeout: tempo limite de tentativa de conexão TCP no método scanner
  • self.opened: resultado do scanner que retorna as portas abertas no alvo
  • self.hosts_ativos: resultado do discover que retorna os hosts ativos
Owner
Newbie
Display Images in your terminal with python

A python library to display images in the terminal

Pranav Baburaj 57 Dec 30, 2022
Urial (URI Addition tooL) intelligently updates URIs stored in Finder comments of macOS files

Urial Urial (URI addition tool) is a simple but intelligent command-line tool to add or replace URIs found inside macOS Finder comments. Table of cont

Mike Hucka 3 Sep 14, 2022
Navigate torrents in CLI with Mariner.

Navigate torrents in CLI with Mariner. It offers a simple interface for streamlined experience. No more annoying ads and pop-up windows.

2 Oct 20, 2021
Custom 64 bit shellcode encoder that evades detection and removes some common badchars (\x00\x0a\x0d\x20)

x64-shellcode-encoder Custom 64 bit shellcode encoder that evades detection and removes some common badchars (\x00\x0a\x0d\x20) Usage Using a generato

Cole Houston 2 Jan 26, 2022
A simple Python library that allows you to customize your CLI based output on Linux

Terminal-Colored-Print About A small module that allows to simply decorate strings on Linux terminals. I personally use it for multi-threaded project,

Francesco Milano 0 Dec 13, 2021
A very simple and lightweight ToDo app using python that can be used from the command line

A very simple and lightweight ToDo app using python that can be used from the command line

Nilesh Sengupta 2 Jul 20, 2022
Zero-config CLI for TypeScript package development

Despite all the recent hype, setting up a new TypeScript (x React) library can be tough. Between Rollup, Jest, tsconfig, Yarn resolutions, ESLint, and

Jared Palmer 10.5k Jan 08, 2023
A minimal ascii-representation of your local weather.

Ascii-Weather A simple, ascii-based weather visualizer for the terminal. The ascii-art updates to match the current weather and conditions. Uses ipinf

Aaron R. 12 Jan 29, 2022
Simple CLI interface for linear task manager

Linear CLI (Unmaintained) Simple CLI interface for linear task manager Usage Install: pip install linearcli Setup: Generate a pe

Mike Lyons 1 Jan 07, 2022
Textual: a TUI (Text User Interface) framework for Python inspired by modern web development

Textual Textual is a TUI (Text User Interface) framework for Python inspired by

17.1k Jan 04, 2023
MiShell is a multi-platform, multi-architecture project based on the first version (MiShell32)

MiShell is a multi-platform, multi-architecture project based on the first version (MiShell32), which offers super super small reverse shell payloads great for injection in buffer overflow vulnerabil

Kamyar Hatamnezhad 0 Oct 27, 2022
'rl_UK' is an open-source command-line tool in Python for calculating the shortest path between BUS stop sequences in the UK

'rl_UK' is an open-source command-line tool in Python for calculating the shortest path between BUS stop sequences in the UK. As input files, it uses an ATCO-CIF file and 'OS Open Roads' dataset from

Nesh P. 0 Feb 16, 2022
Double Pendulum visualised with fetching system information in Python.

Show off your terminal, in style. A nice relaxing double pendulum simulation using ASCII, able to simulate multiple pendulums at once, and provide tra

Nekurone 62 Dec 14, 2022
You'll never want to use cd again.

Jmp Description Have you ever used the cd command? You'll never touch that outdated thing again when you try jmp. Navigate your filesystem with unprec

Grant Holmes 21 Nov 03, 2022
Command Line For Truecaller Written In Python

Truecaller-CLI Command Line Version For Truecaller Written In Python Never Login With A Number Over And Over Or It Will Be Banned Because Program Is S

Sandaru Ashen Fernando 16 Nov 08, 2022
電通大のCLIツールです

uecli 電通大のCLIツールです。コマンドラインからシラバス検索、成績参照、図書館の貸出リストなどを見ることができます インストール pip install uecli 使い方 シラバスを検索 uecli syllabus search -s 'コンピュータサイエンス' シラバスを取得し、Mar

UEC World Dominators 2 Oct 31, 2021
Convert shellcode into :sparkles: different :sparkles: formats!

Bluffy Convert shellcode into ✨ different ✨ formats! Bluffy is a utility which was used in experiments to bypass Anti-Virus products (statically) by f

pre.empt.dev 305 Dec 17, 2022
Borderless-Window-Utility - Modifies window style to force most applications into a borderless windowed mode

Borderless-Window-Utility Modifies window style to force most applications into

8 Oct 22, 2022
This a simple tool to query the awesome ippsec.rocks website from your terminal

ippsec-cli This a simple tool to query the awesome ippsec.rocks website from your terminal Installation and usage cd /opt git clone https://github.com

stark0de 5 Nov 26, 2022
Stream comments, submissions from subreddits and users across reddit right in your terminal

reddit_from_terminal stream comments, submissions from subreddits and users across reddit right in your terminal Alert! : Can't watch media contents(p

Pritam Dhara 2 Dec 30, 2021