Changeset 48 for trunk


Ignore:
Timestamp:
12/10/09 16:24:55 (15 years ago)
Author:
Kris Deugau
Message:

/trunk

WHOIS query is functional - requires Net::Whois::Raw and Text::Wrap (idjit

WHOIS servers return (very-)long-line respones sometimes)

Added proper template for WHOIS, removed copy-of-VegaDNS-output version

Location:
trunk
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r47 r48  
    639639  }
    640640
    641 } elsif ($webvar{page} eq 'whois') {
     641} elsif ($webvar{page} eq 'whoisq') {
     642
     643  if ($webvar{qfor}) {
     644    use Net::Whois::Raw;
     645    use Text::Wrap;
     646
     647# caching useful?
     648#$Net::Whois::Raw::CACHE_DIR = "/var/spool/pwhois/";
     649#$Net::Whois::Raw::CACHE_TIME = 60;
     650
     651    my ($dominfo, $whois_server) = whois($webvar{qfor});
     652##fixme:  if we're given an IP, try rwhois as well as whois so we get the real final data
     653
     654    # le sigh.  idjits spit out data without linefeeds...
     655    $Text::Wrap::columns = 88;
     656
     657# &%$@%@# high-bit crap.  We should probably find a way to properly recode these instead of one-by-one.
     658# Mainly an XHTML validation thing.
     659    $dominfo =~ s/\xa9/\©/g;
     660    $dominfo =~ s/\xae/\®/g;
     661
     662    $page->param(qfor => $webvar{qfor});
     663    $page->param(dominfo => wrap('','',$dominfo));
     664    $page->param(whois_server => $whois_server);
     665  } else {
     666    $page->param(errmsg => "Missing host or domain to query in WHOIS") if $webvar{askaway};
     667  }
    642668
    643669} elsif ($webvar{page} eq 'log') {
  • trunk/templates/dns.css

    r42 r48  
    5252        background-color: #CCCCCC;
    5353        padding: 3px;
     54        text-align: left;
    5455}
    5556tr.darkrowheader {
     
    5960tr.datalinelight {
    6061        background-color: #F0F0F0;
     62        text-align: left;
    6163}
    6264
Note: See TracChangeset for help on using the changeset viewer.