Profile | $profile | |
Status | $control | |
Step | \n"; if( $status == -1 ) { print "-1: Deploying\n"; } elsif( $status == 0 ) { print "0: All files\n"; } elsif( $status == 1 ) { print "1: Whitelisting\n"; } elsif( $status == 2 ) { print "2: Scanning\n"; } elsif( $status == 3 ) { print "3: Done\n"; } print " | |
Files Done | \n"; if( $filesdone ne "" ) { print "" . commify($filesdone) . " | N/A | \n"; } print "
Files Total | \n"; if( $filestotal ne "" ) { print "" . commify($filestotal) . " | N/A | \n"; } print "
Bytes Done | \n"; if( $bytesdone ne "" ) { print "" . commify($bytesdone) . " | N/A | \n"; } print "
Bytes Total | \n"; if( $bytestotal ne "" ) { print "" . commify($bytestotal) . " | N/A | \n"; } print "
Progress | \n"; print "\n";
my $rounded = "";
if( $status > 1 )
{
if( $status != 3 )
{
my $percent = 100 * $bytesdone / $bytestotal;
$rounded = sprintf( "%.2f", $percent );
}
else
{
$rounded = "100";
}
my $width = 2 * $rounded;
$width = floor( $width );
print "
"; } print " | |
Percentage | \n";
if( $status > 1 )
{
if( $status != 3 )
{
print $rounded;
}
else
{
print "100";
}
print "\%";
}
else
{
print " "; } print " | |
Completion Time | ";
if( $status > 1 )
{
if( $status != 3 )
{
my $string = "SELECT updated FROM logs WHERE tracker=? ORDER BY updated LIMIT 1";
$sth = $dbh->prepare( $string );
$sth->execute( $system );
my $results = $sth->fetchrow_arrayref();
my $starttime = $$results[0];
$sth->finish();
my $currenttime = time();
my $difftime = $currenttime - $starttime;
my $eta = ($difftime / ($rounded / 100 )) - $difftime;
$eta = floor( $eta );
my $hours = floor( $eta / 3600 );
my $leftovers = $eta % 3600;
my $minutes = floor( $leftovers / 60 );
$seconds = $eta % 60;
if( $hours < 10 ) { $hours = "0" . $hours; }
if( $minutes < 10 ) { $minutes = "0" . $minutes; }
if( $seconds < 10 ) { $seconds = "0" . $seconds; }
print "Approx $hours:$minutes:$seconds remaining";
}
else
{
print " "; } } else { print " "; } print " | \n";
print "|
Total Findings | $total | |
False Positives | $fp_count | |
Valid Findings | $diff | |
Updated | "; my $hours = floor($timediff / 3600); my $leftovers = $timediff % 3600; my $minutes = floor($leftovers / 60); my $seconds = $timediff % 60; if( $hours < 10 ) { $hours = "0" . $hours; } if( $minutes < 10 ) { $minutes = "0" . $minutes; } if( $seconds < 10 ) { $seconds = "0" . $seconds; } print "$hours:$minutes:$seconds ago | |
Pause | \n"; if( $control eq "running" ) { print "Pause | N/A | \n"; } # resume print "
Resume | \n"; if( $control eq "stopped" ) { print "Resume | N/A | \n"; } # uninstall print "
Kill | \n"; if( $control =~ /^(stopped|running)$/i ) { print "Uninstall | N/A | \n"; } print "
Profile | $profile | |
Status | $control | |
Step | \n"; if( $status == -1 ) { print "-1: Deploying\n"; } elsif( $status == 0 ) { print "0: All files\n"; } elsif( $status == 1 ) { print "1: Whitelisting\n"; } elsif( $status == 2 ) { print "2: Scanning\n"; } elsif( $status == 3 ) { print "3: Done\n"; } print " | |
Files Done | \n"; if( $filesdone ne "" ) { print "" . commify($filesdone) . " | N/A | \n"; } print "
Files Total | \n"; if( $filestotal ne "" ) { print "" . commify($filestotal) . " | N/A | \n"; } print "
Bytes Done | \n"; if( $bytesdone ne "" ) { print "" . commify($bytesdone) . " | N/A | \n"; } print "
Bytes Total | \n"; if( $bytestotal ne "" ) { print "" . commify($bytestotal) . " | N/A | \n"; } print "
Progress | \n"; print "\n";
my $rounded = "";
if( $status > 1 )
{
if( $status != 3 )
{
my $percent = 100 * $bytesdone / $bytestotal;
$rounded = sprintf( "%.2f", $percent );
}
else
{
$rounded = "100";
}
my $width = 2 * $rounded;
$width = floor( $width );
print "
"; } print " | |
Percentage | \n";
if( $status > 1 )
{
if( $status != 3 )
{
print $rounded;
}
else
{
print "100";
}
print "\%";
}
else
{
print " "; } print " | |
Completion Time | ";
if( $status > 1 )
{
if( $status != 3 )
{
my $string = "SELECT updated FROM logs WHERE tracker=? ORDER BY updated LIMIT 1";
$sth = $dbh->prepare( $string );
$sth->execute( $system );
my $results = $sth->fetchrow_arrayref();
my $starttime = $$results[0];
$sth->finish();
my $currenttime = time();
my $difftime = $currenttime - $starttime;
my $eta = ($difftime / ($rounded / 100 )) - $difftime;
$eta = floor( $eta );
my $hours = floor( $eta / 3600 );
my $leftovers = $eta % 3600;
my $minutes = floor( $leftovers / 60 );
$seconds = $eta % 60;
if( $hours < 10 ) { $hours = "0" . $hours; }
if( $minutes < 10 ) { $minutes = "0" . $minutes; }
if( $seconds < 10 ) { $seconds = "0" . $seconds; }
print "Approx $hours:$minutes:$seconds remaining";
}
else
{
print " "; } } else { print " "; } print " | \n";
print "|
Total Findings | $total | |
False Positives | $fp_count | |
Valid Findings | $diff | |
Updated | "; my $hours = floor($timediff / 3600); my $leftovers = $timediff % 3600; my $minutes = floor($leftovers / 60); my $seconds = $timediff % 60; if( $hours < 10 ) { $hours = "0" . $hours; } if( $minutes < 10 ) { $minutes = "0" . $minutes; } if( $seconds < 10 ) { $seconds = "0" . $seconds; } print "$hours:$minutes:$seconds ago | |
Pause | \n"; if( $control eq "running" ) { print "Pause | N/A | \n"; } # resume print "
Resume | \n"; if( $control eq "stopped" ) { print "Resume | N/A | \n"; } # uninstall print "
Kill | \n"; if( $control =~ /^(stopped|running)$/i ) { print "Uninstall | N/A | \n"; } print "
Profile | $profile | |
Status | $control | |
Step | \n"; if( $status == -1 ) { print "-1: Deploying\n"; } elsif( $status == 0 ) { print "0: All files\n"; } elsif( $status == 1 ) { print "1: Whitelisting\n"; } elsif( $status == 2 ) { print "2: Scanning\n"; } elsif( $status == 3 ) { print "3: Done\n"; } print " | |
Files Done | \n"; if( $filesdone ne "" ) { print "" . commify($filesdone) . " | N/A | \n"; } print "
Files Total | \n"; if( $filestotal ne "" ) { print "" . commify($filestotal) . " | N/A | \n"; } print "
Bytes Done | \n"; if( $bytesdone ne "" ) { print "" . commify($bytesdone) . " | N/A | \n"; } print "
Bytes Total | \n"; if( $bytestotal ne "" ) { print "" . commify($bytestotal) . " | N/A | \n"; } print "
Progress | \n"; print "\n";
my $rounded = "";
if( $status > 1 )
{
if( $status != 3 )
{
my $percent = 100 * $bytesdone / $bytestotal;
$rounded = sprintf( "%.2f", $percent );
}
else
{
$rounded = "100";
}
my $width = 2 * $rounded;
$width = floor( $width );
print "
"; } print " | |
Percentage | \n";
if( $status > 1 )
{
if( $status != 3 )
{
print $rounded;
}
else
{
print "100";
}
print "\%";
}
else
{
print " "; } print " | |
Completion Time | ";
if( $status > 1 )
{
if( $status != 3 )
{
my $string = "SELECT updated FROM logs WHERE tracker=? ORDER BY updated LIMIT 1";
$sth = $dbh->prepare( $string );
$sth->execute( $system );
my $results = $sth->fetchrow_arrayref();
my $starttime = $$results[0];
$sth->finish();
my $currenttime = time();
my $difftime = $currenttime - $starttime;
my $eta = ($difftime / ($rounded / 100 )) - $difftime;
$eta = floor( $eta );
my $hours = floor( $eta / 3600 );
my $leftovers = $eta % 3600;
my $minutes = floor( $leftovers / 60 );
$seconds = $eta % 60;
if( $hours < 10 ) { $hours = "0" . $hours; }
if( $minutes < 10 ) { $minutes = "0" . $minutes; }
if( $seconds < 10 ) { $seconds = "0" . $seconds; }
print "Approx $hours:$minutes:$seconds remaining";
}
else
{
print " "; } } else { print " "; } print " | \n";
print "|
Total Findings | $total | |
False Positives | $fp_count | |
Valid Findings | $diff | |
Updated | "; my $hours = floor($timediff / 3600); my $leftovers = $timediff % 3600; my $minutes = floor($leftovers / 60); my $seconds = $timediff % 60; if( $hours < 10 ) { $hours = "0" . $hours; } if( $minutes < 10 ) { $minutes = "0" . $minutes; } if( $seconds < 10 ) { $seconds = "0" . $seconds; } print "$hours:$minutes:$seconds ago | |
Pause | \n"; if( $control eq "running" ) { print "Pause | N/A | \n"; } # resume print "
Resume | \n"; if( $control eq "stopped" ) { print "Resume | N/A | \n"; } # uninstall print "
Kill | \n"; if( $control =~ /^(stopped|running)$/i ) { print "Uninstall | N/A | \n"; } print "
Profile | $profile | |
Status | $control | |
Step | \n"; if( $status == -1 ) { print "-1: Deploying\n"; } elsif( $status == 0 ) { print "0: All files\n"; } elsif( $status == 1 ) { print "1: Whitelisting\n"; } elsif( $status == 2 ) { print "2: Scanning\n"; } elsif( $status == 3 ) { print "3: Done\n"; } print " | |
Databases Done | \n"; if( $dbdone ne "" ) { print "" . commify($dbdone) . " | N/A | \n"; } print "
Databases Total | \n"; if( $dbtotal ne "" ) { print "" . commify($dbtotal) . " | N/A | \n"; } print "
Tables Done | \n"; if( $tabledone ne "" ) { print "" . commify($tabledone) . " | N/A | \n"; } print "
Tables Total | \n"; if( $tabletotal ne "" ) { print "" . commify($tabletotal) . " | N/A | \n"; } print "
Columns Done | \n"; if( $columndone ne "" ) { print "" . commify($columndone) . " | N/A | \n"; } print "
Columns Total | \n"; if( $columntotal ne "" ) { print "" . commify($columntotal) . " | N/A | \n"; } print "
Progress | \n"; print "\n";
my $rounded = "";
if( $status > 1 )
{
if( $status != 3 )
{
my $percent = 100 * $columndone / $columntotal;
$rounded = sprintf( "%.2f", $percent );
}
else
{
$rounded = "100";
}
my $width = 2 * $rounded;
$width = floor( $width );
print "
"; } print " | |
Percentage | \n";
if( $status > 1 )
{
if( $status != 3 )
{
print $rounded;
}
else
{
print "100";
}
print "\%";
}
else
{
print " "; } print " | |
Completion Time | ";
if( $status > 1 )
{
if( $status != 3 )
{
my $string = "SELECT updated FROM logs WHERE tracker=? ORDER BY updated LIMIT 1";
$sth = $dbh->prepare( $string );
$sth->execute( $system );
my $results = $sth->fetchrow_arrayref();
my $starttime = $$results[0];
$sth->finish();
my $currenttime = time();
my $difftime = $currenttime - $starttime;
my $eta = ($difftime / ($rounded / 100 )) - $difftime;
$eta = floor( $eta );
my $hours = floor( $eta / 3600 );
my $leftovers = $eta % 3600;
my $minutes = floor( $leftovers / 60 );
$seconds = $eta % 60;
if( $hours < 10 ) { $hours = "0" . $hours; }
if( $minutes < 10 ) { $minutes = "0" . $minutes; }
if( $seconds < 10 ) { $seconds = "0" . $seconds; }
print "Approx $hours:$minutes:$seconds remaining";
}
else
{
print " "; } } else { print " "; } print " | \n";
print "|
Total Findings | $total | |
False Positives | $fp_count | |
Valid Findings | $diff | |
Updated | "; my $hours = floor($timediff / 3600); my $leftovers = $timediff % 3600; my $minutes = floor($leftovers / 60); my $seconds = $timediff % 60; if( $hours < 10 ) { $hours = "0" . $hours; } if( $minutes < 10 ) { $minutes = "0" . $minutes; } if( $seconds < 10 ) { $seconds = "0" . $seconds; } print "$hours:$minutes:$seconds ago | |
Pause | \n"; if( $control eq "running" ) { print "Pause | N/A | \n"; } # resume print "
Resume | \n"; if( $control eq "stopped" ) { print "Resume | N/A | \n"; } # uninstall print "
Kill | \n"; if( $control =~ /^(stopped|running)$/i ) { print "Uninstall | N/A | \n"; } print "
' . "\n"; } sub footer { print " |