hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

raptor
i wanna make a batch file that will connect to an ftp,
and will give username & passwd and will cd to required folder...
then it will get filename...

(can i make a .bat file for this work ?)
i really want to make a batch downloader...

if there is another way to make a file download via command prompt (windows) like wget in linux i would like to know how...
Flinston
make a new text document and save it as test.bat e.g.

in the test.bat:
CODE

@echo off
echo open server port > z
echo user >> z
echo pass >> z
echo BINARY >> z
echo cd directory >> z
echo get filename >> z
echo get nextfilename >> z
...
echo quit >> z
ftp -i -s:z
cls
exit

thats it
raptor
thanx very much man !!!
it was great...
raptor
but doesn't work...
it says incorrect login...
maybe something must be changed ???

(make it for server:
test.server.com
port 21
username: test
passwd: test
and file evil.exe in folder test

thanx again...

hope it 'll work...
ma622
CODE

@echo off
echo open server port > z
echo user USER_NAME PASS_WORD >> z
echo BINARY >> z
echo cd directory >> z
echo get filename c:\Path_to_save\filename >> z
echo bye >> z
ftp -i -s:z
cls
exit
Flinston
get files directly :
CODE

@echo off
echo open test.server.com > z
echo test >> z
echo test >> z
echo BINARY >> z
echo get c:\test\evil.exe >> z
echo bye >> z
ftp -i -s:z
cls
exit

Files relative to path
CODE

@echo off
echo open test.server.com > z
echo test >> z
echo test >> z
echo BINARY >> z
echo cd c:\test\ >> z
echo get evil.exe >> z
echo bye >> z
ftp -i -s:z
cls
exit
mrBob
or use instead of echo get evil.exe >> z just echo mget *.* >> z wink.gif
raptor
ok thanx...
the problem was with password:
echo password >> z
(check that the null (space) character is after password...)
that's why it failed!!!
"password" was taken as "password "

i found it anyway...

can someone tell me what are -i and -s modes in ftp ???
can i know why binary is needed ???
can i have a list with all commands and switches explained ???

thanx guys...
manni
C:\>ftp -help
ftp -help

Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.

FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host]

-v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
-a Use any local interface when binding data connection.
-A login as anonymous.
-w:buffersize Overrides the default transfer buffer size of 4096.
host Specifies the host name or IP address of the remote
host to connect to.

Notes:
- mget and mput commands take y/n/q for yes/no/quit.
- Use Control-C to abort commands.
jetprice
msdos also has this command called help and /?

typing ftp /? will give you all info you need to know, i'm sure you installed your OS in your own language so it won't be so hard to understand how to use this stuff ..

using help will give you more detailed info than these prewritten scripts ppl post in here, its not bad but you don't learn anything by just copy / pasting it ... Just a tip.

greets Jetprice
Flinston
in the batch you write the ftp script with echo .. >> z

then you start the script with ftp -s:z

-i means that ftp doesn't ask if he should overwrite something ...
raptor
QUOTE (jetprice @ Oct 25 2003, 04:28 PM)
msdos also has this command called help and /?

typing ftp /? will give you all info you need to know, i'm sure you installed your OS in your own language so it won't be so hard to understand how to use this stuff ..

using help will give you more detailed info than these prewritten scripts ppl post in here, its not bad but you don't learn anything by just copy / pasting it ... Just a tip.

greets Jetprice

yes i agree with you but i have win installed in english ver.
so cause i'm greek i had prob. understanding what -i exactly does (yes i know /? -help... commands i'm not a dummy)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.