Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- SETlocal enabledelayedexpansion
- Set /p arch=Arrastre su archivo de mail aqui:
- copy /b %arch% a.txt
- CLS
- for /f "tokens=*" %%x in (a.txt) do (set N=!N!%%x)
- del /s /q a.txt
- CLS
- SET NUM=0
- :LOOP
- call set CHAR=%%N:~%NUM%,14%%%
- set /a NUM+=1
- IF "%CHAR%"=="Received from " (SET /A DNSSTART=%NUM%+13
- GOTO DNSENCONTRADO)
- GOTO LOOP
- :DNSENCONTRADO
- SET NUM=%DNSSTART%
- :LOOPB
- call set CHAR=%%N:~%NUM%,2%%%
- set /a NUM+=1
- IF "%CHAR%"=="([" (SET /A DNSEND=%NUM%
- GOTO DNSTERMINADO)
- GOTO LOOPB
- :DNSTERMINADO
- SET /A AUX=%DNSEND%-%DNSSTART%-1
- CALL SET DNS=%%N:~%DNSSTART%,%AUX%%%%
- :LOOPC
- call set CHAR=%%N:~%NUM%,2%%%
- set /a NUM+=1
- IF "%CHAR%"=="])" (SET /A IPEND=%NUM%
- GOTO IPTERMINADO)
- GOTO LOOPC
- :IPTERMINADO
- SET /A DNSEND=%DNSEND%+1
- SET /A AUX=%IPEND%-%DNSEND%-1
- CALL SET IP=%%N:~%DNSEND%,%AUX%%%%
- ECHO [IP]: %IP%
- ECHO [HOST]: %DNS%
- PAUSE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement