K
Knight Stalker
Looking for a little help with postini and ezcommand in the postini system.
The code I have is working fine for verifing authentication, but I receive
different responses from a web browser as compared to what I receive with a
perl script.
script is as follows:
use LWP::UserAgent;
use PSTNCrossAuth;
$secret = 'secret';
$auth = new PSTNCrossAuth( $secret );
$user = '(e-mail address removed)';
$authString = $auth->authString( '(e-mail address removed)' );
$address = $auth->checkString( $authString, $secret );
# $authString =~ s/+/%2B/g;
print "AUTH STRING: $authString\n";
print "ADDRESS: $address\n";
my $ua=LWP::UserAgent->new;
$ua->timeout( 600 );
my $reqobj = $ua->post(
'https://xxxxxx.postini.com/exec/remotecmd?$auth=$authString&cmd=adduser $
user' );
if( ${$reqobj}{_msg} ne 'OK' )
{
print "\nerror posting data: ${$reqobj}{_msg}\n";
exit 1;
}
my $results = ${ $reqobj }{_content};
print $results;
exit 1;
has anyone used ezcommand with perl to update postini?
thanx,
The code I have is working fine for verifing authentication, but I receive
different responses from a web browser as compared to what I receive with a
perl script.
script is as follows:
use LWP::UserAgent;
use PSTNCrossAuth;
$secret = 'secret';
$auth = new PSTNCrossAuth( $secret );
$user = '(e-mail address removed)';
$authString = $auth->authString( '(e-mail address removed)' );
$address = $auth->checkString( $authString, $secret );
# $authString =~ s/+/%2B/g;
print "AUTH STRING: $authString\n";
print "ADDRESS: $address\n";
my $ua=LWP::UserAgent->new;
$ua->timeout( 600 );
my $reqobj = $ua->post(
'https://xxxxxx.postini.com/exec/remotecmd?$auth=$authString&cmd=adduser $
user' );
if( ${$reqobj}{_msg} ne 'OK' )
{
print "\nerror posting data: ${$reqobj}{_msg}\n";
exit 1;
}
my $results = ${ $reqobj }{_content};
print $results;
exit 1;
has anyone used ezcommand with perl to update postini?
thanx,