-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.frm
416 lines (393 loc) · 12.1 KB
/
Form1.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
VERSION 5.00
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
Begin VB.Form Form1
BackColor = &H00000000&
Caption = "Get Header v1.0 (Don Steele)"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 5790
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 5790
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer4
Interval = 30
Left = 120
Top = 2250
End
Begin VB.Timer Timer3
Enabled = 0 'False
Interval = 40
Left = 120
Top = 2760
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 10
Left = 120
Top = 2760
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 2000
Left = 5280
Top = 2280
End
Begin VB.TextBox Text2
BackColor = &H00400000&
BeginProperty Font
Name = "OCR A Extended"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00F3525A&
Height = 285
Left = 360
TabIndex = 1
Text = "Url goes here"
Top = 2280
Width = 4695
End
Begin VB.TextBox Text1
BackColor = &H00400000&
BeginProperty Font
Name = "OCR A Extended"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00F3525A&
Height = 1815
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 240
Width = 5415
End
Begin InetCtlsObjects.Inet Inet1
Left = 5280
Top = 2640
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
AccessType = 1
URL = "http://"
RequestTimeout = 6000
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
ForeColor = &H0000FF00&
Height = 195
Left = 1140
TabIndex = 8
Top = 30
Width = 3105
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "don4jc@saintmail.net"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 3240
MouseIcon = "Form1.frx":0000
MousePointer = 99 'Custom
TabIndex = 7
Top = 480
Width = 1695
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "http://www.starsplace.net/teck"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 360
MouseIcon = "Form1.frx":030A
MousePointer = 99 'Custom
TabIndex = 6
Top = 480
Width = 2295
End
Begin VB.Label Label4
BackColor = &H00000080&
Caption = " OK"
BeginProperty Font
Name = "OCR A Extended"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H008080FF&
Height = 255
Left = 2160
TabIndex = 5
Top = 2760
Visible = 0 'False
Width = 1335
End
Begin VB.Label Label3
BackColor = &H00400000&
Caption = " About"
BeginProperty Font
Name = "OCR A Extended"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00F3525A&
Height = 255
Left = 3720
TabIndex = 4
Top = 2760
Width = 1335
End
Begin VB.Label Label2
BackColor = &H00400000&
Caption = " Stop"
BeginProperty Font
Name = "OCR A Extended"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00F3525A&
Height = 255
Left = 2160
TabIndex = 3
Top = 2760
Width = 1335
End
Begin VB.Label Label1
BackColor = &H00400000&
Caption = " Get It"
BeginProperty Font
Name = "OCR A Extended"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00F3525A&
Height = 255
Left = 600
TabIndex = 2
Top = 2760
Width = 1335
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************************************
'* Get header V1.0 By Donald Steele *
'* *
'* ever want to know what server software *
'* a website is running? well here is your answer *
'* just type in a url and like magic you will *
'* receive the http header information that reveals *
'* all kinds of useful info like the os and server software *
'* being used *
'* *
'* send any comments to don4jc@saintmail.net :) *
'* *
'**************************************************************
'* GET A REAL OS GET LINUX WWW.LINUX.COM *
'**************************************************************
Dim running
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Enum T_WindowStyle
Maximized = 3
Normal = 1
ShowOnly = 5
End Enum
Dim crispy
Dim critter
Private Sub Form_Load()
crispy = 0
critter = 0
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
'ok lets check to see if were connected to the site
Select Case State
Case 3
'whoo hoo we are connected now lets turn on the timer to grab the data
Timer1.Enabled = True
End Select
End Sub
'ever get sick of buttons?
Private Sub Label1_Click()
On Error GoTo e
Timer1.Enabled = False
'close any open connections so we don't error out
Inet1.Cancel
'check for a return so we don't have to click the button every time
'it can be annoying after your 20th site
Text1.Text = ""
Label7.Caption = "Connecting...."
'clear the buggy inet control so it will be ready for a new site
Inet1.URL = ""
Inet1.Cancel
'open the url so we can get the nuggets of information we need
Inet1.OpenURL Text2.Text, 1
Text2.Enabled = False
GoTo last:
e:
Text1.Text = "there was an error please try your query again"
last:
End Sub
Private Sub Label2_Click()
'kill the timer so we won't try and proccess any data
Timer1.Enabled = False
'kill the active connection
Inet1.Cancel
'reset the control
Inet1.URL = ""
Text2.Enabled = True
Label7.Caption = ""
End Sub
Private Sub Label3_Click()
Timer2.Enabled = True
End Sub
Private Sub Label4_Click()
Text1.Top = 240
Text2.Left = 360
Text1.ForeColor = &HF3525A
Text1.BackColor = &H400000
Label4.Visible = False
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Text1.Text = ""
End Sub
Private Sub Label5_Click()
OpenInternet Me, "http://www.starsplace.net/teck", Normal
End Sub
Private Sub Label6_Click()
OpenInternet Me, "mailto:don4jc@saintmail.net", Normal
End Sub
Private Sub Text2_KeyUp(keycode As Integer, Shift As Integer)
'close any open connections so we don't error out
Inet1.Cancel
'check for a return so we don't have to click the button every time
'it can be annoying after your 20th site
If keycode = "13" Then
Text1.Text = ""
Label7.Caption = "Connecting...."
'clear the buggy inet control so it will be ready for a new site
Inet1.URL = ""
'open the url so we can get the nuggets of information we need
On Error Resume Next
Text2.Enabled = False
Inet1.OpenURL Text2.Text, 1
End If
End Sub
Private Sub Timer1_Timer()
DoEvents
On Error GoTo e
Dim h
'lets make sure we still don't have an open connection
'if we do the inet control will freek out and just continue to get the site
'for about 15 min (very very bad)
If Inet1.StillExecuting = False Then
'ok were all set lets read teh header information into a var.
h = Inet1.GetHeader
'let's make sure we didn't get a blank field
If Not h = "" Then
'dump what we got to a text box
Text1.Text = Text1.Text & h
'kill the timer so we don't have a loop going on here
Timer1.Enabled = False
Label7.Caption = ""
'set the input box for our next site
Text2.Enabled = True
'this is added to force the inet control to reset for some reason it would not reset
'correctly ????
Inet1.Cancel
GoTo last
End If
End If
GoTo last
e:
Text1.Text = "there was an error please submit your query again"
last:
End Sub
'that's all people
Private Sub Timer2_Timer()
critter = 0
crispy = crispy + 1
Select Case crispy
Case 20
Timer3.Enabled = True
Timer2.Enabled = False
crispy = 0
End Select
DoEvents
End Sub
Private Sub Timer3_Timer()
If Not Text2.Left < -5000 Then
Text2.Left = Text2.Left - 500
Else
If Not Text1.Top > 840 Then
Text1.Top = Text1.Top + 50
Else: critter = critter + 1
End If
End If
If critter = 1 Then Label1.Visible = False
If critter = 2 Then Label2.Visible = False
If critter = 3 Then Label3.Visible = False
If critter = 4 Then Text1.BackColor = &H80&
If critter = 5 Then Label4.Visible = True
If critter = 6 Then Text1.ForeColor = &H8080FF
If critter = 7 Then Text1.Text = "This program is designed to retreave http header information which will give you information on what type of server the website is running as well as the os that it is being run on if you have any questions or comments please contact me"
If critter = 8 Then Timer3.Enabled = False
End Sub
Public Sub OpenInternet(Parent As Form, URL As String, _
WindowStyle As T_WindowStyle)
ShellExecute Parent.hwnd, "Open", URL, "", "", WindowStyle
End Sub
Private Sub Timer4_Timer()
DoEvents
End Sub