gresolver-0.0.5/0000755000076400007640000000000010367512230012525 5ustar gavingavingresolver-0.0.5/gresolver.pl0000644000076400007640000004352610367476362015123 0ustar gavingavin#!/usr/bin/perl # Copyright (c) 2004 Gavin Brown. This program is free software, you can use it # and/or modify it under the same terms as Perl itself. # # $Id: gresolver.pl,v 1.12 2006/01/30 20:54:10 gavin Exp $ use English; use Gtk2 -init; use Gtk2::GladeXML; use Gtk2::Helper; use File::Temp qw(tmpnam); use POSIX qw(setlocale); use Net::IPv6Addr; use strict; ### variables: my $NAME = 'GResolver'; my $SNAME = lc($NAME); my $PREFIX = '@PREFIX@'; my $LOCALE_DIR = (-d $PREFIX ? "$PREFIX/share/locale" : get_current_dir().'/locale'); my $LOCALE = (defined($ENV{LC_MESSAGES}) ? $ENV{LC_MESSAGES} : $ENV{LANG}); ### do locale stuff here, so that we can have a translated error message below: if ($OSNAME ne 'MSWin32') { require Locale::gettext; eval { use POSIX; setlocale(LC_ALL, $LOCALE); bindtextdomain($SNAME, $LOCALE_DIR); textdomain($SNAME); }; } else { eval { sub gettext { shift } }; } my $GLADE_FILE = (-d $PREFIX ? "$PREFIX/share/$SNAME" : get_current_dir())."/$SNAME.glade"; my $ICON_FILE = (-d $PREFIX ? "$PREFIX/share/pixmaps" : get_current_dir())."/$SNAME.png"; my $VERSION = '0.0.5'; my $RCFILE = sprintf('%s/.%src', Glib::get_home_dir(), $SNAME); my $OPTIONS = load_options(); my @SERVER_HIST = split(/\|/, $OPTIONS->{server_hist}); my @QUERY_HIST = split(/\|/, $OPTIONS->{query_hist}); my $glade = Gtk2::GladeXML->new($GLADE_FILE); $glade->signal_autoconnect_from_package('main'); if ($OSNAME eq 'MSWin32' && !-e $OPTIONS->{dig}) { my $filter = Gtk2::FileFilter->new; $filter->add_pattern('dig.exe'); $filter->set_name('dig.exe'); $glade->get_widget('dig_locator_chooser')->add_filter($filter); $glade->get_widget('dig_locator')->set_icon(Gtk2::Gdk::Pixbuf->new_from_file($ICON_FILE)); $glade->get_widget('dig_locator')->signal_connect('response', \&on_dig_locator_response, $glade); $glade->get_widget('dig_locator')->run; } my $DIG; if ($OSNAME eq 'MSWin32') { $DIG = $OPTIONS->{dig}; } else { chomp($DIG = `which dig 2>/dev/null`); } ### we need an executable dig, pop up an error dialog if one can't be found: if (!-x $DIG) { my $dialog = Gtk2::MessageDialog->new(undef, 'modal', 'error', 'ok', gettext("Can't find the 'dig' program!")); $dialog->signal_connect('response', sub { exit 1 }); $dialog->signal_connect('delete_event', sub { exit 1 }); $dialog->run; } my @DIG_VERSION = get_dig_version(); my $DIG_VERSION = join('.', @DIG_VERSION); my $RECURS_PARAM= recursive_param(); # these correspond to rows in the type combobox, which are populated by glade. # They will break if the order of the rows is changed. my $ANY_ROW_ID = 4; my $PTR_ROW_ID = 6; my $ABOUT_DIALOG_MARKUP = <<"END"; $NAME v$VERSION, using DiG v$DIG_VERSION Copyright (c) 2004 Gavin Brown. This program is free software, you can use it and/or modify it under the same terms as Perl itself. END my $OVERWRITE_DIALOG_MARKUP = sprintf('%s', gettext('A file named "%s" already exists.')); my $normal = Gtk2::Gdk::Cursor->new('left_ptr'); my $busy = Gtk2::Gdk::Cursor->new('watch'); ### build the UI: my $glade = Gtk2::GladeXML->new($GLADE_FILE); $glade->signal_autoconnect_from_package('main'); ### the application icon: my $ICON = Gtk2::Gdk::Pixbuf->new_from_file($ICON_FILE); ### set up the about dialog: $glade->get_widget('about_icon')->set_from_pixbuf($ICON); $glade->get_widget('about_label')->set_markup($ABOUT_DIALOG_MARKUP); $glade->get_widget('about_dialog')->set_icon($ICON); ### set up the file overwrite dialog: my $SAVE_TARGET = ''; $glade->get_widget('overwrite_dialog')->set_icon($ICON); $glade->get_widget('overwrite_dialog')->signal_connect('close', sub { $glade->get_widget('overwrite_dialog')->hide_all ; return 1 }); $glade->get_widget('overwrite_dialog')->signal_connect('delete_event', sub { $glade->get_widget('overwrite_dialog')->hide_all ; return 1 }); $glade->get_widget('overwrite_dialog')->signal_connect('response', sub { $glade->get_widget('overwrite_dialog')->hide_all ; write_output($SAVE_TARGET) if ($_[1] eq 'ok') ; return 1 }); ### set up the output treeview: my @cols = qw(Host TTL Class Type Answer); my $store = Gtk2::TreeStore->new(qw/Glib::String Glib::String Glib::String Glib::String Glib::String/); $glade->get_widget('output')->set_model($store); for (0..4) { $glade->get_widget('output')->insert_column_with_attributes( $_, gettext($cols[$_]), Gtk2::CellRendererText->new, text => $_, ); } foreach my $col ($glade->get_widget('output')->get_columns) { $col->set_resizable(1); } $glade->get_widget('output')->signal_connect('button_release_event', sub { context_menu() if ($_[1]->button == 3) }); ### setup the raw output textview: $glade->get_widget('raw_response')->get_buffer->create_tag( 'monospace', font => $OPTIONS->{font}, wrap_mode => 'none', ); $glade->get_widget('query_combo')->disable_activate; $glade->get_widget('server_combo')->disable_activate; ### apply user settings: $glade->get_widget('main_window')->set_position('center'); $glade->get_widget('main_window')->set_icon($ICON); $glade->get_widget('query_combo')->set_popdown_strings('', @QUERY_HIST); $glade->get_widget('server_combo')->set_popdown_strings('', @SERVER_HIST); $glade->get_widget('recursive_checkbutton')->set_active( $OPTIONS->{recursive_on} == 1); $glade->get_widget('additional_checkbutton')->set_active( $OPTIONS->{additional_on} == 1); $glade->get_widget('authoritative_checkbutton')->set_active( $OPTIONS->{authoritative_on} == 1); $glade->get_widget('trace_checkbutton')->set_active( $OPTIONS->{trace_on} == 1); $glade->get_widget('options_expander')->set_expanded( $OPTIONS->{options_visible} == 1); $glade->get_widget('notebook')->set_current_page( $OPTIONS->{current_page}); $glade->get_widget('type_combo')->set_active( $OPTIONS->{last_type}); $glade->get_widget('query_menuitem')->set_sensitive(undef); $glade->get_widget('query_button')->set_sensitive(undef); $glade->get_widget('main_window')->show_all; Gtk2->main; exit 0; ### gather user settings and save config: sub close_program { $OPTIONS->{recursive_on} = ($glade->get_widget('recursive_checkbutton')->get_active ? 1 : 0); $OPTIONS->{additional_on} = ($glade->get_widget('additional_checkbutton')->get_active ? 1 : 0); $OPTIONS->{authoritative_on} = ($glade->get_widget('authoritative_checkbutton')->get_active ? 1 : 0); $OPTIONS->{trace_on} = ($glade->get_widget('trace_checkbutton')->get_active ? 1 : 0); $OPTIONS->{options_visible} = ($glade->get_widget('options_expander')->get_expanded ? 1 : 0); $OPTIONS->{current_page} = $glade->get_widget('notebook')->get_current_page; $OPTIONS->{last_type} = $glade->get_widget('type_combo')->get_active; $OPTIONS->{query_hist} = join('|', uniq(@QUERY_HIST)); $OPTIONS->{server_hist} = join('|', uniq(@SERVER_HIST)); save_options($OPTIONS); exit 0; } ### make a DNS query: sub make_query { ### query options: my $type = $glade->get_widget('type_combo')->get_model->get($glade->get_widget('type_combo')->get_active_iter, 0); my $query = $glade->get_widget('query_combo')->entry->get_text; my $server = $glade->get_widget('server_combo')->entry->get_text; my $recursive = $glade->get_widget('recursive_checkbutton')->get_active; my $additional = $glade->get_widget('additional_checkbutton')->get_active; my $authoritative = $glade->get_widget('authoritative_checkbutton')->get_active; my $trace = $glade->get_widget('trace_checkbutton')->get_active; return unless ($query ne ''); unshift(@QUERY_HIST, $query); @QUERY_HIST = uniq(@QUERY_HIST); unshift(@SERVER_HIST, $server) if ($server ne ''); @SERVER_HIST = uniq(@SERVER_HIST); $glade->get_widget('query_combo')->set_popdown_strings(@QUERY_HIST); $glade->get_widget('server_combo')->set_popdown_strings(@SERVER_HIST) if ($server ne ''); $glade->get_widget('query_button')->set_sensitive(undef); $glade->get_widget('menu')->set_sensitive(undef); set_status(gettext('Sending query...')); ### if we're doing a PTR query and the query string is a dotted-quad IP address, ### then turn it into an in-addr.arpa domain: if ($type eq 'PTR') { if (is_ipv4addr($query)) { $query = join('.', reverse(split(/\./, $query))).'.in-addr.arpa'; $glade->get_widget('query_combo')->entry->set_text($query); } elsif (is_ipv6addr($query)) { $glade->get_widget('query_combo')->entry->set_text(lc(Net::IPv6Addr->new($query)->to_string_ip6_int)); } } ### build the dig query: my $cmd = join(' ', ( "\"$DIG\"", '+'.($recursive == 1 ? '' : 'no').$RECURS_PARAM, '+'.($additional == 1 ? '' : 'no').'additional', '+'.($authoritative == 1 ? '' : 'no').'authority', '+'.($trace == 1 ? '' : 'no').'trace', $type, $query, ($server ne '' ? sprintf('@%s', $server) : ''), )); $glade->get_widget('main_window')->window->set_cursor($busy); $store->clear; $glade->get_widget('raw_response')->get_buffer->set_text(''); ### read dig's STDOUT, pipe STDERR to a file so we can display it ### if dig exits with an error: my $tmpfile = tmpnam(); if (!open(DIG, "$cmd 2>$tmpfile|")) { $glade->get_widget('main_window')->window->set_cursor($normal); $glade->get_widget('menu')->set_sensitive(1); $glade->get_widget('query_button')->set_sensitive(1); my $dialog = Gtk2::MessageDialog->new(undef, 'modal', 'error', 'ok', sprintf(gettex('Cannot pipe from dig: %s'), $!)); $dialog->signal_connect('response', sub { $dialog->destroy }); set_status(gettext('')); $dialog->run; } else { my ($tag, $buffer); set_status(gettext('Receiving response...')); $tag = Gtk2::Helper->add_watch(fileno(DIG), 'in', sub { if (eof(DIG)) { close(DIG); Gtk2::Helper->remove_watch($tag); display($buffer); $glade->get_widget('main_window')->window->set_cursor($normal); $glade->get_widget('menu')->set_sensitive(1); $glade->get_widget('query_button')->set_sensitive(1); set_status(gettext('')); if ($? > 0) { if (!open(TMPFILE, $tmpfile)) { print STDERR "Error: couldn't open temporary file '$tmpfile' to tell you about an error from dig: $!\n"; exit 1; } else { my $err; while () { $err .= $_; } close(TMPFILE); my $dialog = Gtk2::MessageDialog->new(undef, 'modal', 'error', 'ok', $err); $dialog->signal_connect('response', sub { $dialog->destroy }); $dialog->run; } } else { unlink($tmpfile); } } else { $buffer .= ; } }); } return 1; } sub display { my $buffer = shift; my @lines = split(/\n{1}/, $buffer); my $parent = undef; $glade->get_widget('raw_response')->get_buffer->insert_with_tags_by_name( $glade->get_widget('raw_response')->get_buffer->get_start_iter, $buffer, 'monospace', ); foreach my $line (@lines) { if ($line =~ /;; ANSWER SECTION/) { my $iter = $store->append(undef); $store->set($iter, 0, 'Answer:'); $parent = $iter; } elsif ($line =~ /;; ADDITIONAL SECTION/) { my $iter = $store->append(undef); $store->set($iter, 0, 'Additional:'); $parent = $iter; } elsif ($line =~ /;; AUTHORITY SECTION/) { my $iter = $store->append(undef); $store->set($iter, 0, 'Authority:'); $parent = $iter; } elsif ($line !~ /^\s*$/ && $line !~ /^\s*;/) { my $iter = $store->append($parent); my @parts = split(/\s+/, $line, 5); for (0..4) { $store->set($iter, $_, $parts[$_]); } } } $glade->get_widget('output')->expand_all; return 1; } sub load_options { my $hashref = { font => 'Courier 10', recursive_on => 1, additional_on => 1, authoritative_on => 1, trace_on => 0, options_visible => 0, current_page => 0, last_type => 0, }; if (open(RCFILE, $RCFILE)) { while () { chomp; my ($name, $value) = split(/\s*=\s*/, $_, 2); $hashref->{lc($name)} = $value; } close(RCFILE); } return $hashref; } sub save_options { my $hashref = shift; if (!open(RCFILE, ">$RCFILE")) { print STDERR "Error opening '$RCFILE': $!\n"; return undef; } else { foreach my $name (keys(%{$hashref})) { printf(RCFILE "%s=%s\n", $name, $hashref->{$name}); } close(RCFILE); return 1; } } sub uniq { my @array = @_; my @new; my %map; foreach my $member (@array) { $map{$member}++; } foreach my $member (@array) { if ($map{$member} > 0) { push(@new, $member); $map{$member} = 0; } } return @new; } sub show_about_dialog { $glade->get_widget('about_dialog')->set_position('center'); $glade->get_widget('about_dialog')->show_all; return 1; } sub hide_about_dialog { $glade->get_widget('about_dialog')->hide_all; return 1; } sub changed { my $bool = ($glade->get_widget('query_combo')->entry->get_text ne ''); $glade->get_widget('query_menuitem')->set_sensitive($bool); $glade->get_widget('query_button')->set_sensitive($bool); return 1; } ### return an array containing the major, minor and micro version numbers of the dig program: sub get_dig_version { my $version; # an un-argumented call to dig returns the root hints from the default server; if (!open(DIG, "\"$DIG\"|")) { print STDERR "Cannot pipe from '$DIG': $!\n"; exit 1; } else { # ignore the first line: ; # capture the next line: my $line = ; close(DIG); if ($line =~ /DiG ([\d\.]+)/) { $version = $1; } else { print STDERR "Error parsing version output from dig, got:\n\t$line\n"; exit 1; } } return split(/\./, $version, 3); } ### the +[no]recurs(iv)e parameter changed between 9.2.x and 9.3.x. This subroutine examines the ### dig version and returns a string containing the correct parameter: sub recursive_param { return ($DIG_VERSION[0] >= 9 && $DIG_VERSION[1] >= 3 && $DIG_VERSION[2] >= 0 ? 'recurse' : 'recursive'); } sub is_ipv4addr { return ($_[0] =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/); } ### this is about as good as we can get here, since IPv6 addresses can have all different ### kinds of format: sub is_ipv6addr { return ($_[0] =~ /^[A-F0-9:]+$/); } sub context_menu { my ($model, $iter) = $glade->get_widget('output')->get_selection->get_selected; return 1 if (!defined($model) && !defined($iter)); my ($host, $ttl, $class, $type, $answer) = $model->get($iter); $type = uc($type); $answer =~ s/\.$//; return 1 if ($type eq 'SOA' || $answer eq ''); my $menu = Gtk2::Menu->new; my ($label, $callback); if ($type eq 'A') { $label = sprintf(gettext("Do a PTR query on %s"), $answer); $callback = sub { $glade->get_widget('query_combo')->entry->set_text($answer); $glade->get_widget('type_combo')->set_active($PTR_ROW_ID); $glade->get_widget('query_button')->clicked; } } elsif ($type eq 'MX') { my ($priority, $exchanger) = split(/\s+/, $answer, 2); if (is_ipv4addr($exchanger)) { $label = sprintf(gettext("Do a PTR query on '%s'"), $exchanger); $callback = sub { $glade->get_widget('query_combo')->entry->set_text($exchanger); $glade->get_widget('type_combo')->set_active($PTR_ROW_ID); $glade->get_widget('query_button')->clicked; }; } else { $label = sprintf(gettext("Put '%s' into Query box"), $exchanger); $callback = sub { $glade->get_widget('query_combo')->entry->set_text($exchanger); $glade->get_widget('type_combo')->set_active($ANY_ROW_ID); }; } } elsif ($type eq 'AAAA') { $label = sprintf(gettext("Do a PTR query on '%s'"), $answer); $callback = sub { $glade->get_widget('query_combo')->entry->set_text($answer); $glade->get_widget('type_combo')->set_active($PTR_ROW_ID); $glade->get_widget('query_button')->clicked; }; } elsif ($type eq 'NS') { $label = sprintf(gettext("Put '%s' into Server box"), $answer); $callback = sub { $glade->get_widget('server_combo')->entry->set_text($answer); }; } else { $label = sprintf(gettext("Put '%s' into Query box"), $answer); $callback = sub { $glade->get_widget('query_combo')->entry->set_text($answer); $glade->get_widget('type_combo')->set_active($ANY_ROW_ID); }; } my $item = Gtk2::ImageMenuItem->new_with_label($label); $item->set_image(Gtk2::Image->new_from_pixbuf($glade->get_widget('main_window')->render_icon('gtk-jump-to', 'menu'))); $item->signal_connect('activate', $callback) if (defined($callback)); $menu->append($item); $menu->show_all; $menu->popup(undef, undef, undef, undef, 3, undef); return 1; } sub save_output { my $chooser = Gtk2::FileChooserDialog->new( gettext('Save as...'), $glade->get_widget('main_window'), 'save', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok', ); $chooser->set_modal(1); $chooser->signal_connect('response', sub { my $file = $chooser->get_filename; $chooser->destroy; if ($_[1] eq 'ok') { $SAVE_TARGET = $file; if (-e $file) { $glade->get_widget('overwrite_dialog_title_label')->set_markup(sprintf($OVERWRITE_DIALOG_MARKUP, $file)); $glade->get_widget('overwrite_dialog')->show_all; } else { write_output($SAVE_TARGET); } } }); $chooser->show_all; return 1; } sub set_status { my $text = shift; $glade->get_widget('status')->push($glade->get_widget('status')->get_context_id('default'), $text); } sub write_output { my $file = shift; if (!open(FILE, ">$file")) { my $dialog = Gtk2::MessageDialog->new(undef, 'modal', 'error', 'ok', sprintf(gettext("Error opening '%s': %s", $file, $!))); $dialog->signal_connect('response', sub { $dialog->destroy }); $dialog->run; } else { print FILE $glade->get_widget('raw_response')->get_buffer->get_text( $glade->get_widget('raw_response')->get_buffer->get_start_iter, $glade->get_widget('raw_response')->get_buffer->get_end_iter, 0 ); close(FILE); } return 1; } sub get_current_dir { if ($OSNAME eq 'MSWin32') { my $dir; eval { require Win32; $dir = Win32::GetCwd(); }; return ($@ ? undef : $dir); } else { return $ENV{PWD}; } } sub on_dig_locator_close { exit 0; } sub on_dig_locator_response { my ($dialog, $response, $glade) = @_; if ($response ne 'ok') { exit 0; } else { my $dig = $glade->get_widget('dig_locator_chooser')->get_filename; if (!-e $dig) { $dialog->run; } else { $glade->get_widget('dig_locator')->hide; $OPTIONS->{dig} = $dig; save_options(); return 1; } } } gresolver-0.0.5/ChangeLog0000644000076400007640000000140410367477334014315 0ustar gavingavinChangeLog ========= 2006-01-30 - v0.0.5 * This release works on Windows. 2005-06-20 - v0.0.4 * This release introduces some user-interface improvements, and allows the user to save their queries. 2004-11-03 - v0.0.3 * This release improves support for IPv6, allowing for RFC 1886 style reverse lookups, as well as the A6 and DNAME record types. You can now also right-click on most records in the output window. 2004-10-24 - v0.0.2 * This release fixes a problem caused by a change in dig's command line syntax between 9.2 and 9.3, that broke the recursion option. Thanks to Jean-Yves Lefort for reporting this bug. 2004-10-17 - v0.0.1 * Initial release. -- $Id: ChangeLog,v 1.5 2006/01/30 21:02:20 gavin Exp $ gresolver-0.0.5/gresolver.ico0000644000076400007640000001027610367476400015247 0ustar gavingavin  ( @    &.4785/'  #7HZenqqog]L<'  0GburW<#=`) 9#A(D+C*>&0 '  V0 @a +B*Q5W8X:Y:V8?*NA6p`tciUuaNK=2`( = r1"ubIl[B(\>cC"cC"^? I5 rexuuuqmY0' Y) 5^>)V;zhfJ.jJ(jJ(U<#pbVwuuriU(!F% ]@*_A"lM,kPjK*qQ/eTCvuuɵuupaP@k-76%[?!mM*tV5gJsT1pbTuuuɵuuuw` @ % fX>!lM+oR2w\lmQ1rdWuuɵuuun V, 3@-iK+kN-F7'5/'82+82+82+72+/)!!g\Quuɵɵuuul$f8- _\B%rT1mR3AAA{tm}uuuɵuuug3$8$tEA/lO.{[8|^=III|uuuɵuuwsbRB-K2 MT=$xY7d?fBJJJunhxuuxnUK@W<Z=$ S _G+`8NKHPOMRPN|zvȸsWSB,m F9)iYDAwŷͽȸ}egT \$help, 'prefix=s' => \$prefix); if (defined($help)) { print <<"END"; Usage: configure [options] Options: --help print this message --prefix=DIR installation destination (will use `pkg-config gtk+-2.0 --variable=prefix` by default) END } else { if (!defined($prefix)) { chomp($prefix = `pkg-config gtk+-2.0 --variable=prefix`); } printf("Configuration options:\n prefix: %s\nWriting Makefile...\n", $prefix); open(SRC, 'Makefile.in'); open(DST, '>Makefile'); while () { s/\@PREFIX\@/$prefix/g; print DST $_; } close(SRC); close(DST); print "Now type 'make' to build.\n"; } gresolver-0.0.5/gresolver.spec0000644000076400007640000000225610367512163015423 0ustar gavingavinSummary: A graphical DNS query tool. Name: gresolver Version: 0.0.5 Release: 1 Epoch: 0 Group: Applications/System License: GPL URL: http://jodrell.net/projects/gresolver Packager: Gavin Brown Vendor: http://jodrell.net/ Source: http://jodrell.net/download.html?file=/files/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/root-%{name}-%{version} Prefix: %{_prefix} AutoReq: no BuildArch: noarch BuildRequires: perl >= 0:5.00503 Requires: gtk2 >= 2.6.0, perl >= 5.8.0, perl-Gtk2, perl-Gtk2-GladeXML, perl-gettext, bind-utils > 9,perl-Net-IPv6Addr %description GResolver is a graphical DNS query tool. It allows system administrators to quickly and easily make the most common DNS queries without constructing lengthy 'dig' commands. %prep %setup ./configure --prefix=%{_prefix} %build make %install rm -rf %{buildroot} %makeinstall prefix=%{buildroot}%{_prefix} %clean rm -rf %{buildroot} %files %defattr(-,root,root,0755) %doc COPYING ChangeLog %{_bindir}/* %{_datadir}/* %changelog * Mon Jun 20 2005 Gavin Brown - 0.0.4-1 - Updated dependency on GTK+ 2.6.0+ * Sun Oct 17 2004 Gavin Brown - 0.0.1-1 - Initial package. gresolver-0.0.5/gresolver.glade0000644000076400007640000013747710367433740015566 0ustar gavingavin DNS Resolver GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False 500 500 True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True True False 0 True True _File True True Make Q_uery... True True gtk-execute 1 0.5 0.5 0 0 True True Save Query _As... True True gtk-save-as 1 0.5 0.5 0 0 True True _Quit True True gtk-quit 1 0.5 0.5 0 0 True _Help True True _About True True gtk-about 1 0.5 0.5 0 0 0 False False 6 True False 12 6 True 3 2 False 12 12 True Query: False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 1 0 1 fill True Server: False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 1 1 2 fill True False True False True False True True True True 0 True * False True GTK_SELECTION_BROWSE 1 2 0 1 True False True False True False True True True True 0 True * False True GTK_SELECTION_BROWSE 1 2 1 2 True Type: False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 1 2 3 fill True A AAAA A6 AXFR ANY CNAME PTR NS MX DNAME SOA TXT SIG KEY False True 1 2 2 3 fill fill 0 False False True True True 0 True False 0 True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True False 6 True True Recursive True GTK_RELIEF_NORMAL True True False True 0 False False True True Show additional True GTK_RELIEF_NORMAL True True False True 0 False False True True Show authority True GTK_RELIEF_NORMAL True True False True 0 False False True True Show trace from root True GTK_RELIEF_NORMAL True False False True 0 False False 0 False False True <span weight="bold">Options</span> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 False False True True True True GTK_POS_TOP False False 6 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT True True True False False True False False False False True True Response False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 tab 6 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT True True False False True GTK_JUSTIFY_LEFT GTK_WRAP_NONE True 0 0 0 0 0 0 False True True Raw False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 tab 0 True True True 1 0 0 0 0 0 0 0 True True True GTK_RELIEF_NORMAL True True 0.5 0.5 0 0 0 0 0 0 True False 2 True gtk-execute 4 0.5 0.5 0 0 0 False False True Make _Query... True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False 0 False True 0 True True True True 0 False False About GResolver GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE True False False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True False 0 True GTK_BUTTONBOX_END True True True gtk-close True GTK_RELIEF_NORMAL True -7 0 False True GTK_PACK_END 6 True False 12 True 0.5 0.5 0 0 0 False False True True label11 False True GTK_JUSTIFY_CENTER True True 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True 0 True True Confirm Overwrite... GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE True False False True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True False 0 True GTK_BUTTONBOX_END True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True GTK_RELIEF_NORMAL True -5 True 0.5 0.5 0 0 0 0 0 0 True False 2 True gtk-refresh 4 0.5 0.5 0 0 0 False False True _Replace True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False 0 False True GTK_PACK_END 6 True False 12 True gtk-dialog-question 6 0 0 0 0 0 False False True False 12 True False True GTK_JUSTIFY_LEFT True False 0 0 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True Do you want to replace it with the one you are saving? False False GTK_JUSTIFY_LEFT True False 0 0 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True 0 True True 0 True True Locate the 'dig.exe' executable GTK_WINDOW_TOPLEVEL GTK_WIN_POS_CENTER True False False True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True True True False 0 True GTK_BUTTONBOX_END True True True gtk-quit True GTK_RELIEF_NORMAL True 0 True True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END 6 True False 12 True 0 0 0 0 0 0 0 0 True gtk-dialog-question 6 0.5 0.5 0 0 0 False False True False 12 True <span size="large" weight="bold">Locate the 'dig.exe' executable</span> False True GTK_JUSTIFY_LEFT False False 0 0 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True In order to use GResolver, you must locate the file 'dig.exe' on your system: False False GTK_JUSTIFY_LEFT True False 0 0 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True Select A File GTK_FILE_CHOOSER_ACTION_OPEN True False -1 0 False False 0 True True 0 True True gresolver-0.0.5/COPYING0000644000076400007640000004313110134210765013562 0ustar gavingavin GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. gresolver-0.0.5/Makefile.in0000644000076400007640000000152010367476362014607 0ustar gavingavin# Makefile for gresolver. # $Id: Makefile.in,v 1.2 2006/01/30 20:54:10 gavin Exp $ prefix=@PREFIX@ name=gresolver all: build build: mkdir build perl -ne 's!\@PREFIX\@!$(prefix)!g ; print' < $(name).pl > $(name) install: -mkdir -p "$(prefix)/bin" "$(prefix)/share/$(name)" "$(prefix)/share/pixmaps" "$(prefix)/share/applications" -mkdir -p "$(prefix)/share/locale/en/LC_MESSAGES" install -m 0755 $(name) "$(prefix)/bin/" install -m 0644 $(name).png "$(prefix)/share/pixmaps/" install -m 0644 $(name).glade "$(prefix)/share/$(name)/" install -m 0644 $(name).desktop "$(prefix)/share/applications/" clean: rm -rf build rm -f $(name) Makefile uninstall: rm -f "$(prefix)/bin/$(name)" rm -f "$(prefix)/share/pixmaps/$(name).png" rm -rf "$(prefix)/share/$(name)/" find "$(prefix)/share/locale" -print | grep -i $(name) | xargs rm -rf gresolver-0.0.5/gresolver.png0000644000076400007640000000761110133774354015260 0ustar gavingavinPNG  IHDR00WbKGD pHYs  ~tIME %7 λIDATx՚yl}?of&"ER/QӺ,[%Gqbu--EpQ)Ah4jمԉkW$떩%x˽wgycgWC:-: ܙ7 _ OT5K$W56%R2! -̥̐ro/>1 cu[x}c[e0LJyƧ0|i ;9@.j<|ڽsӎ-iLL! ]Fkp,y:ps驱μʏD} c 8vh_lvffQHu)șz /~8|dM f˗/Wk<ϫ]WѣGٹs'/eaYa@<]xe!9VH&B@Y@ֺ{?Խ޳UD"\t/BPBJk< [txZ_վx41 D}<7~aCG1#@U 7n~ꢕr9VXu*˲4DB4.XLk<`b>GS"LK2|p,,Ra*Mb/9ug/OrU*/utt`yhM0i8ݻ*ΝLNVKxx3yftts!6l@6e||b5j}ş֢5J]-PBJqYe^֬ZՋ?>X>#H!Ξ r$ma6e*b#GH$8}4T SSS\|sCܳ-*`6;ں,v~_J JjmFS#'_ %{ñabGسg-kp6x#0Zkc+҂4̶Ksxg&F,+wt?< &LF_~m,Cs@(U|487rܜmhO`c|xr)I66ljai+K[ijmeVp[HfF_(efEyV8ʉ3Baqi|aZxi)@>uY<2>|A'p|ȉ׬Xz!̻bKZ0 J !*B^ˌO҆y<@4lQv^IӸܤ/|?}bҨM]9?ssc4u 5A*WR*2y[*Z mdhx[Zk2F:(p_iJN`2oUsda:-;RB2qBJ#O!ˣ$?8:27C4X0v~+G#$0[ͦttazUԓGWðBxZ3x U#a\!(9sgy]-8p/3\8}f^A`Է@ixѼF\(ώ ڎ4/_OʃW^|N`XJ)O)all󧎰546-v+b/9.'O{r~`8 *nQDp# X,7c ɶt۞EtI zJ X,(;;CBhﻍĒl!WT256ȹ81>ņ&QnZ} ˀV3\_jMtf8dXB&0A [ J,MƩamlW.Bv.|p>uUu5ٕ>;(}ۏ9_^|gJ/d_ujU_.ʟ6n NU U e3^FL@J PDojp=D^Vbߓ(@2 AIENDB`gresolver-0.0.5/gresolver.desktop0000644000076400007640000000050110262252261016123 0ustar gavingavin[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Exec=gresolver TryExec= X-GNOME-DocPath= Terminal=false StartupNotify=true Name=DNS Query Tool Name[en_GB]=DNS Query Tool Comment=Perform advanced DNS queries Comment[en_GB]=Perform advanced DNS queries Icon=gresolver Categories=Categories=Application;Network;