[libsendmail-milter-perl] 04/20: Merge commit 'upstream/0.50'
Hilko Bengen
bengen at moszumanska.debian.org
Sun Sep 27 18:32:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag debian/1.0-1
in repository libsendmail-milter-perl.
commit de9e1045a0fde0b80bd60e23bf0cb8a9d15b8257
Merge: 5b989fe 9803bb1
Author: Hilko Bengen <bengen at debian.org>
Date: Wed Jul 22 14:43:28 2009 +0200
Merge commit 'upstream/0.50'
Conflicts:
bin/regview.pl
Changes | 53 +
MANIFEST | 83 +-
META.yml | 23 +-
README | 2 +-
bin/regclassnames.pl | 19 +-
bin/regcompare.pl | 1027 +++++++++++++++++++
bin/regdiff.pl | 18 +-
bin/regdump.pl | 67 +-
bin/regexport.pl | 21 +-
bin/regfind.pl | 38 +-
bin/regmultidiff.pl | 154 +++
bin/regscan.pl | 60 +-
bin/regsecurity.pl | 55 +
bin/regshell.pl | 246 +++++
bin/regstats.pl | 6 +-
bin/regtimeline.pl | 34 +-
bin/regtree.pl | 41 +-
bin/regview.pl | 1005 +++++++++++++++----
lib/Parse/Win32Registry.pm | 1195 +++++++++++++++++-----
lib/Parse/Win32Registry/Base.pm | 1090 ++++++++++++++++++--
lib/Parse/Win32Registry/Entry.pm | 89 ++
lib/Parse/Win32Registry/File.pm | 24 +
lib/Parse/Win32Registry/Key.pm | 114 ++-
lib/Parse/Win32Registry/Value.pm | 45 +-
lib/Parse/Win32Registry/Win95/Entry.pm | 77 +-
lib/Parse/Win32Registry/Win95/File.pm | 230 +++--
lib/Parse/Win32Registry/Win95/Key.pm | 449 +++------
lib/Parse/Win32Registry/Win95/Value.pm | 133 ++-
lib/Parse/Win32Registry/WinNT/Entry.pm | 168 ++--
lib/Parse/Win32Registry/WinNT/File.pm | 196 ++--
lib/Parse/Win32Registry/WinNT/Hbin.pm | 160 +++
lib/Parse/Win32Registry/WinNT/Key.pm | 327 +++---
lib/Parse/Win32Registry/WinNT/Security.pm | 181 ++++
lib/Parse/Win32Registry/WinNT/Value.pm | 164 ++-
t/constants.t | 2 +-
t/entry.t | 235 +++++
t/errors.t | 635 ++++--------
t/fake_ntuser_dat.rf | Bin 4536 -> 4536 bytes
t/fake_sam.rf | Bin 4320 -> 4320 bytes
t/fake_security.rf | Bin 4512 -> 4512 bytes
t/fake_software.rf | Bin 4440 -> 4440 bytes
t/fake_system.rf | Bin 4440 -> 4440 bytes
t/fake_usrclass_dat.rf | Bin 4368 -> 4368 bytes
t/file.t | 22 +-
t/invalid_hbin_header.rf | Bin 4224 -> 0 bytes
t/invalid_nk_node_type.rf | Bin 96 -> 0 bytes
t/invalid_nk_signature.rf | Bin 96 -> 0 bytes
t/invalid_regf_checksum.rf | Bin 0 -> 512 bytes
t/invalid_regf_header.rf | Bin 112 -> 512 bytes
t/invalid_rgdb_block_size.rf | Bin 152 -> 0 bytes
t/invalid_rgdb_entry_size.rf | Bin 228 -> 0 bytes
t/invalid_rgdb_header.rf | Bin 152 -> 0 bytes
t/invalid_rgkn_block_num.rf | Bin 120 -> 0 bytes
t/invalid_vk_inline_data.rf | Bin 32 -> 0 bytes
t/invalid_vk_signature.rf | Bin 64 -> 0 bytes
t/key.t | 72 +-
t/misc.t | 437 +++++---
t/missing_hbin_root_key.rf | Bin 112 -> 0 bytes
t/missing_nk_class_name.rf | Bin 4224 -> 0 bytes
t/missing_nk_name.rf | Bin 80 -> 0 bytes
t/missing_rgdb_entry_data_for_value.rf | Bin 15 -> 0 bytes
t/missing_rgdb_entry_for_key.rf | Bin 164 -> 0 bytes
t/missing_rgdb_entry_name_for_key.rf | Bin 172 -> 0 bytes
t/missing_rgdb_entry_name_for_value.rf | Bin 12 -> 0 bytes
t/missing_rgdb_header.rf | Bin 120 -> 0 bytes
t/missing_rgkn_root_key.rf | Bin 64 -> 0 bytes
t/missing_subkey_list.rf | Bin 4232 -> 0 bytes
t/missing_subkey_list_header.rf | Bin 4224 -> 0 bytes
t/missing_value_list.rf | Bin 4228 -> 0 bytes
t/missing_vk_data.rf | Bin 32 -> 0 bytes
t/missing_vk_name.rf | Bin 24 -> 0 bytes
t/no_matching_rgdb_entry_for_key.rf | Bin 176 -> 0 bytes
t/security.t | 1219 +++++++++++++++++++++++
t/use.t | 8 +-
t/value.t | 210 ++--
t/virtual_root.t | 2 +-
t/win95_error_tests.rf | Bin 1147 -> 510 bytes
t/win95_key_tests.rf | Bin 834 -> 827 bytes
t/win95_value_tests.rf | Bin 943 -> 943 bytes
t/winnt_error_tests.rf | Bin 6320 -> 6680 bytes
t/winnt_key_tests.rf | Bin 5528 -> 5632 bytes
t/{fake_software.rf => winnt_security_tests.rf} | Bin 4440 -> 5232 bytes
t/winnt_value_tests.rf | Bin 6392 -> 6392 bytes
83 files changed, 8005 insertions(+), 2431 deletions(-)
diff --cc bin/regdump.pl
index d3f4edb,d686dcd..e1daa59
--- a/bin/regdump.pl
+++ b/bin/regdump.pl
@@@ -78,36 -112,10 +112,41 @@@ $script_name <filename> [subkey] [-r] [
or the subkey specified
-v or --values display values
-x or --hexdump display value data as a hex dump
+ -c or --class-name display the class name for the key (if present)
+ -s or --security display the security information for the key,
+ including the owner and group SIDs,
+ and the system and discretionary ACLs (if present)
+ -o or --owner display only the owner SID for the key (if present)
USAGE
}
+__END__
+
+=head1 NAME
+
+regdump - Dumps the keys and values of a registry file.
+
+=head1 SYNOPSIS
+
+regdump <filename> [subkey] [-r] [-v] [-x]
+
+=over 4
+
+=item -r or --recurse
+
+traverse all child keys from the root key or the subkey specified
+
+=item -v or --values
+
+display values
+
+=item -x or --hexdump
+
+display value data as a hex dump
+
+=back
+
+=head1 SEE ALSO
+
+L<Parse::Win32Registry>
+
+=cut
diff --cc bin/regfind.pl
index ebf7335,f11c9fc..888b459
--- a/bin/regfind.pl
+++ b/bin/regfind.pl
@@@ -103,40 -118,6 +118,41 @@@ $script_name <filename> <search-string
-v or --value search value names for a match
-d or --data search value data for a match
-t or --type search value types for a match
+ -x or --hexdump display value data as a hex dump
USAGE
}
+__END__
+
+=head1 NAME
+
+regfind - Searches a registry file for anything that matches the specified string.
+
+=head1 SYNOPSIS
+
+regfind <filename> <search-string> [-k] [-v] [-d] [-t]
+
+=over 4
+
+=item -k or --key
+
+search key names for a match
+
+=item -v or --value
+
+search value names for a match
+
+=item -d or --data
+
+search value data for a match
+
+=item -t or --type
+
+search value types for a match
+
+=back
+
+=head1 SEE ALSO
+
+L<Parse::Win32Registry>
+
+=cut
diff --cc bin/regscan.pl
index c68a580,e7ed419..2efd347
--- a/bin/regscan.pl
+++ b/bin/regscan.pl
@@@ -42,56 -55,19 +55,59 @@@ sub usage
$script_name for Parse::Win32Registry $Parse::Win32Registry::VERSION
Displays the component elements of a registry file, without traversing
- the current active key structure. This will include elements that are
+ the current active key structure. This will display elements that are
associated with but are not actually keys or values. Additionally,
some of the keys, values, and associated elements displayed
- will no longer be active and may be invalid or 'deleted'.
-
- $script_name <filename> [-d] [-s] [-x]
- -d or --debug show the technical information for an entry
+ will no longer be active and may be invalid or deleted.
+
+ $script_name <filename> [-k] [-v] [-s] [-a] [-p] [-u] [-w]
+ -k or --keys list only 'key' entries
+ -v or --values list only 'value' entries
+ -s or --security list only 'security' entries
+ -a or --allocated list only 'allocated' entries
+ -p or --parse-info show the technical information for an entry
instead of the string representation
- -s or --silent suppress the display of warning messages
- for invalid keys and values
- -x or --hexdump show the on-disk entries as a hex dump
+ -u or --unparsed show the unparsed on-disk entries as a hex dump
+ -w or --warnings display warnings of invalid keys and values
USAGE
}
+__END__
+
+=head1 NAME
+
+regscan - Displays the component elements of a registry file
+
+=head1 SYNOPSIS
+
+regscan <filename> [-d] [-s] [-x]
+
+=over 4
+
+=item -d or --debug
+
+show the technical information for an entry instead of the string
+representation
+
+=item -s or --silent
+
+suppress the display of warning messages for invalid keys and values
+
+=item -x or --hexdump
+
+show the on-disk entries as a hex dump
+
+=back
+
+=head1 DESCRIPTION
+
+B<regscan> displays the component elements of a registry file, without
+traversing the current active key structure. This will include
+elements that are associated with but are not actually keys or values.
+Additionally, some of the keys, values, and associated elements
+displayed will no longer be active and may be invalid or 'deleted'.
+
+=head1 SEE ALSO
+
+L<Parse::Win32Registry>
+
+=cut
diff --cc bin/regtimeline.pl
index 0190d35,ec6bfab..c640621
--- a/bin/regtimeline.pl
+++ b/bin/regtimeline.pl
@@@ -82,32 -91,6 +91,33 @@@ $script_name <filename> [subkey] [-l <n
-l or --last display only the last <number> days
of registry activity
-v or --values display values
+ -x or --hexdump display value data as a hex dump
USAGE
}
+__END__
+
+=head1 NAME
+
+regtimeline - Displays the keys and values of a registry file in date order.
+
+=head1 SYNOPSIS
+
+regtimeline <filename> [subkey] [-l <number>] [-v]
+
+=over 4
+
+=item -l or --last
+
+display only the last <number> days of registry activity
+
+=item -v or --values
+
+display values
+
+=back
+
+=head1 SEE ALSO
+
+L<Parse::Win32Registry>
+
+=cut
diff --cc bin/regview.pl
index 62bdf8b,e2cbc54..f38930e
--- a/bin/regview.pl
+++ b/bin/regview.pl
@@@ -361,33 -603,358 +603,382 @@@ sub quit
sub about {
Gtk2->show_about_dialog(undef,
- name => $script_name,
- version => $Parse::Win32Registry::VERSION,
- copyright => 'Copyright (c) 2008 James Macfarlane',
- comments => 'GTK2 Registry Viewer for the Parse::Win32Registry module',
+ 'program-name' => $script_name,
+ 'version' => $Parse::Win32Registry::VERSION,
+ 'copyright' => 'Copyright (c) 2008,2009 James Macfarlane',
+ 'comments' => 'GTK2 Registry Viewer for the Parse::Win32Registry module',
+ );
+ }
+
+ sub show_message {
+ my $type = shift;
+ my $message = shift;
+
+ my $dialog = Gtk2::MessageDialog->new(
+ $window,
+ 'destroy-with-parent',
+ $type,
+ 'ok',
+ $message,
+ );
+ $dialog->run;
+ $dialog->destroy;
+ }
+
+ sub create_bookmark_menuitem {
+ my ($name, $subkey_path) = @_;
+
+ if (my $menuitem = Gtk2::MenuItem->new($name)) {
+ $bookmarks_menu->append($menuitem);
+ $bookmarks_menu->show_all;
+ if (my $iter = $bookmark_store->append) {
+ $bookmark_store->set($iter,
+ 0, $name,
+ 1, $subkey_path,
+ 2, $menuitem,
+ );
+ }
+ $menuitem->signal_connect('activate' => \&go_to_bookmark,
+ $subkey_path);
+ }
+ }
+ sub add_bookmark {
+ my $iter = $tree_selection->get_selected;
+ return if !defined $iter;
+
+ my $key = $tree_store->get($iter, 3);
+
+ # Remove root key name to get subkey path
+ my $subkey_path = (split(/\\/, $key->get_path, 2))[1];
+ if (defined $subkey_path) {
+ my $name = $key->get_name;
+ create_bookmark_menuitem($name, $subkey_path);
+ }
+ }
+
+ sub edit_bookmarks {
+ $bookmarks_dialog->show_all;
+ }
+
+ sub remove_all_bookmarks {
+ my $iter = $bookmark_store->get_iter_first;
+ # destroy all the bookmark menu items
+ while (defined $iter) {
+ my $menuitem = $bookmark_store->get($iter, 2);
+ $bookmarks_menu->remove($menuitem);
+ $menuitem->destroy;
+ $iter = $bookmark_store->iter_next($iter);
+ }
+ # then empty the bookmark store
+ $bookmark_store->clear;
+ }
+
+ sub go_to_bookmark {
+ my ($menuitem, $path) = @_;
+ go_to_subkey($path);
+ }
+
+ sub copy_key_path {
+ my $tree_iter = $tree_selection->get_selected;
+ if (defined $tree_iter) {
+ my $key = $tree_store->get($tree_iter, 3);
+ my $clipboard = Gtk2::Clipboard->get(Gtk2::Gdk->SELECTION_CLIPBOARD);
+ $clipboard->set_text($key->get_path);
+ }
+ }
+
+ sub go_to_value {
+ my $value_name = shift;
+
+ my $iter = $list_store->get_iter_first;
+ while (defined $iter) {
+ my $name = $list_store->get($iter, 0);
+ my $value = $list_store->get($iter, 3);
+
+ if ($value_name eq $value->get_name) {
+ my $tree_path = $list_store->get_path($iter);
+ $list_view->expand_to_path($tree_path);
+ $list_view->scroll_to_cell($tree_path);
+ $list_view->set_cursor($tree_path);
+ $window->set_focus($list_view);
+ return;
+ }
+
+ $iter = $list_store->iter_next($iter);
+ }
+ }
+
+ sub find_matching_child_iter {
+ my ($iter, $subkey_name) = @_;
+
+ my $child_iter = $tree_store->iter_nth_child($iter, 0);
+ if (!defined $child_iter) {
+ # iter has already been expanded and has no children
+ return;
+ }
+
+ # Check iter's children are real
+ if (!defined $tree_store->get($child_iter, 0)) {
+ my $key = $tree_store->get($iter, 3);
+ add_children($key, $tree_store, $iter);
+ $tree_store->remove($child_iter);
+ # (Need to refetch the first child iter after removing it.)
+ $child_iter = $tree_store->iter_nth_child($iter, 0);
+ }
+
+ while (defined $child_iter) {
+ my $child_name = $tree_store->get($child_iter, 0);
+ my $child_key = $tree_store->get($child_iter, 3);
+
+ if ($child_name eq $subkey_name) {
+ return $child_iter; # match found
+ }
+ $child_iter = $tree_store->iter_next($child_iter);
+ }
+ return; # no match found
+ }
+
+ sub go_to_subkey {
+ my $subkey_path = shift;
+
+ my @path_components = index($subkey_path, "\\") == -1
+ ? ($subkey_path)
+ : split(/\\/, $subkey_path, -1);
+
+ my $iter = $tree_store->get_iter_first;
+ return if !defined $iter; # no registry loaded
+
+ while (defined(my $subkey_name = shift @path_components)) {
+ $iter = find_matching_child_iter($iter, $subkey_name);
+ if (!defined $iter) {
+ return; # subkey cannot be found in/added to the tree store
+ }
+
+ if (@path_components == 0) {
+ my $tree_path = $tree_store->get_path($iter);
+ $tree_view->expand_to_path($tree_path);
+ $tree_view->scroll_to_cell($tree_path);
+ $tree_view->set_cursor($tree_path);
+ $window->set_focus($tree_view);
+ return; # skip remaining search
+ }
+ }
+ }
+
+ sub find_next {
+ if (!defined $find_param || !defined $find_iter) {
+ return;
+ }
+
+ # Build find next dialog
+ my $label = Gtk2::Label->new;
+ $label->set_text("Searching registry...");
+ my $dialog = Gtk2::Dialog->new('Find',
+ $window,
+ 'modal',
+ 'gtk-cancel' => 'cancel',
);
+ $dialog->vbox->pack_start($label, TRUE, TRUE, 10);
+ $dialog->set_default_response('cancel');
+ $dialog->show_all;
+
+ my $id = Glib::Idle->add(sub {
+ my ($key, $value) = $find_iter->get_next;
+
+ if (!defined $key) {
+ $dialog->response('ok');
+ show_message('info', 'Finished searching.');
+ return FALSE; # stop searching
+ }
+
+ # Remove root key name to get subkey path
+ my $subkey_path = (split(/\\/, $key->get_path, 2))[1];
+ if (!defined $subkey_path) {
+ return FALSE; # stop searching
+ # (currently get_subtree_iterator never returns the root key)
+ }
+
+ if (defined $value) {
+ # Check value for a match
+ my $value_name = $value->get_name;
+ if (index(lc $value_name, lc $find_param) >= 0) {
+ go_to_subkey($subkey_path);
+ go_to_value($value_name);
+ $dialog->response('ok');
+ return FALSE; # stop searching
+ }
+ else {
+ return TRUE; # continue searching
+ }
+ }
+
+ # Check key for a match
+ my $key_name = $key->get_name;
+ if (index(lc $key_name, lc $find_param) >= 0) {
+ go_to_subkey($subkey_path);
+ $dialog->response('ok');
+ return FALSE; # stop searching
+ }
+ else {
+ return TRUE; # continue searching
+ }
+ });
+
+ my $response = $dialog->run;
+ $dialog->destroy;
+
+ if ($response eq 'cancel' || $response eq 'delete-event') {
+ Glib::Source->remove($id);
+ }
+ }
+
+ sub find {
+ # Build find dialog
+ my $entry = Gtk2::Entry->new;
+ $entry->set_activates_default(TRUE);
+ my $dialog = Gtk2::Dialog->new('Find',
+ $window,
+ 'modal',
+ 'gtk-cancel' => 'cancel',
+ 'gtk-ok' => 'ok',
+ );
+ $dialog->vbox->pack_start($entry, TRUE, TRUE, 10);
+ $dialog->set_default_response('ok');
+ $dialog->show_all;
+
+ my $response = $dialog->run;
+ $dialog->destroy;
+
+ my $root_iter = $tree_store->get_iter_first;
+ return if !defined $root_iter;
+
+ my $root_key = $tree_store->get($root_iter, 3);
+ return if !defined $root_key;
+
+ if ($response eq 'ok') {
+ $find_param = $entry->get_text;
+ $find_iter = undef;
+ if ($find_param ne '') {
+ $find_iter = $root_key->get_subtree_iterator;
+ find_next;
+ }
+ }
+ }
+
+ sub save_settings {
+ if (defined $settings_file) {
+ if (open my $fh, ">", $settings_file) {
+ my ($x, $y) = $window->get_position;
+ my ($w, $h) = $window->get_size;
+ print {$fh} "main=${x}x${y}+${w}x${h}\n";
+
+ my $iter = $bookmark_store->get_iter_first;
+ while (defined $iter) {
+ my $name = $bookmark_store->get($iter, 0);
+ my $path = $bookmark_store->get($iter, 1);
+ print {$fh} "$name\t$path\n";
+ $iter = $bookmark_store->iter_next($iter);
+ }
+ }
+ else {
+ warn "Unable to save settings: $!\n";
+ }
+ }
+ }
+
+ sub load_settings {
+ if (defined $settings_file) {
+ if (open my $fh, "<", $settings_file) {
+ while (<$fh>) {
+ if (/main=(\d+)x(\d+)\+(\d+)x(\d+)/) {
+ my ($x, $y, $w, $h) = ($1, $2, $3, $4);
+ $window->move($x, $y);
+ $window->resize($w, $h);
+ }
+ elsif (/^([^\t]*)\t(.*)$/) {
+ my $name = $1;
+ my $subkey_path = $2;
+ create_bookmark_menuitem($name, $subkey_path);
+ }
+ }
+ }
+ else {
+ warn "Unable to load settings: $!\n";
+ }
+ }
+ }
+
+ sub dump_settings {
+ print "Dumping settings:\n";
+ my ($x, $y) = $window->get_position;
+ my ($width, $height) = $window->get_size;
+ print "window at $x x $y for $width x $height\n";
+
+ my $hpos = $hpaned->get_position;
+ print "hsplit at $hpos\n";
+
+ my $vpos = $vpaned->get_position;
+ print "vsplit at $vpos\n";
+
+ my ($bx, $by) = $bookmarks_dialog->get_position;
+ my ($bw, $bh) = $bookmarks_dialog->get_size;
+ print "bookmarks_dialog at $bx x $by for $bw x $bh\n";
+ save_settings();
+ }
+
+ sub dump_loaded_keys {
+ print "Dumping loaded keys:\n";
+ $tree_store->foreach(sub {
+ my ($model, $path, $iter) = @_;
+
+ my $key = $model->get($iter, 3);
+ if (defined $key) {
+ print $key->get_path, "\n";
+ }
+ return FALSE;
+ });
+ }
+
+ sub dump_bookmarks {
+ print "Dumping bookmarks:\n";
+ my $root_iter = $tree_store->get_iter_first;
+ if (!defined $root_iter) {
+ print "(no registry file loaded)\n";
+ return;
+ }
+ my $root_key = $tree_store->get($root_iter, 3);
+ my $iter = $bookmark_store->get_iter_first;
+ while (defined $iter) {
+ my $name = $bookmark_store->get($iter, 0);
+ my $path = $bookmark_store->get($iter, 1);
+
+ if (my $key = $root_key->get_subkey($path)) {
+ print $key->get_path, "\n";
+ }
+ $iter = $bookmark_store->iter_next($iter);
+ }
}
+
+__END__
+
+=head1 NAME
+
+regview - GTK2 Registry Viewer for the Parse::Win32Registry module
+
+=head1 SYNOPSIS
+
+regview [-d] <filename>
+
+=over 4
+
+=item -d or --debuga
+
+enable debugging mode
+
+=back
+
+=head1 SEE ALSO
+
+L<Parse::Win32Registry>
+
+=cut
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libsendmail-milter-perl.git
More information about the Pkg-perl-cvs-commits
mailing list