HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/doc/popularity-contest/examples/bin/gensections.pl
#! /usr/bin/perl -wT

my $mirrorbase = "/srv/mirrors/debian";
my $docurlbase = "";

$ENV{PATH}="/bin:/usr/bin";

for (glob("$mirrorbase/dists/stable/*/binary-*/Packages.xz"))
{
  /([^[:space:]]+)/ or die("incorrect package name");
  $file = $1;#Untaint
  open AVAIL, "-|:encoding(UTF-8)","xzcat $file";
  while(<AVAIL>)
  {
/^Package: (.+)/  and do {$p=$1;next;};
/^Section: (.+)/ or next;
          $section{$p}=$1;
  }
  close AVAIL;
}
@pkgs=sort keys %section;
for (@pkgs)
{
  print "$_ $section{$_}\n";
}