Just starting out? Need help? Post your questions and find answers here.
Wolf
Enthusiast
Posts: 234 Joined: Sat Apr 03, 2004 12:00 pm
Location: S.T
Post
by Wolf » Sat Apr 03, 2004 12:43 pm
Hi i am beginner and this is my first post
I want make a port monitor software.( Security soft )
How can i detect one program are access to port and if user want can stop access that program to port?
Very thanks
thefool
Always Here
Posts: 5875 Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark
Post
by thefool » Sat Apr 03, 2004 1:50 pm
sounds like an advanced task for a beginner.
Have you used pb before?
Wolf
Enthusiast
Posts: 234 Joined: Sat Apr 03, 2004 12:00 pm
Location: S.T
Post
by Wolf » Sat Apr 03, 2004 11:43 pm
No full thefool.
I want just know about it .
If exist source code it's big help for me or if not exist, one help for how make this soft.
Thanks.
thefool
Always Here
Posts: 5875 Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark
Post
by thefool » Sat Apr 03, 2004 11:51 pm
hmm. i only know how to see if a port is open.
Wolf
Enthusiast
Posts: 234 Joined: Sat Apr 03, 2004 12:00 pm
Location: S.T
Post
by Wolf » Sun Apr 04, 2004 1:52 pm
thefool wrote: hmm. i only know how to see if a port is open.
It's good for start please tell me.
You or somebody know how close one port or detect what program is access to one port?
Thanks.
thefool
Always Here
Posts: 5875 Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark
Post
by thefool » Sun Apr 04, 2004 4:13 pm
try to connect to it.
i would ping it and see result.
I dont really 100% know, but try:
InitNetwork()
conid= OpenNetworkConnection("host", 85);host,port
If conid ~ NULL
MessageRequester("","port open")
EndIf
Andre
PureBasic Team
Posts: 2139 Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:
Post
by Andre » Sun Apr 04, 2004 8:26 pm
@Wolf: Welcome at the forum and here a hint for a "PB Newbie":
www.PureArea.net contains are large collection of PB sources in the CodeArchive....
Wolf
Enthusiast
Posts: 234 Joined: Sat Apr 03, 2004 12:00 pm
Location: S.T
Post
by Wolf » Mon Apr 05, 2004 1:48 am
Thank you thefool.
Thanks Andre its great.
BongMong
User
Posts: 31 Joined: Sat Jan 03, 2004 6:50 pm
Post
by BongMong » Mon Apr 05, 2004 9:35 am
Code: Select all
Result = initnetwork()
if Result = 0
Messagerequester("Error","No Connection Found",0)
Endif
;---Strings
Ip$ = "127.0.0.1"
;---Loop
For A=1 To 65536 ;Ports
B = Opennetworkconnection(Ip$,A) ;Scanning
if B ;If port open
Messagerequester("Scanning","Port open: "+Str(A),0)
endif
next
1300 @ 1450mhz, DDR400, MX440, XP pro / 2000Pro
Wolf
Enthusiast
Posts: 234 Joined: Sat Apr 03, 2004 12:00 pm
Location: S.T
Post
by Wolf » Tue Apr 06, 2004 1:16 am
Very thanks BongMong.
Your source is big help.
PWS32
User
Posts: 85 Joined: Sat May 10, 2003 1:02 pm
Location: Germany
Post
by PWS32 » Wed Apr 07, 2004 1:06 pm
Hi BongMong,
nice code !, its are little bit slow, please speed up the tests
Best regards,
Peter