From 195a4ac211d52a0ac02c35d1c48a6eb8f20a1ba0 Mon Sep 17 00:00:00 2001 From: unethical Date: Fri, 3 May 2019 09:47:03 +0000 Subject: Update 'tool/irssi_cf_alturl.pl' --- tool/irssi_cf_alturl.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tool') diff --git a/tool/irssi_cf_alturl.pl b/tool/irssi_cf_alturl.pl index 22264882..3ef2726e 100644 --- a/tool/irssi_cf_alturl.pl +++ b/tool/irssi_cf_alturl.pl @@ -84,12 +84,15 @@ sub mitmtest { my ( $server, $chan, $longurl ) = @_; my ($fqdn) = $longurl =~ m!(https?://[^:/]+)!; my ( $junk, $fqdn ) = split( /\/\//, $fqdn, 2 ); + my $scanned_url; +## FQDN is ok + if (length($fqdn) >= 4) { my $url = 'https://searxes.danwin1210.me/collab/open/ismitm.php?f=' . $fqdn; - deb("getting url:($url)"); my $browser = LWP::UserAgent->new; $browser->agent("cloudflare cflare_alt.pl"); my $response = $browser->get($url); - my $scanned_url = $response->content; + $scanned_url = $response->content; + } ## if the array[1] is true => it is MITM if ( $scanned_url == '[true,true]' ) { $scanned_url = 'https://web.archive.org/web/' . $longurl; -- cgit v1.2.3