@echo off
echo literal stat > entrada
echo quit >> entrada
ftp -A -s:entrada ftp.es.debian.org >temp1 2>nul
findstr "Connected" temp1 >temp
del entrada
set /p a=""<temp
del temp1 temp
set a=%a:~18,20%
echo. >Datos_PC.txt
echo Nombre del Equipo..........: %computername% >>Datos_PC.txt
echo. >>Datos_PC.txt
wmic computersystem get domain|findstr /v "Domain" >temp.txt
set/p grupo=""<temp.txt
del temp.txt
set grupo=%grupo:~0,10%
echo Grupo de Trabajo...........: %grupo% >>Datos_PC.txt
echo. >>Datos_PC.txt
echo Usuario Activo.............: %username% >>Datos_PC.txt
echo. >>Datos_PC.txt
echo I.P. Publica...............: %a% >>Datos_PC.txt
echo. >>Datos_PC.txt
ipconfig|FINDSTR "Dirección IPv4" >temp.txt
set /p ip=""<temp.txt
del temp.txt
set ip=%ip:~47,20%
echo I.P. local.................: %ip% >>Datos_PC.txt
echo. >>Datos_PC.txt
ipconfig|FINDSTR "subred" >temp.txt
set /p subred=""<temp.txt
del temp.txt
set subred=%subred:~47,20%
echo Mascara de Subred..........: %subred% >>Datos_PC.txt
echo. >>Datos_PC.txt
ipconfig /all|findstr "enlace" >temp.txt
set/p enlace=""<temp.txt
del temp.txt
set enlace=%enlace:~47,18%
echo Puerta de enlace...........: %enlace% >>Datos_PC.txt
echo. >>Datos_PC.txt
ipconfig /all|findstr "Servidores" >temp.txt
set /p dns=""<temp.txt
del temp.txt
set dns=%dns:~47,25%
echo Servidor DNS...............: %dns% >>Datos_PC.txt
echo. >>Datos_PC.txt
ipconfig /all|findstr "sica" >temp.txt
set /p mac=""<temp.txt
del temp.txt
set mac=%mac:~47,28%
echo Direccion Fisica(M.A.C.)...: %mac% >>Datos_PC.txt
echo. >>Datos_PC.txt
echo. >>Datos_PC.txt
echo Hecho por EL SWAMI >>Datos_PC.txt
echo. >>Datos_PC.txt
type Datos_PC.txt
echo Set objshell = createobject("wscript.shell") >datos.vbs
echo Set ping = objshell.exec("cmd /c type Datos_PC.txt")>>datos.vbs
echo Msgbox ping.stdout.readall >>datos.vbs
echo Set ping = objshell.exec("cmd /c del Datos_PC.txt") >>datos.vbs
echo Set ping = objshell.exec("cmd /c del datos.vbs") >>datos.vbs
start datos.vbs