Imports System
Imports System.Drawing
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Net.Sockets
Imports System.Net
Imports System.Threading
Namespace SaTaNaPoRTSCaNNeR
'/ <summary>
'/ Descrizione di riepilogo per Form1.
'/ </summary>
Public Class Form1
Inherits System.Windows.Forms.Form
Private i As Integer
Private t As Thread
Private ipz As System.Windows.Forms.TextBox
Private da As System.Windows.Forms.TextBox
Private label1 As System.Windows.Forms.Label
Private label2 As System.Windows.Forms.Label
Private WithEvents button1 As System.Windows.Forms.Button
Private WithEvents button2 As System.Windows.Forms.Button
Private WithEvents button3 As System.Windows.Forms.Button
Private WithEvents button4 As System.Windows.Forms.Button
Private pictureBox1 As System.Windows.Forms.PictureBox
Private d As System.Windows.Forms.TextBox
Private label3 As System.Windows.Forms.Label
Private a As System.Windows.Forms.TextBox
Private label4 As System.Windows.Forms.Label
Private label5 As System.Windows.Forms.Label
Private barra As System.Windows.Forms.ProgressBar
Private richTextBox1 As System.Windows.Forms.RichTextBox
Private s As System.Windows.Forms.TextBox
Private label6 As System.Windows.Forms.Label
'/ <summary>
'/ Variabile di progettazione necessaria.
'/ </summary>
Private components As System.ComponentModel.Container = Nothing
Public Sub New()
'
' Necessario per il supporto di Progettazione Windows Form
'
InitializeComponent()
End Sub 'New
'
' TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
'
'/ <summary>
'/ Pulire le risorse in uso.
'/ </summary>
Protected Overrides Sub Dispose(disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub 'Dispose
#Region "Codice generato da Progettazione Windows Form"
'/ <summary>
'/ Metodo necessario per il supporto della finestra di progettazione. Non modificare
'/ il contenuto del metodo con l'editor di codice.
'/ </summary>
Private Sub InitializeComponent()
Dim resources As New System.Resources.ResourceManager(GetType(Form1))
Me.ipz = New System.Windows.Forms.TextBox()
Me.da = New System.Windows.Forms.TextBox()
Me.label1 = New System.Windows.Forms.Label()
Me.label2 = New System.Windows.Forms.Label()
Me.button1 = New System.Windows.Forms.Button()
Me.button2 = New System.Windows.Forms.Button()
Me.button3 = New System.Windows.Forms.Button()
Me.button4 = New System.Windows.Forms.Button()
Me.pictureBox1 = New System.Windows.Forms.PictureBox()
Me.richTextBox1 = New System.Windows.Forms.RichTextBox()
Me.d = New System.Windows.Forms.TextBox()
Me.label3 = New System.Windows.Forms.Label()
Me.a = New System.Windows.Forms.TextBox()
Me.label4 = New System.Windows.Forms.Label()
Me.label5 = New System.Windows.Forms.Label()
Me.barra = New System.Windows.Forms.ProgressBar()
Me.s = New System.Windows.Forms.TextBox()
Me.label6 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
' ipz
'
Me.ipz.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.ipz.ForeColor = System.Drawing.Color.Black '
'ToDo: Error processing original source shown below
' this.ipz.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.ipz.ForeColor = System.Drawing.Color.Black;
'--------------------------------------------------------------------^--- Numeric constant overflow
Me.ipz.Location = New System.Drawing.Point(128, 8)
Me.ipz.Multiline = True
Me.ipz.Name = "ipz"
Me.ipz.Size = New System.Drawing.Size(472, 48)
Me.ipz.TabIndex = 0
Me.ipz.Text = ""
'
' da
'
Me.da.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.da.ForeColor = System.Drawing.Color.Black '
'ToDo: Error processing original source shown below
' this.da.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.da.ForeColor = System.Drawing.Color.Black;
'-------------------------------------------------------------------^--- Numeric constant overflow
Me.da.Location = New System.Drawing.Point(296, 72)
Me.da.Multiline = True
Me.da.Name = "da"
Me.da.Size = New System.Drawing.Size(120, 64)
Me.da.TabIndex = 1
Me.da.Text = "1"
'
' label1
'
Me.label1.Font = New System.Drawing.Font("Comic Sans MS", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.label1.ForeColor = System.Drawing.Color.Yellow
Me.label1.Location = New System.Drawing.Point(16, 0)
Me.label1.Name = "label1"
Me.label1.Size = New System.Drawing.Size(80, 56)
Me.label1.TabIndex = 2
Me.label1.Text = "IP"
'
' label2
'
Me.label2.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.label2.ForeColor = System.Drawing.Color.Yellow '
'ToDo: Error processing original source shown below
' this.label2.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.label2.ForeColor = System.Drawing.Color.Yellow;
'-----------------------------------------------------------------------^--- Numeric constant overflow
Me.label2.Location = New System.Drawing.Point(8, 80)
Me.label2.Name = "label2"
Me.label2.Size = New System.Drawing.Size(176, 56)
Me.label2.TabIndex = 3
Me.label2.Text = "PoRTa"
'
' button1
'
Me.button1.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.button1.ForeColor = System.Drawing.Color.Yellow '
'ToDo: Error processing original source shown below
' this.button1.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.button1.ForeColor = System.Drawing.Color.Yellow;
'------------------------------------------------------------------------^--- Numeric constant overflow
Me.button1.Location = New System.Drawing.Point(56, 424)
Me.button1.Name = "button1"
Me.button1.Size = New System.Drawing.Size(120, 48)
Me.button1.TabIndex = 4
Me.button1.Text = "VaI"
'
' button2
'
Me.button2.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.button2.ForeColor = System.Drawing.Color.Yellow '
'ToDo: Error processing original source shown below
' this.button2.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.button2.ForeColor = System.Drawing.Color.Yellow;
'------------------------------------------------------------------------^--- Numeric constant overflow
Me.button2.Location = New System.Drawing.Point(264, 424)
Me.button2.Name = "button2"
Me.button2.Size = New System.Drawing.Size(120, 48)
Me.button2.TabIndex = 5
Me.button2.Text = "SToP"
'
' button3
'
Me.button3.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.button3.ForeColor = System.Drawing.Color.Yellow '
'ToDo: Error processing original source shown below
' this.button3.Font = new System.Drawing.Font("Comic Sans MS", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.button3.ForeColor = System.Drawing.Color.Yellow;
'------------------------------------------------------------------------^--- Numeric constant overflow
Me.button3.Location = New System.Drawing.Point(16, 488)
Me.button3.Name = "button3"
Me.button3.Size = New System.Drawing.Size(312, 48)
Me.button3.TabIndex = 6
Me.button3.Text = "CaNCeLLa SKeRMo"
'
' button4
'
Me.button4.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.button4.ForeColor = System.Drawing.Color.Yellow '
'ToDo: Error processing original source shown below
' this.button4.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.button4.ForeColor = System.Drawing.Color.Yellow;
'------------------------------------------------------------------------^--- Numeric constant overflow
Me.button4.Location = New System.Drawing.Point(352, 488)
Me.button4.Name = "button4"
Me.button4.Size = New System.Drawing.Size(144, 48)
Me.button4.TabIndex = 7
Me.button4.Text = "ABouT"
'
' pictureBox1
'
Me.pictureBox1.BackColor = System.Drawing.Color.Transparent
Me.pictureBox1.Image = CType(resources.GetObject("pictureBox1.Image"), System.Drawing.Image)
Me.pictureBox1.Location = New System.Drawing.Point(704, 8)
Me.pictureBox1.Name = "pictureBox1"
Me.pictureBox1.Size = New System.Drawing.Size(136, 176)
Me.pictureBox1.TabIndex = 8
Me.pictureBox1.TabStop = False
'
' richTextBox1
'
Me.richTextBox1.Font = New System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.richTextBox1.ForeColor = System.Drawing.Color.Black
Me.richTextBox1.Location = New System.Drawing.Point(16, 208)
Me.richTextBox1.Name = "richTextBox1"
Me.richTextBox1.Size = New System.Drawing.Size(536, 200)
Me.richTextBox1.TabIndex = 9
Me.richTextBox1.Text = ""
'
' d
'
Me.d.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.d.ForeColor = System.Drawing.Color.Black '
'ToDo: Error processing original source shown below
' this.d.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.d.ForeColor = System.Drawing.Color.Black;
'------------------------------------------------------------------^--- Numeric constant overflow
Me.d.Location = New System.Drawing.Point(208, 144)
Me.d.Multiline = True
Me.d.Name = "d"
Me.d.Size = New System.Drawing.Size(344, 56)
Me.d.TabIndex = 10
Me.d.Text = "5"
'
' label3
'
Me.label3.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.label3.ForeColor = System.Drawing.Color.Yellow '
'ToDo: Error processing original source shown below
' this.label3.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.label3.ForeColor = System.Drawing.Color.Yellow;
'-----------------------------------------------------------------------^--- Numeric constant overflow
Me.label3.Location = New System.Drawing.Point(8, 144)
Me.label3.Name = "label3"
Me.label3.Size = New System.Drawing.Size(176, 56)
Me.label3.TabIndex = 11
Me.label3.Text = "DeLaY"
'
' a
'
Me.a.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.a.ForeColor = System.Drawing.Color.Black '
'ToDo: Error processing original source shown below
' this.a.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
' this.a.ForeColor = System.Drawing.Color.Black;
'------------------------------------------------------------------^--- Numeric constant overflow
'
'ToDo: Error processing original source shown below
' //
' this.ipz.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'-------------------------------------------------------------------^--- expression expected
'
'ToDo: Error processing original source shown below
' //
' this.da.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'------------------------------------------------------------------^--- expression expected
'
'ToDo: Error processing original source shown below
' //
' this.label2.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'----------------------------------------------------------------------^--- expression expected
'
'ToDo: Error processing original source shown below
' //
' this.button1.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'-----------------------------------------------------------------------^--- expression expected
'
'ToDo: Error processing original source shown below
' //
' this.button2.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'-----------------------------------------------------------------------^--- expression expected
'
'ToDo: Error processing original source shown below
' //
' this.button3.Font = new System.Drawing.Font("Comic Sans MS", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'-----------------------------------------------------------------------^--- expression expected
'
'ToDo: Error processing original source shown below
' //
' this.button4.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'-----------------------------------------------------------------------^--- expression expected
'
'ToDo: Error processing original source shown below
' //
' this.d.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'-----------------------------------------------------------------^--- expression expected
'
'ToDo: Error processing original source shown below
' //
' this.label3.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'----------------------------------------------------------------------^--- expression expected
'
'ToDo: Error processing original source shown below
' //
' this.a.Font = new System.Drawing.Font("Comic Sans MS", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
'-----------------------------------------------------------------^--- expression expected
Me.a.Location = New System.Drawing.Point(512, 72)
Me.a.Multiline = True
Me.a.Name = "a"
Me.a.Size = New System.Drawing.Size(168, 64)
Me.a.TabIndex = 12
Me.a.Text = "65536"
'
' label4
'
Me.label4.Font = New System.Drawing.Font("Comic Sans MS", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.label4.ForeColor = System.Drawing.Color.Yellow
Me.label4.Location = New System.Drawing.Point(208, 72)
Me.label4.Name = "label4"
Me.label4.Size = New System.Drawing.Size(80, 64)
Me.label4.TabIndex = 13
Me.label4.Text = "Da"
'
' label5
'
Me.label5.Font = New System.Drawing.Font("Comic Sans MS", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.label5.ForeColor = System.Drawing.Color.Yellow
Me.label5.Location = New System.Drawing.Point(424, 72)
Me.label5.Name = "label5"
Me.label5.Size = New System.Drawing.Size(80, 64)
Me.label5.TabIndex = 14
Me.label5.Text = "A"
'
' barra
'
Me.barra.Location = New System.Drawing.Point(16, 552)
Me.barra.Name = "barra"
Me.barra.Size = New System.Drawing.Size(536, 40)
Me.barra.TabIndex = 15
'
' s
'
Me.s.Font = New System.Drawing.Font("Comic Sans MS", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.s.ForeColor = System.Drawing.Color.Black
Me.s.Location = New System.Drawing.Point(568, 192)
Me.s.Multiline = True
Me.s.Name = "s"
Me.s.Size = New System.Drawing.Size(264, 216)
Me.s.TabIndex = 16
Me.s.Text = ""
'
' label6
'
Me.label6.Font = New System.Drawing.Font("Comic Sans MS", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
Me.label6.ForeColor = System.Drawing.Color.Yellow
Me.label6.Location = New System.Drawing.Point(568, 456)
Me.label6.Name = "label6"
Me.label6.Size = New System.Drawing.Size(264, 80)
Me.label6.TabIndex = 17
Me.label6.Text = "* H *"
'
' Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.Blue
Me.ClientSize = New System.Drawing.Size(842, 608)
Me.Controls.Add(label6)
Me.Controls.Add(s)
Me.Controls.Add(barra)
Me.Controls.Add(label5)
Me.Controls.Add(label4)
Me.Controls.Add(a)
Me.Controls.Add(label3)
Me.Controls.Add(d)
Me.Controls.Add(richTextBox1)
Me.Controls.Add(pictureBox1)
Me.Controls.Add(button4)
Me.Controls.Add(button3)
Me.Controls.Add(button2)
Me.Controls.Add(button1)
Me.Controls.Add(label2)
Me.Controls.Add(label1)
Me.Controls.Add(da)
Me.Controls.Add(ipz)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "Form1"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = ".. PRÑ€R. http://satanaoverride.altervista.org "
Me.ResumeLayout(False)
End Sub 'InitializeComponent
#End Region
'/ <summary>
'/ Il punto di ingresso principale dell'applicazione.
'/ </summary>
<STAThread()> _
Shared Sub Main()
Application.Run(New Form1())
End Sub 'Main
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load
End Sub 'Form1_Load
Private Sub button1_Click(sender As Object, e As System.EventArgs) Handles button1.Click
Dim ts As New ThreadStart(Me.ScannaPorte)
t = New Thread(ts)
t.Start()
End Sub 'button1_Click
Public Sub ScannaPorte()
barra.Value = 0
Dim da1 As Integer = Convert.ToInt32(da.Text)
Dim a1 As Integer = Convert.ToInt32(a.Text)
barra.Maximum = a1 - da1
For i = da1 To a1
barra.Value += 1
s.Text = "Porta controllata: " + i + ""
Dim host As IPHostEntry = Dns.Resolve(ipz.Text)
Dim ip As IPAddress
For Each ip In host.AddressList
Dim indirizzoeporta As New IPEndPoint(ip, i)
Dim socket As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
socket.BeginConnect(indirizzoeporta, New AsyncCallback(AddressOf ConnectCallback), socket)
Next ip
Next i 'int delay = Convert.ToInt32(d);
'Thread.Sleep(delay);
t.Abort()
End Sub 'ScannaPorte
Public Sub ConnectCallback(ar As IAsyncResult)
Try
Dim client As Socket = CType(ar.AsyncState, Socket)
client.EndConnect(ar)
Dim s As Char() = ":".ToCharArray()
Dim p As String() = client.RemoteEndPoint.ToString().Split(s)
Dim porta As Integer = Convert.ToInt32(p(1))
Dim descr As String = Me.Porta(porta)
richTextBox1.Text += "Porta " + porta + " aperta (" + descr + ")" + ControlChars.Lf
Catch e As Exception
End Try
End Sub 'ConnectCallback
Public Function Porta(porta As Integer) As String
Dim descrizioneporta As String = "Sconosciuta"
If porta = 1 Then
descrizioneporta = "Echo"
End If
If porta = 21 Then
descrizioneporta = "FTP"
End If
If porta = 23 Then
descrizioneporta = "Telnet"
End If
If porta = 25 Then
descrizioneporta = "Smtp"
End If
If porta = 79 Then
descrizioneporta = "Finger"
End If
If porta = 80 Then
descrizioneporta = "Http"
End If
If porta = 98 Then
descrizioneporta = "Linux Config"
End If
If porta = 110 Then
descrizioneporta = "POP3"
End If
If porta = 111 Then
descrizioneporta = "Sunrpc"
End If
If porta = 113 Then
descrizioneporta = "Trojan: Kazimas"
End If
If porta = 135 Then
descrizioneporta = "Dce Endpoint Resolution"
End If
If porta = 139 Then
descrizioneporta = "Netbios"
End If
If porta = 411 Then
descrizioneporta = "Dc server"
End If
If porta = 445 Then
descrizioneporta = "Microsoft Ds"
End If
If porta = 515 Then
descrizioneporta = "Printer"
End If
If porta = 1025 Then
descrizioneporta = "Network Black Jack"
End If
If porta = 1080 Then
descrizioneporta = "Socks"
End If
If porta = 1112 Then
descrizioneporta = "Msql"
End If
If porta = 1241 Then
descrizioneporta = "Messenger"
End If
If porta = 4899 Then
descrizioneporta = "Radmin"
End If
If porta = 5900 Then
descrizioneporta = "Vnc"
End If
Return descrizioneporta
End Function 'Porta
Private Sub button2_Click(sender As Object, e As System.EventArgs) Handles button2.Click
If t.IsAlive Then
t.Abort()
End If
End Sub 'button2_Click
Private Sub button3_Click(sender As Object, e As System.EventArgs) Handles button3.Click
ipz.Text = ""
da.Text = ""
a.Text = ""
d.Text = ""
richTextBox1.Text = ""
s.Text = ""
End Sub 'button3_Click
Private Sub button4_Click(sender As Object, e As System.EventArgs) Handles button4.Click
Dim f As New Form3()
f.ShowDialog()
End Sub 'button4_Click
End Class 'Form1
End Namespace 'SaTaNaPoRTSCaNNeR