#!/usr/bin/perl
# Unmoronized by CG1H3R0
use LWP::Simple; 
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);

$time = ($mday+1).".".($mon+1).".".($year+1900)." ".$hour.":".$min; 

$url = "http://www.net-security.org/";

#$tmp = `lynx -dump -source $url`;
$tmp = get($url); 
@data = split(/\n/, $tmp);

while(@data){
$tmp=shift(@data);
    if($tmp =~ m/newsitem/){
        $tmp=shift(@data);
        @file[$i] .= $tmp . "\n";
    $i++;
    }
}

$today = "<H1>CG1-H3R0 News</H1>";
$today .= "<H2>$time</H2>";

while(@file){

$tmp = shift(@file);
$today .= $date;
$today .= $tmp, "\n";
$tmp =~ tr/<>="/\n/;
@urls = split(/\n/, $tmp);

    while(@urls){
    $url = shift(@urls);
        if($url =~ m/http/){
        $today .= "<a href=\"$url\">$url</a>" . "<br>";
        }
    }
$today .= "<p><center>-------------------</center><p>"; 
}

#open HNS,">hns.html";
#print HNS $today;
#close HNS;
#$today =~ s,\<(.?+)\>,,g;
#$today =~ s,\<(.+?)\>,,g;
print "Content-type: text/html\n";
print "\n"; 
print $today;
#print `lynx -dump -nolist hns.html`;