Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 29th, 2001, 01:34 PM
mcsimon mcsimon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 179 mcsimon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 38 sec
Reputation Power: 9
Send a message via AIM to mcsimon Send a message via Yahoo to mcsimon
Smile Interesting Problem

Hi

Does anybody have a suggestion for the following situation:

There are five web developers running Personal Web Server and/or IIS on their workstation. Is there a way to routinely run a script to go to each Developers' server and copy everything from their wwwroot directory? I'd like to backup their websites on a separate dedicated workstation. I'd also like to grab dynamic pages with the code intact (like ASP PHP CGI) - I'm not sure whether one can even grab the code without it being processed.

Any suggestions would be greatly appreciated.

Thanks,
mcsimon

Reply With Quote
  #2  
Old May 29th, 2001, 01:56 PM
Atrus's Avatar
Atrus Atrus is offline
yet another member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 262 Atrus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Hi!

I don't know of a way to make a server spit out code instead of executing it like usual.

I just thought of running some lightweight ftp server on each workstation (serv-u or something) that serves each webserver's docroot. Then you could easily retrieve all files directly from disk by Net::FTP

I know this is not a graceful solution, sorry.

Greetings,

Atrus.

Reply With Quote
  #3  
Old May 29th, 2001, 06:38 PM
mcsimon mcsimon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 179 mcsimon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 38 sec
Reputation Power: 9
Send a message via AIM to mcsimon Send a message via Yahoo to mcsimon
Atrus,

I think that's a great solution. I can set up an ftp server on each machine and grab the files using NET::ftp.

I didn't think there was a way to grab code via a web server without it being executed. You've given me enough to go on and to keep busy for a while. Thanks!

adios,
mcsimon

Reply With Quote
  #4  
Old June 12th, 2001, 08:24 PM
footinmouth footinmouth is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: North Vancouver, BC, Canada
Posts: 44 footinmouth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Grab perl code off cgi-bin example

Try this:

#!c:/perl/bin/perl

# Name this file fun.pl or change open name

# Send file as contents if " IP address is correct " arrives
$Terminator = $ENV{'REMOTE_ADDR'};

if ($Terminator eq "xxx.xxx.xxx.xxx") {

print"Content-type: text/plain\n\n";

open(FILE,"<fun.pl");
while(<FILE>){
print $_;
}
close(FILE);

} # end of sending out fun.pl

# Regular code starts here or .....
# Kinda risky for security (maybe)

print"Content-type: text/html\n\n";

print "Hello World\n";



might work well with socket connection to servers with files

Best to remove before use in production.
__________________
Thanks

Foot in Mouth ver 1.2.5 Onion

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Interesting Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT