' standard timeout sub, causes a short pause in the code
Dim StartTime As Double, x As Integer
StartTime = Timer
Do While Timer - StartTime < Duration
x = DoEvents()
Loop
End Sub
Private Sub addbutt_Click()
addbutt.Enabled = False
List1.clear
List1.AddItem "", 0
List2.clear
Load addtask
addtask.Visible = True
End Sub
Private Sub Command1_Click()
List1.clear
qs.Text1.Text = ""
qs.Text2.Text = ""
qs.Text3.Text = ""
addtask.startport = Null
addtask.stopport = Null
Load qs
qs.Visible = True
End Sub
Private Sub Command2_Click()
changerr = tasks.ListIndex
If changerr = -1 Then
MsgBox "Select a valid task before trying to remove it!", vbOKOnly, "IDIOT!"
ElseIf changerr = 0 Then
MsgBox "Select a valid task before trying to remove it!", vbOKOnly, "IDIOT!"
tasks.RemoveItem changerr
ops.RemoveItem changerr
tasktimes.RemoveItem changerr
End If
End Sub
Private Sub endbutt_Click()
If tasks.ListCount > 1 Then
decide = MsgBox("Exiting will delete your scheduled tasks. Do you want to continue?", vbYesNo, "Exit?")
If decide = 6 Then End
End If
End Sub
Private Sub Form_Load()
ops.AddItem "Code Master: Cory Forsythe", 0
tasks.AddItem "TCP/IP King V:1.0", 0
tasktimes.AddItem "Written@December,2000", 0
itemno = 0
GoS = False
End Sub
Private Sub List1_Click()
MsgBox List1.List(List1.ListIndex), vbOKOnly, " "
End Sub
Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)
If login_data = True Then
Winsock1(Index).GetData Data, vbString
List1.AddItem Winsock1(Index).RemotePort & " RETURNS:: " & Data
List2.AddItem ""
List1.AddItem ""
List2.AddItem ""
Open App.Path & "\Scanner log.txt" For Append As #2
Write #2, Winsock1(Index).RemotePort & " RETURNS:: " & Data
Close #2
End If
End Sub
Private Sub Winsock1_Connect(Index As Integer)
If Winsock1(Index).RemotePort = 8080 Then
List1.AddItem "PROXY SERVER FOUND"
List1.AddItem "Port " & Winsock1(Index).RemotePort & " is open"
Open App.Path & "\Scanner log.txt" For Append As #4
Write #4, "Port " & Winsock1(Index).RemotePort & " is open"
Close #4
End If
End Sub
Private Sub Winsock1_Error(Index As Integer, 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)
destroy Winsock1(Index)
End Sub
Public Sub destroy(obj As Object)
TimeOut 1
Unload obj
TimeOut 1
End Sub
Private Sub ops_Click()
tasks.Selected(ops.ListIndex) = True
tasktimes.Selected(ops.ListIndex) = True
End Sub
Private Sub runbutt_Click()
changer = tasks.ListIndex
If changer = -1 Then
MsgBox "Select a valid task before trying to run it!", vbOKOnly, "IDIOT!"
ElseIf changer = 0 Then
MsgBox "Select a valid task before trying to run it!", vbOKOnly, "IDIOT!"
Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
Winsock2.GetData Data, vbString
List1.AddItem Data
End Sub
Private Sub Winsock2_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)