Centauro - a command line tool with some network management functionality

Related tags

CLI Tools Centauro
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
You might also like...
PyArmor is a command line tool used to obfuscate python scripts

PyArmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

A command line tool to remove background from video and image
A command line tool to remove background from video and image

A command line tool to remove background from video and image, brought to you by BackgroundRemover.app which is an app made by nadermx powered by this tool

Amazon Scraper: A command-line tool for scraping Amazon product data
Amazon Scraper: A command-line tool for scraping Amazon product data

Amazon Product Scraper: 2021 Description A command-line tool for scraping Amazon product data to CSV or JSON format(s). Requirements Python 3 pip3 Ins

A command line tool (and Python library) for archiving Twitter JSON

A command line tool (and Python library) for archiving Twitter JSON

command line tool for frequent nmigen tasks (generate sources, show design)
command line tool for frequent nmigen tasks (generate sources, show design)

nmigen-tool command line tool for frequent nmigen tasks (generate sources, show design) Usage: generate verilog: nmigen generate verilog nmigen_librar

Command line tool to keep track of your favorite playlists on YouTube and many other places.

Command line tool to keep track of your favorite playlists on YouTube and many other places.

googler is a power tool to Google (web, news, videos and site search) from the command-line.
googler is a power tool to Google (web, news, videos and site search) from the command-line.

googler is a power tool to Google (web, news, videos and site search) from the command-line.

LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.
LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

Command line tool for google dorks

CLI for google dorks This is the command line tool made with pytohn which allows the users to perform Google dorks easily Installation Install google

Owner
Newbie
null
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 11 Aug 10, 2022
Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Phil Wang 4.4k Jan 9, 2023
A cd command that learns - easily navigate directories from the command line

NAME autojump - a faster way to navigate your filesystem DESCRIPTION autojump is a faster way to navigate your filesystem. It works by maintaining a d

William Ting 14.5k Jan 3, 2023
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

null 37 Dec 15, 2022
Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juan Carlos Juárez 1 Feb 2, 2022
Command-line tool for looking up colors and palettes.

Colorpedia Colorpedia is a command-line tool for looking up colors, shades and palettes. Supported color models: HEX, RGB, HSL, HSV, CMYK. Requirement

Joohwan Oh 282 Dec 27, 2022
Free and Open-Source Command Line tool for Text Replacement

Sniplet Free and Open Source Text Replacement Tool Description: Sniplet is a work in progress CLI tool which can do text replacement globally in Linux

Veeraraghavan Narasimhan 13 Nov 28, 2022
PwnWiki command line searching tool & bindings written in Python

pwsearch PwnWiki 数据库搜索命令行工具。 安装 您可以直接用 pip 命令从 PyPI 安装 pwsearch: pip3 install -U pwsearch 您也可以 clone 该仓库并直接从源码启动

PwnWiki 20 Jun 21, 2021
Official AIdea command line tool

AIdea CLI Official AIdea command line tool for https://aidea-web.tw. Installation Make sure you have installed both Python 3 and pip package manager.

AIdea 5 Dec 15, 2021