# Perl libraries we need - Please note that Date::Parse is not # standard and needs to be installed as of OpenBSD 5.7 use utf8; use Path::Class; use strict; use warnings; use Time::Piece; use Date::Parse; use Socket; use Sys::Hostname; use POSIX qw(strftime); use DBI; use IO::Socket::INET; use Storable; use Storable qw(nstore store_fd nstore_fd freeze thaw dclone); use IPC::Open2; use Symbol 'gensym'; use String::Util 'trim'; use Net::SNMP; use Data::Dumper; # Get our hostname for C2 operations our $host = hostname(); # Get our local IP address by connecting to the MRTG Database our $localip = ''; sub get_local_ip(){ my $sock = IO::Socket::INET->new( PeerAddr=> $mrtgc2, PeerPort=> 5432, Proto => "tcp"); our $localip = ''; $::localip = $sock->sockhost; } get_local_ip(); ...... ...... ...... ## The following line is #128 from the above error ## print $fd $daemon_log_timestamp.' '.our $host.' mrtg[]:['.$log_entry_category.']: '.$log_entry.'.'."\n";