Buona sera a tutti
ho un programmino si fatto
Dim GetwayIP, RepScanNTB As String
Dim Getway As String
Dim GetwayMeno As String
Dim IP As String
Dim Port3389 As String
Dim num, ss, sNTB As String[]
Dim i As Byte
Dim a, b As Byte
If TextBox1.Text = "" Then
Message.Error("Errore devi inserire la pass di root se vuoi che funzioni, Ciao!")
Else
Shell "(/sbin/ip route | awk '/default/ { print $3 }')" To GetwayIP
Getway = Trim(GetwayIP)
GetwayMeno = Left(Getway, -1)
Shell "echo " & TextBox1.Text & " | sudo -S nmap -T4 -p3389 " & Getway & "/24 -oN /tmp/h" Wait
Shell "nbtscan -e " & Getway & "/24" To RepScanNTB
Print RepScanNTB
Shell "cat /tmp/h | grep -oP '" & GetwayMeno & "*'" To IP
Shell "cat /tmp/h | grep -P '3389/tcp '" To Port3389
sNTB = Split(IP, "\n")
ss = Split(IP, "\n")
ss.Remove(0)
num = Split(Port3389, "\n")
For i = 0 To num.Max
If num[i] = "3389/tcp open ms-wbt-server" Then
b = 0
While sNTB.Max
Print InStr(sNTB[b], ss[i])
Inc b
Wend
ColumnView1.Add(a, ss[i])
Inc a
Endif
Next
Endif
End
quin nel print mi dice outof bound ma come mai ??
b=0
While sNTB.Max
Print InStr(sNTB
, ss)
Inc b
Wend
qualcuno ha idea delperchè???
grazie a tutti