fix(ids): escape ; on query string

This commit is contained in:
MDLeom 2025-03-22 11:00:33 +00:00
parent f748baa472
commit de74a0b373
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ for await (const line of urls.readLines()) {
const url = new URL(`http://${line}`)
const { hostname, pathname, search } = url
const pathEscape = pathname.replaceAll(';', '\\;') + search
const pathEscape = `${pathname}${search}`.replaceAll(';', '\\;')
const path = pathname + search
snort2.write(`alert tcp $HOME_NET any -> $EXTERNAL_NET [80,443] (msg:"phishing-filter phishing website detected"; flow:established,from_client; content:"GET"; http_method; content:"${pathEscape.substring(0, 2048)}"; http_uri; nocase; content:"${hostname}"; content:"Host"; http_header; classtype:attempted-recon; sid:${sid}; rev:1;)\n`)