Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6127429

Browse files
Fixed the security loophole in google result crawling
1 parent 707c3a8 commit 6127429

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

‎web_programming/web_crawling/crawl_google_results_lwp.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ sub main {
4949
my $search_text = "Perl";
5050
my $url = "https://www.google.com/search?q=" . $search_text;
5151

52-
my $ua = LWP::UserAgent->new(ssl_opts=> {verify_hostname=> 0});
52+
my $ua = LWP::UserAgent->new();
5353
$ua->show_progress(1);
5454

5555
$ua->agent('Mozilla/5.0');

‎web_programming/web_crawling/crawl_google_results_mojo.pl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ sub main {
4343
my $ua = Mojo::UserAgent->new;
4444

4545
$ua->transactor->name('Mozilla/5.0');
46-
$ua->insecure(1);
4746

4847
crawl_results ($ua, $url);
4948
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /