I'm currently working on a script that uses curl's to check internet connectivity with and without a proxy being specified.
Basically what I'd like to achieve is having the script output fail or success according to the "method" used (direct or via proxy).
A very ugly way of doing it:
The script expects 2x arguments. The first one is the URL and the second one is the proxy address.
Whats a more dynamic way of writing that ugly if statement?
I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)
#!/bin/ksh
application task run command //returns 0 if successful
if ; then echo "Ran Fine"
else echo "Didnt run"
fi
When I run the script, here is the output
Status code = 0
ksh: [0: not found.
Job didnt run
any suggestions? (4 Replies)
Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max
But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Hi,
I would like to know if there's any option to use with the du command so that I can list only the files/directories on the current filesystem... I usually use
du -gs *But I'd like to see only the directories in the filesystem I am on, and not the mount point directory of other fss...
... (6 Replies)
Hello all,
I need to print all the lines before a specific string and print a custom message 2 lines after that.
So far I have managed to print everything up the string, inclusively, but I can't figure out how to print the 2 lines after that and the custom message.
My code thus far is:... (4 Replies)
Hey, all!
Why is the "human readable" flag changing the behavior of du? And while I'm at it, can you make du only look at files, not directories. I often find myself wanting to find the largest file(s) in a dir or vol. Using 'find' itself, it seems you have to at least be able to guess the size of... (2 Replies)
Hi
In one of the script I am seeing some thing like exit 7,exit 1,exit 2,exit 3,exit 9,exit6.What is the difference between all of this exit.Can anyone help here please (3 Replies)
After a bash function is run the below file is produced:
out_name.txt tab-delimeted
Input Errors and warnings AccNo Genesymbol Variant Reference Sequence Start Descr. Coding DNA Descr. Protein Descr. GeneSymbol Coding DNA Descr. GeneSymbol Protein Descr. Genomic... (3 Replies)
Hello :
I want to make a netfilter conntrack module for myself. So I copy all the source code about netfilter conntrack from kernel source tree to my external directory. It can be insmod after compiled. Then I add some members to the struct nf_conn, and it 's compiled successfully. However, it... (1 Reply)
Discussion started by: 915086731
1 Replies
LEARN ABOUT DEBIAN
net::proxy::connector::connect
Net::Proxy::Connector::connect(3pm) User Contributed Perl Documentation Net::Proxy::Connector::connect(3pm)NAME
Net::Proxy::Connector::connect - Create CONNECT tunnels through HTTP proxies
SYNOPSIS
# sample proxy using Net::Proxy::Connector::tcp
# and Net::Proxy::Connector::connect
use Net::Proxy;
# listen on localhost:6789
# and proxy to remotehost:9876 through proxy.company.com:8080
# using the given credentials
my $proxy = Net::Proxy->new(
in => { type => 'tcp', port => '6789' },
out => {
type => 'connect',
host => 'remotehost',
port => '9876',
proxy_host => 'proxy.company.com',
proxy_port => '8080',
proxy_user => 'jrandom',
proxy_pass => 's3kr3t',
proxy_agent => 'Mozilla/4.04 (X11; I; SunOS 5.4 sun4m)',
},
);
$proxy->register();
Net::Proxy->mainloop();
DESCRIPTION
"Net::Proxy::Connecter::connect" is a "Net::Proxy::Connector" that uses the HTTP CONNECT method to ask the proxy to create a tunnel to an
outside server.
Be aware that some proxies are set up to deny the creation of some outside tunnels (either to ports other than 443 or outside a specified
set of outside hosts).
This connector is only an "out" connector.
CONNECTOR OPTIONS
"Net::Proxy::Connector::connect" accepts the following options:
"out"
o host
The destination host.
o port
The destination port.
o proxy_host
The web proxy name or address.
o proxy_port
The web proxy port.
o proxy_user
The authentication username for the proxy.
o proxy_pass
The authentication password for the proxy.
o proxy_agent
The user-agent string to use when connecting to the proxy.
AUTHOR
Philippe 'BooK' Bruhat, "<book@cpan.org>".
BUGS
All the authentication schemes supported by "LWP::UserAgent" should be supported (we use an "LWP::UserAgent" internally to contact the
proxy).
This means we should also support NTLM, since it is supported as from "libwww-perl" 5.66. "Net::Proxy::Connector::connect" has not been
actually tested with NTLM, though. Any report of success or failure with a NTLM proxy will be appreciated.
HISTORY
This module is based on my script "connect-tunnel", that provided a command-line interface to create tunnels though HTTP proxies. It was
first published on CPAN on March 2003.
A better version of "connect-tunnel" (using "Net::Proxy") is provided this distribution.
COPYRIGHT
Copyright 2006 Philippe 'BooK' Bruhat, All Rights Reserved.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2009-10-18 Net::Proxy::Connector::connect(3pm)