package Post; #use Carp; use Exporter; @ISA=(Exporter); @EXPORT=qw(&post); #@EXPORT_OK=qw(); #$VERSION = 1.00; use Net::NNTP; use Dumpvalue; use Net::Cmd; @ISA = qw(Net::Cmd); use strict; my @msg=(); my $date; my $dumper = new Dumpvalue; my $nntp = my $email = my $date = my $subject = 0; my $h_type = my $message = my $line = my $h_value = 0; my @h_value = my @h_value2 = (); my @messages = my @header = my @msg = my @date = my %attr = (); my $aux = 0; sub post { %attr = %{$_[0]}; #FILL IN YOUR NEWSSERVER FOR POSTING, USERNAME AND PASSWORD, HERE : while ($nntp = Net::NNTP->new ("your_newsserver"),! $nntp ) {print ".";}; $nntp->authinfo("your_username", "your_password"); print $nntp->message(); $date = scalar localtime(); @date = split(" ", $date); $date=$date[0].", ".$date[2]." ".$date[1]." ".$date[4]." ".$date[3]; #$date = (scalar localtime(time -7200)) . " GMT" ; print $date,"\n"; print $attr{Botname},"\n"; #print $nntp->reader(); #CUSTOMIZE YOUR HEADERS HERE : @msg = ("From: $attr{Botname}\n", "Newsgroups: $attr{Group}\n", "Subject: $_[1]\n", "Organization: Alcatroll Labs Inc.\n", "Date: $date\n", "NNTP-Posting-Host: 192.168.30.2\n", "X-Trace: fu-berlin.de 1007332286 8395410 192.168.30.2 (16 [79743])\n", "X-Priority: 3\n", "X-MSMail-Priority: Normal\n", "X-Newsreader: Microsoft Outlook Express 6.00.2600.0000\n", "X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000\n", "References: $_[3]\n", "\n", ); push (@msg, @{$_[2]} ); #print join("\n", @msg); $nntp->post(@msg); print $nntp->message(); @msg=''; $nntp->quit(); } 1;