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
A lightweight terminal-based password manager coded with Python using SQLCipher for SQLite database encryption.

password-manager A lightweight terminal-based password manager coded with Python using SQLCipher for SQLite database encryption. Screenshot Pre-requis

Leonardo de Araujo 15 Oct 15, 2022
A simple reverse shell in python

RevShell A simple reverse shell in python Getting started First, start the server python server.py Finally, start the client (victim) python client.py

Lojacopsen 4 Apr 06, 2022
A python CLI app that converts a mp4 file into a gif with ASCII effect added.

Video2ASCIIgif This CLI app takes in a mp4 format video, converts it to a gif with ASCII effect applied. This also includes full control over: backgro

Sriram R 6 Dec 31, 2021
Get Air Quality Index for your city/country 😷

Air Quality Index CLI Get Air Quality index for your City. Installation $ pip install air-quality-cli Contents Air Quality Index CLI Installation Cont

Yankee 40 Oct 21, 2022
Jupyter notebook client in neovim

🪐 Jupyter-Nvim Read jupyter notebooks in neovim Note: The plugin is still in alpha stage 👾 Usage Just open any *.ipynb file and voila! ✨ Contributin

Ahmed Khalf 85 Dec 29, 2022
Helicopter animation in terminal

helicopter-helicopter Helicopter animation in terminal (scroll down for instructions) Why does this exist? It's because of a meme Click for details Se

Wasi Master 7 Mar 14, 2022
Another (unofficial) Qt CLI Installer on multi-platforms

Another Qt installer(aqt) Release: Documentation: Test status: and Coverage: This is a utility alternative to the official graphical Qt installer, for

Hiroshi Miura 528 Jan 02, 2023
A CLI Spigot plugin manager that adheres to Unix conventions and Python best practices.

Spud A cross-platform, Spigot plugin manager that adheres to the Unix philosophy and Python best practices. Some focuses of the project are: Easy and

Tommy Dougiamas 9 Dec 02, 2022
A CLI tools to get you started on any project in any language

Any Template A faster easier to Quick start any programming project. Installation pip3 install any-template Features No third party dependencies. Tem

Adwaith Rajesh 2 Jan 11, 2022
Interact with Replit remotely with the Replit CLI

Replit CLI pip install repl-cli Welcome to Replit CLI! With the Replit CLI Application, you can work with your repls locally, including clone, pull,

Shuchir Jain 4 Aug 18, 2022
Wappalyzer CLI tool to find Web Technologies

Wappalyzer CLI tool to find Web Technologies

GOKUL A.P 17 Dec 15, 2022
A Python3 rewrite of my original PwnedConsole project from almost a decade ago

PwnedConsoleX A CLI shell for performing queries against the HaveIBeenPwned? API to gather breach information for user-supplied email addresses. | wri

1 Jul 23, 2022
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

1 Feb 05, 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 09, 2023
⚙ A lightweight command line interface library for creating commands.

⚙ A lightweight command line interface library for creating cli commands. About | Installation | Usage | Features | Contributors | License About Next:

Serum 16 Sep 25, 2022
GoogleFormSpammer - A simple CLI script to spam Google Forms used by Crypto Wallet scammers to collect stolen data

GoogleFormSpammer - A simple CLI script to spam Google Forms used by Crypto Wallet scammers to collect stolen data

14 Dec 17, 2022
Alacritty terminal used with Bash, Tmux, Vim, Mutt, Lynx, etc. and the many different additions added to each configuration file

Alacritty terminal used with Bash, Tmux, Vim, Mutt, Lynx, etc. and the many different additions added to each configuration file

Carter 19 Aug 24, 2022
swarmexec executes command in swarm service

Swarmexec swarmexec executes command in swarm service Install pip install git+https://github.com/filimon43g/swarmexec.git Config In swarm_config.ini

Phil 2 Nov 23, 2021
Analysis of a daily word game "Wordle"

Wordle Analysis of a daily word game "Wordle" https://www.powerlanguage.co.uk/wordle/ Description Worlde is a daily word game in which a player attemp

Bartek 1 Feb 07, 2022
Shellcode runner to execute malicious payload and bypass AV

buffshark-shellcode-runner Python Shellcode Runner to execute malicious payload and bypass AV This script utilizes mmap(for linux) and win api wrapper

Momo Lenard 9 Dec 29, 2022