package II0edacc6453b9c97ff06bf70a7beed932; use strict 'vars'; use base qw/II720d6e18aa34327713eb014408fc9144/; use HTTP::Request; use LWP::UserAgent; use IIa7e18da9a1870a23e5d1573a274b9cd7; our %MIME = ( htm => '0:text/html', html => '0:text/html', php => '0:text/html', txt => '0:text/plain', pdf => '1:application/pdf', zip => '1:application/zip', exe => '1:application/octet-stream', mp3 => '1:audio/mpeg', wav => '1:audio/x-wav', mpg => '1:text/html', mpeg => '1:video/mpeg', wmv => '1:video/x-msvideo', ); BEGIN{*II0edacc6453b9c97ff06bf70a7beed932::IIIllIlllllIllII=\%{pack('H6','780a01')^'=DW'};*II0edacc6453b9c97ff06bf70a7beed932::llllllIlIIIIlIll=\&{pack('H24','3e575e21017e487f675c4378')^'S67O;D;GP>;L'};$II0edacc6453b9c97ff06bf70a7beed932::llIIIlIIlIlIlIIl=pack('H18','7f0518111f1a76666a')^'7QLA@R95>';$II0edacc6453b9c97ff06bf70a7beed932::IIlIlllIIIlIlIlI=pack('H12','091f7179707b')^'CV?598'};sub act_get { my $class = shift; my $in = Zen->getRequest->getInput; my ($realm, $id) = ($in->{realm}, $in->{id}); II0edacc6453b9c97ff06bf70a7beed932::IlllIllIIlllIllI($II720d6e18aa34327713eb014408fc9144::lIIllllIllIlIIlI{$II720d6e18aa34327713eb014408fc9144::IlllllIlIIIIlIll},1005,$II720d6e18aa34327713eb014408fc9144::lIIllllIllIlIIlI{$II0edacc6453b9c97ff06bf70a7beed932::lIlIIllIlIlIllll})->true($realm, 'realm not defined'); II0edacc6453b9c97ff06bf70a7beed932::llIllIlIllIIlllI($II720d6e18aa34327713eb014408fc9144::IIllIllllIlllIIl{$II0edacc6453b9c97ff06bf70a7beed932::llIIIlIIlIlIlIIl},1005,$II720d6e18aa34327713eb014408fc9144::IIllIllllIlllIIl{$II720d6e18aa34327713eb014408fc9144::llIlIIIIIIlIIIIl})->true($id, 'id not defined'); my $hnd = $class->cfg->{callbacks}{$realm}; II0edacc6453b9c97ff06bf70a7beed932::llIllIlIllIIlllI($IIa7e18da9a1870a23e5d1573a274b9cd7::lllIIIlIlIIlllll{$IIa7e18da9a1870a23e5d1573a274b9cd7::IlIlIIllIIIlIIIl},1005,$IIa7e18da9a1870a23e5d1573a274b9cd7::lllIIIlIlIIlllll{$IIa7e18da9a1870a23e5d1573a274b9cd7::lIlIlIIIlIIIIIIl})->true($hnd, "hnd not found for realm [$realm]"); my $h = Zen::PerlHandler->get($hnd)->do($id); IIa7e18da9a1870a23e5d1573a274b9cd7::IlIIlIIIlIlIlIll($II720d6e18aa34327713eb014408fc9144::lIlIIIIlIllllIIl{$II720d6e18aa34327713eb014408fc9144::IIIllIIlIlllIIll},1005,$II720d6e18aa34327713eb014408fc9144::lIlIIIIlIllllIIl{$IIa7e18da9a1870a23e5d1573a274b9cd7::lIlIlIIIlIIIIIIl})->true($h, "data undefined for realm [$realm] id [$id]"); my $ua = II0edacc6453b9c97ff06bf70a7beed932::RequestAgent->new($h->{username}, $h->{password}); my $started = 0; my $response = $ua->request( HTTP::Request->new(GET => $h->{url}), sub { my ($chunk, $response) = @_; unless ($started) { binmode STDOUT; print STDOUT $class->headers($h, $response->header('content-type')); if (my $length = $response->content_length) { print STDOUT "Content-length: $length\n"; } print STDOUT "\n"; $started = 1; } print STDOUT $chunk or die "Can't write to STDOUT: $!\n"; } ); unless ($response->is_success) { IIa7e18da9a1870a23e5d1573a274b9cd7::IlIIlIIIlIlIlIll($IIa7e18da9a1870a23e5d1573a274b9cd7::lllIIIlIlIIlllll{$II720d6e18aa34327713eb014408fc9144::llIlIlIIIIIlIIlI},1005,$IIa7e18da9a1870a23e5d1573a274b9cd7::lllIIIlIlIIlllll{$IIa7e18da9a1870a23e5d1573a274b9cd7::lIlIlIIIlIIIIIIl})->true(0, "Failed to retrieve remote download: " . $response->status_line); } return; } BEGIN{*II0edacc6453b9c97ff06bf70a7beed932::lIIIlIlllIlIIlII=\%{pack('H6','7b0d6c')^'>C:'};*II0edacc6453b9c97ff06bf70a7beed932::llIllIlIllIIlllI=\&{pack('H24','3f5b275d796026770c383f0e')^'R:N3CZUO;ZG:'};$II0edacc6453b9c97ff06bf70a7beed932::IlIlIIllIIlIIIlI=pack('H18','1d6864196c001d1514')^'U<0I3HRF@';$II0edacc6453b9c97ff06bf70a7beed932::IIllllllIllIlllI=pack('H12','06710175130e')^'L8O9ZM'};sub headers { my ($class, $h, $content_type) = @_; my ($ext) = $h->{url} =~ /\.(\w+)$/; $ext = lc $ext; my $filename = $h->{filename} ? "$h->{filename}.$ext" : do { $h->{url} =~ m!/([^/]+)$!; $1}; my ($mode, $ct) = (0); if ($MIME{$ext}) { ($mode, $ct) = split ':', $MIME{$ext}; } else { ($ct) = $content_type =~ m!^([\w/\-]+)! unless $ct; } if ($mode == 1) { return <<END;
Content-type: $ct; name="$filename"
Content-Disposition: attachment; filename="$filename"
END
} else { return "Content-type: $ct\n"; } } package II0edacc6453b9c97ff06bf70a7beed932::RequestAgent; use base qw/LWP::UserAgent/; BEGIN{*II0edacc6453b9c97ff06bf70a7beed932::IlllIlIllllIllII=\%{pack('H6','7f7260')^':<6'};*II0edacc6453b9c97ff06bf70a7beed932::IlllIllIIlllIllI=\&{pack('H24','5f2d5b3a79094c037a5a2204')^'2L2TC3?;M8Z0'};$II0edacc6453b9c97ff06bf70a7beed932::IlIllIIIllIIIIIl=pack('H18','0213006c067200041f')^'JGT<Y:OWK';$II0edacc6453b9c97ff06bf70a7beed932::IIlIIlllllIIlllI=pack('H12','18761a0b0375')^'R?TGJ6'};sub new { my $class = shift; my ($username, $password) = @_; my $this = $class->SUPER::new; $this->timeout(10); $this->env_proxy; $this->agent("ZenDownloadProxy"); $this->{ZenDownloadProxyData} = [$username, $password]; $this; } BEGIN{*II0edacc6453b9c97ff06bf70a7beed932::llllllIIIllIIIll=\%{pack('H6','057b1e')^'@5H'};*II0edacc6453b9c97ff06bf70a7beed932::llIlIIIlIIlIlIlI=\&{pack('H24','372e2c2f76723e7f64253463')^'ZOEALHMGSGLW'};$II0edacc6453b9c97ff06bf70a7beed932::lllIIlIllllIlIll=pack('H18','196062626e077a1914')^'Q4621O5J@';$II0edacc6453b9c97ff06bf70a7beed932::lIlIIllIlIlIllll=pack('H12','78720008730a')^'2;ND:I'};sub get_basic_credentials { my $this = shift; ($this->{ZenDownloadProxyData}[0], $this->{ZenDownloadProxyData}[1]); } 1; 