- Timestamp:
- 04/17/16 12:55:28 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/extras/db2rwhois.pl
r858 r859 3 3 # ipdb/cgi-bin/extras/db2rwhois.pl 4 4 # Pull data from ipdb and mangle it into RWHOIS 5 # Initial version 03/26/2004 kdeugau against IPDB v16 5 ### 7 6 # Revision info … … 102 101 $masterblocks[$i] = new NetAddr::IP $master; 103 102 my ($ctime,undef) = split /\s/, $mcreate; 104 ($mmod,undef) = split /\s/, $mmod;105 106 print "$masterblocks[$i] $ctime $m mod\n";103 my ($mtime,undef) = split /\s/, $mmod; 104 105 print "$masterblocks[$i] $ctime $mtime\n"; 107 106 108 107 my $date = strftime("%Y-%m-%d", localtime); … … 213 212 "Tech-Contact: $IPDB::org_techhandle\n". 214 213 "Created: $ctime\n". 215 "Updated: $m mod\n".214 "Updated: $mtime\n". 216 215 "Updated-By: $IPDB::org_email\n"; 217 216 218 217 # And now the subblocks 219 218 $ssth->execute($mid, $master) or die "nosubs: $!\n".$dbh->errstr."\n"; 220 while (my ($cidr, $custid, $type, $city, $desc, $ ctime, $mtime, $swip, $defcust) = $ssth->fetchrow_array) {219 while (my ($cidr, $custid, $type, $city, $desc, $bctime, $bmtime, $swip, $defcust) = $ssth->fetchrow_array) { 221 220 222 221 # We get master block info from @masterblocks. … … 245 244 246 245 # Fix up datestamps. We don't *really* need sub-microsecond resolution on our exports... 247 ($ ctime) = ($ctime =~ /^(\d+-\d+-\d+)\s+/);248 ($ mtime) = ($mtime =~ /^(\d+-\d+-\d+)\s+/);246 ($bctime) = ($bctime =~ /^(\d+-\d+-\d+)\s+/); 247 ($bmtime) = ($bmtime =~ /^(\d+-\d+-\d+)\s+/); 249 248 250 249 # Notes: … … 280 279 "Country-Code: $IPDB::org_country\n". 281 280 "Tech-Contact: $IPDB::org_techhandle\n". 282 "Created: $ ctime\n".283 "Updated: $ mtime\n".281 "Created: $bctime\n". 282 "Updated: $bmtime\n". 284 283 "Updated-By: $IPDB::org_email\n"; 285 284 } else { … … 304 303 "Country-Code: ".($country ? $country : $IPDB::org_country)."\n". 305 304 "Tech-Contact: ".($tech ? $tech : $IPDB::org_techhandle)."\n". 306 "Created: $ ctime\n".307 "Updated: $ mtime\n".305 "Created: $bctime\n". 306 "Updated: $bmtime\n". 308 307 "Updated-By: $IPDB::org_email\n"; 309 308 } # swip
Note:
See TracChangeset
for help on using the changeset viewer.