LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-23-2003, 07:25 AM   #1
joesbox
Member
 
Registered: Feb 2003
Location: hampton va
Distribution: ubuntu
Posts: 502

Rep: Reputation: 30
proxy authentication


first the script then the problem:

foreach $tropical (@tropical) {
print "$tropical\n";
$name =$tropical;
#print "$name\n";
$name =~ s/$baseurl\///;
print "$name\n";
$hdrs = new HTTP::Headers(Accept => 'image/gif', User-Agent => 'Mozilla/4.0 compatible MSIE 5.5 Windows NT4.0');
$ua = new LWP::UserAgent;
# PROXY SUPPORT
$ENV{HTTPS_PROXY} = '***.***.***.***:8080';
$url = new URI::URL("$tropical");
$hdrs = new HTTP::Headers(Accept => 'image/gif', User-Agent => 'Mozilla/4.0compatible MSIE 5.5 Windows NT4.0');
$req = new HTTP::Request(GET, $url, $hdrs);
$res = $ua->request($req, "/var/www/html/afwamodels/tropical/$name");
$resp = $ua->request($req);
if ($resp->is_success) {
print "$res\n";
print "got file\n";
}else {
print $resp->message;print " no way\n";
}
}

now i am behind a proxy and i have checked with lan support and it is the correct ip (not shown cause net-security would have a fit). now what this does is goes out the a website and retrieves images. then brings them back for sorting. i run the script in the terminal and i get something about

"proxy connect failed" bla bla bla "Proxy Authentication Required....Unable to complete request:.....Access denied due to authentication failure".

does anyone know if there is a way to auto input my username and password into this so that i can avoid this crap? i will obviously use a seperate file that will only be aloud to be seen my me and this script but i need something. boss is going to be upset and i don't want to hear it.
 
Old 02-23-2003, 10:13 AM   #2
joesbox
Member
 
Registered: Feb 2003
Location: hampton va
Distribution: ubuntu
Posts: 502

Original Poster
Rep: Reputation: 30
found the fix. lan support was wrong again. they had changed the ip on me of the proxy and didn't tell. after a ping i got it fixed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid proxy authentication gubak Linux - Networking 2 11-16-2005 03:34 AM
pacman and proxy authentication jsmarshall85 Arch 1 07-08-2005 02:00 PM
Authentication - proxy: swaret N_A_J_M Slackware 1 09-26-2004 10:55 PM
able to ping proxy but no authentication rvijay17 Linux - Networking 4 06-17-2004 08:05 AM
Linux Proxy Authentication macaddict Linux - Networking 0 09-01-2003 06:37 PM


All times are GMT -5. The time now is 03:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration