MarkVR Posted April 16, 2008 Share Posted April 16, 2008 Hi I need to get a user to access my FTP server without giving him the password. I am trying the following but the send command doesnt work: $Fullcommand = @ComSpec & " /k FTP testftpsite.com" RunWait($Fullcommand,@Scriptdir,@SW_Show) WinWaitActive("c:\") sleep(500) Send("Username{Enter}") Send("Pasword{Enter}") Any ideas please? Thanks Link to comment Share on other sites More sharing options...
jvanegmond Posted April 16, 2008 Share Posted April 16, 2008 He could always get a packet scanner and just read the password from that. You should use a secure FTP connection, or just create another FTP account just for him. github.com/jvanegmond Link to comment Share on other sites More sharing options...
MarkVR Posted April 16, 2008 Author Share Posted April 16, 2008 He could always get a packet scanner and just read the password from that.You should use a secure FTP connection, or just create another FTP account just for him.Ok thanks for the input m8 After trolling the forum a bit I found FTP.au3.. Woot thx very much. I did the following and it works fine for me.#include <Inet.au3>#include <FTP.au3>#include <GUIConstants.au3>$Form1 = GUICreate("FTP Uploader", 320, 125, 193, 125)$Inppath = GUICtrlCreateInput("", 32, 40, 177, 21)$Lblpath = GUICtrlCreateLabel("Enter the directory where the file is. ie (c:\data\)", 32, 16, 250, 17)$Lblfile = GUICtrlCreateLabel("Enter the filename. ie (Video.txt)", 32, 70, 200, 17)$Inpfile = GUICtrlCreateInput("", 32, 85, 177, 21)$BtnUpload = GUICtrlCreateButton("Upload", 240, 50, 50, 33, 0)GUISetState(@SW_SHOW)While 1 $Msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btnUpload Upload() Case Else ;;; EndSelectWEndExitFunc Upload()$server = "Site"$username = "User"$pass = "PSW"$dllhandle = DllOpen('wininet.dll')$path = GUICtrlRead($Inppath)$file = GUICtrlRead($Inpfile)$source = $path&$file$Open = _FTPOpen("Upload")$Conn = _FTPConnect($Open, $server, $username, $pass)$Ftpp = _FtpPutFile($Conn, $source, "/www/video/"&$file)$Ftpc = _FTPClose($Open)DllClose($dllhandle)MsgBox(0,"Upload status", $source & " has been uploaded")ExitEndFuncRegards Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now