| « playing with glibc-2.5-r3, kernel 2.6.21 and AT_ENTROPY | sleepy golden eyes » |
advanced perl h4x0r!ng with agaffney :)
big ups to the man
here we go ![]()
y %MODES;
${MODES}{"op001"}{function} = \&startChroot;
${MODES}{"op001"}{data} = \$start;
${MODES}{"op002"}{function} = \&stopChroot;
${MODES}{"op002"}{data} = \$stop;
${MODES}{"op003"}{function} = \&resetChroot;
${MODES}{"op003"}{data} = \$reset;
${MODES}{"op004"}{function} = \&deleteChroot;
${MODES}{"op004"}{data} = \$delete;
## side effect: commandline arguments are reordered
## alphabetically before they are processed
for(sort(keys(%MODES))) {
my $mode = $_;
if (defined(${ ${MODES}{$mode}{data} }) && ${ ${MODES}{$mode}{data} } ne "") {
my @CHROOTS = split(",", ${ ${MODES}{$mode}{data} });
for (@CHROOTS) {
my $name = $_;
if ($name =~ /all/) {
foreach my $user (keys(%CHROOT)) {
foreach my $chrootname (keys( %{ ${CHROOT}{$user} } )) {
&{ ${MODES}{$mode}{function} }($user, $chrootname) or die "operation failed for $user:$chrootname";
}
}
} else {
foreach my $chrootname (keys( %{ ${CHROOT}{$name} } )) {
&{ ${MODES}{$mode}{function} }($name, $chrootname) or die "operation failed for $name:$chrootname";
} } } } }
this is the new building block for devel-chroots 2.1.0
xml based config file
improved chroot management utility (devel-chroots --start --stop --reset --delete)
I will code it up the rest of this week, as always have fun and enjoy,
Alex
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 1 feedback awaiting moderation...