function Flow_ClassifyNeweggTraffic (dpiMsg) local function isempty(s) return s == nil or s == '' end local app = GetString(dpiMsg, "internal", "application") if app == "http" then local location = GetString(dpiMsg, "http", "location") local headerRaw = GetString(dpiMsg, "http", "header_raw") if not isempty(location) then foundInLocation = string.find(location, "newegg", 1, true) end
if not isempty(headerRaw) then foundInHeader = string.find(headerRaw, "newegg", 1, true) end
if foundInLocation or foundInHeader then SetCustomApplication(dpiMsg, "newegg") end end end |