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

📄 form1.frm

📁 WEB服务器漏洞扫描器
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmMain 
   BackColor       =   &H00C0C0C0&
   Caption         =   "Enigma 1.0 - Ready for action"
   ClientHeight    =   8115
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   11715
   BeginProperty Font 
      Name            =   "Terminal"
      Size            =   9
      Charset         =   255
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   8115
   ScaleWidth      =   11715
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00400000&
      BorderStyle     =   0  'None
      Height          =   615
      Left            =   0
      Picture         =   "Form1.frx":0442
      ScaleHeight     =   615
      ScaleWidth      =   4335
      TabIndex        =   3
      Top             =   0
      Width           =   4335
   End
   Begin VB.TextBox txtcmd 
      BackColor       =   &H00404040&
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   270
      Left            =   0
      TabIndex        =   2
      Text            =   "Type commands here."
      Top             =   6720
      Width           =   9735
   End
   Begin MSComDlg.CommonDialog cd1 
      Left            =   0
      Top             =   7080
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin RichTextLib.RichTextBox txtServerInfo 
      Height          =   5895
      Left            =   0
      TabIndex        =   1
      Top             =   680
      Width           =   9735
      _ExtentX        =   17171
      _ExtentY        =   10398
      _Version        =   393217
      BackColor       =   14737632
      BorderStyle     =   0
      ReadOnly        =   -1  'True
      ScrollBars      =   3
      RightMargin     =   1.00000e5
      TextRTF         =   $"Form1.frx":11E7
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Verdana"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   600
      Top             =   6960
   End
   Begin InetCtlsObjects.Inet Inet1 
      Left            =   6120
      Top             =   3840
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
   End
   Begin VB.Shape Shape2 
      BackColor       =   &H00808080&
      BackStyle       =   1  'Opaque
      Height          =   75
      Left            =   0
      Top             =   600
      Width           =   9735
   End
   Begin VB.Shape Shape1 
      BackColor       =   &H00400000&
      BackStyle       =   1  'Opaque
      Height          =   615
      Left            =   0
      Top             =   0
      Width           =   9735
   End
   Begin VB.Label lblTimer 
      Caption         =   "0"
      Height          =   255
      Left            =   7440
      TabIndex        =   0
      Top             =   4800
      Width           =   855
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'********************************
'*   Enigma 1 - Written by: Tom Bishop
'*   This program uses the inet controll to scan a specified server
'*   of know exploits through URL's. There are quit a few here now and
'*   I will be adding more. If you have any questions or comments please
'*   send them to n9productions@hotmail.com
'*   Thank You
'*********************************

Private Sub Form_Load()
On Error GoTo Err: 'if an error occurs then goto error trapper
Dim varTimeout, varProxy
varTimeout = GetValue("Config", "Timeout", App.Path & "/iis.ini")
varProxy = GetValue("Config", "Proxy", App.Path & "/iis.ini")

txtServerInfo.LoadFile App.Path & "\loadstart.ies", rtfText 'load welcome message into richtextbox

If varProxy = "" Then
txtServerInfo.Text = txtServerInfo.Text + vbCrLf & vbCrLf & "   No Proxy set!"
Else
Inet1.Proxy = varProxy
txtServerInfo.Text = txtServerInfo.Text + vbCrLf & vbCrLf & "   Proxy set to: " & Inet1.Proxy
End If

If varTimeout = "" Then
Inet1.RequestTimeout = "120"
txtServerInfo.Text = txtServerInfo.Text + vbCrLf & vbCrLf & "   Timeout set to: " & Inet1.RequestTimeout & " seconds."
Else
Inet1.RequestTimeout = varTimeout
txtServerInfo.Text = txtServerInfo.Text + vbCrLf & vbCrLf & "   Timeout set to: " & Inet1.RequestTimeout & " seconds."
End If

Exit Sub 'end sub so program dosn't execute error trapper
Err: 'initiate error trapper
'txtServerInfo.Text = "Unable to load loadstart.ies! Please make sure this file is in same directory as the program file." 'alert the user that I can't find the welcome file

Exit Sub 'exit the error trapper
End Sub

Private Sub Form_Resize()
On Error Resume Next 'if an error occurs then ignore it
Shape1.Width = frmMain.Width - 100 'all the following just keeps everything in it's place when you resize the form.
Shape2.Width = frmMain.Width - 100
txtServerInfo.Height = frmMain.Height - 1400
txtcmd.Top = frmMain.Height - 700
txtServerInfo.Width = frmMain.Width - 100
txtcmd.Width = frmMain.Width - 100
End Sub

Private Sub Form_Unload(Cancel As Integer)
Call PutValue("Config", "Timeout", Inet1.RequestTimeout, App.Path & "/iis.ini")
Call PutValue("Config", "Proxy", Inet1.Proxy, App.Path & "/iis.ini")
End Sub

Private Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
    Case icError
'        txtServerInfo.Text = txtServerInfo.Text + vbCrLf & vbCrLf & "Unable to find host " & txtcmd & vbCrLf & vbCrLf
'    Case icResponseCompleted
'        txtServerInfo.Text = txtServerInfo.Text + "Connected!" & vbCrLf
'    Case icNone
'        txtServerInfo.Text = txtServerInfo.Text + "No State" & vbCrLf
'    Case icResolvingHost
'       txtServerInfo.Text = txtServerInfo.Text + "Resolving host..." & vbCrLf
'    Case icHostResolved
'        txtServerInfo.Text = txtServerInfo.Text + "Host resolved - found its IP address" & vbCrLf
'    Case icConnecting
'        txtServerInfo.Text = txtServerInfo.Text + "Connecting..." & vbCrLf
'    Case icConnected
'        txtServerInfo.Text = txtServerInfo.Text + "Connected!" & vbCrLf
'    Case icRequesting
'       txtServerInfo.Text = txtServerInfo.Text + "Sending request..." & vbCrLf
'    Case icRequestSent
'      txtServerInfo.Text = txtServerInfo.Text + "Request sent" & vbCrLf
'    Case icReceivingResponse
 '      txtServerInfo.Text = txtServerInfo.Text + "Receiving data..." & vbCrLf
''    Case icResponseReceived
 '      txtServerInfo.Text = txtServerInfo.Text + "Response received" & vbCrLf
 '   Case icDisconnecting
 '      txtServerInfo.Text = txtServerInfo.Text + "Disconnecting..." & vbCrLf
 '   Case icDisconnected
      txtServerInfo.Text = txtServerInfo.Text + vbCrLf & vbCrLf & "Disconnected from host." & vbCrLf
    End Select
End Sub

Private Sub Timer1_Timer()
lblTimer = lblTimer + 1 'this is counter. I enable the timer when I start a scan and disable it when I stop a scan and whatever is in the label is how many secods it took. I also set the time's interval to 1000. The timer is measured in milliseconds so 1000 is one second.
End Sub

Private Sub txtcmd_KeyPress(KeyAscii As Integer)

If KeyAscii = "013" Then '013 = the enter key. So when the user presses the enter key execute the following code.


Dim t1, t2 'declare variables for parsing command

t1 = txtcmd.Text 'put command into variable
t2 = Split(t1, " ") 'parse out information o both side of the space and put it into an array


If t2(0) = "exit" Then 'txtcmd is where the user types the commands. When they hit enter and the textbox = exit then cancel everything and exit the program
On Error Resume Next
Inet1.URL = ""
Inet1.Cancel
Unload Me

ElseIf t2(0) = "config" Then
On Error Resume Next
txtServerInfo.Text = "IIS Configuration:" & vbCrLf & "Proxy: " & Inet1.Proxy & vbCrLf & "Timeout: " & Inet1.RequestTimeout



ElseIf t2(0) = "proxy" Then
On Error Resume Next
Inet1.Proxy = t2(1)
txtServerInfo.Text = txtServerInfo.Text & vbCrLf & vbCrLf & "Proxy set to: " & Inet1.Proxy
txtcmd.Text = ""


ElseIf t2(0) = "timeout" Then
On Error Resume Next
Inet1.RequestTimeout = t2(1)
txtServerInfo.Text = txtServerInfo.Text & vbCrLf & vbCrLf & "Timeout set to: " & Inet1.RequestTimeout & " seconds."
txtcmd.Text = ""



'ElseIf t2(0) = "save" Then
'On Error Resume Next
'Dim filename
'filename = t2(1)

'Call SaveTextFile(filename, txtServerInfo.Text)

 ElseIf t2(0) = "scan" Then
 
 ' now, if the textbox dosn't equal any of the above then they must be trying to type in a URL.
 ' this is all the good stuff. This is where the program does all the scanning.
 
Dim varURL As String

varURL = t2(1)

On Error GoTo Err:

Timer1.Enabled = True
txtServerInfo.Text = ""
txtServerInfo.Text = "Please Wait..."
Dim h, h2
Inet1.Cancel
Inet1.URL = ""
Inet1.OpenURL "http://" & varURL, 1
h = Inet1.GetHeader("server")
txtServerInfo.Text = "Server is running " & h
txtServerInfo.Text = txtServerInfo.Text + vbCrLf & vbCrLf & "Scanning [" & t2(1) & "]" & vbCrLf & vbCrLf

' check cgi-bin

h = ""
Inet1.URL = ""
Inet1.OpenURL t2(1) & "/cgi-bin", 1
h = Inet1.GetHeader
h2 = Split(h, vbCrLf) 'all this does is parse the header and put each line into an array. All I need is the first line which is the HTTP/1.1 200 OK, etc.

txtServerInfo.Text = txtServerInfo.Text + h2(0) & ":  " & Inet1.URL & vbCrLf & vbCrLf

' check formmail

'h = ""
'h2 = ""
'Inet1.URL = ""
'Inet1.OpenURL t2(1) & "/cgi-bin/formmail.cgi", 1
'h = Inet1.GetHeader
'h2 = Split(h, vbCrLf)
'txtServerInfo.Text = txtServerInfo.Text + h2(0) & ":  " & Inet1.URL & vbCrLf & vbCrLf

' check server-status

'h = ""
'h2 = ""
'Inet1.URL = ""
'Inet1.OpenURL t2(1) & "/server-status", 1
'h = Inet1.GetHeader
'h2 = Split(h, vbCrLf)

'txtServerInfo.Text = txtServerInfo.Text + h2(0) & ":  " & Inet1.URL & vbCrLf & vbCrLf

' check server-info

'h = ""
'h2 = ""

⌨️ 快捷键说明

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