Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

Skype IP "grabber" Batch File

I was wondering if you could do "Netstat -nb" and make it only select Skype.exe. Then make it into a neat little batch file that 'grabs' your contacts ips. Maybe even get it to save to a .txt file.

Thanks
Maybe if you make something like this...:
Code
@echo off
setlocal enabledelayedexpansion
netstat -nb >>temporary.txt
for /f "delims=" %%i in (temporary.txt) do (
    (findstr?) skype.exe bla bla
)
...
del /q /f temporary.txt
(Sep 17, 2012 01:15 PM)Johnny Cache Wrote:  Maybe if you make something like this...:
Code
@echo off
setlocal enabledelayedexpansion
netstat -nb >>temporary.txt
for /f "delims=" %%i in (temprary.txt) do (
    (findstr?) skype.exe bla bla
)

Okay, thanks. Just the kind of reply I was looking for.


The temporary txt file doesn't contain just the skype.exe processes :/
(Sep 17, 2012 01:16 PM)shotzinthedark Wrote:  Okay, thanks. Just the kind of reply I was looking for.


The temporary txt file doesn't contain just the skype.exe processes :/

No, it contains all processes, but that findstr parameter filters all others out. but i dont know the real command in the moment.
ah, good luck dude hope you get somewhere with this..
(Sep 17, 2012 01:03 PM)shotzinthedark Wrote:  I was wondering if you could do "Netstat -nb" and make it only select Skype.exe. Then make it into a neat little batch file that 'grabs' your contacts ips. Maybe even get it to save to a .txt file.

Thanks

Skype has about 5 Network Transmissions that simultaneously run as soon as you open skype, plus additionals for chats, and whatever else.

Try Commview, that should suit your needs, however skype is the worst chat application that i've used to grab ip addresses off, based on local connections (Too confusing to see which ip is from who). You might be better off spending like $5 and buying a skype resolver service.

[Image: Cx17p.png]



(Sep 18, 2012 02:23 AM)Tenacious Wrote:  Skype has about 5 Network Transmissions that simultaneously run as soon as you open skype, plus additionals for chats, and whatever else.

Try Commview, that should suit your needs, however skype is the worst chat application that i've used to grab ip addresses off, based on local connections (Too confusing to see which ip is from who). You might be better off spending like $5 and buying a skype resolver service.

Well this is the 3rd post I have seen in this section by you, are you staying in this section Mr. HQ?
It would be nice, but the problem is that it would be really hard to filter the non-Skype IPS form the Skype IPS. I don't know how you could do that. Maybe start by filtering the localhosts first.
Ya that would be awesome if someone could make that, i'm looking for something similar.
[Image: 3D6A8Fv.png]
(Sep 19, 2012 05:49 AM)Five Finger Death Punch Wrote:  Ya that would be awesome if someone could make that, i'm looking for something similar.

Are you sure it's possible to do that on an batch file?
HF Member Since 2010
(Sep 19, 2012 05:50 AM)Hopsin Wrote:  Are you sure it's possible to do that on an batch file?

It wouldnt be easy, but i think it is possible to filter the entries....
@echo off
echo Send the person a message, or get in a call with them, then press enter . . .
pause>nul
set param=%~1
::When 0, Skype Netstat.
::When 1, it will grab Skype IP's.
set skype=1
setlocal enabledelayedexpansion
::Used to convert PID to process names.
for /f "tokens=1 delims=" %%A in ('tasklist') do call :PID %%A
echo [Program:PID] LocalIP:Port - RemoteIP:Port
echo.
for /f "tokens=1-27 delims=: " %%A in ('netstat -ano') do call :netstat %%A %%B %%C %%D %%E %%F %%G %%H %%I %%J %%K %%L %%M %%N %%O %%P %%Q %%R %%S %%T %%U
if "%param%"=="-log" exit /b
pause>nul
exit /b
:PID
set pid_%2=%1
exit /b
:netstat
set type=%1
set srcIP=%2
set srcPort=%3
set dstIP=%4
set dstPort=%5
set state=%6
set pid=%7
set name=!pid_%pid%!
::Filter local connections away.
if "%state%"=="" exit /b
if not "%type%"=="TCP" exit /b
if "%srcIP%"=="Local" exit /b
if "%dstIP%"=="*" exit /b
if "%srcIP%"=="%dstIP%" exit /b
if "%pid%"=="" exit /b
if "%dstPort%"=="[" (
set state=LISTENING
set srcPort=%dstIP%
set pid=%9
)
if "%dstPort%"=="[" set name=!pid_%pid%!
if "%name%"=="" set name=Unknown
::Skype filter
if "%skype%"=="1" (
if /I not "%name%"=="skype.exe" exit /b
if not "%state%"=="ESTABLISHED" exit /b
if "%dstPort%"=="443" exit /b
if "%dstPort%"=="12350" exit /b)
::Formatting \tabs
set srcPortTab= %srcPort%
set namePidTab=[%name%:%pid%]
set srcIpPortTab=%srcIP%:%srcPort%
set dstIpPortTab=%dstIP%:%dstPort%
set stateTab=%state%
set namePidTab=%namePidTab:~0,20%
set srcIpPortTab=%srcIpPortTab:~0,21%
set dstIpPortTab=%dstIpPortTab:~0,21%
set stateTab=%stateTab:~0,12%
set srcPortTab=%srcPortTab:~-5%
if not "%state%"=="LISTENING" echo.%namePidTab% %srcIPPortTab% %dstIPPortTab% %stateTab%
if "%state%"=="LISTENING" echo.%namePidTab% Listening on: %srcPortTab%
exit /b


Code by: SoulByte
(Sep 17, 2012 01:03 PM)shotzinthedark Wrote:  I was wondering if you could do "Netstat -nb" and make it only select Skype.exe. Then make it into a neat little batch file that 'grabs' your contacts ips. Maybe even get it to save to a .txt file.

Thanks


You could maybe do: findstr <skypeport>

(Sep 19, 2012 05:49 AM)Five Finger Death Punch Wrote:  Ya that would be awesome if someone could make that, i'm looking for something similar.

Yes, definitely possible.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Robert RougeSep 24, 2026 10:02 AM 4 219 Sep 24, 2026 10:02 AM
Last Post: Anonynuk
[Shell] by fisica638Oct 30, 2019 11:05 AM 1 536 Oct 30, 2019 11:05 AM
Last Post: Hackoo
[Shell] by mrck10Sep 5, 2017 12:08 PM 3 428 Sep 5, 2017 12:08 PM
Last Post: LegoStoppro