I appreciate your help - Tom#!C:\perl\bin\perl.exe -w # Purpose: Script for extracting data from tables and write it to a te +xt file # Version: 0.3 print "Content-type: text/html\n\n"; use CGI::Carp qw(fatalsToBrowser); use strict; use HTML::TableExtract; my $table; # table of interest my $html_file = "http://www.securityfocus.com/bid"; # url of web site my $te; # table extract my $ts; # table search my $row; # row of table of interest my @securityfocus; # array for(1..30000) { my $table = $html_file."/".$_; $te = HTML::TableExtract->new( depth => 1, count => 0 ); $te->parse_file($table); } foreach $ts ($te->tables) { print "Table found at ", join(',', $ts->coords), ":\n"; foreach $row ($ts->rows) { print " ", join(',', @$row), "\n"; } } @securityfocus=("Bugtraq ID: \n","Class: \n","CVE: \n","Remote: \n","L +ocal: \n", "Published: \n","Updated: \n","Credit: \n","Vulnerable: \n","Not Vulne +rable: \n"); open(OUTPUTFILE,">bid.txt") or die "Can't open bid.txt $!"; print OUTPUTFILE @securityfocus; close(OUTPUTFILE) or die "Can't close bid.txt $!"; open(OUTPUTFILE,"bid.txt") or die "Can't open bid.txt $!"; while (<OUTPUTFILE>) { chomp; print " $_ \n"; } close(OUTPUTFILE) or die "Can't close bid.txt $!";
In reply to Extract table info and create txt file by TomBombadil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |