From 3db4d1b4a4e03217711faad8293ab1b5d2e6bde4 Mon Sep 17 00:00:00 2001 From: Immortal Date: Wed, 6 Mar 2024 11:31:46 +0330 Subject: [PATCH] fix: scan in port 80 --- src/hooks/useIPScanner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useIPScanner.ts b/src/hooks/useIPScanner.ts index da7813d..3dfadb5 100644 --- a/src/hooks/useIPScanner.ts +++ b/src/hooks/useIPScanner.ts @@ -170,7 +170,7 @@ export const useIPScanner = ({ allIps }: IPScannerProps) => { async function testIPs(ipList: string[]) { let isSSL = false; - if (ports.https.includes(state.portValue)) { + if (state.sniValue !== '' && ports.https.includes(state.portValue)) { isSSL = true; } for (const ip of ipList) { @@ -178,7 +178,7 @@ export const useIPScanner = ({ allIps }: IPScannerProps) => { let url = `http://${ip}:${state.portValue}`; let path = `/cdn-cgi/trace`; - if (state.sniValue !== '' && isSSL ) { + if ( isSSL ) { url = `https://${ip}:${state.portValue}`; path = `/__down`; }