It`me, VMTurbo!
http://download.vmturbo.com/appliance/cgi-bin/vmtcallhome.cgi
http://download.vmturbo.com/appliance/cgi-bin/vmtcallhome.old
#!/usr/bin/perl -w
#
#
use strict;
use vars qw($cgi $event $pm $vm $app $health $sendmail $reply_to $send_to $subject $content $whois);# Autoflush.
$| = 1;# Print the HTTP header line.
print “Content-Type: text/html\n\n”;# Make sure CGI version 2.46 or above is installed.
eval(“use CGI 2.46 qw(-private_tempfiles :standard);”);
(print(“Error: $@”), exit(-1)) if $@;# Create CGI object.
$cgi = new CGI;# Has any files been uploaded?
if (! $cgi->param(‘event’)) {
print <<__END__ERROR__;
It seems like you have not specified the event.
Please try again.
__END__ERROR__
exit(-1);
}# Prep email content
$sendmail = “/usr/sbin/sendmail -t”;
$subject = “Subject: $event notification from $ENV{REMOTE_ADDR}\n”;
$send_to = “To: support\@vmturbo.com\n”;# Get the whois information
$whois = `whois $ENV{REMOTE_ADDR}`;# Get the event type: Firstboot or Discovery
$event = $cgi->param(‘event’);if ($event eq “firstboot”) {
$reply_to = “Reply-to: support\@vmturbo.com\n”;
$content = “Appliance booted at customer IP: $ENV{REMOTE_ADDR}\n”;
} elsif ($event eq “discovery”) {
$reply_to = “Reply-to: support\@vmturbo.com\n”;
$pm = $cgi->param(‘PM’);
$vm = $cgi->param(‘VM’);
$app = $cgi->param(‘APP’);
$content = “Discovery completed at customer IP: $ENV{REMOTE_ADDR} with PM=$pm, VM=$vm, App=$app\n”;
} elsif ($event eq “healthcheck”) {
$reply_to = “Reply-to: healthcheck\@vmturbo.com\n”;
$health = $cgi->param(‘HEALTH’);
$content = “Healtcheck results from customer IP: $ENV{REMOTE_ADDR} $health\n”;
}# Send email notification
open(SENDMAIL, “|$sendmail”) or die “Cannot open $sendmail: $!”;
print SENDMAIL $reply_to;
print SENDMAIL $subject;
print SENDMAIL $send_to;
print SENDMAIL “Content-type: text/plain\n\n”;
print SENDMAIL $content.$whois;
close(SENDMAIL);