⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmain.frm

📁 Ping,扫描,Whois IP
💻 FRM
📖 第 1 页 / 共 5 页
字号:
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   -74805
         TabIndex        =   39
         Top             =   683
         Width           =   1935
      End
      Begin VB.Label lblDataSend 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "Data to Send:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   -74820
         TabIndex        =   36
         Top             =   1275
         Width           =   1365
      End
      Begin VB.Label lblUserName 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "User Name:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   -74820
         TabIndex        =   35
         Top             =   1650
         Width           =   1455
      End
      Begin VB.Label lblPing 
         BackStyle       =   0  'Transparent
         Caption         =   "Remote IP:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   270
         Left            =   -74820
         TabIndex        =   34
         Top             =   555
         Width           =   1095
      End
      Begin VB.Label lblLag 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "Lag Time:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   -74820
         TabIndex        =   33
         Top             =   2385
         Width           =   1110
      End
      Begin VB.Label lblPort 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "Port Address:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   -74820
         TabIndex        =   32
         Top             =   2745
         Width           =   1440
      End
      Begin VB.Label lblSize 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "Packet Size:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   -74820
         TabIndex        =   31
         Top             =   3480
         Width           =   1320
      End
      Begin VB.Label lblServerStatus 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "Status:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   -74820
         TabIndex        =   30
         Top             =   2010
         Width           =   675
      End
      Begin VB.Label lblEcho 
         BackColor       =   &H00C0C0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "Echo:"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   -74820
         TabIndex        =   29
         Top             =   3105
         Width           =   645
      End
   End
   Begin MSComctlLib.StatusBar sbMain 
      Align           =   2  'Align Bottom
      Height          =   315
      Left            =   0
      TabIndex        =   37
      Top             =   4065
      Width           =   7890
      _ExtentX        =   13917
      _ExtentY        =   556
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   8731
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Menu mnuFile 
      Caption         =   "File"
      Begin VB.Menu mnuExit 
         Caption         =   "Exit"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'port scan variables
Dim NextPort As Double
Dim boolPortScan As Boolean
Dim strPortIP As String

'ip scan port
Dim IPBegScan As Integer
Dim IPEndScan As Integer
Dim strIPScan As String
Dim boolIPScan As Boolean

''''''''Winsock States''''''''''

'0 sckClosed
'1 sckOpen
'2 sckListening
'3 sckConnectionPending
'4 sckResolvingHost
'5 sckHostResolved
'6 sckConnecting
'7 sckConnected
'8 sckClosing
'9 sckError

''''''''''''''''''''''''''''''''''GENERAL FORM'''''''''''''''''''''''''''''''''''''''''
Private Sub Form_Load()

    Dim strFile As String                                       'used for input file for port listing
    CpuInfo                                                     'call cpu info
    sbMain.Panels(2).Text = Format(Date, "DD MMM YYYY")         'set status bar date
        
    Open App.Path & "\portlist.txt" For Input As #1             ' Open file for input.
    Do While Not EOF(1)                                         '** Loop until end of file.
        Input #1, strFile                                       '** Read data into two variables.
        lstPorts.AddItem (strFile)
    Loop
    Close #1                                                    'close connection

End Sub

Private Sub tmrPing_Timer()
    'timer controls movement between port/ip scans
    'looks to see what you are doing via what tab is visible
    If MainTab.Tab = 0 Then
        sbMain.Panels(1).Text = "IP Index: " & IPBegScan
        ScanIP
    Else
        sbMain.Panels(1).Text = "Current Port: " & NextPort
        PortScan
    End If
    
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Unload Me
    End
End Sub

Private Sub mnuExit_Click()
    Unload Me
    End
End Sub

Private Sub tcpPing_Close()
   tcpPing.Close
End Sub

Private Sub tcpPing_Connect()
        
    On Error GoTo errorTCP
    
                                                                            'based on tab perform certain procedures
    If MainTab.Tab = 0 Then
        rtxtIP.Text = rtxtIP.Text & ("IP OK:  " & tcpPing.RemoteHost _
                        & "   " & IPtoDNS(tcpPing.RemoteHost)) & vbCrLf
        ScanIP                                                              'call scanip sub
    ElseIf MainTab.Tab = 1 Then
        lstOpenPorts.AddItem "Port: " + Str(Me.tcpPing.RemotePort)
        PortScan                                                            'call portscan sub
    ElseIf MainTab.Tab = 3 Then
        TxtWhois = "Connected to " & txtInfoSource.Text & vbCrLf
    End If
    Exit Sub

errorTCP:
    If Err.Number <> 0 Then
        MsgBox "Error " & Err.Number & vbCrLf & Err.Description
        Resume Next
    End If

End Sub

Private Sub MainTab_Click(PreviousTab As Integer)
    
    If MainTab.Tab = 0 Then
        txtIp_IP(0).SetFocus
    ElseIf MainTab.Tab = 1 Then
        txtIP_Port(0).SetFocus
        cmdScan.Enabled = True
        cmdStop.Enabled = False
    ElseIf MainTab.Tab = 3 Then
        txtDomainName.SetFocus
    End If
    sbMain.Panels(1).Text = ""
            
End Sub

Private Sub tcpPing_DataArrival(ByVal bytesTotal As Long)
    
    On Error GoTo errorTCP
    
    Dim strMessage As String
    
    tcpPing.GetData strMessage
    If MainTab.Tab = 0 Then                                 'receive data then put it into corresponding textboxes
        rtxtIP.Text = rtxtIP.Text & ("Incoming : " & strMessage) & vbCrLf
        tcpPing.Close
    ElseIf MainTab.Tab = 1 Then
        lstOpenPorts.AddItem ("Incoming : " & strMessage)
        tcpPing.Close
    ElseIf MainTab.Tab = 3 Then
        TxtWhois.Text = TxtWhois.Text & strMessage
    End If
    Exit Sub
    
errorTCP:
    If Err.Number <> 0 Then
        MsgBox "Error " & Err.Number & vbCrLf & Err.Description
        tcpPing.Close
        Resume Next
    End If
    
End Sub

Private Sub tcpPing_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
    If MainTab.Tab = 0 Then                                 'on error with scanning ips or ports just move to the next one
        ScanIP
    ElseIf MainTab.Tab = 1 Then
        PortScan
    Else
        tcpPing.Close
    End If
End Sub

Private Sub tmrCurrent_Timer()
    sbMain.Panels(3).Text = Time
End Sub

''''''''''''''''''''''''''''''''''IP TAB'''''''''''''''''''''''''''''''''''''''''

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -