Discussion:
help- script to connect to ftp server
(too old to reply)
steveP
2007-01-24 15:11:33 UTC
Permalink
I need to created a script to connect and download files from a ftp
server --- simple ?
the issue is i am behind a bluecoat proxy and i can connect manully but
not via a script, can anyone help me.

Here is what i have so far

type in manually and works --
C:\>ftp 172.x.x.x
Connected to 172.x.x.x
220 Blue Coat FTP Service
User (172.x.x.x:(none)): ***@Remoteftpsite.com Proxyusrname
331 Enter password.
Password:
332 Enter proxy password.
Password:
230 User Username logged in. Access restrictions apply.
ftp> dir
200 PORT command successful.
150 File status okay; about to open data connection.
total 6340
------------------------------------------------------------
Here is my script and does not work

I have a batch file that contains

FTP -i -n -s:"D:\FTPCMDS1.TXT"

details of FTPCMDS1.TXT file >
open 172.x.x.x
user ***@Remoteftpsite.com Proxyusrname
ftp site password -- actual password hidden
proxy password -- actual password hidden
binary
mget *
BYE
------------------------------------------------------------
Results of running my script

ftp> open 172.x.x.x
Connected to 172.x.x.x
220 Blue Coat FTP Service
ftp> user ***@Remoteftpsite.com Proxyusrname
331 Enter password.
332 Enter proxy password.

530-User Access denied.
530-
530-Usage: USER ***@hostname proxyusername
530- PASS password
530 ACCT proxypassword
Login failed.
ftp>
ftp>
Invalid command.
ftp> binary
200 Command okay.
ftp> mget *
User access denied.
530 User access denied.
Cannot find list of remote files.
ftp> BYE
200 Command okay.
Guy
2007-01-24 17:24:18 UTC
Permalink
Post by steveP
I need to created a script to connect and download files
from a ftp server --- simple ?
the issue is i am behind a bluecoat proxy and
i can connect manully but not via a script, can anyone help me.
Here is what i have so far
type in manually and works --
C:\>ftp 172.x.x.x
Connected to 172.x.x.x
220 Blue Coat FTP Service
331 Enter password.
332 Enter proxy password.
230 User Username logged in. Access restrictions apply.
ftp> dir
200 PORT command successful.
150 File status okay; about to open data connection.
total 6340
------------------------------------------------------------
Here is my script and does not work
I have a batch file that contains
FTP -i -n -s:"D:\FTPCMDS1.TXT"
details of FTPCMDS1.TXT file >
open 172.x.x.x
ftp site password -- actual password hidden
proxy password -- actual password hidden
binary
mget *
BYE
------------------------------------------------------------
Results of running my script
ftp> open 172.x.x.x
Connected to 172.x.x.x
220 Blue Coat FTP Service
331 Enter password.
332 Enter proxy password.
530-User Access denied.
530-
530- PASS password
530 ACCT proxypassword
Login failed.
ftp>
ftp>
Invalid command.
ftp> binary
200 Command okay.
ftp> mget *
User access denied.
530 User access denied.
Cannot find list of remote files.
ftp> BYE
200 Command okay.
Try this in the FTPCMDS1.TXT file:

OPEN 172.x.x.x
USER ***@remoteftpsite.com proxyusrname
ftpsitepassword
QUOTE ACCT proxypassword
BINARY
MGET *
BYE
--
OpenPGP: id=18795161E22D3905; preference=signencrypt;
url=http://guysalias.batcave.net/pgpkeys.txt
steveP
2007-01-25 10:09:25 UTC
Permalink
Post by Guy
Post by steveP
I need to created a script to connect and download files
from aftpserver --- simple ?
the issue is i am behind a bluecoatproxyand
i can connect manully but not via a script, can anyone help me.
Here is what i have so far
type in manually and works --
C:\>ftp172.x.x.x
Connected to 172.x.x.x
220 Blue CoatFTPService
331 Enter password.
332 Enterproxypassword.
230 User Username logged in. Access restrictions apply.
ftp> dir
200 PORT command successful.
150 File status okay; about to open data connection.
total 6340
------------------------------------------------------------
Here is my script and does not work
I have abatchfile that contains
FTP-i -n -s:"D:\FTPCMDS1.TXT"
details of FTPCMDS1.TXT file >
open 172.x.x.x
ftpsite password -- actual password hidden
proxypassword -- actual password hidden
binary
mget *
BYE
------------------------------------------------------------
Results of running my script
ftp> open 172.x.x.x
Connected to 172.x.x.x
220 Blue CoatFTPService
331 Enter password.
332 Enterproxypassword.
530-User Access denied.
530-
530- PASS password
530 ACCT proxypassword
Login failed.
ftp>
ftp>
Invalid command.
ftp> binary
200 Command okay.
ftp> mget *
User access denied.
530 User access denied.
Cannot find list of remote files.
ftp> BYE
OPEN 172.x.x.x
ftpsitepassword
QUOTE ACCT proxypassword
BINARY
MGET *
BYE
--
OpenPGP: id=18795161E22D3905; preference=signencrypt;
url=http://guysalias.batcave.net/pgpkeys.txt- Hide quoted text -- Show quoted text -
------------------------------------------------------------------
Still no joy by adding the line QUOTE ACCT proxypassword -- hidden pwd
Any further advise would be fantastic
-------------------------------------------------------------------
Guy
2007-01-26 20:54:07 UTC
Permalink
Post by steveP
Post by Guy
Post by steveP
I need to created a script to connect and download files
from aftpserver --- simple ?
the issue is i am behind a bluecoatproxyand i can connect
manully but not via a script, can anyone help me.
Here is what i have so far
type in manually and works --
C:\>ftp172.x.x.x
Connected to 172.x.x.x
220 Blue CoatFTPService
331 Enter password.
332 Enterproxypassword.
230 User Username logged in. Access restrictions apply.
ftp> dir
200 PORT command successful.
150 File status okay; about to open data connection.
total 6340
------------------------------------------------------------
Here is my script and does not work
I have abatchfile that contains
FTP-i -n -s:"D:\FTPCMDS1.TXT"
details of FTPCMDS1.TXT file >
open 172.x.x.x
ftpsite password -- actual password hidden
proxypassword -- actual password hidden binary
mget *
BYE
------------------------------------------------------------
Results of running my script
ftp> open 172.x.x.x
Connected to 172.x.x.x
220 Blue CoatFTPService
331 Enter password. 332 Enterproxypassword.
530-User Access denied.
530-
530- PASS password
530 ACCT proxypassword
Login failed.
ftp>
ftp>
Invalid command.
ftp> binary
200 Command okay.
ftp> mget *
User access denied.
530 User access denied.
Cannot find list of remote files.
ftp> BYE
OPEN 172.x.x.x
QUOTE ACCT proxypassword
BINARY
MGET *
BYE
Still no joy by adding the line QUOTE ACCT proxypassword -- hidden pwd
Any further advise would be fantastic
Do you include this " -- hidden pwd", is that some command switch?
Or is that Google damage. Use news client for news not google web.
There is some Mozilla client or that browser can do.


Wget should do what you want, I think is better for GETting files.

--proxy-user=user
--proxy-password=password

Or cURL
--
OpenPGP: id=18795161E22D3905; preference=signencrypt;
url=http://guysalias.batcave.net/pgpkeys.txt
Loading...