GET https://example.org/example.png
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use strict; use warnings; use 5.010; use LWP::UserAgent; my $request_uri = ''; my $ua = LWP::UserAgent->new; $ua->protocols_allowed( [ 'http', 'https' ] ); $ua->ssl_opts( verify_hostnames => 1 ); $ua->add_handler( "request_send", sub { shift->dump; return } ); $ua->add_handler( "response_done", sub { shift->dump; return } ); $ua->agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.106 Safari/537.36"); $ua->proxy(['http', 'https'], 'http://localhost:8001/'); $request_uri = 'https://example.org/'; my $response = $ua->get($request_uri); print $response->decoded_content;
2020-09-16T15:54:46 GwenDragonIst es so, dass TOR Proxy socks nutzt?
GwenDragonLass mal ausgeben was gesendet+empfangen wird.
$ua->add_handler( "request_send", sub { shift->dump; return } );
1 2 3 4 5 6 7 8
my $req_buf = $socket->format_request($method, $fullpath, @h); print "------\n$req_buf\n------\n"; if (!$has_content || $write_wait || $has_content > 8*1024) { WRITE: { # Since this just writes out the header block it should almost # always succeed to send the whole buffer in a single write call. my $n = $socket->syswrite($req_buf, length($req_buf));
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
GET /example.png HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: keep-alive, TE, close
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.5
Host: example.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
Upgrade-Insecure-Requests: 1
HTTP/1.1 403 Forbidden
Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Wed, 16 Sep 2020 17:11:24 GMT
Server: cloudflare
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Expires: Thu, 01 Jan 1970 00:00:01 GMT
CF-Chl-Bypass: 1
CF-RAY: 5d3c34da4e5edfad-FRA
Cf-Request-Id: 05397f5c6f0000dfad78ada200000001
Client-Date: Wed, 16 Sep 2020 17:11:21 GMT
Client-Peer: 127.0.0.1:9150
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=Cloudflare, Inc./CN=Cloudflare Inc ECC CA-3
Client-SSL-Cert-Subject: /C=US/ST=CA/L=San Francisco/O=Cloudflare, Inc./CN=sni.cloudflaressl.com
Client-SSL-Cipher: TLS_AES_256_GCM_SHA384
Client-SSL-Socket-Class: IO::Socket::SSL
Client-SSL-Warning: Peer certificate not verified
Client-Transfer-Encoding: chunked
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Set-Cookie: __cfduid=da0509213e9332061eeceee8eeaa086ef1600276284; expires=Fri, 16-Oct-20 17:11:24 GMT; path=/; domain=.example.org; HttpOnly; SameSite=Lax
X-Frame-Options: SAMEORIGIN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; use LWP::Protocol::socks; my $line = '='x80 . "\n"; my $ua = LWP::UserAgent->new(ssl_opts => {verify_hostname => 1}); $ua->timeout(60); $ua->proxy(['http','https'],'socks://127.0.0.1:9150/'); $ua->default_header('User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0'); $ua->default_header('Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'); $ua->default_header('Accept-Encoding' => 'gzip, deflate'); $ua->default_header('Accept-Language' => 'en-US,en;q=0.5'); $ua->default_header('Connection' => 'keep-alive'); $ua->default_header('Upgrade-Insecure-Requests' => '1'); $ua->default_header('Cache-Control' => 'no-cache'); $ua->default_header('Pragma' => 'no-cache'); $ua->add_handler( "request_send", sub {print $line;shift->dump; return } ); $ua->add_handler( "response_done", sub {print $line;shift->dump; return } ); my $response = $ua->get('https://www.cloudflare.com'); $response->{_content} = $response->decoded_content; print $line; print $response->{_request}->as_string,"\n\n"; print $line; print $response->as_string,"\n\n";
Guest whatever_u_wantHört sich nach einer entdeckten Lücke/Bug an, die du nicht preisgeben darfst. OK, verständlich.(…) die schlechte Nachricht ist, dass ich nicht öffentlich darüber reden kann als Teil eines Gentlemen-Agreements.