#!/bin/bash # Mi IP publica, IP local y red local. # (c) hackingyseguridad.com 2017 #Ejecutar script desde Github directamente: #via curl: #sh -c "$(curl -fsSL https://raw.githubusercontent.com/hackingyseguridad/scan/master/miip)" #via wget: #sh -c "$(wget -qO- https://raw.githubusercontent.com/hackingyseguridad/scan/master/miip)" # o via fetch: #sh -c "$(fetch -o - https://raw.githubusercontent.com/hackingyseguridad/scan/master/miip)" Verde='\033[0;32m' NC='\033[0m' echo printf "${Verde}IP interfaces: ${NC}\n" ifconfig echo printf "${Verde}Gateway: ${NC}\n" route echo printf "${Verde}ARP MAC Address: ${NC}\n" arp echo printf "${Verde}DNS: ${NC}\n" cat /etc/resolv.conf | grep 'nameserver' | awk '{print $2}' echo printf "${Verde}Sistema: ${NC}\n" uname -o echo printf "${Verde}Arquitectura: ${NC}\n" uname -m echo printf "${Verde}Version Kernel: ${NC}\n" uname -r echo printf "${Verde}Carga promedio: ${NC}\n" cat /proc/loadavg | cut -f 1-3 -d ' ' echo printf "${Verde}Tiempo actividad: ${NC}\n" uptime -p | cut -f 2- -d " " echo printf "${Verde}Memoria: ${NC}\n" echo "\n$(free -m | grep -v +)" echo printf "${Verde}Unidades: ${NC}\n" echo "\n$(df -h| grep 'Filesystem\|^/dev/*')" echo printf "${Verde}IP publica: ${NC}\n" wget http://ipinfo.io/ip -qO - echo