Android Question Check ports of VPS

Douglas Farias

Expert
Licensed User
Longtime User
hi its possible to check the ports opned on my vps using b4a ?

for exemple, one edittext you put the ip
later + 2 edit text begin scan at (0) for example stop at 5000

and a button, later this button is pressed make a check and make a list of opned ports
like 80, 3306 , 1433 etc *-* its possible?

know if ip exist or no etc *-*
 

Douglas Farias

Expert
Licensed User
Longtime User
If you are testing your vps then there are much simpler ways to do it. You can create a web service that runs netstat and returns the result.
NO

AND NO

xD

im want to make a portscan app
user enter with ip and the start port check and last por check

example

192.50.25.25
start scan 0
finish scan 100

Result =

0
1
2

80
22
 
Upvote 0

Douglas Farias

Expert
Licensed User
Longtime User
Resolved this works here perfect xD

B4X:
#Region  Project Attributes
    #ApplicationLabel: Port Scan
    #VersionCode: 1
    #VersionName:
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
Dim Socket1 As Socket
End Sub

Sub Globals
    Private EditText1 As EditText
    Private Button1 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    Socket1.Initialize("Socket1")
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Socket1_Connected(Connected As Boolean)As Boolean
  If Connected = True Then
      Msgbox("Porta aberta!","")
      Return True
  Else
      Msgbox("Porta fechada!", "")
      Return False
  End If
End Sub

Sub Button1_Click
    Socket1.Connect("198.50.211.32",EditText1.Text,3000)
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…