throbber
#!/usr/local/bin/sybperl5
`#-T
`# -w
`# $Header: /usr/local/cvsroot/webley/agents/www/webget.pl,v 1.9
`1999/12/13 22:54:20 zhukoff Exp $
`# Agent to get info from the web.
`# Parameters: service_name [service_parameters], i.e. stock msft
`or weather 60645
`# Configuration stored in files service_name.ini
`# if this file is absent the configuration is received from
`mcServices table
`# This script provides autoupdate to datatable if the .ini file
`is newer.
`use URI::URL;
`use LWP::UserAgent;
`use HTTP::Request::Common;
`use Vail::VarList;
`use Sybase::CTlib;
`use HTTP::Cookies;
`#print "Sybase::CTlib $DB_USR, $DB_PWD, $DB_SRV;";
`open( STDERR, ">>$0.log" );
`$log = `date`;
`chop( $log );
`$debug2 = 0;
`my $service = shift;
`$log .= " $service: ". join( ':', @ARGV ) . "\n";
`print STDERR $log;
`my @ini = &read_ini( $service );
`chop( @ini );
`my $section = "";
`do { $section = &process_section( $section ) } while $section;
`exit;
`#######################################################
`sub read_ini {
`my ( $service ) = @_;
`my @ini = ();
`# first, try to read file
`$0 =~ m|^(.*/)[^/]*|;
`$service = $1 . $service;
`if ( open( INI, "$service.ini" ) ) {
`@ini = ( <INI> );
`return @ini unless ( $DB_SRV );
`# update datatable
`my $file_time = time - int( ( -M "$service.ini" ) * 24
`print "time $file_time\n";
`my $dbh = new Sybase::CTlib $DB_USR, $DB_PWD, $DB_SRV;
`unless ( $dbh ) {
`print STDERR "webget.pl: Cannot connect to
`
`* 3600 );
`#
`
`1
`
`Parus Exhibit 2032
`Google, et al. v. Parus Holdings, Inc.
`IPR2020-00846
`Page 1 of 5
`
`

`

`dataserver $DB_SRV:$DB_USR:$DB_PWD\n";
`return @ini;
`y @row_refs = $dbh->ct_sql( "select lastUpdate from
`mcServices where service = '$service'", undef, 1 );
`if ( $dbh->{ RC } == CS_FAIL ) {
`print STDERR "webget.pl: DB select from
`mcServices failed\n";
`return @ini;
`nless ( defined @row_refs ) {
`# have to insert
`my ( @ini_escaped ) = map {
`( my $x = $_ ) =~ s/\'/\'\'/g;
`$x;
`} @ini;
`$dbh->ct_sql( "insert mcServices
`values( '$service', '@ini_escaped', $file_time )" );
`if ( $dbh->{ RC } == CS_FAIL ) {
`print STDERR "webget.pl: DB insert to
`mcServices failed\n";
`eturn @ini;
`}
`#
`print "time $file_time:".$row_refs[ 0 ]->
`{ 'lastUpdate' }."\n";
`if ( $file_time > $row_refs[ 0 ]->{ 'lastUpdate' } ) {
`# have to update
`my ( @ini_escaped ) = map {
`( my $x = $_ ) =~ s/\'/\'\'/g;
`$x;
`} @ini;
`$dbh->ct_sql( "update mcServices set config =
`'@ini_escaped', lastUpdate = $file_time where service =
`'$service'" );
`if ( $dbh->{ RC } == CS_FAIL ) {
`print STDERR "webget.pl: DB update to
`mcServices failed\n";
`}
`eturn @ini;
`
`}m
`
`}u
`
`}r
`
`}r
`
`}e
`
``pwd`
`
`lse {
`print STDERR "$0: WARNING: $service.ini n/a in " .
`. "Try to read DB\n";
` then try to read datatable
`die "webget.pl: Unable to find service $service\n" unless
`( $DB_SRV );
`my $dbh = new Sybase::CTlib $DB_USR, $DB_PWD, $DB_SRV;
`die "webget.pl: Cannot connect to dataserver $DB_SRV:
`
`}#
`
`2
`
`Parus Exhibit 2032, Page 2 of 5
`
`

`

`$DB_USR:$DB_PWD\n" unless ( $dbh );
`my @row_refs = $dbh->ct_sql( "select config from mcServices
`where service = '$service'", undef, 1 );
`die "webget.pl: DB select from mcServices failed\n" if
`$dbh->{ RC } == CS_FAIL;
`die "webget.pl: Unable to find service $service\n" unless
`( defined @row_refs );
`$row_refs[ 0 ]->{ 'config' } =~ s/\n /\n\r/g;
`@ini = split( /\r/, $row_refs[ 0 ]->{ 'config' } );
`return @ini;
`######################################################
`sub process_section {
`my ( $prev_section ) = @_;
`my ( $section, $output, $content );
`my %Param;
`my %Content;
`print"################################\n";
`foreach ( @ini ) {
`print;
`chop;
`s/\s+$//;
`s/^\s+//;
`# get section name
`if ( /^\[(.*)\]/ ) {
`print "$_: $section:$prev_section\n";
`last if $section;
`next if $1 eq "print";
`next if $prev_section ne "" and $prev_section ne
`if ( $prev_section eq $1 ) {
`$prev_section = "";
`next;
`section = $1;
` get parameters
`push( @{ $Param{ $1 } }, $2 ) if $section and
`/([^=]+)=(.*)/;
`}
`#
`print"++++++++++++++++++++++++++++++++++\n";
`return 0 unless $section;
`#
`print "section $section\n";
`# substitute parameters with values
`map { $Param{ URL }->[ 0 ] =~ s/$Param{ Input }->[ $_ ]/
`$ARGV[ $_ ]/g
`} 0 .. $#{ $Param{ Input } };
`# get page content
`( $Content{ 'TIME' }, $content ) =
`&get_url_content( ${ $Param{ URL } }[ 0 ] );
`
`#
`$1;
`
`}#
`
`#
`#
`#
`
`#
`
`3
`
`}$
`
`}#
`
`Parus Exhibit 2032, Page 3 of 5
`
`

`

`# filter it
`map {
`if ( /\"([^\"]+)\"([^\"]*)\"/ or /\/([^\/]+)\/([^
`\/]*)\// ) {
`my $out = $2; $content =~ s/$1/$out/g;
`}
`} @{ $Param{ "Pre-filter" } };
`# do main regular expression
`unless( @values = $content =~ /
`${ $Param{ Regular_expression } }[ 0 ]/ ) {
`&die_hard( ${ $Param{ Regular_expression } }[ 0 ],
`$content );
`return $section;
`
`} %
`
`Content = map { ( $Param{ Output }->[ $_ ], $values[ $_ ] )
`} 0 .. $#{ $Param{ Output } };
`# filter it
`map {
`if ( /([^\"]+)\"([^\"]+)\"([^\"]*)\"/
`or /([^\/]+)\/([^\/]+)\/([^\/]*)\// ) {
`my $out = $3;
`$Content{ $1 } =~ s/$2/$out/g;
`}
`} @{ $Param{ "Post-filter" } };
`# calculate it
`map {
`if ( /([^=]+)=(.*)/ ) {
`my $eval = $2;
`map { $eval =~ s/$_/$Content{ $_ }/g
`} keys %Content;
` $Content{ $1 } = eval( $eval );
`}
`} @{ $Param{ Calculate } };
`# read section [print]
` foreach $i ( 0 .. $#ini ) {
`next unless $ini[ $i ] =~ /^\[print\]/;
`foreach ( $i + 1 .. $#ini ) {
` last if $ini[ $_ ] =~ /^\[.+\]/;
` $output .= $ini[ $_ ] . "\n";
`ast;
`
`}l
`
`} #
`
` prepare output
`map { $output =~ s/$_/$Content{ $_ }/g
`} keys %Content;
`
`4
`
`Parus Exhibit 2032, Page 4 of 5
`
`

`

`print $output;
`return 0;
`######################################################
`sub get_url_content {
`my ( $url ) = @_;
`my $ua = LWP::UserAgent->new;
`$ua->agent( 'Mozilla/4.0 [en] (X11; I; FreeBSD 2.2.8-STABLE
`i386)' );
`$ua->proxy( ['http', 'https'],
`'http://proxy.webley:3128/' );
`$ua->no_proxy( 'webley', 'vail' );
`my $cookie = HTTP::Cookies->new;
`$ua->cookie_jar( $cookie );
`$url = url $url;
`print "$url\n" if $debug2;
`my $time = time;
`my $res = $ua->request( GET $url );
`print "Response: " . ( time - $time ) . "sec\n" if $debug2;
`return( $time - time, $res->content );
`######################################################
`sub die_hard {
`my( $re, $content ) = @_;
`my ( $re_end, $pattern );
`while( $content !~ /$re/ ) {
`if ( $re =~ s/(\([^\(\)]+\)[^\(\)]*$)// ) {
`$re_end = $1 . $re_end;
`lse {
`$re_end = $re;
`last;
`
`}e
`
`}#
`
`}#
`
`}
`content =~ /$re/;
`print STDERR "The regular expression did not match:\n
`$re\n
`Possible misuse:
`$re_end:\n
`Matched:
`$&\n
`Mismatched:
`$'\n
`";
` print STDERR "Content:\n $content\n" unless $';
`######################################################
`
`}$
`
`}#
`
`5
`
`Parus Exhibit 2032, Page 5 of 5
`
`

This document is available on Docket Alarm but you must sign up to view it.


Or .

Accessing this document will incur an additional charge of $.

After purchase, you can access this document again without charge.

Accept $ Charge
throbber

Still Working On It

This document is taking longer than usual to download. This can happen if we need to contact the court directly to obtain the document and their servers are running slowly.

Give it another minute or two to complete, and then try the refresh button.

throbber

A few More Minutes ... Still Working

It can take up to 5 minutes for us to download a document if the court servers are running slowly.

Thank you for your continued patience.

This document could not be displayed.

We could not find this document within its docket. Please go back to the docket page and check the link. If that does not work, go back to the docket and refresh it to pull the newest information.

Your account does not support viewing this document.

You need a Paid Account to view this document. Click here to change your account type.

Your account does not support viewing this document.

Set your membership status to view this document.

With a Docket Alarm membership, you'll get a whole lot more, including:

  • Up-to-date information for this case.
  • Email alerts whenever there is an update.
  • Full text search for other cases.
  • Get email alerts whenever a new case matches your search.

Become a Member

One Moment Please

The filing “” is large (MB) and is being downloaded.

Please refresh this page in a few minutes to see if the filing has been downloaded. The filing will also be emailed to you when the download completes.

Your document is on its way!

If you do not receive the document in five minutes, contact support at support@docketalarm.com.

Sealed Document

We are unable to display this document, it may be under a court ordered seal.

If you have proper credentials to access the file, you may proceed directly to the court's system using your government issued username and password.


Access Government Site

We are redirecting you
to a mobile optimized page.





Document Unreadable or Corrupt

Refresh this Document
Go to the Docket

We are unable to display this document.

Refresh this Document
Go to the Docket