portscan

  • Thread starter Milosz - [playseven.com]
  • Start date
M

Milosz - [playseven.com]

what is the best way to perform a portscan in CF.
To use TCPClient is very slow because of the TimeOUT property.
I know the possibility to make my own timer and start the Connect in a
different thread, but perhaps there is a better way ?
and how to make a stealth scan ?

regards

Milosz

--
-> Milosz Weckowski
www.playseven.com

mailto:[email protected]
ICQ Number: 84867613

Get the enhanced Progressbar and a fine Colorpicker for the Compact Framwork
for free:
http://www.playseven.com/11620/p7_Controls.html
 
N

Neil Cowburn [MVP]

You could always use low-level sockets rather relying on TCPClient. That
way, you can specify your own timeout.

--Neil

--
Neil Cowburn, MVP
Co-founder, OpenNETCF.org
Technologist, Content Master Ltd
Microsoft .NET Compact Framework MVP

www.opennetcf.org | www.contentmaster.com
 
M

Milosz - [playseven.com]

Neil, do you mean via
System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork,
System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp)

but how specify the timeout ?

or didn't you mean this ...
do you have a hint more ?

THX

Milosz
 
N

Neil Cowburn [MVP]

Yes, I do mean like that.

You can set the send and receive timeouts using SetSocketOption and
instead of trying to do a Connect then Send, try just using the SendTo
method.

--Neil

--
Neil Cowburn, MVP
Co-founder, OpenNETCF.org
Technologist, Content Master Ltd
Microsoft .NET Compact Framework MVP

www.opennetcf.org | www.contentmaster.com
 
H

Hans J. Ude

Milosz - said:
what is the best way to perform a portscan in CF.
To use TCPClient is very slow because of the TimeOUT property.
I know the possibility to make my own timer and start the Connect in a
different thread, but perhaps there is a better way ?
and how to make a stealth scan ?

There is a full featured postscanner for the Linux OS called NMAP. It
has been ported to windows. Why not try to create a new NMAPCE?
Sources for NMAPWIN are available at
http://sourceforge.net/projects/nmapwin

Hans
 
M

Milosz - [playseven.com]

Hello Neil,

Thx for your hint. Now I try:
Dim EP As New System.Net.IPEndPoint(mIP, mPort)

Dim S As Socket = New Socket(EP.AddressFamily, SocketType.Dgram,
ProtocolType.Udp)

S.SetSocketOption(Sockets.SocketOptionLevel.Socket,
Sockets.SocketOptionName.SendTimeout, Me.mTimeOUT)

.......

but it crashes with Exception:

"An unknown, invalid, or unsupported option or level was specified in a
getsockopt or setsockopt call"

it seems it does not matter what value is me.mTimeout. i tried 100 and 1000.
I tried also ReceiveTimeOut and with a TCP Socket but it always crashes.

the method is running in an own thread

Somebody knows help ?

THX Milosz
 
M

Milosz - [playseven.com]

It is written in C++,
my issue is to do it with CF

but nice idea
regards

Milosz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top