Brutal 164 Posted April 11, 2014 Report Share Posted April 11, 2014 Hi guys, I have a bot that has the user enter his ftp details into it - Anyone know of a way to verify success/failed ftp login? Quote Link to post Share on other sites
Brutal 164 Posted April 11, 2014 Author Report Share Posted April 11, 2014 Never mind - I got it. Here it is in case anyone else ever needs to work with similar functionality. plugin command("FTPCommands.dll", "connect to ftp server", "FTP", "user-doman.com", 21, "user-username", "user-password", "") { wait(3) if($plugin function("FTPCommands.dll", "$ftp folder exists", "public_html")) { then { alert("true") } else { alert("false") } }} Quote Link to post Share on other sites
Brutal 164 Posted April 11, 2014 Author Report Share Posted April 11, 2014 I was wrong.. While it does verify a successful connection, it does not verify an unsuccessful connection, so I still need help if anyone has any ideas. Quote Link to post Share on other sites
Brutal 164 Posted April 11, 2014 Author Report Share Posted April 11, 2014 Ok, this conversation that I have had with myself so far has paid off... I was close before, but a little off. This one works beautifully! set(#ftpcheck, $nothing, "Global")if($comparison(1, "=", 1)) { then { plugin command("FTPCommands.dll", "connect to ftp server", "FTP", "userdomain.com", 21, "user-username", "user-password", "") { wait(3) if($plugin function("FTPCommands.dll", "$ftp folder exists", "public_html")) { wait(3) then { set(#ftpcheck, "ok", "Global") } else { } } } } else { }}if($comparison(#ftpcheck, "=", "ok")) { then { alert("Successful Connection") } else { alert("Failed Connection") }} Quote Link to post Share on other sites
vonnch 1 Posted April 13, 2014 Report Share Posted April 13, 2014 Tried this one for a test and it works! Thanks. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.