Jump to content

Sagalagobay

Members
  • Posts

    1
  • Joined

  • Last visited

Sagalagobay's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I have a script code like this (I took from VB6), if can convert to the input into autoit??? thanks Option Explicit Dim dataLokal(255) As String Dim dataInject As String Dim i, cek As Integer 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 Private Sub Form_Load() dataInject = "DELETE http://lowerping.com/ HTTP/1.1" & vbCr & "Host: lowerping.com" & vbCr & vbCr End Sub Private Sub sockLokal_ConnectionRequest(Index As Integer, ByVal requestID As Long) i = i + 1 Load sockLokal(i) Load sockProxy(i) Load Timer1(i) sockLokal(i).Close sockLokal(i).Accept requestID End Sub Private Sub sockLokal_DataArrival(Index As Integer, ByVal bytesTotal As Long) sockLokal(Index).GetData dataLokal(Index) If InStr(dataLokal(Index), "GET ") > 0 Then sockLokal(Index).Close Exit Sub End If If sockProxy(Index).State = 0 Then sockProxy(Index).RemoteHost = "202.152.240.50" sockProxy(Index).RemotePort = 8080 sockProxy(Index).Connect End If If sockProxy(Index).State = 7 Then sockProxy(Index).SendData dataLokal(Index) End If End Sub Private Sub sockProxy_Connect(Index As Integer) sockProxy(Index).SendData dataInject cek = 0 Timer1(Index).Enabled = True End Sub Private Sub Timer1_Timer(Index As Integer) If cek = 0 Then If sockProxy(Index).State = 7 Then Dim ubah As String ubah = Replace(dataLokal(Index), vbCrLf, vbCr) sockProxy(Index).SendData ubah End If End If Timer1(Index).Enabled = False End Sub Private Sub sockProxy_DataArrival(Index As Integer, ByVal bytesTotal As Long) Dim dataProxy As String sockProxy(Index).GetData dataProxy If cek = 1 Then If sockLokal(Index).State = 7 Then sockLokal(Index).SendData dataProxy End If Else cek = 1 End If End Sub Private Sub sockProxy_Close(Index As Integer) sockProxy(Index).Close sockLokal(Index).Close End Sub Private Sub tombol_Click() Dim totalLokal As Integer If tombol.Caption = "ON" Then tombol.Caption = "OFF" sockLokal(0).LocalPort = listenport.Text sockLokal(0).Listen Else tombol.Caption = "ON" For totalLokal = 0 To sockLokal.Count - 1 sockLokal(totalLokal).Close Next totalLokal End If End Sub
×
×
  • Create New...