Advertisement
Guest User

email by79137913

a guest
May 10th, 2012
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.85 KB | None | 0 0
  1. @echo off
  2. SETlocal enabledelayedexpansion
  3. Set /p arch=Arrastre su archivo de mail aqui:
  4. copy /b %arch% a.txt
  5. CLS
  6. for /f "tokens=*" %%x in (a.txt) do (set N=!N!%%x)
  7. del /s /q a.txt
  8. CLS
  9. SET NUM=0
  10. :LOOP
  11. call set CHAR=%%N:~%NUM%,14%%%
  12. set /a NUM+=1
  13. IF "%CHAR%"=="Received from " (SET /A DNSSTART=%NUM%+13
  14. GOTO DNSENCONTRADO)
  15. GOTO LOOP
  16. :DNSENCONTRADO
  17. SET NUM=%DNSSTART%
  18. :LOOPB
  19. call set CHAR=%%N:~%NUM%,2%%%
  20. set /a NUM+=1
  21. IF "%CHAR%"=="([" (SET /A DNSEND=%NUM%
  22. GOTO DNSTERMINADO)
  23. GOTO LOOPB
  24. :DNSTERMINADO
  25. SET /A AUX=%DNSEND%-%DNSSTART%-1
  26. CALL SET DNS=%%N:~%DNSSTART%,%AUX%%%%
  27. :LOOPC
  28. call set CHAR=%%N:~%NUM%,2%%%
  29. set /a NUM+=1
  30. IF "%CHAR%"=="])" (SET /A IPEND=%NUM%
  31. GOTO IPTERMINADO)
  32. GOTO LOOPC
  33. :IPTERMINADO
  34. SET /A DNSEND=%DNSEND%+1
  35. SET /A AUX=%IPEND%-%DNSEND%-1
  36. CALL SET IP=%%N:~%DNSEND%,%AUX%%%%
  37. ECHO [IP]: %IP%
  38. ECHO [HOST]: %DNS%
  39. PAUSE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement