/
usr
/
local
/
bin
/
/usr/local/bin
mkdir
upload
Name
Size
Mode
Actions
config_data
7138
0555
edit
dl
rm
crc32
1043
0555
edit
dl
rm
crontab
3320736
0755
edit
dl
rm
drush
6138646
0755
edit
dl
rm
drush.phar
6138646
0755
edit
dl
rm
ea-php72
5815400
0755
edit
dl
rm
ea-php73
5647288
0755
edit
dl
rm
ea-php74
6383296
0755
edit
dl
rm
ea-php80
7986080
0755
edit
dl
rm
ea-php81
8098952
0755
edit
dl
rm
ea_convert_php_ini
40811
0755
edit
dl
rm
ea_current_to_profile
11519
0755
edit
dl
rm
ea_install_profile
7274
0755
edit
dl
rm
ea_sync_user_phpini_settings
6888
0755
edit
dl
rm
htmltree
1173
0555
edit
dl
rm
instmodsh
4194
0555
edit
dl
rm
ipcount
3724
0555
edit
dl
rm
iptab
982
0555
edit
dl
rm
json_pp
3828
0555
edit
dl
rm
json_xs
7013
0555
edit
dl
rm
lsphp
937
0755
edit
dl
rm
lwp-download
8635
0555
edit
dl
rm
lwp-dump
2797
0555
edit
dl
rm
lwp-mirror
2478
0555
edit
dl
rm
lwp-request
15059
0555
edit
dl
rm
mech-dump
4623
0555
edit
dl
rm
passwd
3768664
0755
edit
dl
rm
pear
935
0755
edit
dl
rm
php
933
0755
edit
dl
rm
php-config
6384
0755
edit
dl
rm
prove
13457
0555
edit
dl
rm
ptar
3456
0555
edit
dl
rm
ptardiff
2535
0555
edit
dl
rm
ptargrep
4299
0555
edit
dl
rm
shasum
9287
0555
edit
dl
rm
tpage
8923
0555
edit
dl
rm
ttree
39234
0555
edit
dl
rm
wp
6928461
0755
edit
dl
rm
wp-cli.phar
6928461
0755
edit
dl
rm
zipdetails
48366
0555
edit
dl
rm
Edit:
/usr/local/bin/lwp-dump
(2797B)
#!/usr/bin/perl -w eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}' if 0; # not running under some shell use strict; use LWP::UserAgent (); use Getopt::Long qw(GetOptions); use Encode; use Encode::Locale; my $VERSION = "6.15"; GetOptions(\my %opt, 'parse-head', 'max-length=n', 'keep-client-headers', 'method=s', 'agent=s', 'request', ) || usage(); my $url = shift || usage(); @ARGV && usage(); sub usage { (my $progname = $0) =~ s,.*/,,; die <<"EOT"; Usage: $progname [options] <url> Recognized options are: --agent <str> --keep-client-headers --max-length <n> --method <str> --parse-head --request EOT } my $ua = LWP::UserAgent->new( parse_head => $opt{'parse-head'} || 0, keep_alive => 1, env_proxy => 1, agent => $opt{agent} || "lwp-dump/$VERSION ", ); my $req = HTTP::Request->new($opt{method} || 'GET' => decode(locale => $url)); my $res = $ua->simple_request($req); $res->remove_header(grep /^Client-/, $res->header_field_names) unless $opt{'keep-client-headers'} or ($res->header("Client-Warning") || "") eq "Internal response"; if ($opt{request}) { $res->request->dump; print "\n"; } $res->dump(maxlength => $opt{'max-length'}); __END__ =head1 NAME lwp-dump - See what headers and content is returned for a URL =head1 SYNOPSIS B<lwp-dump> [ I<options> ] I<URL> =head1 DESCRIPTION The B<lwp-dump> program will get the resource identified by the URL and then dump the response object to STDOUT. This will display the headers returned and the initial part of the content, escaped so that it's safe to display even binary content. The escapes syntax used is the same as for Perl's double quoted strings. If there is no content the string "(no content)" is shown in its place. The following options are recognized: =over =item B<--agent> I<str> Override the user agent string passed to the server. =item B<--keep-client-headers> LWP internally generate various C<Client-*> headers that are stripped by B<lwp-dump> in order to show the headers exactly as the server provided them. This option will suppress this. =item B<--max-length> I<n> How much of the content to show. The default is 512. Set this to 0 for unlimited. If the content is longer then the string is chopped at the limit and the string "...\n(### more bytes not shown)" appended. =item B<--method> I<str> Use the given method for the request instead of the default "GET". =item B<--parse-head> By default B<lwp-dump> will not try to initialize headers by looking at the head section of HTML documents. This option enables this. This corresponds to L<LWP::UserAgent/"parse_head">. =item B<--request> Also dump the request sent. =back =head1 SEE ALSO L<lwp-request>, L<LWP>, L<HTTP::Message/"dump">
Save
cmd:
run