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

.NET 

Looking for a port scanner source[VB]

Hello guys

I'm looking for a port scanner source... I know, there are some sources on the internet but they are very basic, or lead to memory exhaustion (really). I'd like something advanced, maybe a Syn scanner, or something that won't lead to memory exhaustion after i scan from port 1 to 20000... Please note that I'm not the kind that writes a code from scratch, I like to understand the code, and improve it, and maybe include it in something bigger.

Thank you very much.
Here's one: http://www.codeproject.com/Articles/1725...rt-Scanner
Here's two: https://www.planet-source-code.com/vb/sc...&lngWId=10

BTW....that was after only 1 Google search and it was like magic or something LoL
(Mar 1, 2015 07:12 AM)nuk Wrote:  Here's one:
Here's two:

BTW....that was after only 1 Google search and it was like magic or something LoL

One - Timers, it might not work well, but I'll give it a try, maybe I'll replace the timers with a background worker.

Two - 2003... cool
(Mar 1, 2015 10:17 AM)IMAGINARY666 Wrote:  One - Timers, it might not work well, but I'll give it a try, maybe I'll replace the timers with a background worker.

Two - 2003... cool

You could download one of my old ones that I made a long time ago.

http://www.mediafire.com/download/aqtpak...+Keiko.rar

Educational purposes only.
(Mar 1, 2015 11:03 AM)Marwix Wrote:  You could download one of my old ones that I made a long time ago.

Educational purposes only.

Sorry but it doesn't work remotely... I can only scan 127.0.0.1

Btw i have this, and it does work remotely, but only for a certain port

Code
Dim logonServer As New TcpClient()

      Try
      logonServer.Connect(iptxt.Text, porttxt.Text)

      Catch generatedExceptionName As Exception
      label1.ForeColor = Color.Red
      label1.Text = "Offline!"

      End Try
      If logonServer.Connected Then

      label1.ForeColor = Color.LimeGreen
      label1.Text = "Online!"
      logonServer.Close()
                End If
I tried to make it work for a port range but i failed... :(
Can someone help me to make this work for a port range?
For a port range use a for-loop.
My quick code:

Code
For portIndex As Integer = 1 To 5 'You could use two numericupdown's here for start-port and end-port (For port As Integer = numericUpDownStartPort.Value To numericUpDownEndPort.Value
    Try
      logonServer.Connect(iptxt.Text, porttxt.Text)
      Messagebox.Show("Connection Successful on port: " & Convert.ToString(portIndex))
    Catch ex As Exception
      Messagebox.Show("Connection Failed on port: " & Convert.ToString(portIndex))
Next

However, change your validation, as a label would not work right, try to add the logs to richtextbox or something like that.
(Mar 1, 2015 04:17 PM)Punkbastard Wrote:  For a port range use a for-loop.
My quick code:

Code
For portIndex As Integer = 1 To 5 'You could use two numericupdown's here for start-port and end-port (For port As Integer = numericUpDownStartPort.Value To numericUpDownEndPort.Value
    Try
      logonServer.Connect(iptxt.Text, porttxt.Text)
      Messagebox.Show("Connection Successful on port: " & Convert.ToString(portIndex))
    Catch ex As Exception
      Messagebox.Show("Connection Failed on port: " & Convert.ToString(portIndex))
Next

However, change your validation, as a label would not work right, try to add the logs to richtextbox or something like that.

It does work but it's the slowest thing ever made. :\
(Mar 2, 2015 12:12 PM)IMAGINARY666 Wrote:  It does work but it's the slowest thing ever made. :\

That's because it takes time to connect. You could use multithreading to make it look more 'flawless' but I guess you won't get it much faster.
(Mar 2, 2015 12:17 PM)Punkbastard Wrote:  That's because it takes time to connect. You could use multithreading to make it look more 'flawless' but I guess you won't get it much faster.

I did use threading, lol, it's important, i dont want to kill my UI. But it is slow, not the slowest thing but meh, slow.
(Mar 2, 2015 12:45 PM)IMAGINARY666 Wrote:  I did use threading, lol, it's important, i dont want to kill my UI. But it is slow, not the slowest thing but meh, slow.

If you want something better, write it yourself. Beggars can't be choosers.
(Mar 2, 2015 12:51 PM)Odus Wrote:  If you want something better, write it yourself. Beggars can't be choosers.

I'm ok with it, i'll do some research to find out how this thing works.
(Mar 1, 2015 07:12 AM)nuk Wrote:  Here's one: http://www.codeproject.com/Articles/1725...rt-Scanner
Here's two: https://www.planet-source-code.com/vb/sc...&lngWId=10

BTW....that was after only 1 Google search and it was like magic or something LoL

omg are you a wizard or something? what is this magical place called Google?
OT: Seriously, resort to Google first. It prevents these silly posts on the forums and saves you a lot of time waiting for an answer.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by SkofosMay 1, 2020 10:49 AM 4 455 May 1, 2020 10:49 AM
Last Post: Skofos
[C#] by basisJun 1, 2018 05:59 AM 9 790 Jun 1, 2018 05:59 AM
Last Post: Dalvik
[C#] by -Mr MesmerJul 7, 2016 07:15 PM 2 108 Jul 7, 2016 07:15 PM
Last Post: -Mr Mesmer