Jump to content

Recommended Posts

Hi! Im currently new to AutoIT Script, and programming in general. I just started doing some script during my free time at my job( Computer IT ). Im currently making a manager to see if everything is correct on some computer and one of them is the FTP. Im trying to get the info if the Port is open, passive and transfer IN/OUT.  I just don't understand at all the FTP in AutoIT! I try the FTP_CONNECT function but all im able to do is connect without getting the info I need. I only need to know if the port is open for exemple. If someone could explain me a little it would be much appreciate! I love AutoIT and I would like to understand more to help the community!

Thank You!

PS: Sry for my bad english, it my second language. :S

Link to post
Share on other sites

i suggest :  if  you send  a  code  is much better  for comunity , help you (use a tag ) , for your problem i suggest , before read this


and after  use winscp you can bind in autoit , winscp is much powerful  and support also sftp 




Link to post
Share on other sites

you could connect to its port to see if it is open


func IpPortTest($ip,$port)
    $socket = TCPConnect($ip,$port)
    $error = @error
    if $error then
        if $error = 10060 then Return 'Error : Connection timed out on ip:'&$ip&', port:'&$port
        if $error = 1 then Return '!Error : IPAddr: '&$ip&' is incorrect.'
        if $error = 2 then Return '!Error : port: '&$port&' is incorrect.'
        if $error = -2 then Return 'not connected.'; not sure when this one will trigger, no network conection?
        Return '+Port:'&$port&' is open on IPAddr: '&$ip&' socket:'&$socket


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...