summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tool/irssi_cf_alturl.pl7
1 files changed, 5 insertions, 2 deletions
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;