0: #!/usr/bin/perl -w 1: 2: #run this from /etc/rc.d/rc.local to have your ip posted 3: #to the net somewhere, so that when you start a machine, you 4: #know where it is on the net. 5: #comments, and suggestions are welcome. 6: 7: use strict; 8: use Net::FTP; 9: 10: my $server="someserver.com"; 11: my $user="username"; 12: my $password="notarealpassword"; 13: my $dir="www"; 14: my $file="/tmp/ipinfo"; 15: 16: my $ftp; 17: 18: `ifconfig > /tmp/ipinfo`; 19: 20: $ftp=Net::FTP->new($server); 21: $ftp->login($user, $password); 22: $ftp->cwd($dir); 23: $ftp->put($file); 24: $ftp->quit;
In reply to Simple IP Poster by coolmichael
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |