AutoIt Forums: Network Connections Viewer - AutoIt Forums

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Network Connections Viewer Rate Topic: ***** 4 Votes

#1 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 08 November 2009 - 12:38 AM

There are situation when you know something is going off from or to your computer and you have no idea what that is or who's doing that. On the other hand, sometimes you are just curious to know (I know I am) what's cooking.

Scrip below is analyzing every connection that your machine have. Either TCP or UDP. It'll give you port numbers, IP addresses, names of the processes issuing connections, their PIDs, locations on HD, user names, connection statuses, and hints on protocols for used ports (so that you know roughly what that connection is or could be).

Script:
Attached File  ConnView.au3 (37.33K)
Number of downloads: 398

edit: new script

This post has been edited by trancexx: 09 November 2009 - 01:31 PM

1

#2 User is offline   Beege 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 132
  • Joined: 18-November 05
  • Location:Indiana

Posted 08 November 2009 - 02:43 AM

Nice Script. Like it a lot. 5 Stars! :party:
0

#3 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 08 November 2009 - 09:14 AM

I like it you like it. Thanks.
1

#4 User is offline   Avian 

  • Newbie
  • Group: Full Members
  • Posts: 8
  • Joined: 28-October 08
  • Location:Piedmont Triad, NC, US

Posted 08 November 2009 - 03:10 PM

View Posttrancexx, on 08 November 2009 - 01:38 AM, said:

There are situation when you know something is going off from or to your computer and you have no idea what that is or who's doing that. On the other hand, sometimes you are just curious to know (I know I am) what's cooking.

Scrip below is analyzing every connection that your machine have. Either TCP or UDP. It'll give you port numbers, IP addresses, names of the processes issuing connections, their PIDs, connection statuses, and hints on protocols for used ports (so that you know roughly what that connection is or could be).

Script:
Attachment ConnView.au3


Many thanks!! I've always wondered what was going on when the drive activity light was on and I wasn't doing anything. I always wondered if there was something connecting to my PC without my knowledge!

Avian
0

#5 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 09 November 2009 - 01:47 PM

The library has been updated.
I'm kidding :lmao:

New script attached.
More informations available for endpoints. 'Elevated Mode' button is now showing its purpose when needed.

With this script I've assimilated a couple of functions written by Manko and wraithdu. They are rewritten to look the way I like it. I fixed Manko's (there were a bug with trying to access unavailable space causing a random crash).

So, what was the joke in the intro? I bet you don't know :P
0

#6 User is offline   UEZ 

  • Never say never
  • PipPipPipPip
  • Group: Full Members
  • Posts: 531
  • Joined: 03-December 07
  • Gender:Male
  • Location:Germany

Posted 09 November 2009 - 02:09 PM

Very nice code demonstration again! :graduated:

Btw, you can use netstat -na to get these information from cmd but from your tool it is much more comfortable and it has more infomation.

UEZ

*****

This post has been edited by UEZ: 09 November 2009 - 03:15 PM

0

#7 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 09 November 2009 - 02:31 PM

Thanks UEZ.
And a joke?


Btw, netstat.exe is, among others, using functions InternalGetTcpTableWithOwnerModule and InternalGetUdpTableWithOwnerModule but I couldn't find any documentation for those two even though they sound smart.
Never mind, going around sometimes is not that bad.
0

#8 User is offline   UEZ 

  • Never say never
  • PipPipPipPip
  • Group: Full Members
  • Posts: 531
  • Joined: 03-December 07
  • Gender:Male
  • Location:Germany

Posted 09 November 2009 - 03:15 PM

View Posttrancexx, on 09 November 2009 - 02:31 PM, said:

...
And a joke?
...


A Joke?

UEZ
0

#9 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 09 November 2009 - 03:20 PM

View PostUEZ, on 09 November 2009 - 03:15 PM, said:

A Joke?

UEZ

Well yeah, from the post above :muttley:

Ahh, you didn't get it.
0

#10 User is offline   UEZ 

  • Never say never
  • PipPipPipPip
  • Group: Full Members
  • Posts: 531
  • Joined: 03-December 07
  • Gender:Male
  • Location:Germany

Posted 09 November 2009 - 03:29 PM

I'm 37 and very often I need a lot of time to understand... :idiot:


UEZ :lol:
0

#11 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 09 November 2009 - 04:49 PM

View PostUEZ, on 09 November 2009 - 03:29 PM, said:

I'm 37 and very often I need a lot of time to understand... :idiot:


UEZ :lol:

I'm not 37 and very often I need a lot of time to understand too... but don't tell anyone :shhh: it's a sort of a secret
0

#12 User is online   mrmacadamia 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 73
  • Joined: 12-May 09
  • Gender:Male

Posted 10 November 2009 - 09:06 AM

I'm not very understand about tcp and udp stuff.
But i think i like it :graduated:
0

#13 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 11 November 2009 - 01:31 AM

View Postmrmacadamia, on 10 November 2009 - 09:06 AM, said:

I'm not very understand about tcp and udp stuff.
But i think i like it :graduated:

Very resolutive :mellow:

I just saw that I dropped two 'DllOpen' and one tiny other thing. It makes almost no difference but still, flaw is a flaw.
0

#14 User is offline   MirnesC2 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 43
  • Joined: 21-September 09

Posted 15 November 2009 - 04:06 AM

Ran it, nothing happened. Windows 7 x64, just a heads up.
0

#15 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 15 November 2009 - 11:34 AM

View PostMirnesC2, on 15 November 2009 - 04:06 AM, said:

Ran it, nothing happened. Windows 7 x64, just a heads up.

And what's the exit code? Version of AutoIt?
0

#16 User is offline   UEZ 

  • Never say never
  • PipPipPipPip
  • Group: Full Members
  • Posts: 531
  • Joined: 03-December 07
  • Gender:Male
  • Location:Germany

Posted 15 November 2009 - 12:31 PM

View PostMirnesC2, on 15 November 2009 - 04:06 AM, said:

Ran it, nothing happened. Windows 7 x64, just a heads up.


How did you run it? With F5 in SciTE or double click?

If yes, then indeed it is crashing in x64 mode! I got error code: AutoIT3.exe ended.rc:-1073741819

I got German version and this is the crash info:

Problemsignatur:
Problemereignisname: APPCRASH
Anwendungsname: AutoIt3_x64.exe
Anwendungsversion: 3.3.0.0
Anwendungszeitstempel: 4951fa01
Fehlermodulname: AutoIt3_x64.exe
Fehlermodulversion: 3.3.0.0
Fehlermodulzeitstempel: 4951fa01
Ausnahmecode: c0000005
Ausnahmeoffset: 0000000000018660
Betriebsystemversion: 6.1.7600.2.0.0.256.1
Gebietsschema-ID: 1031
Zusatzinformation 1: d9e9
Zusatzinformation 2: d9e98e26e5862e4b8c1835bc653abe12
Zusatzinformation 3: 1735
Zusatzinformation 4: 1735faf7dba7c27eea43b7a3330f19b3


But if you compile it and start it afterwards it is working because it will started as x32 not x64 native version!

UEZ

This post has been edited by UEZ: 15 November 2009 - 12:31 PM

0

#17 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 15 November 2009 - 12:50 PM

That's 'Access Violation'.
Interesting. Could you or someone with x64 windows try to determine what function is causing the error?
0

#18 User is offline   UEZ 

  • Never say never
  • PipPipPipPip
  • Group: Full Members
  • Posts: 531
  • Joined: 03-December 07
  • Gender:Male
  • Location:Germany

Posted 15 November 2009 - 01:01 PM

Probably function Func _ProcessList() is causing "access violation" in for next loop

[ autoIt ]    ( Popup )
    For $i = 1 To $aCall[5]         $tWTS_PROCESS_INFO = DllStructCreate("dword SessionId;" & _                 "dword ProcessId;" & _                 "ptr ProcessName;" & _                 "ptr UserSid", _                 $aCall[4] + ($i - 1) * 16) ; looping thru structures         $pString = DllStructGetData($tWTS_PROCESS_INFO, "ProcessName")         $iStringLen = _PtrStringLenW($pString)         $aOut[$i][0] = DllStructGetData(DllStructCreate("wchar[" & $iStringLen + 1 & "]", $pString), 1)         $aOut[$i][1] = DllStructGetData($tWTS_PROCESS_INFO, "ProcessId")         $aOut[$i][2] = _AccountName(DllStructGetData($tWTS_PROCESS_INFO, "UserSid"))     Next  


Maybe other functions are also not working but this is the 1st one!

UEZ

This post has been edited by UEZ: 15 November 2009 - 08:02 PM

0

#19 User is offline   trancexx 

  • somewhere beyond the moon
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,567
  • Joined: 18-March 08
  • Gender:Not Telling
  • Location:Split, HR

Posted 15 November 2009 - 04:31 PM

Well, can you fix it? I'm 32-bit only.


edit:
I just spotted a strange bug(?) with AutoIt when 'thinking' what you wrote. Will report it to get an explanation on the behavior.

This post has been edited by trancexx: 15 November 2009 - 04:35 PM

0

#20 User is offline   UEZ 

  • Never say never
  • PipPipPipPip
  • Group: Full Members
  • Posts: 531
  • Joined: 03-December 07
  • Gender:Male
  • Location:Germany

Posted 15 November 2009 - 04:35 PM

If you can put your brain in my head, I will do it! I'm a noob in this kind of stuff!

But I will try it anyway. Don't expect a successfull result...

UEZ
0

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users