
mhx
Enthusiast
/ Moderator
Jul 18, 2001, 8:40 AM
Post #12 of 14
(1172 views)
|
Hi Revival Fire, I just had another idea how you could possibly solve your problem without a special FTP program. The easiest way would be if you have telnet access to your server. If this is the case, you could simply use tar to create an archive of all your files. Since tar also saves the permissions of the files, you can download that archive, upload it to the other server, and untar the files there. If you don't have telnet access, you can try to run tar from a CGI script. Another possibility would be to use the two scripts I've attached, which I have written quite some time ago because I also don't have telnet access to my server. These two scripts act more or less like a poor man's telnet. I've written them just to browse through the server a little bit. Before I explain exactly what the scripts are doing, I have something important to say: Leaving this script on your server is a very, very high security risk. There's no password or any other kind of protection. Anyone who knows the URL of the script can do just about everything on your server, e.g. delete all your files or even worse. Upload the script, use it, and immediately delete it after usage. Or try to add some security patches. Ok, now what are the scripts doing. The first one is intended to be uploaded to your server. It is invoked like any other CGI script by an HTTP request. It has two parameters, the current working directory and the command to execute. When executing a command, it opens a pipe from the command and returns all it's standard and error output as well as the current working directory via plain text output. The second script is intended to run on your local system. You have to supply the name of your server as the only argument, otherwise it will use localhost. Once you run the script, it requests the current working directory from the CGI script on your server. If it succeeds, you will receive a prompt to enter your commands. You can type 'exit' or 'quit' to exit the program. Please, try to have a look at both scripts first, and -- even more important -- try to understand how dangerous it can be to leave them on your server. You may need to modify the $baseurl in the local script, and I'd recommend not to name the remote script 'exec.cgi'. If you give it a name only you know, it would be a bit safer. Just edit the $baseurl line to contain the new name of the script. There's also some code in there to remove the banner that netfirms.com inserts in every page. You can ignore this, because it won't do any harm if there's no banner. I hope this will help you. -- Marcus
s$$ab21b8d15c3d97bd6317286d$;$"=547269736;split'i',join$,,map{chr(($*+= ($">>=1)&1?-hex:hex)+0140)}/./g;$"=chr$";s;.;\u$&;for@_[0,2];print"@_,"
|