Sto cercando di capire come farlo in modo nativo all'interno di Windows senza dover caricare applicazioni di terze parti. Quando corro:
netstat -ba
Voglio trovare connessioni stabilite senza perdere il nome dell'eseguibile che è collegato a quella particolare connessione.
L'output originale ha il seguente aspetto:
TCP 127.0.0.1:5905 My_HOSTNAME:1044 ESTABLISHED
[agent.exe]
TCP 127.0.0.1:5905 My_HOSTNAME:1045 ESTABLISHED
[agent.exe]
TCP 127.0.0.1:5905 My_HOSTNAME:1047 ESTABLISHED
[agent.exe]
TCP 127.0.0.1:5939 My_HOSTNAME:0 LISTENING
[TeamViewer_Service.exe]
TCP 127.0.0.1:5939 My_HOSTNAME:47311 ESTABLISHED
[TeamViewer_Service.exe]
TCP 127.0.0.1:9089 My_HOSTNAME:0 LISTENING
[vmware-converter-a.exe]
TCP 127.0.0.1:9421 My_HOSTNAME:0 LISTENING
[netsession_win.exe]
TCP 127.0.0.1:12656 My_HOSTNAME:33335 ESTABLISHED
[java.exe]
TCP 127.0.0.1:19872 My_HOSTNAME:47441 ESTABLISHED
[Dropbox.exe]
TCP 127.0.0.1:24001 My_HOSTNAME:0 LISTENING
[fileserver.exe]
TCP 127.0.0.1:24001 My_HOSTNAME:1078 ESTABLISHED
[fileserver.exe]
TCP 127.0.0.1:31000 My_HOSTNAME:32000 ESTABLISHED
[java.exe]
TCP 127.0.0.1:32000 My_HOSTNAME:0 LISTENING
[wrapper.exe]
TCP 127.0.0.1:32000 My_HOSTNAME:31000 ESTABLISHED
[wrapper.exe]
TCP 127.0.0.1:33335 My_HOSTNAME:0 LISTENING
[postgres.exe]
TCP 127.0.0.1:33335 My_HOSTNAME:1071 ESTABLISHED
[postgres.exe]
TCP 127.0.0.1:33335 My_HOSTNAME:1092 ESTABLISHED
[postgres.exe]
TCP 127.0.0.1:33335 My_HOSTNAME:12656 ESTABLISHED
[postgres.exe]
TCP 127.0.0.1:47311 My_HOSTNAME:5939 ESTABLISHED
[TeamViewer.exe]
TCP 127.0.0.1:47358 My_HOSTNAME:2002 ESTABLISHED
[LogMeInSystray.exe]
TCP 127.0.0.1:47389 My_HOSTNAME:62522 ESTABLISHED
[vpnui.exe]
TCP 127.0.0.1:47441 My_HOSTNAME:19872 ESTABLISHED
[Dropbox.exe]
TCP 127.0.0.1:49152 My_HOSTNAME:0 LISTENING
[omtsreco.exe]
TCP 127.0.0.1:62514 My_HOSTNAME:0 LISTENING
[cvpnd.exe]
TCP 127.0.0.1:62522 My_HOSTNAME:0 LISTENING
[vpnagent.exe]
TCP 127.0.0.1:62522 My_HOSTNAME:47389 ESTABLISHED
[vpnagent.exe]
TCP 10.97.0.133:7139 My_HOSTNAME:0 LISTENING
Can not obtain ownership information
Quando trovo le connessioni stabilite in questo modo:
netstat -ba | find "EST"
Elimina i nomi eseguibili visualizzati nella riga sopra e l'output è simile a:
TCP 127.0.0.1:47311 My_HOSTNAME:5939 ESTABLISHED
TCP 127.0.0.1:47358 My_HOSTNAME:2002 ESTABLISHED
TCP 127.0.0.1:47389 My_HOSTNAME:62522 ESTABLISHED
TCP 127.0.0.1:47441 My_HOSTNAME:19872 ESTABLISHED
TCP 127.0.0.1:62522 My_HOSTNAME:47389 ESTABLISHED
TCP 10.97.0.13:11523 SPICEWORKS:8080 ESTABLISHED
TCP 10.97.0.13:11537 SPICEWORKS:5556 ESTABLISHED
Vorrei poter restituire risultati simili a:
TCP 127.0.0.1:47441 My_HOSTNAME:19872 ESTABLISHED
[vpnagent.exe]
TCP 127.0.0.1:62522 My_HOSTNAME:47389 ESTABLISHED
Can not obtain ownership information
TCP 10.97.0.133:711523 SPICEWORKS:8080 ESTABLISHED
[vpnui.exe]
o in questo modo:
TCP 127.0.0.1:47441 My_HOSTNAME:19872 ESTABLISHED [vpnagent.exe]
TCP 127.0.0.1:62522 My_HOSTNAME:47389 ESTABLISHED Can not obtain ownership information
TCP 10.97.0.133:711523 SPICEWORKS:8080 ESTABLISHED [vpnui.exe]
Usando solo ciò che è contenuto in Windows, come posso ottenerlo?