package II8a70bfa3659ddec2131075017eed7b83; use strict 'vars'; use base qw/II720d6e18aa34327713eb014408fc9144/; use HTTP::Cookies; use HTTP::Headers; use HTTP::Request; use LWP::UserAgent; use IIe27820f4c94bc1b5d7f300a1ecc438c8; use IIe6eb818eb92d015e9a5b4a899a8ab60f; BEGIN{*II8a70bfa3659ddec2131075017eed7b83::IllIIlIIIllllIII=\%{pack('H6','7c7c60')^'926'};*II8a70bfa3659ddec2131075017eed7b83::IIIIIIIIIlIIIIll=\&{pack('H24','5535285e0d7b3a69675d3373')^'8TA07AIQP?KG'};$II8a70bfa3659ddec2131075017eed7b83::lllIlIIIIllIIIlI=pack('H18','7d676e6f10780e146c')^'53:?O0AG8';$II8a70bfa3659ddec2131075017eed7b83::IIllIIllllIllIII=pack('H12','75010f720809')^'?HA>AJ'};sub act_upgrade { my $class = shift; my $request = Zen->getRequest; my $in = $request->getInput; my $si = IIe27820f4c94bc1b5d7f300a1ecc438c8::IlIIlIIIlIIIlIIl($II720d6e18aa34327713eb014408fc9144::lIIllIIIlIlIlIIl{$II720d6e18aa34327713eb014408fc9144::IlllllIlIIIIlIll},78,$II720d6e18aa34327713eb014408fc9144::lIIllIIIlIlIlIIl{$II8a70bfa3659ddec2131075017eed7b83::IIllIIllllIllIII})->getOrEmpty($in->{si_id}) or die "SI [$in->{si_id}] not found"; my $finish = sub { my @msg = @_; $request->printHeader('text/plain'); print $class->message(@msg); $request->finish; }; my $version_tag = $si->getVersions->[0] or &$finish('upgradesatellite.error_connection'); &$finish('upgradesatellite.error_not_supported') if II720d6e18aa34327713eb014408fc9144::IIllIllIIlIIIlll($IIe6eb818eb92d015e9a5b4a899a8ab60f::lllIIlIlllIIlllI{$II720d6e18aa34327713eb014408fc9144::IllIIlIIIIllllII},15,$IIe6eb818eb92d015e9a5b4a899a8ab60f::lllIIlIlllIIlllI{$IIe27820f4c94bc1b5d7f300a1ecc438c8::lIIllllIllIIlIIl})->compareVersionTags($version_tag, 'jin-3-35') < 0; my $ua = LWP::UserAgent->new; $ua->timeout(20); $ua->env_proxy; my $cookie_jar = HTTP::Cookies->new; my $ua = LWP::UserAgent->new; $ua->cookie_jar($cookie_jar); $ua->timeout(60); my $login_url = "$si->{url}/action/Jin/User/Web/login.txt"; my $request_content = IIe27820f4c94bc1b5d7f300a1ecc438c8::IIllIlIIlIlIlIlI($IIe6eb818eb92d015e9a5b4a899a8ab60f::IlIIIIIIlIllIllI{$II8a70bfa3659ddec2131075017eed7b83::lllIlIIIIllIIIlI},995,$IIe6eb818eb92d015e9a5b4a899a8ab60f::IlIIIIIIlIllIllI{$IIe27820f4c94bc1b5d7f300a1ecc438c8::IllIIlllllllIIlI})->URLPack({ realm => 'Jin', login => $si->{admin_email}, passwd => $si->{admin_passwd}, }); my $headers = HTTP::Headers->new; $headers->header('Content-Length' => length($request_content)); $headers->header('Content-Type' => 'application/x-www-form-urlencoded'); my $request = HTTP::Request->new('POST', $login_url, $headers, $request_content); my $response = $ua->request($request); &$finish('upgradesatellite.error_login', $response->status_line) unless $response->is_success; my $response_content = $response->content; &$finish('upgradesatellite.error_login', $1) if $response_content =~ /^ERROR:\s+(.+)/; &$finish('upgradesatellite.error_login', $response_content) unless $response_content =~ /^OK/; $ua->timeout(300); my $upgrade_url = "$si->{url}/help/checkversion.html?do_auto_upgrade=1&remote_mode=1"; $request = HTTP::Request->new('GET', $upgrade_url); $response = $ua->request($request); &$finish('upgradesatellite.error_upgrade', $response->status_line) unless $response->is_success; $response_content = $response->content; &$finish('upgradesatellite.error_upgrade', $response_content) unless $response_content =~ /^OK/; delete $si->{cached_versions}; &$finish('upgradesatellite.done', $si->getVersions->[1]); return; } 1; 