Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21271

rdp help please

$
0
0
this is my rdp tool it gets all ip andd username and pass from txt file instead i wish to grab ip from list3


Code:

Private Sub cmdScanNext_Click()
    Dim ServerSpecs As String
    Dim SpecsParts() As String
    Dim Password As String
    Dim i As Integer
    Dim NS As MSTSCLibCtl.IMsRdpClientNonScriptable
Call Command2_Click
    With cmdScanNext
    '.Enabled = False
      ' .Refresh
    End With
    If EOF(ServersFile) Then
        Log "*** no more servers ***"
        Close #ServersFile
        ServersFile = 0
    Else
        Line Input #ServersFile, ServerSpecs
        SpecsParts = Split(ServerSpecs, ",")
        SpecsParts(0) = Trim$(SpecsParts(0))
        If Len(SpecsParts(0)) = 0 Then SpecsParts(0) = "3389"
        SpecsParts(1) = Trim$(SpecsParts(1))
       
        SpecsParts(2) = List3.Text
        SpecsParts(3) = Trim$(SpecsParts(3))
        Password = List2.Text
      ' SpecsParts(4) = "???"
        Text3.Text = SpecsParts(3)
        Text4.Text = List2.Text
        Log "SCANNING: " & Join$(SpecsParts, ", ")
       
        With RDP
     
            .AdvancedSettings2.RDPPort = CLng(SpecsParts(0))
            .Domain = SpecsParts(1)
            .Server = SpecsParts(2)
            Text2.Text = SpecsParts(2)
            .UserName = SpecsParts(3)
            Set NS = .Object
            NS.ClearTextPassword = List2.Text
           
            .Connect
        End With
    End If
End Sub



SpecsParts(2) is the ip

Viewing all articles
Browse latest Browse all 21271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>