Detectar sistemas operacionais dos dispositivos na rede via TTL
Publicado por Tiago Hillebrandt (última atualização em 28/03/2013)
[ Hits: 4.533 ]
Homepage: http://tiagohillebrandt.eti.br
Apesar do TTL ser facilmente manipulável, esse script pode facilitar na detecção do sistema operacional dos dispositivos conectados em uma determinada faixa de IP da classe C, sendo facilmente adaptável para outras classes de endereço.
#!/bin/bash # # Detecta sistemas operacionais dos dispositivos na rede via TTL # Copyright (C) 2013 Tiago Hillebrandt <tiagohillebrandt@ubuntu.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # for i in {1..254}; do latencia=`ping 192.168.1.$i -c 1 | grep ttl | awk -F'ttl=' '{ print $2 }' | awk '{ print $1 }'` if [ ${#latencia} -eq 0 ]; then sistema="-" elif [ $latencia -lt 100 ]; then sistema="Linux" elif [ $latencia -gt 150 ]; then sistema="UNIX" else sistema="Windows" fi echo "192.168.1.$i: $sistema" done
Script para formatar disquetes em modo texto (Melhorado)
Script para carregar e descarregar regras com iptables
Atenção a quem posta conteúdo de dicas, scripts e tal (2)
Configuração básica do Conky para mostrar informações sobre a sua máquina no Desktop
Aprenda a criar músicas com Inteligência Artificial usando Suno AI
Entendendo o que é URI, URL, URN e conhecendo as diferenças entre POST e GET
Ativando o Modo Noturno via Linha de Comando no GNOME/Wayland
Habilitando a importação de senhas no Firefox
Como corrigir o erro do VirtualBox travar a máquina virtual em tela cheia
Instalando Google Chrome no Ubuntu 24.04 LTS
Quantidade de caracteres suportados na barra de endereços dos navegadores
Instalar Chrome no Ubuntu (11)
Clamav e suas atualizações (28)
Erro ao fazer parse GUID string para GUID exadecimal[AJ... (1)
pacotes 32 bit no void 64 bit (4)
Segunda tela não dá vídeo mas reconhece o monitor no painel (2)