Ok, so here is the scoop. This is a continuation of what I have been working on that I asked about before. I am at stuck yet again. I found out that the authentication isn't working right in the perl script. Basically there is a call to an "expect script" that automates the user interaction to an already-working perl script and store it in an array. What this already-working perl script does is authenticates a user to a website and grabs information about their grade,classes,etc. Now the script I am working is supposed to store the result of this script and use those results for further processing. Maybe it is better that I show you all what it looks like:
Now the PERL looks like this:
my @paws_output = `/var/www/cgi-bin/addu/automate_paws.ept $student_id $pin_no \'$semester\'`;
The expect script looks like this:
#!/usr/bin/expect -f
spawn /var/www/cgi-bin/addu/paws/Fall2004/paws.pl
expect "Please enter your PAWS username:"
send "[lindex $argv 0]\r"
expect "Please enter your pin or password:"
send "[lindex $argv 1]\r"
expect "Which semester would you like (default Fall 2004)?"
send "[lindex $argv 2]\r"
expect eof
exit
When I try to look at what @paws_output is storing, all it shows is spawn /var/www/cgi-bin/addu/paws/Fall2004/paws.pl
I am faced with either rewriting the authentication or getting this stupid expect script to work. You guys have any suggestions? Thank you all very much in advance! 🙂 😀
Now the PERL looks like this:
my @paws_output = `/var/www/cgi-bin/addu/automate_paws.ept $student_id $pin_no \'$semester\'`;
The expect script looks like this:
#!/usr/bin/expect -f
spawn /var/www/cgi-bin/addu/paws/Fall2004/paws.pl
expect "Please enter your PAWS username:"
send "[lindex $argv 0]\r"
expect "Please enter your pin or password:"
send "[lindex $argv 1]\r"
expect "Which semester would you like (default Fall 2004)?"
send "[lindex $argv 2]\r"
expect eof
exit
When I try to look at what @paws_output is storing, all it shows is spawn /var/www/cgi-bin/addu/paws/Fall2004/paws.pl
I am faced with either rewriting the authentication or getting this stupid expect script to work. You guys have any suggestions? Thank you all very much in advance! 🙂 😀